https://gcc.gnu.org/g:d1ced2a5ea6b09ad54ad927f90ccc8047cb74e19

commit r16-901-gd1ced2a5ea6b09ad54ad927f90ccc8047cb74e19
Author: Jonathan Wakely <jwak...@redhat.com>
Date:   Tue May 27 12:54:14 2025 +0100

    libstdc++: Fix some names.cc test failures on AIX
    
    libstdc++-v3/ChangeLog:
    
            * testsuite/17_intro/names.cc [_AIX] (n): Undefine.
            * testsuite/experimental/names.cc [_AIX] (ptr): Undefine.

Diff:
---
 libstdc++-v3/testsuite/17_intro/names.cc     | 2 ++
 libstdc++-v3/testsuite/experimental/names.cc | 6 ++++++
 2 files changed, 8 insertions(+)

diff --git a/libstdc++-v3/testsuite/17_intro/names.cc 
b/libstdc++-v3/testsuite/17_intro/names.cc
index 0e67c795564d..a61e49dc8191 100644
--- a/libstdc++-v3/testsuite/17_intro/names.cc
+++ b/libstdc++-v3/testsuite/17_intro/names.cc
@@ -248,6 +248,8 @@
 #undef r
 #undef x
 #undef y
+// <sys/localedef.h> defines _LC_weight_t::n
+#undef n
 // <sys/poll.h> defines pollfd_ext::u on AIX 7.3
 #undef u
 // <sys/var.h> defines vario::v
diff --git a/libstdc++-v3/testsuite/experimental/names.cc 
b/libstdc++-v3/testsuite/experimental/names.cc
index e0a7d4f9b880..4bedd530ecc5 100644
--- a/libstdc++-v3/testsuite/experimental/names.cc
+++ b/libstdc++-v3/testsuite/experimental/names.cc
@@ -22,6 +22,12 @@
 // naming variables, parameters etc. in the library.
 
 #include "../17_intro/names.cc"
+
+#ifdef _AIX
+// <netdb.h> declares endnetgrent_r with ptr parameter.
+# undef n
+#endif
+
 // Filesystem
 #if __has_include(<experimental/filesystem>)
 # include <experimental/filesystem>

Reply via email to