summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2019-12-08 21:49:32 +0100
committerBruno Haible <bruno@clisp.org>2019-12-08 21:49:32 +0100
commit16e9d079c99026d6807ab3a42bb2175593f6dbc2 (patch)
treefd59c3f67913b21b1a6c52463b2904dc29229f62
parent1554ca2f6bbe5b98d5ce8a5d0b876222aea9076a (diff)
downloadgnulib-16e9d079c99026d6807ab3a42bb2175593f6dbc2.tar.gz
gnulib-16e9d079c99026d6807ab3a42bb2175593f6dbc2.tar.bz2
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.
-rw-r--r--ChangeLog6
-rw-r--r--doc/glibc-functions/getpagesize.texi3
-rw-r--r--lib/unistd.in.h5
3 files changed, 14 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 7b468512e1..903e56c236 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
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.
* lib/math.in.h (copysignf, fmaf, fma): Undefine before
_GL_FUNCDECL_SYS.
diff --git a/doc/glibc-functions/getpagesize.texi b/doc/glibc-functions/getpagesize.texi
index 74273baa20..1538a1ec39 100644
--- a/doc/glibc-functions/getpagesize.texi
+++ b/doc/glibc-functions/getpagesize.texi
@@ -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
diff --git a/lib/unistd.in.h b/lib/unistd.in.h
index 2fa25b4a75..c57d6f9ff3 100644
--- a/lib/unistd.in.h
+++ b/lib/unistd.in.h
@@ -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. */

Return to:

Send suggestions and report system problems to the System administrator.