]> Savannah Git Hosting - gnulib.git/commitdiff
ffsl, ffsll: Work around AIX 7.2 problem.
authorBruno Haible <bruno@clisp.org>
Mon, 4 Jan 2021 07:02:18 +0000 (08:02 +0100)
committerBruno Haible <bruno@clisp.org>
Mon, 4 Jan 2021 07:02:18 +0000 (08:02 +0100)
* lib/string.in.h: On AIX, include <strings.h> for the declarations of
ffsl and ffsll.
* doc/glibc-functions/ffsl.texi: Document the AIX 7.2 problem.
* doc/glibc-functions/ffsll.texi: Likewise.

ChangeLog
doc/glibc-functions/ffsl.texi
doc/glibc-functions/ffsll.texi
lib/string.in.h

index 6f42f1ccc5ad60b344da999429e7a81a0fc147d7..33cc845a9d3c78fb1aba301ac8e3143ba5c4f8ce 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2021-01-04  Bruno Haible  <bruno@clisp.org>
+
+       ffsl, ffsll: Work around AIX 7.2 problem.
+       * lib/string.in.h: On AIX, include <strings.h> for the declarations of
+       ffsl and ffsll.
+       * doc/glibc-functions/ffsl.texi: Document the AIX 7.2 problem.
+       * doc/glibc-functions/ffsll.texi: Likewise.
+
 2021-01-04  Bruno Haible  <bruno@clisp.org>
 
        ssfmalloc: Fix includes.
index 9f8357b2f7537b41e07c2e672d9ada977ce28cfa..441383cc381be6ee54e8b826abdbef2ebf07c838 100644 (file)
@@ -11,6 +11,10 @@ Portability problems fixed by Gnulib:
 @item
 This function is missing on some platforms:
 FreeBSD 5.2.1, NetBSD 9.0, OpenBSD 6.7, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 10, Cygwin 1.7.x, mingw, MSVC 14, Android 9.0.
+@item
+This function is declared in @code{<strings.h>} instead of @code{<string.h>}
+on some platforms:
+AIX 7.2.
 @end itemize
 
 Portability problems not fixed by Gnulib:
index a8493a969c778d2aa06f75919380c82522394584..718ccfcafeded7d279fa1e85557f1824517c294f 100644 (file)
@@ -11,6 +11,10 @@ Portability problems fixed by Gnulib:
 @item
 This function is missing on many non-glibc platforms:
 Mac OS X 10.5, FreeBSD 6.0, NetBSD 9.0, OpenBSD 6.7, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 10, Cygwin 1.7.x, mingw, MSVC 14, Android 9.0.
+@item
+This function is declared in @code{<strings.h>} instead of @code{<string.h>}
+on some platforms:
+AIX 7.2.
 @end itemize
 
 Portability problems not fixed by Gnulib:
index c32fd36178874b398dcebae4bb07e5a8b07c9a5c..2f2e07bd774f08056593830ba4723d3046eb802f 100644 (file)
 # include <unistd.h>
 #endif
 
+/* AIX 7.2 declares ffsl and ffsll in <strings.h>, not in <string.h>.  */
+/* But in any case avoid namespace pollution on glibc systems.  */
+#if ((@GNULIB_FFSL@ || @GNULIB_FFSLL@ || defined GNULIB_POSIXCHECK) \
+     && defined _AIX) \
+    && ! defined __GLIBC__
+# include <strings.h>
+#endif
+
 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
 
 /* The definition of _GL_ARG_NONNULL is copied here.  */