>From d863fc54623c497e0ed51fb0d7011415dc943434 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 8 Feb 2020 21:22:15 +0100 Subject: [PATCH 1/2] lchmod: Ensure declaration on HP-UX. * lib/sys_stat.in.h (lchown): Declare also on HP-UX. * doc/glibc-functions/lchmod.texi: Mention the HP-UX problem. --- ChangeLog | 6 ++++++ doc/glibc-functions/lchmod.texi | 3 +++ lib/sys_stat.in.h | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index fc07914..ffb2096 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2020-02-08 Bruno Haible + lchmod: Ensure declaration on HP-UX. + * lib/sys_stat.in.h (lchown): Declare also on HP-UX. + * doc/glibc-functions/lchmod.texi: Mention the HP-UX problem. + +2020-02-08 Bruno Haible + fchmodat: Strengthen tests. * tests/test-fchmodat.c (BASE): New macro. (main): Use it, to avoid conflicts with other unit tests. Verify that diff --git a/doc/glibc-functions/lchmod.texi b/doc/glibc-functions/lchmod.texi index 6cc48b4..7a2e9d0 100644 --- a/doc/glibc-functions/lchmod.texi +++ b/doc/glibc-functions/lchmod.texi @@ -10,6 +10,9 @@ Portability problems fixed by Gnulib: This function is missing on some platforms: OpenBSD 3.8, Minix 3.1.8, AIX 5.1, IRIX 6.5, Solaris 11.4, Cygwin, mingw, MSVC 14, Android 9.0. @item +This function is not declared on some platforms: +HP-UX 11.31. +@item This function always fails with @code{errno} set to @code{ENOSYS}, even when the file is not a symbolic link: GNU/Linux with glibc 2.31. diff --git a/lib/sys_stat.in.h b/lib/sys_stat.in.h index 4f9eb59..65661f4 100644 --- a/lib/sys_stat.in.h +++ b/lib/sys_stat.in.h @@ -525,7 +525,7 @@ _GL_FUNCDECL_RPL (lchmod, int, _GL_CXXALIAS_RPL (lchmod, int, (char const *filename, mode_t mode)); # else -# if !@HAVE_LCHMOD@ +# if !@HAVE_LCHMOD@ || defined __hpux _GL_FUNCDECL_SYS (lchmod, int, (const char *filename, mode_t mode) _GL_ARG_NONNULL ((1))); # endif -- 2.7.4