[SystemZ][z/OS][libcxx]:Fix fopen64 undeclared error in 32 bit mode
authorFanbo Meng <fanbo.meng@ibm.com>
Thu, 6 Jan 2022 13:56:13 +0000 (08:56 -0500)
committerFanbo Meng <fanbo.meng@ibm.com>
Thu, 6 Jan 2022 13:57:56 +0000 (08:57 -0500)
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

libcxx/test/support/filesystem_test_helper.h

index 44a0164..dc85a86 100644 (file)
@@ -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;