[libcxx-commits] [libcxx] 43c5e61 - [SystemZ][z/OS][libcxx]:Fix fopen64 undeclared error in 32 bit mode

Fanbo Meng via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jan 6 05:58:02 PST 2022


Author: Fanbo Meng
Date: 2022-01-06T08:57:56-05:00
New Revision: 43c5e61b555c3a7fe06d450a27e96ec4629397c3

URL: https://github.com/llvm/llvm-project/commit/43c5e61b555c3a7fe06d450a27e96ec4629397c3
DIFF: https://github.com/llvm/llvm-project/commit/43c5e61b555c3a7fe06d450a27e96ec4629397c3.diff

LOG: [SystemZ][z/OS][libcxx]:Fix fopen64 undeclared error in 32 bit mode

z/OS doesn't support fopen64() functions. Modify the preprocessor directive for z/OS to use fopen() instead.

Reviewed By: #libc, abhina.sreeskantharajan, muiez, ldionne

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

Added: 
    

Modified: 
    libcxx/test/support/filesystem_test_helper.h

Removed: 
    


################################################################################
diff  --git a/libcxx/test/support/filesystem_test_helper.h b/libcxx/test/support/filesystem_test_helper.h
index 44a01645dc49d..dc85a86fa3ed3 100644
--- a/libcxx/test/support/filesystem_test_helper.h
+++ b/libcxx/test/support/filesystem_test_helper.h
@@ -180,7 +180,7 @@ struct scoped_test_env
     // 2GB.
     std::string create_file(fs::path filename_path, uintmax_t size = 0) {
         std::string filename = filename_path.string();
-#if defined(__LP64__) || defined(_WIN32)
+#if defined(__LP64__) || defined(_WIN32) || defined(__MVS__)
         auto large_file_fopen = fopen;
         auto large_file_ftruncate = utils::ftruncate;
         using large_file_offset_t = off_t;


        


More information about the libcxx-commits mailing list