diff options
| author | Paul Eggert | 2020-07-09 16:35:48 -0700 |
|---|---|---|
| committer | Paul Eggert | 2020-07-09 16:38:44 -0700 |
| commit | 0fc8671d10ccab52d78afdaeb715bcc9e52c0ac0 (patch) | |
| tree | c2ff20906b1af26e3c68027576bfa0df948479bd /lib | |
| parent | 814e3b0b17bce65afb1d487167c1ce7291ddcf4d (diff) | |
| download | emacs-0fc8671d10ccab52d78afdaeb715bcc9e52c0ac0.tar.gz emacs-0fc8671d10ccab52d78afdaeb715bcc9e52c0ac0.zip | |
Update from Gnulib
This incorporates:
2020-07-07 dup2: remove support for some very old platforms
2020-07-07 memchr: remove support for some very old platforms
2020-07-04 getumask: new module
2020-07-03 getrandom: fix compilation error on native Windows
2020-07-03 lchmod: simplify after 2020-02-22 change
2020-07-01 manywarnings: improve port to GCC 10.1
2020-06-28 getrandom: fix compilation errors on older versions of mingw
2020-06-29 alloca-opt: fix warning on mingw
* lib/alloca.in.h, lib/dup2.c, lib/getrandom.c, lib/string.in.h:
* lib/sys_stat.in.h, lib/unistd.in.h, m4/dup2.m4, m4/getrandom.m4:
* m4/lchmod.m4, m4/manywarnings.m4, m4/string_h.m4, m4/sys_stat_h.m4:
* m4/unistd_h.m4: Copy from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/alloca.in.h | 15 | ||||
| -rw-r--r-- | lib/dup2.c | 100 | ||||
| -rw-r--r-- | lib/getrandom.c | 2 | ||||
| -rw-r--r-- | lib/gnulib.mk.in | 9 | ||||
| -rw-r--r-- | lib/string.in.h | 5 | ||||
| -rw-r--r-- | lib/sys_stat.in.h | 17 | ||||
| -rw-r--r-- | lib/unistd.in.h | 3 |
7 files changed, 58 insertions, 93 deletions
diff --git a/lib/alloca.in.h b/lib/alloca.in.h index c7187e66ae3..5686b082bbe 100644 --- a/lib/alloca.in.h +++ b/lib/alloca.in.h | |||
| @@ -35,13 +35,16 @@ | |||
| 35 | */ | 35 | */ |
| 36 | 36 | ||
| 37 | #ifndef alloca | 37 | #ifndef alloca |
| 38 | /* Some version of mingw have an <alloca.h> that causes trouble when | ||
| 39 | included after 'alloca' gets defined as a macro. As a workaround, | ||
| 40 | include this <alloca.h> first and define 'alloca' as a macro afterwards | ||
| 41 | if needed. */ | ||
| 42 | # if defined __GNUC__ && (defined _WIN32 && ! defined __CYGWIN__) && @HAVE_ALLOCA_H@ | ||
| 43 | # include_next <alloca.h> | ||
| 44 | # endif | ||
| 45 | #endif | ||
| 46 | #ifndef alloca | ||
| 38 | # ifdef __GNUC__ | 47 | # ifdef __GNUC__ |
| 39 | /* Some version of mingw have an <alloca.h> that causes trouble when | ||
| 40 | included after 'alloca' gets defined as a macro. As a workaround, include | ||
| 41 | this <alloca.h> first and define 'alloca' as a macro afterwards. */ | ||
| 42 | # if (defined _WIN32 && ! defined __CYGWIN__) && @HAVE_ALLOCA_H@ | ||
| 43 | # include_next <alloca.h> | ||
| 44 | # endif | ||
| 45 | # define alloca __builtin_alloca | 48 | # define alloca __builtin_alloca |
| 46 | # elif defined _AIX | 49 | # elif defined _AIX |
| 47 | # define alloca __alloca | 50 | # define alloca __alloca |
diff --git a/lib/dup2.c b/lib/dup2.c index 88ef2591313..9bc3951f3d2 100644 --- a/lib/dup2.c +++ b/lib/dup2.c | |||
| @@ -25,28 +25,26 @@ | |||
| 25 | #include <errno.h> | 25 | #include <errno.h> |
| 26 | #include <fcntl.h> | 26 | #include <fcntl.h> |
| 27 | 27 | ||
| 28 | #if HAVE_DUP2 | 28 | #undef dup2 |
| 29 | 29 | ||
| 30 | # undef dup2 | 30 | #if defined _WIN32 && ! defined __CYGWIN__ |
| 31 | |||
| 32 | # if defined _WIN32 && ! defined __CYGWIN__ | ||
| 33 | 31 | ||
| 34 | /* Get declarations of the native Windows API functions. */ | 32 | /* Get declarations of the native Windows API functions. */ |
| 35 | # define WIN32_LEAN_AND_MEAN | 33 | # define WIN32_LEAN_AND_MEAN |
| 36 | # include <windows.h> | 34 | # include <windows.h> |
| 37 | 35 | ||
| 38 | # if HAVE_MSVC_INVALID_PARAMETER_HANDLER | 36 | # if HAVE_MSVC_INVALID_PARAMETER_HANDLER |
| 39 | # include "msvc-inval.h" | 37 | # include "msvc-inval.h" |
| 40 | # endif | 38 | # endif |
| 41 | 39 | ||
| 42 | /* Get _get_osfhandle. */ | 40 | /* Get _get_osfhandle. */ |
| 43 | # if GNULIB_MSVC_NOTHROW | 41 | # if GNULIB_MSVC_NOTHROW |
| 44 | # include "msvc-nothrow.h" | 42 | # include "msvc-nothrow.h" |
| 45 | # else | 43 | # else |
| 46 | # include <io.h> | 44 | # include <io.h> |
| 47 | # endif | 45 | # endif |
| 48 | 46 | ||
| 49 | # if HAVE_MSVC_INVALID_PARAMETER_HANDLER | 47 | # if HAVE_MSVC_INVALID_PARAMETER_HANDLER |
| 50 | static int | 48 | static int |
| 51 | dup2_nothrow (int fd, int desired_fd) | 49 | dup2_nothrow (int fd, int desired_fd) |
| 52 | { | 50 | { |
| @@ -65,9 +63,9 @@ dup2_nothrow (int fd, int desired_fd) | |||
| 65 | 63 | ||
| 66 | return result; | 64 | return result; |
| 67 | } | 65 | } |
| 68 | # else | 66 | # else |
| 69 | # define dup2_nothrow dup2 | 67 | # define dup2_nothrow dup2 |
| 70 | # endif | 68 | # endif |
| 71 | 69 | ||
| 72 | static int | 70 | static int |
| 73 | ms_windows_dup2 (int fd, int desired_fd) | 71 | ms_windows_dup2 (int fd, int desired_fd) |
| @@ -103,11 +101,11 @@ ms_windows_dup2 (int fd, int desired_fd) | |||
| 103 | return result; | 101 | return result; |
| 104 | } | 102 | } |
| 105 | 103 | ||
| 106 | # define dup2 ms_windows_dup2 | 104 | # define dup2 ms_windows_dup2 |
| 107 | 105 | ||
| 108 | # elif defined __KLIBC__ | 106 | #elif defined __KLIBC__ |
| 109 | 107 | ||
| 110 | # include <InnoTekLIBC/backend.h> | 108 | # include <InnoTekLIBC/backend.h> |
| 111 | 109 | ||
| 112 | static int | 110 | static int |
| 113 | klibc_dup2dirfd (int fd, int desired_fd) | 111 | klibc_dup2dirfd (int fd, int desired_fd) |
| @@ -155,81 +153,37 @@ klibc_dup2 (int fd, int desired_fd) | |||
| 155 | return dupfd; | 153 | return dupfd; |
| 156 | } | 154 | } |
| 157 | 155 | ||
| 158 | # define dup2 klibc_dup2 | 156 | # define dup2 klibc_dup2 |
| 159 | # endif | 157 | #endif |
| 160 | 158 | ||
| 161 | int | 159 | int |
| 162 | rpl_dup2 (int fd, int desired_fd) | 160 | rpl_dup2 (int fd, int desired_fd) |
| 163 | { | 161 | { |
| 164 | int result; | 162 | int result; |
| 165 | 163 | ||
| 166 | # ifdef F_GETFL | 164 | #ifdef F_GETFL |
| 167 | /* On Linux kernels 2.6.26-2.6.29, dup2 (fd, fd) returns -EBADF. | 165 | /* On Linux kernels 2.6.26-2.6.29, dup2 (fd, fd) returns -EBADF. |
| 168 | On Cygwin 1.5.x, dup2 (1, 1) returns 0. | 166 | On Cygwin 1.5.x, dup2 (1, 1) returns 0. |
| 169 | On Cygwin 1.7.17, dup2 (1, -1) dumps core. | 167 | On Cygwin 1.7.17, dup2 (1, -1) dumps core. |
| 170 | On Cygwin 1.7.25, dup2 (1, 256) can dump core. | 168 | On Cygwin 1.7.25, dup2 (1, 256) can dump core. |
| 171 | On Haiku, dup2 (fd, fd) mistakenly clears FD_CLOEXEC. */ | 169 | On Haiku, dup2 (fd, fd) mistakenly clears FD_CLOEXEC. */ |
| 172 | # if HAVE_SETDTABLESIZE | 170 | # if HAVE_SETDTABLESIZE |
| 173 | setdtablesize (desired_fd + 1); | 171 | setdtablesize (desired_fd + 1); |
| 174 | # endif | 172 | # endif |
| 175 | if (desired_fd < 0) | 173 | if (desired_fd < 0) |
| 176 | fd = desired_fd; | 174 | fd = desired_fd; |
| 177 | if (fd == desired_fd) | 175 | if (fd == desired_fd) |
| 178 | return fcntl (fd, F_GETFL) == -1 ? -1 : fd; | 176 | return fcntl (fd, F_GETFL) == -1 ? -1 : fd; |
| 179 | # endif | 177 | #endif |
| 180 | 178 | ||
| 181 | result = dup2 (fd, desired_fd); | 179 | result = dup2 (fd, desired_fd); |
| 182 | 180 | ||
| 183 | /* Correct an errno value on FreeBSD 6.1 and Cygwin 1.5.x. */ | 181 | /* Correct an errno value on FreeBSD 6.1 and Cygwin 1.5.x. */ |
| 184 | if (result == -1 && errno == EMFILE) | 182 | if (result == -1 && errno == EMFILE) |
| 185 | errno = EBADF; | 183 | errno = EBADF; |
| 186 | # if REPLACE_FCHDIR | 184 | #if REPLACE_FCHDIR |
| 187 | if (fd != desired_fd && result != -1) | 185 | if (fd != desired_fd && result != -1) |
| 188 | result = _gl_register_dup (fd, result); | 186 | result = _gl_register_dup (fd, result); |
| 189 | # endif | 187 | #endif |
| 190 | return result; | ||
| 191 | } | ||
| 192 | |||
| 193 | #else /* !HAVE_DUP2 */ | ||
| 194 | |||
| 195 | /* On older platforms, dup2 did not exist. */ | ||
| 196 | |||
| 197 | # ifndef F_DUPFD | ||
| 198 | static int | ||
| 199 | dupfd (int fd, int desired_fd) | ||
| 200 | { | ||
| 201 | int duplicated_fd = dup (fd); | ||
| 202 | if (duplicated_fd < 0 || duplicated_fd == desired_fd) | ||
| 203 | return duplicated_fd; | ||
| 204 | else | ||
| 205 | { | ||
| 206 | int r = dupfd (fd, desired_fd); | ||
| 207 | int e = errno; | ||
| 208 | close (duplicated_fd); | ||
| 209 | errno = e; | ||
| 210 | return r; | ||
| 211 | } | ||
| 212 | } | ||
| 213 | # endif | ||
| 214 | |||
| 215 | int | ||
| 216 | dup2 (int fd, int desired_fd) | ||
| 217 | { | ||
| 218 | int result = fcntl (fd, F_GETFL) < 0 ? -1 : fd; | ||
| 219 | if (result == -1 || fd == desired_fd) | ||
| 220 | return result; | ||
| 221 | close (desired_fd); | ||
| 222 | # ifdef F_DUPFD | ||
| 223 | result = fcntl (fd, F_DUPFD, desired_fd); | ||
| 224 | # if REPLACE_FCHDIR | ||
| 225 | if (0 <= result) | ||
| 226 | result = _gl_register_dup (fd, result); | ||
| 227 | # endif | ||
| 228 | # else | ||
| 229 | result = dupfd (fd, desired_fd); | ||
| 230 | # endif | ||
| 231 | if (result == -1 && (errno == EMFILE || errno == EINVAL)) | ||
| 232 | errno = EBADF; | ||
| 233 | return result; | 188 | return result; |
| 234 | } | 189 | } |
| 235 | #endif /* !HAVE_DUP2 */ | ||
diff --git a/lib/getrandom.c b/lib/getrandom.c index 030a78bb08d..f8695abf30a 100644 --- a/lib/getrandom.c +++ b/lib/getrandom.c | |||
| @@ -32,7 +32,7 @@ | |||
| 32 | # if HAVE_BCRYPT_H | 32 | # if HAVE_BCRYPT_H |
| 33 | # include <bcrypt.h> | 33 | # include <bcrypt.h> |
| 34 | # else | 34 | # else |
| 35 | # include <ntdef.h> /* NTSTATUS */ | 35 | # define NTSTATUS LONG |
| 36 | typedef void * BCRYPT_ALG_HANDLE; | 36 | typedef void * BCRYPT_ALG_HANDLE; |
| 37 | # define BCRYPT_USE_SYSTEM_PREFERRED_RNG 0x00000002 | 37 | # define BCRYPT_USE_SYSTEM_PREFERRED_RNG 0x00000002 |
| 38 | # if HAVE_LIB_BCRYPT | 38 | # if HAVE_LIB_BCRYPT |
diff --git a/lib/gnulib.mk.in b/lib/gnulib.mk.in index 35d2db09bd4..c249d626728 100644 --- a/lib/gnulib.mk.in +++ b/lib/gnulib.mk.in | |||
| @@ -325,6 +325,7 @@ GNULIB_GETPASS = @GNULIB_GETPASS@ | |||
| 325 | GNULIB_GETRANDOM = @GNULIB_GETRANDOM@ | 325 | GNULIB_GETRANDOM = @GNULIB_GETRANDOM@ |
| 326 | GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ | 326 | GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ |
| 327 | GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ | 327 | GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ |
| 328 | GNULIB_GETUMASK = @GNULIB_GETUMASK@ | ||
| 328 | GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ | 329 | GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ |
| 329 | GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ | 330 | GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ |
| 330 | GNULIB_GRANTPT = @GNULIB_GRANTPT@ | 331 | GNULIB_GRANTPT = @GNULIB_GRANTPT@ |
| @@ -548,7 +549,6 @@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ | |||
| 548 | HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ | 549 | HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ |
| 549 | HAVE_DIRENT_H = @HAVE_DIRENT_H@ | 550 | HAVE_DIRENT_H = @HAVE_DIRENT_H@ |
| 550 | HAVE_DPRINTF = @HAVE_DPRINTF@ | 551 | HAVE_DPRINTF = @HAVE_DPRINTF@ |
| 551 | HAVE_DUP2 = @HAVE_DUP2@ | ||
| 552 | HAVE_DUP3 = @HAVE_DUP3@ | 552 | HAVE_DUP3 = @HAVE_DUP3@ |
| 553 | HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ | 553 | HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ |
| 554 | HAVE_EXPLICIT_BZERO = @HAVE_EXPLICIT_BZERO@ | 554 | HAVE_EXPLICIT_BZERO = @HAVE_EXPLICIT_BZERO@ |
| @@ -578,6 +578,7 @@ HAVE_GETPASS = @HAVE_GETPASS@ | |||
| 578 | HAVE_GETRANDOM = @HAVE_GETRANDOM@ | 578 | HAVE_GETRANDOM = @HAVE_GETRANDOM@ |
| 579 | HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ | 579 | HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ |
| 580 | HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ | 580 | HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ |
| 581 | HAVE_GETUMASK = @HAVE_GETUMASK@ | ||
| 581 | HAVE_GRANTPT = @HAVE_GRANTPT@ | 582 | HAVE_GRANTPT = @HAVE_GRANTPT@ |
| 582 | HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ | 583 | HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ |
| 583 | HAVE_IMAXDIV_T = @HAVE_IMAXDIV_T@ | 584 | HAVE_IMAXDIV_T = @HAVE_IMAXDIV_T@ |
| @@ -592,7 +593,6 @@ HAVE_MAKEINFO = @HAVE_MAKEINFO@ | |||
| 592 | HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@ | 593 | HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@ |
| 593 | HAVE_MBSLEN = @HAVE_MBSLEN@ | 594 | HAVE_MBSLEN = @HAVE_MBSLEN@ |
| 594 | HAVE_MBTOWC = @HAVE_MBTOWC@ | 595 | HAVE_MBTOWC = @HAVE_MBTOWC@ |
| 595 | HAVE_MEMCHR = @HAVE_MEMCHR@ | ||
| 596 | HAVE_MEMPCPY = @HAVE_MEMPCPY@ | 596 | HAVE_MEMPCPY = @HAVE_MEMPCPY@ |
| 597 | HAVE_MKDIRAT = @HAVE_MKDIRAT@ | 597 | HAVE_MKDIRAT = @HAVE_MKDIRAT@ |
| 598 | HAVE_MKDTEMP = @HAVE_MKDTEMP@ | 598 | HAVE_MKDTEMP = @HAVE_MKDTEMP@ |
| @@ -1132,7 +1132,6 @@ pdfdir = @pdfdir@ | |||
| 1132 | prefix = @prefix@ | 1132 | prefix = @prefix@ |
| 1133 | program_transform_name = @program_transform_name@ | 1133 | program_transform_name = @program_transform_name@ |
| 1134 | psdir = @psdir@ | 1134 | psdir = @psdir@ |
| 1135 | runstatedir = @runstatedir@ | ||
| 1136 | sbindir = @sbindir@ | 1135 | sbindir = @sbindir@ |
| 1137 | sharedstatedir = @sharedstatedir@ | 1136 | sharedstatedir = @sharedstatedir@ |
| 1138 | srcdir = @srcdir@ | 1137 | srcdir = @srcdir@ |
| @@ -2833,7 +2832,6 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H | |||
| 2833 | -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \ | 2832 | -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \ |
| 2834 | -e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \ | 2833 | -e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \ |
| 2835 | -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \ | 2834 | -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \ |
| 2836 | -e 's|@''HAVE_MEMCHR''@|$(HAVE_MEMCHR)|g' \ | ||
| 2837 | -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \ | 2835 | -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \ |
| 2838 | -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \ | 2836 | -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \ |
| 2839 | -e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \ | 2837 | -e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \ |
| @@ -3017,6 +3015,7 @@ sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNU | |||
| 3017 | -e 's/@''GNULIB_FSTAT''@/$(GNULIB_FSTAT)/g' \ | 3015 | -e 's/@''GNULIB_FSTAT''@/$(GNULIB_FSTAT)/g' \ |
| 3018 | -e 's/@''GNULIB_FSTATAT''@/$(GNULIB_FSTATAT)/g' \ | 3016 | -e 's/@''GNULIB_FSTATAT''@/$(GNULIB_FSTATAT)/g' \ |
| 3019 | -e 's/@''GNULIB_FUTIMENS''@/$(GNULIB_FUTIMENS)/g' \ | 3017 | -e 's/@''GNULIB_FUTIMENS''@/$(GNULIB_FUTIMENS)/g' \ |
| 3018 | -e 's/@''GNULIB_GETUMASK''@/$(GNULIB_GETUMASK)/g' \ | ||
| 3020 | -e 's/@''GNULIB_LCHMOD''@/$(GNULIB_LCHMOD)/g' \ | 3019 | -e 's/@''GNULIB_LCHMOD''@/$(GNULIB_LCHMOD)/g' \ |
| 3021 | -e 's/@''GNULIB_LSTAT''@/$(GNULIB_LSTAT)/g' \ | 3020 | -e 's/@''GNULIB_LSTAT''@/$(GNULIB_LSTAT)/g' \ |
| 3022 | -e 's/@''GNULIB_MKDIRAT''@/$(GNULIB_MKDIRAT)/g' \ | 3021 | -e 's/@''GNULIB_MKDIRAT''@/$(GNULIB_MKDIRAT)/g' \ |
| @@ -3030,6 +3029,7 @@ sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNU | |||
| 3030 | -e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \ | 3029 | -e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \ |
| 3031 | -e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \ | 3030 | -e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \ |
| 3032 | -e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \ | 3031 | -e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \ |
| 3032 | -e 's|@''HAVE_GETUMASK''@|$(HAVE_GETUMASK)|g' \ | ||
| 3033 | -e 's|@''HAVE_LCHMOD''@|$(HAVE_LCHMOD)|g' \ | 3033 | -e 's|@''HAVE_LCHMOD''@|$(HAVE_LCHMOD)|g' \ |
| 3034 | -e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \ | 3034 | -e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \ |
| 3035 | -e 's|@''HAVE_MKDIRAT''@|$(HAVE_MKDIRAT)|g' \ | 3035 | -e 's|@''HAVE_MKDIRAT''@|$(HAVE_MKDIRAT)|g' \ |
| @@ -3338,7 +3338,6 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H | |||
| 3338 | < $(srcdir)/unistd.in.h | \ | 3338 | < $(srcdir)/unistd.in.h | \ |
| 3339 | sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \ | 3339 | sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \ |
| 3340 | -e 's|@''HAVE_COPY_FILE_RANGE''@|$(HAVE_COPY_FILE_RANGE)|g' \ | 3340 | -e 's|@''HAVE_COPY_FILE_RANGE''@|$(HAVE_COPY_FILE_RANGE)|g' \ |
| 3341 | -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \ | ||
| 3342 | -e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \ | 3341 | -e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \ |
| 3343 | -e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \ | 3342 | -e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \ |
| 3344 | -e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \ | 3343 | -e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \ |
diff --git a/lib/string.in.h b/lib/string.in.h index a08e7057fbd..aa9802791ee 100644 --- a/lib/string.in.h +++ b/lib/string.in.h | |||
| @@ -134,11 +134,6 @@ _GL_FUNCDECL_RPL (memchr, void *, (void const *__s, int __c, size_t __n) | |||
| 134 | _GL_ARG_NONNULL ((1))); | 134 | _GL_ARG_NONNULL ((1))); |
| 135 | _GL_CXXALIAS_RPL (memchr, void *, (void const *__s, int __c, size_t __n)); | 135 | _GL_CXXALIAS_RPL (memchr, void *, (void const *__s, int __c, size_t __n)); |
| 136 | # else | 136 | # else |
| 137 | # if ! @HAVE_MEMCHR@ | ||
| 138 | _GL_FUNCDECL_SYS (memchr, void *, (void const *__s, int __c, size_t __n) | ||
| 139 | _GL_ATTRIBUTE_PURE | ||
| 140 | _GL_ARG_NONNULL ((1))); | ||
| 141 | # endif | ||
| 142 | /* On some systems, this function is defined as an overloaded function: | 137 | /* On some systems, this function is defined as an overloaded function: |
| 143 | extern "C" { const void * std::memchr (const void *, int, size_t); } | 138 | extern "C" { const void * std::memchr (const void *, int, size_t); } |
| 144 | extern "C++" { void * std::memchr (void *, int, size_t); } */ | 139 | extern "C++" { void * std::memchr (void *, int, size_t); } */ |
diff --git a/lib/sys_stat.in.h b/lib/sys_stat.in.h index 44946072795..89e167f6d1c 100644 --- a/lib/sys_stat.in.h +++ b/lib/sys_stat.in.h | |||
| @@ -515,6 +515,23 @@ _GL_WARN_ON_USE (futimens, "futimens is not portable - " | |||
| 515 | #endif | 515 | #endif |
| 516 | 516 | ||
| 517 | 517 | ||
| 518 | #if @GNULIB_GETUMASK@ | ||
| 519 | # if !@HAVE_GETUMASK@ | ||
| 520 | _GL_FUNCDECL_SYS (getumask, mode_t, (void)); | ||
| 521 | # endif | ||
| 522 | _GL_CXXALIAS_SYS (getumask, mode_t, (void)); | ||
| 523 | # if @HAVE_GETUMASK@ | ||
| 524 | _GL_CXXALIASWARN (getumask); | ||
| 525 | # endif | ||
| 526 | #elif defined GNULIB_POSIXCHECK | ||
| 527 | # undef getumask | ||
| 528 | # if HAVE_RAW_DECL_GETUMASK | ||
| 529 | _GL_WARN_ON_USE (getumask, "getumask is not portable - " | ||
| 530 | "use gnulib module getumask for portability"); | ||
| 531 | # endif | ||
| 532 | #endif | ||
| 533 | |||
| 534 | |||
| 518 | #if @GNULIB_LCHMOD@ | 535 | #if @GNULIB_LCHMOD@ |
| 519 | /* Change the mode of FILENAME to MODE, without dereferencing it if FILENAME | 536 | /* Change the mode of FILENAME to MODE, without dereferencing it if FILENAME |
| 520 | denotes a symbolic link. */ | 537 | denotes a symbolic link. */ |
diff --git a/lib/unistd.in.h b/lib/unistd.in.h index b211e4d61f7..a81a14fe873 100644 --- a/lib/unistd.in.h +++ b/lib/unistd.in.h | |||
| @@ -408,9 +408,6 @@ _GL_WARN_ON_USE (dup, "dup is unportable - " | |||
| 408 | _GL_FUNCDECL_RPL (dup2, int, (int oldfd, int newfd)); | 408 | _GL_FUNCDECL_RPL (dup2, int, (int oldfd, int newfd)); |
| 409 | _GL_CXXALIAS_RPL (dup2, int, (int oldfd, int newfd)); | 409 | _GL_CXXALIAS_RPL (dup2, int, (int oldfd, int newfd)); |
| 410 | # else | 410 | # else |
| 411 | # if !@HAVE_DUP2@ | ||
| 412 | _GL_FUNCDECL_SYS (dup2, int, (int oldfd, int newfd)); | ||
| 413 | # endif | ||
| 414 | _GL_CXXALIAS_SYS (dup2, int, (int oldfd, int newfd)); | 411 | _GL_CXXALIAS_SYS (dup2, int, (int oldfd, int newfd)); |
| 415 | # endif | 412 | # endif |
| 416 | _GL_CXXALIASWARN (dup2); | 413 | _GL_CXXALIASWARN (dup2); |