[libcxx-commits] [libcxx] [libc++][AIX] Define _LARGE_FILES to fix offset_range.pass test on 32-bit AIX (PR #189540)
via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Mar 30 22:56:00 PDT 2026
https://github.com/Himadhith created https://github.com/llvm/llvm-project/pull/189540
This patch fixes the `offset_range.pass.cpp` test failure on 32-bit AIX by defining `_LARGE_FILES` before including system headers.
The change should affect only the C library headers and since it is being set only for this test, there should not be any ABI modifications as well.
>From ce2f277ae95dbb92d92001f5d6d96c3d220aaa22 Mon Sep 17 00:00:00 2001
From: himadhith <himadhith.v at ibm.com>
Date: Tue, 31 Mar 2026 03:33:52 -0400
Subject: [PATCH] [libc++][AIX] Define _LARGE_FILES to fix offset_range.pass
test on 32-bit AIX
---
.../fstreams/ifstream.members/offset_range.pass.cpp | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/libcxx/test/std/input.output/file.streams/fstreams/ifstream.members/offset_range.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ifstream.members/offset_range.pass.cpp
index 9fc3cb4a94478..149aa872c5c17 100644
--- a/libcxx/test/std/input.output/file.streams/fstreams/ifstream.members/offset_range.pass.cpp
+++ b/libcxx/test/std/input.output/file.streams/fstreams/ifstream.members/offset_range.pass.cpp
@@ -18,15 +18,14 @@
//
// XFAIL: target={{i686|arm.*}}-{{.+}}-android{{.*}}
-// Writing the >4 GB test file fails on 32 bit AIX.
-//
-// XFAIL: target=powerpc-{{.+}}-aix{{.*}}
-
// By default, off_t is typically a 32-bit integer on ARMv7 Linux systems,
// meaning it can represent file sizes up to 2GB (2^31 bytes) only.
//
// UNSUPPORTED: target=armv7-unknown-linux-gnueabihf
+#if defined(_AIX) && !defined(__64BIT__) && !defined(_LARGE_FILES)
+# define _LARGE_FILES 1
+#endif
#include <fstream>
#include <iostream>
#include <cassert>
More information about the libcxx-commits
mailing list