diff options
author | Bruno Haible <bruno@clisp.org> | 2019-12-08 21:49:32 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2019-12-08 21:49:32 +0100 |
commit | 16e9d079c99026d6807ab3a42bb2175593f6dbc2 (patch) | |
tree | fd59c3f67913b21b1a6c52463b2904dc29229f62 | |
parent | 1554ca2f6bbe5b98d5ce8a5d0b876222aea9076a (diff) | |
download | gnulib-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-- | ChangeLog | 6 | ||||
-rw-r--r-- | doc/glibc-functions/getpagesize.texi | 3 | ||||
-rw-r--r-- | lib/unistd.in.h | 5 |
3 files changed, 14 insertions, 0 deletions
@@ -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. */ |