[libcxx-commits] [PATCH] D97460: [libcxx] Use the allocating form of getcwd() on Glibc and Apple platforms

Martin Storsjö via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Feb 25 14:16:27 PST 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rGc7d46f221e82: [libcxx] Use the allocating form of getcwd() on Glibc and Apple platforms (authored by mstorsjo).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D97460/new/

https://reviews.llvm.org/D97460

Files:
  libcxx/src/filesystem/operations.cpp


Index: libcxx/src/filesystem/operations.cpp
===================================================================
--- libcxx/src/filesystem/operations.cpp
+++ libcxx/src/filesystem/operations.cpp
@@ -1095,7 +1095,7 @@
 path __current_path(error_code* ec) {
   ErrorHandler<path> err("current_path", ec);
 
-#if defined(_LIBCPP_WIN32API)
+#if defined(_LIBCPP_WIN32API) || defined(__GLIBC__) || defined(__APPLE__)
   // Common extension outside of POSIX getcwd() spec, without needing to
   // preallocate a buffer. Also supported by a number of other POSIX libcs.
   int size = 0;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97460.326501.patch
Type: text/x-patch
Size: 578 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210225/e2b242f4/attachment.bin>


More information about the libcxx-commits mailing list