diff options
author | Bruno Haible <bruno@clisp.org> | 2020-11-18 02:33:33 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2020-11-18 02:33:33 +0100 |
commit | 8f591eb5eab9650b93aef4e57e0a4cc056ec571d (patch) | |
tree | 9ef9aa379bb9ed9955aae31e9aa767426c6d32be | |
parent | c1d6485911a260331de7911c7ad81af9c839671d (diff) | |
download | gnulib-8f591eb5eab9650b93aef4e57e0a4cc056ec571d.tar.gz gnulib-8f591eb5eab9650b93aef4e57e0a4cc056ec571d.tar.bz2 |
Fix error when GNULIB_POSIXCHECK is enabled (regression 2019-06-04).
* lib/unistd.in.h (copy_file_range): Don't assume that copy_file_range
is always declared.
* m4/unistd_h.m4 (gl_UNISTD_H): Test whether copy_file_range is
declared.
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | lib/unistd.in.h | 3 | ||||
-rw-r--r-- | m4/unistd_h.m4 | 5 |
3 files changed, 13 insertions, 3 deletions
@@ -1,5 +1,13 @@ 2020-11-17 Bruno Haible <bruno@clisp.org> + Fix error when GNULIB_POSIXCHECK is enabled (regression 2019-06-04). + * lib/unistd.in.h (copy_file_range): Don't assume that copy_file_range + is always declared. + * m4/unistd_h.m4 (gl_UNISTD_H): Test whether copy_file_range is + declared. + +2020-11-17 Bruno Haible <bruno@clisp.org> + Fix link errors on AIX. * modules/clean-temp (Link): Link with $(LIBTHREAD). * modules/getumask (Link): Link with $(LIBTHREAD). diff --git a/lib/unistd.in.h b/lib/unistd.in.h index efe237fb2f..5cf6f9d247 100644 --- a/lib/unistd.in.h +++ b/lib/unistd.in.h @@ -397,10 +397,11 @@ _GL_CXXALIAS_SYS (copy_file_range, ssize_t, (int ifd, off_t *ipos, # endif _GL_CXXALIASWARN (copy_file_range); #elif defined GNULIB_POSIXCHECK -/* Assume copy_file_range is always declared. */ +# if HAVE_RAW_DECL_COPY_FILE_RANGE _GL_WARN_ON_USE (copy_file_range, "copy_file_range is unportable - " "use gnulib module copy_file_range for portability"); +# endif #endif diff --git a/m4/unistd_h.m4 b/m4/unistd_h.m4 index b4734daf60..07b9158195 100644 --- a/m4/unistd_h.m4 +++ b/m4/unistd_h.m4 @@ -1,4 +1,4 @@ -# unistd_h.m4 serial 81 +# unistd_h.m4 serial 82 dnl Copyright (C) 2006-2020 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -41,7 +41,8 @@ AC_DEFUN([gl_UNISTD_H], # include <io.h> # endif #endif - ]], [access chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir + ]], [access chdir chown copy_file_range dup dup2 dup3 environ euidaccess + faccessat fchdir fchownat fdatasync fsync ftruncate getcwd getdomainname getdtablesize getentropy getgroups gethostname getlogin getlogin_r getpagesize getpass getusershell setusershell endusershell |