]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
strings-h: Fix compilation error on AIX in C++ mode.
authorBruno Haible <bruno@clisp.org>
Sat, 9 May 2026 22:37:23 +0000 (00:37 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 9 May 2026 22:37:23 +0000 (00:37 +0200)
* lib/strings.in.h: On AIX in C++ mode, before including the system's
<strings.h> file, include <string.h>.

ChangeLog
lib/strings.in.h

index 6617c812193a8039c9fc8052ccf7ae8c54905ef8..3a1c9f78f78b08d341eb47b9386d3bd4d04b4c10 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2026-05-09  Bruno Haible  <bruno@clisp.org>
+
+       strings-h: Fix compilation error on AIX in C++ mode.
+       * lib/strings.in.h: On AIX in C++ mode, before including the system's
+       <strings.h> file, include <string.h>.
+
 2026-05-09  Bruno Haible  <bruno@clisp.org>
 
        Fix 'restrict' on MSVC and on Solaris 11.4 g++ (regression 2026-05-04).
index fd7cd2df67bb9ff7230e045f803ae995ec8ad57a..68152e83bdc0a5c21c991747ca32272fb3599d11 100644 (file)
 
 /* The include_next requires a split double-inclusion guard.  */
 #if @HAVE_STRINGS_H@
+/* AIX 7.3 has a bug: In C++ mode, <string.h> must be included before
+   <strings.h>.  */
+# if defined __cplusplus && defined _AIX
+#  include <string.h>
+# endif
 # @INCLUDE_NEXT@ @NEXT_STRINGS_H@
 #endif