]> Savannah Git Hosting - gnulib.git/commitdiff
Fix compilation error in C++ mode on HP-UX 11.
authorBruno Haible <bruno@clisp.org>
Sun, 8 Dec 2019 20:49:32 +0000 (21:49 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 8 Dec 2019 20:49:32 +0000 (21:49 +0100)
* lib/unistd.in.h (getpagesize): Declare on HP-UX.
* doc/glibc-functions/getpagesize.texi: Mention the HP-UX problem.

ChangeLog
doc/glibc-functions/getpagesize.texi
lib/unistd.in.h

index 7b468512e10f356ff3654642dbe07db8ea956df2..903e56c236d50736f29ccdc6babe7f643b85719c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2019-12-08  Bruno Haible  <bruno@clisp.org>
+
+       Fix compilation error in C++ mode on HP-UX 11.
+       * lib/unistd.in.h (getpagesize): Declare on HP-UX.
+       * doc/glibc-functions/getpagesize.texi: Mention the HP-UX problem.
+
 2019-12-08  Bruno Haible  <bruno@clisp.org>
 
        Fix compilation errors on HP-UX 11/ia64.
index 74273baa203fb04745edf62d41086b3649058f7b..1538a1ec395b41a595174237c537ad7e7c76f9f4 100644 (file)
@@ -23,6 +23,9 @@ Portability problems fixed by Gnulib:
 This function is missing on some platforms:
 MSVC 14, Android 4.4.
 @item
+This function is not declared on some platforms:
+HP-UX 11 with compiler option @code{-D_XOPEN_SOURCE=600}.
+@item
 This function is broken on some platforms:
 mingw.
 @end itemize
index 2fa25b4a7534ada5661d008ad1d74b7df624e2bb..c57d6f9ff34d55c1a65a34ccecd66386ac2e0212 100644 (file)
@@ -905,6 +905,11 @@ _GL_WARN_ON_USE (getlogin_r, "getlogin_r is unportable - "
 _GL_FUNCDECL_RPL (getpagesize, int, (void));
 _GL_CXXALIAS_RPL (getpagesize, int, (void));
 # else
+/* On HP-UX, getpagesize exists, but it is not declared in <unistd.h> even if
+   the compiler options -D_HPUX_SOURCE -D_XOPEN_SOURCE=600 are used.  */
+#  if defined __hpux
+_GL_FUNCDECL_SYS (getpagesize, int, (void));
+#  endif
 #  if !@HAVE_GETPAGESIZE@
 #   if !defined getpagesize
 /* This is for POSIX systems.  */