[libcxx-commits] [libcxx] [libc++] Support file offsets larger than 2GB in basic_filebuf on 32-bit AIX and 32-bit glibc Linux (PR #215892)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Aug 14 00:42:04 PDT 2026
================
@@ -217,6 +217,20 @@ typedef basic_fstream<wchar_t> wfstream;
# pragma GCC system_header
# endif
+# if defined(_AIX) || (defined(__linux__) && defined(__GLIBC__))
+# define _LIBCPP_HAS_LARGEFILE_API 1
+# else
+# define _LIBCPP_HAS_LARGEFILE_API 0
+# endif
+
+# if _LIBCPP_HAS_LARGEFILE_API
+// On AIX and glibc on Linux, fopen64/fseeko64/ftello64 are not guaranteed to always be declared, so we declare them
----------------
philnik777 wrote:
The glibc claim seems wrong. At least `fseeko64` is defined if `__USE_LARGEFILE64` is defined, which in turn is defined if `_LARGEGILE64_SOURCE` is defined. That in turn is defined if `_GNU_SOURCE` is defined, which is always defined by the compiler in the cases we care about AFAICT.
https://github.com/llvm/llvm-project/pull/215892
More information about the libcxx-commits
mailing list