[libcxx-commits] [libcxx] 1b445ca - [SystemZ][z/OS] define REMOVE_ALL_USE_DIRECTORY_ITERATOR (libc++)

Muiez Ahmed via libcxx-commits libcxx-commits at lists.llvm.org
Fri Sep 16 07:23:44 PDT 2022


Author: Muiez Ahmed
Date: 2022-09-16T10:22:21-04:00
New Revision: 1b445cada51e247116ef934c3394bcc6f22589f7

URL: https://github.com/llvm/llvm-project/commit/1b445cada51e247116ef934c3394bcc6f22589f7
DIFF: https://github.com/llvm/llvm-project/commit/1b445cada51e247116ef934c3394bcc6f22589f7.diff

LOG: [SystemZ][z/OS] define REMOVE_ALL_USE_DIRECTORY_ITERATOR (libc++)

This patch fixes the z/OS build by using the first implementation of __remove_all since we don't have access to the openat() family of POSIX functions.

Differential Revision: https://reviews.llvm.org/D132948

Added: 
    

Modified: 
    libcxx/src/filesystem/operations.cpp

Removed: 
    


################################################################################
diff  --git a/libcxx/src/filesystem/operations.cpp b/libcxx/src/filesystem/operations.cpp
index 7467abb7c15d..61c643cb6e66 100644
--- a/libcxx/src/filesystem/operations.cpp
+++ b/libcxx/src/filesystem/operations.cpp
@@ -1348,7 +1348,7 @@ bool __remove(const path& p, error_code* ec) {
 //
 // The second implementation is used on platforms where `openat()` & friends are available,
 // and it threads file descriptors through recursive calls to avoid such race conditions.
-#if defined(_LIBCPP_WIN32API)
+#if defined(_LIBCPP_WIN32API) || defined (__MVS__)
 # define REMOVE_ALL_USE_DIRECTORY_ITERATOR
 #endif
 


        


More information about the libcxx-commits mailing list