aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2019-09-22 23:50:59 -0700
committerPaul Eggert2019-09-22 23:51:44 -0700
commit78669517dc3db4d6d51fb26d71073fc0c196ab5d (patch)
treea3dff006cf177da51fd6458203d8e4751e36e78b
parenta33cda168e35cb93cdf115f7d12765f590226601 (diff)
downloademacs-78669517dc3db4d6d51fb26d71073fc0c196ab5d.tar.gz
emacs-78669517dc3db4d6d51fb26d71073fc0c196ab5d.zip
Update from Gnulib
This incorporates: 2019-09-22 Update some URLs 2019-09-15 fcntl-h: fix compilation error of creat.c on MSVC 2019-09-15 creat: new module 2019-09-15 access: new module 2019-09-09 Add option to assume best, not worst, when cross-compiling. * build-aux/config.guess, build-aux/config.sub, doc/misc/texinfo.tex: * lib/careadlinkat.c, lib/careadlinkat.h, lib/count-leading-zeros.h: * lib/count-trailing-zeros.h, lib/diffseq.h, lib/fcntl.in.h: * lib/ftoastr.c, lib/get-permissions.c: * lib/ieee754.in.h, lib/inttypes.in.h, lib/mktime.c, lib/open.c: * lib/pathmax.h, lib/pipe2.c, lib/stddef.in.h, lib/stdint.in.h: * lib/stdlib.in.h, lib/str-two-way.h, lib/string.in.h, lib/time.in.h: * lib/timegm.c, lib/unistd.in.h, m4/canonicalize.m4: * m4/extern-inline.m4, m4/fcntl_h.m4, m4/fdopendir.m4: * m4/getgroups.m4, m4/getopt.m4, m4/gettimeofday.m4: * m4/gnulib-common.m4, m4/largefile.m4: * m4/lstat.m4, m4/memmem.m4, m4/mktime.m4, m4/nocrash.m4, m4/open.m4: * m4/pselect.m4, m4/putenv.m4, m4/readlink.m4, m4/regex.m4: * m4/symlink.m4, m4/unistd_h.m4, m4/utimens.m4, m4/utimes.m4: Copy from Gnulib. * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate. * m4/open-slash.m4: New file, copied from Gnulib.
-rwxr-xr-xbuild-aux/config.guess5
-rwxr-xr-xbuild-aux/config.sub2
-rw-r--r--doc/misc/texinfo.tex18
-rw-r--r--lib/careadlinkat.c2
-rw-r--r--lib/careadlinkat.h2
-rw-r--r--lib/count-leading-zeros.h2
-rw-r--r--lib/count-trailing-zeros.h2
-rw-r--r--lib/diffseq.h4
-rw-r--r--lib/fcntl.in.h38
-rw-r--r--lib/ftoastr.c2
-rw-r--r--lib/get-permissions.c2
-rw-r--r--lib/gnulib.mk.in10
-rw-r--r--lib/ieee754.in.h2
-rw-r--r--lib/inttypes.in.h2
-rw-r--r--lib/mktime.c2
-rw-r--r--lib/open.c21
-rw-r--r--lib/pathmax.h2
-rw-r--r--lib/pipe2.c2
-rw-r--r--lib/stddef.in.h2
-rw-r--r--lib/stdint.in.h2
-rw-r--r--lib/stdlib.in.h4
-rw-r--r--lib/str-two-way.h2
-rw-r--r--lib/string.in.h2
-rw-r--r--lib/time.in.h20
-rw-r--r--lib/timegm.c2
-rw-r--r--lib/unistd.in.h62
-rw-r--r--m4/canonicalize.m46
-rw-r--r--m4/extern-inline.m42
-rw-r--r--m4/fcntl_h.m44
-rw-r--r--m4/fdopendir.m46
-rw-r--r--m4/getgroups.m414
-rw-r--r--m4/getopt.m48
-rw-r--r--m4/gettimeofday.m46
-rw-r--r--m4/gnulib-common.m431
-rw-r--r--m4/gnulib-comp.m41
-rw-r--r--m4/largefile.m42
-rw-r--r--m4/lstat.m46
-rw-r--r--m4/memmem.m46
-rw-r--r--m4/mktime.m44
-rw-r--r--m4/nocrash.m44
-rw-r--r--m4/open-slash.m459
-rw-r--r--m4/open.m441
-rw-r--r--m4/pselect.m46
-rw-r--r--m4/putenv.m46
-rw-r--r--m4/readlink.m46
-rw-r--r--m4/regex.m46
-rw-r--r--m4/symlink.m46
-rw-r--r--m4/unistd_h.m410
-rw-r--r--m4/utimens.m46
-rw-r--r--m4/utimes.m44
50 files changed, 281 insertions, 185 deletions
diff --git a/build-aux/config.guess b/build-aux/config.guess
index 97ad0733304..7f9ebbe3109 100755
--- a/build-aux/config.guess
+++ b/build-aux/config.guess
@@ -2,7 +2,7 @@
2# Attempt to guess a canonical system name. 2# Attempt to guess a canonical system name.
3# Copyright 1992-2019 Free Software Foundation, Inc. 3# Copyright 1992-2019 Free Software Foundation, Inc.
4 4
5timestamp='2019-07-24' 5timestamp='2019-09-10'
6 6
7# This file is free software; you can redistribute it and/or modify it 7# This file is free software; you can redistribute it and/or modify it
8# under the terms of the GNU General Public License as published by 8# under the terms of the GNU General Public License as published by
@@ -274,6 +274,9 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
274 *:Sortix:*:*) 274 *:Sortix:*:*)
275 echo "$UNAME_MACHINE"-unknown-sortix 275 echo "$UNAME_MACHINE"-unknown-sortix
276 exit ;; 276 exit ;;
277 *:Twizzler:*:*)
278 echo "$UNAME_MACHINE"-unknown-twizzler
279 exit ;;
277 *:Redox:*:*) 280 *:Redox:*:*)
278 echo "$UNAME_MACHINE"-unknown-redox 281 echo "$UNAME_MACHINE"-unknown-redox
279 exit ;; 282 exit ;;
diff --git a/build-aux/config.sub b/build-aux/config.sub
index a318a468685..0f2234c174d 100755
--- a/build-aux/config.sub
+++ b/build-aux/config.sub
@@ -1343,7 +1343,7 @@ case $os in
1343 | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ 1343 | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
1344 | sym* | kopensolaris* | plan9* \ 1344 | sym* | kopensolaris* | plan9* \
1345 | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ 1345 | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
1346 | aos* | aros* | cloudabi* | sortix* \ 1346 | aos* | aros* | cloudabi* | sortix* | twizzler* \
1347 | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ 1347 | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
1348 | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \ 1348 | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
1349 | knetbsd* | mirbsd* | netbsd* \ 1349 | knetbsd* | mirbsd* | netbsd* \
diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex
index d2e895f3628..df43c1e26ed 100644
--- a/doc/misc/texinfo.tex
+++ b/doc/misc/texinfo.tex
@@ -3,7 +3,7 @@
3% Load plain if necessary, i.e., if running under initex. 3% Load plain if necessary, i.e., if running under initex.
4\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi 4\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
5% 5%
6\def\texinfoversion{2019-08-18.20} 6\def\texinfoversion{2019-09-20.22}
7% 7%
8% Copyright 1985, 1986, 1988, 1990-2019 Free Software Foundation, Inc. 8% Copyright 1985, 1986, 1988, 1990-2019 Free Software Foundation, Inc.
9% 9%
@@ -1052,7 +1052,7 @@ where each line of input produces a line of output.}
1052 tex.sprint( 1052 tex.sprint(
1053 string.format(string.char(0x5c) .. string.char(0x25) .. '03o' .. 1053 string.format(string.char(0x5c) .. string.char(0x25) .. '03o' ..
1054 string.char(0x5c) .. string.char(0x25) .. '03o', 1054 string.char(0x5c) .. string.char(0x25) .. '03o',
1055 (c / 256), (c % 256))) 1055 math.floor(c / 256), math.floor(c % 256)))
1056 else 1056 else
1057 c = c - 0x10000 1057 c = c - 0x10000
1058 local c_hi = c / 1024 + 0xd800 1058 local c_hi = c / 1024 + 0xd800
@@ -1062,8 +1062,8 @@ where each line of input produces a line of output.}
1062 string.char(0x5c) .. string.char(0x25) .. '03o' .. 1062 string.char(0x5c) .. string.char(0x25) .. '03o' ..
1063 string.char(0x5c) .. string.char(0x25) .. '03o' .. 1063 string.char(0x5c) .. string.char(0x25) .. '03o' ..
1064 string.char(0x5c) .. string.char(0x25) .. '03o', 1064 string.char(0x5c) .. string.char(0x25) .. '03o',
1065 (c_hi / 256), (c_hi % 256), 1065 math.floor(c_hi / 256), math.floor(c_hi % 256),
1066 (c_lo / 256), (c_lo % 256))) 1066 math.floor(c_lo / 256), math.floor(c_lo % 256)))
1067 end 1067 end
1068 end 1068 end
1069 end 1069 end
@@ -1076,15 +1076,19 @@ where each line of input produces a line of output.}
1076 function PDFescstr(str) 1076 function PDFescstr(str)
1077 for c in string.bytes(str) do 1077 for c in string.bytes(str) do
1078 if c <= 0x20 or c >= 0x80 or c == 0x28 or c == 0x29 or c == 0x5c then 1078 if c <= 0x20 or c >= 0x80 or c == 0x28 or c == 0x29 or c == 0x5c then
1079 tex.sprint( 1079 tex.sprint(-2,
1080 string.format(string.char(0x5c) .. string.char(0x25) .. '03o', 1080 string.format(string.char(0x5c) .. string.char(0x25) .. '03o',
1081 c)) 1081 c))
1082 else 1082 else
1083 tex.sprint(string.char(c)) 1083 tex.sprint(-2, string.char(c))
1084 end 1084 end
1085 end 1085 end
1086 end 1086 end
1087 } 1087 }
1088 % The -2 in the arguments here gives all the input to TeX catcode 12
1089 % (other) or 10 (space), preventing undefined control sequence errors. See
1090 % https://lists.gnu.org/archive/html/bug-texinfo/2019-08/msg00031.html
1091 %
1088 \endgroup 1092 \endgroup
1089 \def\pdfescapestring#1{\directlua{PDFescstr('\luaescapestring{#1}')}} 1093 \def\pdfescapestring#1{\directlua{PDFescstr('\luaescapestring{#1}')}}
1090 \ifnum\luatexversion>84 1094 \ifnum\luatexversion>84
@@ -4843,6 +4847,7 @@ end
4843 \definedummyletter\ % 4847 \definedummyletter\ %
4844 \definedummyletter\{% 4848 \definedummyletter\{%
4845 \definedummyletter\}% 4849 \definedummyletter\}%
4850 \definedummyletter\&%
4846 % 4851 %
4847 % Do the redefinitions. 4852 % Do the redefinitions.
4848 \definedummies 4853 \definedummies
@@ -4913,6 +4918,7 @@ end
4913 \definedummyword\TeX 4918 \definedummyword\TeX
4914 % 4919 %
4915 % Assorted special characters. 4920 % Assorted special characters.
4921 \definedummyword\ampchar
4916 \definedummyword\atchar 4922 \definedummyword\atchar
4917 \definedummyword\arrow 4923 \definedummyword\arrow
4918 \definedummyword\backslashchar 4924 \definedummyword\backslashchar
diff --git a/lib/careadlinkat.c b/lib/careadlinkat.c
index e56d5030856..480326577c1 100644
--- a/lib/careadlinkat.c
+++ b/lib/careadlinkat.c
@@ -54,7 +54,7 @@
54 54
55 The PREADLINKAT function specifies how to read links. It operates 55 The PREADLINKAT function specifies how to read links. It operates
56 like POSIX readlinkat() 56 like POSIX readlinkat()
57 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/readlink.html> 57 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/readlink.html>
58 but can assume that its first argument is the same as FD. 58 but can assume that its first argument is the same as FD.
59 59
60 If successful, return the buffer address; otherwise return NULL and 60 If successful, return the buffer address; otherwise return NULL and
diff --git a/lib/careadlinkat.h b/lib/careadlinkat.h
index 68b69aa8893..3c08fd6d102 100644
--- a/lib/careadlinkat.h
+++ b/lib/careadlinkat.h
@@ -40,7 +40,7 @@ struct allocator;
40 40
41 The PREADLINKAT function specifies how to read links. It operates 41 The PREADLINKAT function specifies how to read links. It operates
42 like POSIX readlinkat() 42 like POSIX readlinkat()
43 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/readlink.html> 43 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/readlink.html>
44 but can assume that its first argument is the same as FD. 44 but can assume that its first argument is the same as FD.
45 45
46 If successful, return the buffer address; otherwise return NULL and 46 If successful, return the buffer address; otherwise return NULL and
diff --git a/lib/count-leading-zeros.h b/lib/count-leading-zeros.h
index e5ac2e12606..cf867acc530 100644
--- a/lib/count-leading-zeros.h
+++ b/lib/count-leading-zeros.h
@@ -71,7 +71,7 @@ COUNT_LEADING_ZEROS_INLINE int
71count_leading_zeros_32 (unsigned int x) 71count_leading_zeros_32 (unsigned int x)
72{ 72{
73 /* <https://github.com/gibsjose/BitHacks> 73 /* <https://github.com/gibsjose/BitHacks>
74 <http://www.fit.vutbr.cz/~ibarina/pub/bithacks.pdf> */ 74 <https://www.fit.vutbr.cz/~ibarina/pub/bithacks.pdf> */
75 static const char de_Bruijn_lookup[32] = { 75 static const char de_Bruijn_lookup[32] = {
76 31, 22, 30, 21, 18, 10, 29, 2, 20, 17, 15, 13, 9, 6, 28, 1, 76 31, 22, 30, 21, 18, 10, 29, 2, 20, 17, 15, 13, 9, 6, 28, 1,
77 23, 19, 11, 3, 16, 14, 7, 24, 12, 4, 8, 25, 5, 26, 27, 0 77 23, 19, 11, 3, 16, 14, 7, 24, 12, 4, 8, 25, 5, 26, 27, 0
diff --git a/lib/count-trailing-zeros.h b/lib/count-trailing-zeros.h
index 3f78696e30f..7988e4bff44 100644
--- a/lib/count-trailing-zeros.h
+++ b/lib/count-trailing-zeros.h
@@ -69,7 +69,7 @@ COUNT_TRAILING_ZEROS_INLINE int
69count_trailing_zeros_32 (unsigned int x) 69count_trailing_zeros_32 (unsigned int x)
70{ 70{
71 /* <https://github.com/gibsjose/BitHacks> 71 /* <https://github.com/gibsjose/BitHacks>
72 <http://www.fit.vutbr.cz/~ibarina/pub/bithacks.pdf> */ 72 <https://www.fit.vutbr.cz/~ibarina/pub/bithacks.pdf> */
73 static const char de_Bruijn_lookup[32] = { 73 static const char de_Bruijn_lookup[32] = {
74 0, 1, 28, 2, 29, 14, 24, 3, 30, 22, 20, 15, 25, 17, 4, 8, 74 0, 1, 28, 2, 29, 14, 24, 3, 30, 22, 20, 15, 25, 17, 4, 8,
75 31, 27, 13, 23, 21, 19, 16, 7, 26, 12, 18, 6, 11, 5, 10, 9 75 31, 27, 13, 23, 21, 19, 16, 7, 26, 12, 18, 6, 11, 5, 10, 9
diff --git a/lib/diffseq.h b/lib/diffseq.h
index c6aac3d8120..c48da0c98d9 100644
--- a/lib/diffseq.h
+++ b/lib/diffseq.h
@@ -28,13 +28,13 @@
28 The basic algorithm is described in: 28 The basic algorithm is described in:
29 "An O(ND) Difference Algorithm and its Variations", Eugene W. Myers, 29 "An O(ND) Difference Algorithm and its Variations", Eugene W. Myers,
30 Algorithmica Vol. 1, 1986, pp. 251-266, 30 Algorithmica Vol. 1, 1986, pp. 251-266,
31 <http://dx.doi.org/10.1007/BF01840446>. 31 <https://doi.org/10.1007/BF01840446>.
32 See especially section 4.2, which describes the variation used below. 32 See especially section 4.2, which describes the variation used below.
33 33
34 The basic algorithm was independently discovered as described in: 34 The basic algorithm was independently discovered as described in:
35 "Algorithms for Approximate String Matching", Esko Ukkonen, 35 "Algorithms for Approximate String Matching", Esko Ukkonen,
36 Information and Control Vol. 64, 1985, pp. 100-118, 36 Information and Control Vol. 64, 1985, pp. 100-118,
37 <http://dx.doi.org/10.1016/S0019-9958(85)80046-2>. 37 <https://doi.org/10.1016/S0019-9958(85)80046-2>.
38 38
39 Unless the 'find_minimal' flag is set, this code uses the TOO_EXPENSIVE 39 Unless the 'find_minimal' flag is set, this code uses the TOO_EXPENSIVE
40 heuristic, by Paul Eggert, to limit the cost to O(N**1.5 log N) 40 heuristic, by Paul Eggert, to limit the cost to O(N**1.5 log N)
diff --git a/lib/fcntl.in.h b/lib/fcntl.in.h
index eb70dc61eca..abe7993e21c 100644
--- a/lib/fcntl.in.h
+++ b/lib/fcntl.in.h
@@ -39,6 +39,12 @@
39#endif 39#endif
40#@INCLUDE_NEXT@ @NEXT_FCNTL_H@ 40#@INCLUDE_NEXT@ @NEXT_FCNTL_H@
41 41
42/* Native Windows platforms declare open(), creat() in <io.h>. */
43#if (@GNULIB_CREAT@ || @GNULIB_OPEN@ || defined GNULIB_POSIXCHECK) \
44 && (defined _WIN32 && ! defined __CYGWIN__)
45# include <io.h>
46#endif
47
42#else 48#else
43/* Normal invocation convention. */ 49/* Normal invocation convention. */
44 50
@@ -59,6 +65,12 @@
59/* The include_next requires a split double-inclusion guard. */ 65/* The include_next requires a split double-inclusion guard. */
60#@INCLUDE_NEXT@ @NEXT_FCNTL_H@ 66#@INCLUDE_NEXT@ @NEXT_FCNTL_H@
61 67
68/* Native Windows platforms declare open(), creat() in <io.h>. */
69#if (@GNULIB_CREAT@ || @GNULIB_OPEN@ || defined GNULIB_POSIXCHECK) \
70 && (defined _WIN32 && ! defined __CYGWIN__)
71# include <io.h>
72#endif
73
62#ifndef _@GUARD_PREFIX@_FCNTL_H 74#ifndef _@GUARD_PREFIX@_FCNTL_H
63#define _@GUARD_PREFIX@_FCNTL_H 75#define _@GUARD_PREFIX@_FCNTL_H
64 76
@@ -66,12 +78,6 @@
66# include <unistd.h> 78# include <unistd.h>
67#endif 79#endif
68 80
69/* Native Windows platforms declare open(), creat() in <io.h>. */
70#if (@GNULIB_OPEN@ || defined GNULIB_POSIXCHECK) \
71 && (defined _WIN32 && ! defined __CYGWIN__)
72# include <io.h>
73#endif
74
75 81
76/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ 82/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
77 83
@@ -82,6 +88,26 @@
82 88
83/* Declare overridden functions. */ 89/* Declare overridden functions. */
84 90
91#if @GNULIB_CREAT@
92# if @REPLACE_CREAT@
93# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
94# undef creat
95# define creat rpl_creat
96# endif
97_GL_FUNCDECL_RPL (creat, int, (const char *filename, mode_t mode)
98 _GL_ARG_NONNULL ((1)));
99_GL_CXXALIAS_RPL (creat, int, (const char *filename, mode_t mode));
100# else
101_GL_CXXALIAS_SYS (creat, int, (const char *filename, mode_t mode));
102# endif
103_GL_CXXALIASWARN (creat);
104#elif defined GNULIB_POSIXCHECK
105# undef creat
106/* Assume creat is always declared. */
107_GL_WARN_ON_USE (creat, "creat is not always POSIX compliant - "
108 "use gnulib module creat for portability");
109#endif
110
85#if @GNULIB_FCNTL@ 111#if @GNULIB_FCNTL@
86# if @REPLACE_FCNTL@ 112# if @REPLACE_FCNTL@
87# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 113# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
diff --git a/lib/ftoastr.c b/lib/ftoastr.c
index 55f1e02e80f..ffd51d638c5 100644
--- a/lib/ftoastr.c
+++ b/lib/ftoastr.c
@@ -105,7 +105,7 @@ FTOASTR (char *buf, size_t bufsize, int flags, int width, FLOAT x)
105 105
106 Andrysco M, Jhala R, Lerner S. Printing floating-point numbers: 106 Andrysco M, Jhala R, Lerner S. Printing floating-point numbers:
107 a faster, always correct method. ACM SIGPLAN notices - POPL '16. 107 a faster, always correct method. ACM SIGPLAN notices - POPL '16.
108 2016;51(1):555-67 <http://dx.doi.org/10.1145/2914770.2837654>; draft at 108 2016;51(1):555-67 <https://doi.org/10.1145/2914770.2837654>; draft at
109 <https://cseweb.ucsd.edu/~lerner/papers/fp-printing-popl16.pdf>. */ 109 <https://cseweb.ucsd.edu/~lerner/papers/fp-printing-popl16.pdf>. */
110 110
111 PROMOTED_FLOAT promoted_x = x; 111 PROMOTED_FLOAT promoted_x = x;
diff --git a/lib/get-permissions.c b/lib/get-permissions.c
index 99b4664aae7..aa78d7abf1e 100644
--- a/lib/get-permissions.c
+++ b/lib/get-permissions.c
@@ -108,7 +108,7 @@ get_permissions (const char *name, int desc, mode_t mode,
108 When fetching the source ACL, we simply fetch both ACL types. 108 When fetching the source ACL, we simply fetch both ACL types.
109 When setting the destination ACL, we try either ACL types, assuming 109 When setting the destination ACL, we try either ACL types, assuming
110 that the kernel will translate the ACL from one form to the other. 110 that the kernel will translate the ACL from one form to the other.
111 (See in <http://docs.sun.com/app/docs/doc/819-2241/6n4huc7ia?l=en&a=view> 111 (See in <https://docs.oracle.com/cd/E86824_01/html/E54765/acl-2.html>
112 the description of ENOTSUP.) */ 112 the description of ENOTSUP.) */
113 for (;;) 113 for (;;)
114 { 114 {
diff --git a/lib/gnulib.mk.in b/lib/gnulib.mk.in
index 79580e931ab..9a2709c22a7 100644
--- a/lib/gnulib.mk.in
+++ b/lib/gnulib.mk.in
@@ -249,6 +249,7 @@ GL_GENERATE_STDINT_H = @GL_GENERATE_STDINT_H@
249GMALLOC_OBJ = @GMALLOC_OBJ@ 249GMALLOC_OBJ = @GMALLOC_OBJ@
250GMP_LIB = @GMP_LIB@ 250GMP_LIB = @GMP_LIB@
251GMP_OBJ = @GMP_OBJ@ 251GMP_OBJ = @GMP_OBJ@
252GNULIB_ACCESS = @GNULIB_ACCESS@
252GNULIB_ALPHASORT = @GNULIB_ALPHASORT@ 253GNULIB_ALPHASORT = @GNULIB_ALPHASORT@
253GNULIB_ATOLL = @GNULIB_ATOLL@ 254GNULIB_ATOLL = @GNULIB_ATOLL@
254GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ 255GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
@@ -258,6 +259,7 @@ GNULIB_CHOWN = @GNULIB_CHOWN@
258GNULIB_CLOSE = @GNULIB_CLOSE@ 259GNULIB_CLOSE = @GNULIB_CLOSE@
259GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ 260GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@
260GNULIB_COPY_FILE_RANGE = @GNULIB_COPY_FILE_RANGE@ 261GNULIB_COPY_FILE_RANGE = @GNULIB_COPY_FILE_RANGE@
262GNULIB_CREAT = @GNULIB_CREAT@
261GNULIB_CTIME = @GNULIB_CTIME@ 263GNULIB_CTIME = @GNULIB_CTIME@
262GNULIB_DIRFD = @GNULIB_DIRFD@ 264GNULIB_DIRFD = @GNULIB_DIRFD@
263GNULIB_DPRINTF = @GNULIB_DPRINTF@ 265GNULIB_DPRINTF = @GNULIB_DPRINTF@
@@ -838,11 +840,13 @@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
838PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ 840PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
839RALLOC_OBJ = @RALLOC_OBJ@ 841RALLOC_OBJ = @RALLOC_OBJ@
840RANLIB = @RANLIB@ 842RANLIB = @RANLIB@
843REPLACE_ACCESS = @REPLACE_ACCESS@
841REPLACE_CALLOC = @REPLACE_CALLOC@ 844REPLACE_CALLOC = @REPLACE_CALLOC@
842REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ 845REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
843REPLACE_CHOWN = @REPLACE_CHOWN@ 846REPLACE_CHOWN = @REPLACE_CHOWN@
844REPLACE_CLOSE = @REPLACE_CLOSE@ 847REPLACE_CLOSE = @REPLACE_CLOSE@
845REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ 848REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@
849REPLACE_CREAT = @REPLACE_CREAT@
846REPLACE_CTIME = @REPLACE_CTIME@ 850REPLACE_CTIME = @REPLACE_CTIME@
847REPLACE_DIRFD = @REPLACE_DIRFD@ 851REPLACE_DIRFD = @REPLACE_DIRFD@
848REPLACE_DPRINTF = @REPLACE_DPRINTF@ 852REPLACE_DPRINTF = @REPLACE_DPRINTF@
@@ -1609,12 +1613,14 @@ fcntl.h: fcntl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
1609 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ 1613 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
1610 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ 1614 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
1611 -e 's|@''NEXT_FCNTL_H''@|$(NEXT_FCNTL_H)|g' \ 1615 -e 's|@''NEXT_FCNTL_H''@|$(NEXT_FCNTL_H)|g' \
1616 -e 's/@''GNULIB_CREAT''@/$(GNULIB_CREAT)/g' \
1612 -e 's/@''GNULIB_FCNTL''@/$(GNULIB_FCNTL)/g' \ 1617 -e 's/@''GNULIB_FCNTL''@/$(GNULIB_FCNTL)/g' \
1613 -e 's/@''GNULIB_NONBLOCKING''@/$(GNULIB_NONBLOCKING)/g' \ 1618 -e 's/@''GNULIB_NONBLOCKING''@/$(GNULIB_NONBLOCKING)/g' \
1614 -e 's/@''GNULIB_OPEN''@/$(GNULIB_OPEN)/g' \ 1619 -e 's/@''GNULIB_OPEN''@/$(GNULIB_OPEN)/g' \
1615 -e 's/@''GNULIB_OPENAT''@/$(GNULIB_OPENAT)/g' \ 1620 -e 's/@''GNULIB_OPENAT''@/$(GNULIB_OPENAT)/g' \
1616 -e 's|@''HAVE_FCNTL''@|$(HAVE_FCNTL)|g' \ 1621 -e 's|@''HAVE_FCNTL''@|$(HAVE_FCNTL)|g' \
1617 -e 's|@''HAVE_OPENAT''@|$(HAVE_OPENAT)|g' \ 1622 -e 's|@''HAVE_OPENAT''@|$(HAVE_OPENAT)|g' \
1623 -e 's|@''REPLACE_CREAT''@|$(REPLACE_CREAT)|g' \
1618 -e 's|@''REPLACE_FCNTL''@|$(REPLACE_FCNTL)|g' \ 1624 -e 's|@''REPLACE_FCNTL''@|$(REPLACE_FCNTL)|g' \
1619 -e 's|@''REPLACE_OPEN''@|$(REPLACE_OPEN)|g' \ 1625 -e 's|@''REPLACE_OPEN''@|$(REPLACE_OPEN)|g' \
1620 -e 's|@''REPLACE_OPENAT''@|$(REPLACE_OPENAT)|g' \ 1626 -e 's|@''REPLACE_OPENAT''@|$(REPLACE_OPENAT)|g' \
@@ -3176,6 +3182,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
3176 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ 3182 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
3177 -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \ 3183 -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \
3178 -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \ 3184 -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \
3185 -e 's/@''GNULIB_ACCESS''@/$(GNULIB_ACCESS)/g' \
3179 -e 's/@''GNULIB_CHDIR''@/$(GNULIB_CHDIR)/g' \ 3186 -e 's/@''GNULIB_CHDIR''@/$(GNULIB_CHDIR)/g' \
3180 -e 's/@''GNULIB_CHOWN''@/$(GNULIB_CHOWN)/g' \ 3187 -e 's/@''GNULIB_CHOWN''@/$(GNULIB_CHOWN)/g' \
3181 -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \ 3188 -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \
@@ -3275,7 +3282,8 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
3275 -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \ 3282 -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \
3276 -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \ 3283 -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \
3277 | \ 3284 | \
3278 sed -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \ 3285 sed -e 's|@''REPLACE_ACCESS''@|$(REPLACE_ACCESS)|g' \
3286 -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \
3279 -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \ 3287 -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \
3280 -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \ 3288 -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \
3281 -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \ 3289 -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \
diff --git a/lib/ieee754.in.h b/lib/ieee754.in.h
index a079e59d791..586455384cf 100644
--- a/lib/ieee754.in.h
+++ b/lib/ieee754.in.h
@@ -13,7 +13,7 @@
13 13
14 You should have received a copy of the GNU General Public 14 You should have received a copy of the GNU General Public
15 License along with the GNU C Library; if not, see 15 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */ 16 <https://www.gnu.org/licenses/>. */
17 17
18#ifndef _IEEE754_H 18#ifndef _IEEE754_H
19 19
diff --git a/lib/inttypes.in.h b/lib/inttypes.in.h
index d3c735c12ce..31e40c51a68 100644
--- a/lib/inttypes.in.h
+++ b/lib/inttypes.in.h
@@ -17,7 +17,7 @@
17 17
18/* 18/*
19 * ISO C 99 <inttypes.h> for platforms that lack it. 19 * ISO C 99 <inttypes.h> for platforms that lack it.
20 * <http://www.opengroup.org/susv3xbd/inttypes.h.html> 20 * <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/inttypes.h.html>
21 */ 21 */
22 22
23#if __GNUC__ >= 3 23#if __GNUC__ >= 3
diff --git a/lib/mktime.c b/lib/mktime.c
index b00af96c8c4..d45eee85ec8 100644
--- a/lib/mktime.c
+++ b/lib/mktime.c
@@ -78,7 +78,7 @@ my_tzset (void)
78 - Time zone names based on geography, without slashes, e.g. 78 - Time zone names based on geography, without slashes, e.g.
79 "Singapore". 79 "Singapore".
80 - Time zone names that contain explicit DST rules. Syntax: see 80 - Time zone names that contain explicit DST rules. Syntax: see
81 <http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_03> 81 <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_03>
82 The Microsoft CRT understands only the first kind. It produces incorrect 82 The Microsoft CRT understands only the first kind. It produces incorrect
83 results if the value of TZ is of the other kinds. 83 results if the value of TZ is of the other kinds.
84 But in a Cygwin environment, /etc/profile.d/tzset.sh sets TZ to a value 84 But in a Cygwin environment, /etc/profile.d/tzset.sh sets TZ to a value
diff --git a/lib/open.c b/lib/open.c
index 655260572d4..4572ebf6cd2 100644
--- a/lib/open.c
+++ b/lib/open.c
@@ -94,20 +94,13 @@ open (const char *filename, int flags, ...)
94#if OPEN_TRAILING_SLASH_BUG 94#if OPEN_TRAILING_SLASH_BUG
95 /* If the filename ends in a slash and one of O_CREAT, O_WRONLY, O_RDWR 95 /* If the filename ends in a slash and one of O_CREAT, O_WRONLY, O_RDWR
96 is specified, then fail. 96 is specified, then fail.
97 Rationale: POSIX <http://www.opengroup.org/susv3/basedefs/xbd_chap04.html> 97 Rationale: POSIX <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html>
98 says that
99 "A pathname that contains at least one non-slash character and that
100 ends with one or more trailing slashes shall be resolved as if a
101 single dot character ( '.' ) were appended to the pathname."
102 and
103 "The special filename dot shall refer to the directory specified by
104 its predecessor."
105 If the named file already exists as a directory, then 98 If the named file already exists as a directory, then
106 - if O_CREAT is specified, open() must fail because of the semantics 99 - if O_CREAT is specified, open() must fail because of the semantics
107 of O_CREAT, 100 of O_CREAT,
108 - if O_WRONLY or O_RDWR is specified, open() must fail because POSIX 101 - if O_WRONLY or O_RDWR is specified, open() must fail because POSIX
109 <http://www.opengroup.org/susv3/functions/open.html> says that it 102 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/open.html>
110 fails with errno = EISDIR in this case. 103 says that it fails with errno = EISDIR in this case.
111 If the named file does not exist or does not name a directory, then 104 If the named file does not exist or does not name a directory, then
112 - if O_CREAT is specified, open() must fail since open() cannot create 105 - if O_CREAT is specified, open() must fail since open() cannot create
113 directories, 106 directories,
@@ -171,14 +164,6 @@ open (const char *filename, int flags, ...)
171#if OPEN_TRAILING_SLASH_BUG 164#if OPEN_TRAILING_SLASH_BUG
172 /* If the filename ends in a slash and fd does not refer to a directory, 165 /* If the filename ends in a slash and fd does not refer to a directory,
173 then fail. 166 then fail.
174 Rationale: POSIX <http://www.opengroup.org/susv3/basedefs/xbd_chap04.html>
175 says that
176 "A pathname that contains at least one non-slash character and that
177 ends with one or more trailing slashes shall be resolved as if a
178 single dot character ( '.' ) were appended to the pathname."
179 and
180 "The special filename dot shall refer to the directory specified by
181 its predecessor."
182 If the named file without the slash is not a directory, open() must fail 167 If the named file without the slash is not a directory, open() must fail
183 with ENOTDIR. */ 168 with ENOTDIR. */
184 if (fd >= 0) 169 if (fd >= 0)
diff --git a/lib/pathmax.h b/lib/pathmax.h
index 9463a1fb2c6..4287d15870c 100644
--- a/lib/pathmax.h
+++ b/lib/pathmax.h
@@ -20,7 +20,7 @@
20 20
21/* POSIX:2008 defines PATH_MAX to be the maximum number of bytes in a filename, 21/* POSIX:2008 defines PATH_MAX to be the maximum number of bytes in a filename,
22 including the terminating NUL byte. 22 including the terminating NUL byte.
23 <http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/limits.h.html> 23 <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/limits.h.html>
24 PATH_MAX is not defined on systems which have no limit on filename length, 24 PATH_MAX is not defined on systems which have no limit on filename length,
25 such as GNU/Hurd. 25 such as GNU/Hurd.
26 26
diff --git a/lib/pipe2.c b/lib/pipe2.c
index 15a5dec9852..134d9f11fc0 100644
--- a/lib/pipe2.c
+++ b/lib/pipe2.c
@@ -107,7 +107,7 @@ pipe2 (int fd[2], int flags)
107 if (pipe (fd) < 0) 107 if (pipe (fd) < 0)
108 return -1; 108 return -1;
109 109
110 /* POSIX <http://www.opengroup.org/onlinepubs/9699919799/functions/pipe.html> 110 /* POSIX <https://pubs.opengroup.org/onlinepubs/9699919799/functions/pipe.html>
111 says that initially, the O_NONBLOCK and FD_CLOEXEC flags are cleared on 111 says that initially, the O_NONBLOCK and FD_CLOEXEC flags are cleared on
112 both fd[0] and fd[1]. */ 112 both fd[0] and fd[1]. */
113 113
diff --git a/lib/stddef.in.h b/lib/stddef.in.h
index 5aad1210df0..945f19282d4 100644
--- a/lib/stddef.in.h
+++ b/lib/stddef.in.h
@@ -19,7 +19,7 @@
19 19
20/* 20/*
21 * POSIX 2008 <stddef.h> for platforms that have issues. 21 * POSIX 2008 <stddef.h> for platforms that have issues.
22 * <http://www.opengroup.org/susv3xbd/stddef.h.html> 22 * <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/stddef.h.html>
23 */ 23 */
24 24
25#if __GNUC__ >= 3 25#if __GNUC__ >= 3
diff --git a/lib/stdint.in.h b/lib/stdint.in.h
index 21dd8d23e3c..d32de34da19 100644
--- a/lib/stdint.in.h
+++ b/lib/stdint.in.h
@@ -17,7 +17,7 @@
17 17
18/* 18/*
19 * ISO C 99 <stdint.h> for platforms that lack it. 19 * ISO C 99 <stdint.h> for platforms that lack it.
20 * <http://www.opengroup.org/susv3xbd/stdint.h.html> 20 * <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/stdint.h.html>
21 */ 21 */
22 22
23#ifndef _@GUARD_PREFIX@_STDINT_H 23#ifndef _@GUARD_PREFIX@_STDINT_H
diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h
index f829525c104..e5583d967c1 100644
--- a/lib/stdlib.in.h
+++ b/lib/stdlib.in.h
@@ -238,8 +238,8 @@ _GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - "
238 element (or NULL if it doesn't contain an "=" sign), 238 element (or NULL if it doesn't contain an "=" sign),
239 - It returns the index of the "token" in the given array of tokens. 239 - It returns the index of the "token" in the given array of tokens.
240 Otherwise it returns -1, and *OPTIONP and *VALUEP are undefined. 240 Otherwise it returns -1, and *OPTIONP and *VALUEP are undefined.
241 For more details see the POSIX:2001 specification. 241 For more details see the POSIX specification.
242 http://www.opengroup.org/susv3xsh/getsubopt.html */ 242 https://pubs.opengroup.org/onlinepubs/9699919799/functions/getsubopt.html */
243# if !@HAVE_GETSUBOPT@ 243# if !@HAVE_GETSUBOPT@
244_GL_FUNCDECL_SYS (getsubopt, int, 244_GL_FUNCDECL_SYS (getsubopt, int,
245 (char **optionp, char *const *tokens, char **valuep) 245 (char **optionp, char *const *tokens, char **valuep)
diff --git a/lib/str-two-way.h b/lib/str-two-way.h
index 7078c34bdc7..30806d26d64 100644
--- a/lib/str-two-way.h
+++ b/lib/str-two-way.h
@@ -49,7 +49,7 @@
49 character shift table similar to the Boyer-Moore algorithm to 49 character shift table similar to the Boyer-Moore algorithm to
50 achieve improved (potentially sub-linear) performance. 50 achieve improved (potentially sub-linear) performance.
51 51
52 See http://www-igm.univ-mlv.fr/~lecroq/string/node26.html#SECTION00260, 52 See https://www-igm.univ-mlv.fr/~lecroq/string/node26.html#SECTION00260,
53 https://en.wikipedia.org/wiki/Boyer-Moore_string_search_algorithm, 53 https://en.wikipedia.org/wiki/Boyer-Moore_string_search_algorithm,
54 https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.34.6641&rep=rep1&type=pdf 54 https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.34.6641&rep=rep1&type=pdf
55*/ 55*/
diff --git a/lib/string.in.h b/lib/string.in.h
index 4a9292f74ad..c57f041c06d 100644
--- a/lib/string.in.h
+++ b/lib/string.in.h
@@ -693,7 +693,7 @@ _GL_WARN_ON_USE (strcasestr, "strcasestr does work correctly on character "
693 This is a variant of strtok() that is multithread-safe. 693 This is a variant of strtok() that is multithread-safe.
694 694
695 For the POSIX documentation for this function, see: 695 For the POSIX documentation for this function, see:
696 http://www.opengroup.org/susv3xsh/strtok.html 696 https://pubs.opengroup.org/onlinepubs/9699919799/functions/strtok.html
697 697
698 Caveat: It modifies the original string. 698 Caveat: It modifies the original string.
699 Caveat: These functions cannot be used on constant strings. 699 Caveat: These functions cannot be used on constant strings.
diff --git a/lib/time.in.h b/lib/time.in.h
index dd3b21273c9..40e5b2063fc 100644
--- a/lib/time.in.h
+++ b/lib/time.in.h
@@ -84,8 +84,8 @@ struct timespec
84# endif 84# endif
85 85
86# if !GNULIB_defined_struct_time_t_must_be_integral 86# if !GNULIB_defined_struct_time_t_must_be_integral
87/* Per http://austingroupbugs.net/view.php?id=327, POSIX requires 87/* https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_types.h.html
88 time_t to be an integer type, even though C99 permits floating 88 requires time_t to be an integer type, even though C99 permits floating
89 point. We don't know of any implementation that uses floating 89 point. We don't know of any implementation that uses floating
90 point, and it is much easier to write code that doesn't have to 90 point, and it is much easier to write code that doesn't have to
91 worry about that corner case, so we force the issue. */ 91 worry about that corner case, so we force the issue. */
@@ -97,7 +97,7 @@ struct __time_t_must_be_integral {
97 97
98/* Sleep for at least RQTP seconds unless interrupted, If interrupted, 98/* Sleep for at least RQTP seconds unless interrupted, If interrupted,
99 return -1 and store the remaining time into RMTP. See 99 return -1 and store the remaining time into RMTP. See
100 <http://www.opengroup.org/susv3xsh/nanosleep.html>. */ 100 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/nanosleep.html>. */
101# if @GNULIB_NANOSLEEP@ 101# if @GNULIB_NANOSLEEP@
102# if @REPLACE_NANOSLEEP@ 102# if @REPLACE_NANOSLEEP@
103# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 103# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
@@ -153,8 +153,8 @@ _GL_CXXALIASWARN (mktime);
153# endif 153# endif
154 154
155/* Convert TIMER to RESULT, assuming local time and UTC respectively. See 155/* Convert TIMER to RESULT, assuming local time and UTC respectively. See
156 <http://www.opengroup.org/susv3xsh/localtime_r.html> and 156 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/localtime_r.html> and
157 <http://www.opengroup.org/susv3xsh/gmtime_r.html>. */ 157 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/gmtime_r.html>. */
158# if @GNULIB_TIME_R@ 158# if @GNULIB_TIME_R@
159# if @REPLACE_LOCALTIME_R@ 159# if @REPLACE_LOCALTIME_R@
160# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 160# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
@@ -203,8 +203,8 @@ _GL_CXXALIASWARN (gmtime_r);
203# endif 203# endif
204 204
205/* Convert TIMER to RESULT, assuming local time and UTC respectively. See 205/* Convert TIMER to RESULT, assuming local time and UTC respectively. See
206 <http://www.opengroup.org/susv3xsh/localtime.html> and 206 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/localtime.html> and
207 <http://www.opengroup.org/susv3xsh/gmtime.html>. */ 207 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/gmtime.html>. */
208# if @GNULIB_LOCALTIME@ || @REPLACE_LOCALTIME@ 208# if @GNULIB_LOCALTIME@ || @REPLACE_LOCALTIME@
209# if @REPLACE_LOCALTIME@ 209# if @REPLACE_LOCALTIME@
210# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 210# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
@@ -237,7 +237,7 @@ _GL_CXXALIASWARN (gmtime);
237 237
238/* Parse BUF as a timestamp, assuming FORMAT specifies its layout, and store 238/* Parse BUF as a timestamp, assuming FORMAT specifies its layout, and store
239 the resulting broken-down time into TM. See 239 the resulting broken-down time into TM. See
240 <http://www.opengroup.org/susv3xsh/strptime.html>. */ 240 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/strptime.html>. */
241# if @GNULIB_STRPTIME@ 241# if @GNULIB_STRPTIME@
242# if ! @HAVE_STRPTIME@ 242# if ! @HAVE_STRPTIME@
243_GL_FUNCDECL_SYS (strptime, char *, (char const *restrict __buf, 243_GL_FUNCDECL_SYS (strptime, char *, (char const *restrict __buf,
@@ -252,7 +252,7 @@ _GL_CXXALIASWARN (strptime);
252# endif 252# endif
253 253
254/* Convert *TP to a date and time string. See 254/* Convert *TP to a date and time string. See
255 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/ctime.html>. */ 255 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/ctime.html>. */
256# if @GNULIB_CTIME@ 256# if @GNULIB_CTIME@
257# if @REPLACE_CTIME@ 257# if @REPLACE_CTIME@
258# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 258# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
@@ -268,7 +268,7 @@ _GL_CXXALIASWARN (ctime);
268# endif 268# endif
269 269
270/* Convert *TP to a date and time string. See 270/* Convert *TP to a date and time string. See
271 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/strftime.html>. */ 271 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/strftime.html>. */
272# if @GNULIB_STRFTIME@ 272# if @GNULIB_STRFTIME@
273# if @REPLACE_STRFTIME@ 273# if @REPLACE_STRFTIME@
274# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 274# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
diff --git a/lib/timegm.c b/lib/timegm.c
index c440480cb2d..fc8c19fd3ea 100644
--- a/lib/timegm.c
+++ b/lib/timegm.c
@@ -15,7 +15,7 @@
15 15
16 You should have received a copy of the GNU General Public 16 You should have received a copy of the GNU General Public
17 License along with the GNU C Library; if not, see 17 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */ 18 <https://www.gnu.org/licenses/>. */
19 19
20#ifndef _LIBC 20#ifndef _LIBC
21# include <libc-config.h> 21# include <libc-config.h>
diff --git a/lib/unistd.in.h b/lib/unistd.in.h
index 59ee39ecea5..cc57ce680d5 100644
--- a/lib/unistd.in.h
+++ b/lib/unistd.in.h
@@ -253,10 +253,28 @@ _GL_INLINE_HEADER_BEGIN
253/* Declare overridden functions. */ 253/* Declare overridden functions. */
254 254
255 255
256#if defined GNULIB_POSIXCHECK 256#if @GNULIB_ACCESS@
257# if @REPLACE_ACCESS@
258# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
259# undef access
260# define access rpl_access
261# endif
262_GL_FUNCDECL_RPL (access, int, (const char *file, int mode)
263 _GL_ARG_NONNULL ((1)));
264_GL_CXXALIAS_RPL (access, int, (const char *file, int mode));
265# else
266_GL_CXXALIAS_SYS (access, int, (const char *file, int mode));
267# endif
268_GL_CXXALIASWARN (access);
269#elif defined GNULIB_POSIXCHECK
270# undef access
271# if HAVE_RAW_DECL_ACCESS
257/* The access() function is a security risk. */ 272/* The access() function is a security risk. */
258_GL_WARN_ON_USE (access, "the access function is a security risk - " 273_GL_WARN_ON_USE (access, "access does not always support X_OK - "
274 "use gnulib module access for portability; "
275 "also, this function is a security risk - "
259 "use the gnulib module faccessat instead"); 276 "use the gnulib module faccessat instead");
277# endif
260#endif 278#endif
261 279
262 280
@@ -277,7 +295,7 @@ _GL_WARN_ON_USE (chown, "chdir is not always in <unistd.h> - "
277 to GID (if GID is not -1). Follow symbolic links. 295 to GID (if GID is not -1). Follow symbolic links.
278 Return 0 if successful, otherwise -1 and errno set. 296 Return 0 if successful, otherwise -1 and errno set.
279 See the POSIX:2008 specification 297 See the POSIX:2008 specification
280 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/chown.html. */ 298 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/chown.html. */
281# if @REPLACE_CHOWN@ 299# if @REPLACE_CHOWN@
282# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 300# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
283# undef chown 301# undef chown
@@ -371,7 +389,7 @@ _GL_WARN_ON_USE (dup, "dup is unportable - "
371 NEWFD = OLDFD, otherwise close NEWFD first if it is open. 389 NEWFD = OLDFD, otherwise close NEWFD first if it is open.
372 Return newfd if successful, otherwise -1 and errno set. 390 Return newfd if successful, otherwise -1 and errno set.
373 See the POSIX:2008 specification 391 See the POSIX:2008 specification
374 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/dup2.html>. */ 392 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/dup2.html>. */
375# if @REPLACE_DUP2@ 393# if @REPLACE_DUP2@
376# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 394# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
377# define dup2 rpl_dup2 395# define dup2 rpl_dup2
@@ -526,7 +544,7 @@ _GL_WARN_ON_USE (faccessat, "faccessat is not portable - "
526 the given file descriptor is open. 544 the given file descriptor is open.
527 Return 0 if successful, otherwise -1 and errno set. 545 Return 0 if successful, otherwise -1 and errno set.
528 See the POSIX:2008 specification 546 See the POSIX:2008 specification
529 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/fchdir.html>. */ 547 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/fchdir.html>. */
530# if ! @HAVE_FCHDIR@ 548# if ! @HAVE_FCHDIR@
531_GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/)); 549_GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/));
532 550
@@ -587,7 +605,7 @@ _GL_WARN_ON_USE (fchownat, "fchownat is not portable - "
587/* Synchronize changes to a file. 605/* Synchronize changes to a file.
588 Return 0 if successful, otherwise -1 and errno set. 606 Return 0 if successful, otherwise -1 and errno set.
589 See POSIX:2008 specification 607 See POSIX:2008 specification
590 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/fdatasync.html>. */ 608 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/fdatasync.html>. */
591# if !@HAVE_FDATASYNC@ || !@HAVE_DECL_FDATASYNC@ 609# if !@HAVE_FDATASYNC@ || !@HAVE_DECL_FDATASYNC@
592_GL_FUNCDECL_SYS (fdatasync, int, (int fd)); 610_GL_FUNCDECL_SYS (fdatasync, int, (int fd));
593# endif 611# endif
@@ -606,7 +624,7 @@ _GL_WARN_ON_USE (fdatasync, "fdatasync is unportable - "
606/* Synchronize changes, including metadata, to a file. 624/* Synchronize changes, including metadata, to a file.
607 Return 0 if successful, otherwise -1 and errno set. 625 Return 0 if successful, otherwise -1 and errno set.
608 See POSIX:2008 specification 626 See POSIX:2008 specification
609 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/fsync.html>. */ 627 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/fsync.html>. */
610# if !@HAVE_FSYNC@ 628# if !@HAVE_FSYNC@
611_GL_FUNCDECL_SYS (fsync, int, (int fd)); 629_GL_FUNCDECL_SYS (fsync, int, (int fd));
612# endif 630# endif
@@ -625,7 +643,7 @@ _GL_WARN_ON_USE (fsync, "fsync is unportable - "
625/* Change the size of the file to which FD is opened to become equal to LENGTH. 643/* Change the size of the file to which FD is opened to become equal to LENGTH.
626 Return 0 if successful, otherwise -1 and errno set. 644 Return 0 if successful, otherwise -1 and errno set.
627 See the POSIX:2008 specification 645 See the POSIX:2008 specification
628 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/ftruncate.html>. */ 646 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/ftruncate.html>. */
629# if @REPLACE_FTRUNCATE@ 647# if @REPLACE_FTRUNCATE@
630# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 648# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
631# undef ftruncate 649# undef ftruncate
@@ -655,7 +673,7 @@ _GL_WARN_ON_USE (ftruncate, "ftruncate is unportable - "
655 Return BUF if successful, or NULL if the directory couldn't be determined 673 Return BUF if successful, or NULL if the directory couldn't be determined
656 or SIZE was too small. 674 or SIZE was too small.
657 See the POSIX:2008 specification 675 See the POSIX:2008 specification
658 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/getcwd.html>. 676 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/getcwd.html>.
659 Additionally, the gnulib module 'getcwd' guarantees the following GNU 677 Additionally, the gnulib module 'getcwd' guarantees the following GNU
660 extension: If BUF is NULL, an array is allocated with 'malloc'; the array 678 extension: If BUF is NULL, an array is allocated with 'malloc'; the array
661 is SIZE bytes long, unless SIZE == 0, in which case it is as big as 679 is SIZE bytes long, unless SIZE == 0, in which case it is as big as
@@ -815,7 +833,7 @@ _GL_WARN_ON_USE (gethostname, "gethostname is unportable - "
815/* Returns the user's login name, or NULL if it cannot be found. Upon error, 833/* Returns the user's login name, or NULL if it cannot be found. Upon error,
816 returns NULL with errno set. 834 returns NULL with errno set.
817 835
818 See <http://www.opengroup.org/susv3xsh/getlogin.html>. 836 See <https://pubs.opengroup.org/onlinepubs/9699919799/functions/getlogin.html>.
819 837
820 Most programs don't need to use this function, because the information is 838 Most programs don't need to use this function, because the information is
821 available through environment variables: 839 available through environment variables:
@@ -844,7 +862,7 @@ _GL_WARN_ON_USE (getlogin, "getlogin is unportable - "
844 the case that the login name cannot be found but no specific error is 862 the case that the login name cannot be found but no specific error is
845 provided (this case is hopefully rare but is left open by the POSIX spec). 863 provided (this case is hopefully rare but is left open by the POSIX spec).
846 864
847 See <http://www.opengroup.org/susv3xsh/getlogin.html>. 865 See <https://pubs.opengroup.org/onlinepubs/9699919799/functions/getlogin.html>.
848 866
849 Most programs don't need to use this function, because the information is 867 Most programs don't need to use this function, because the information is
850 available through environment variables: 868 available through environment variables:
@@ -1079,7 +1097,7 @@ _GL_WARN_ON_USE (isatty, "isatty has portability problems on native Windows - "
1079 to GID (if GID is not -1). Do not follow symbolic links. 1097 to GID (if GID is not -1). Do not follow symbolic links.
1080 Return 0 if successful, otherwise -1 and errno set. 1098 Return 0 if successful, otherwise -1 and errno set.
1081 See the POSIX:2008 specification 1099 See the POSIX:2008 specification
1082 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/lchown.html>. */ 1100 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/lchown.html>. */
1083# if @REPLACE_LCHOWN@ 1101# if @REPLACE_LCHOWN@
1084# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1102# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1085# undef lchown 1103# undef lchown
@@ -1109,7 +1127,7 @@ _GL_WARN_ON_USE (lchown, "lchown is unportable to pre-POSIX.1-2001 systems - "
1109/* Create a new hard link for an existing file. 1127/* Create a new hard link for an existing file.
1110 Return 0 if successful, otherwise -1 and errno set. 1128 Return 0 if successful, otherwise -1 and errno set.
1111 See POSIX:2008 specification 1129 See POSIX:2008 specification
1112 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/link.html>. */ 1130 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/link.html>. */
1113# if @REPLACE_LINK@ 1131# if @REPLACE_LINK@
1114# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1132# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1115# define link rpl_link 1133# define link rpl_link
@@ -1175,7 +1193,7 @@ _GL_WARN_ON_USE (linkat, "linkat is unportable - "
1175/* Set the offset of FD relative to SEEK_SET, SEEK_CUR, or SEEK_END. 1193/* Set the offset of FD relative to SEEK_SET, SEEK_CUR, or SEEK_END.
1176 Return the new offset if successful, otherwise -1 and errno set. 1194 Return the new offset if successful, otherwise -1 and errno set.
1177 See the POSIX:2008 specification 1195 See the POSIX:2008 specification
1178 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/lseek.html>. */ 1196 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/lseek.html>. */
1179# if @REPLACE_LSEEK@ 1197# if @REPLACE_LSEEK@
1180# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1198# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1181# define lseek rpl_lseek 1199# define lseek rpl_lseek
@@ -1247,7 +1265,7 @@ _GL_WARN_ON_USE (pipe2, "pipe2 is unportable - "
1247 Return the number of bytes placed into BUF if successful, otherwise 1265 Return the number of bytes placed into BUF if successful, otherwise
1248 set errno and return -1. 0 indicates EOF. 1266 set errno and return -1. 0 indicates EOF.
1249 See the POSIX:2008 specification 1267 See the POSIX:2008 specification
1250 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/pread.html>. */ 1268 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/pread.html>. */
1251# if @REPLACE_PREAD@ 1269# if @REPLACE_PREAD@
1252# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1270# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1253# undef pread 1271# undef pread
@@ -1282,7 +1300,7 @@ _GL_WARN_ON_USE (pread, "pread is unportable - "
1282 Return the number of bytes written if successful, otherwise 1300 Return the number of bytes written if successful, otherwise
1283 set errno and return -1. 0 indicates nothing written. See the 1301 set errno and return -1. 0 indicates nothing written. See the
1284 POSIX:2008 specification 1302 POSIX:2008 specification
1285 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/pwrite.html>. */ 1303 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/pwrite.html>. */
1286# if @REPLACE_PWRITE@ 1304# if @REPLACE_PWRITE@
1287# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1305# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1288# undef pwrite 1306# undef pwrite
@@ -1315,7 +1333,7 @@ _GL_WARN_ON_USE (pwrite, "pwrite is unportable - "
1315#if @GNULIB_READ@ 1333#if @GNULIB_READ@
1316/* Read up to COUNT bytes from file descriptor FD into the buffer starting 1334/* Read up to COUNT bytes from file descriptor FD into the buffer starting
1317 at BUF. See the POSIX:2008 specification 1335 at BUF. See the POSIX:2008 specification
1318 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/read.html>. */ 1336 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/read.html>. */
1319# if @REPLACE_READ@ 1337# if @REPLACE_READ@
1320# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1338# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1321# undef read 1339# undef read
@@ -1339,7 +1357,7 @@ _GL_CXXALIASWARN (read);
1339 bytes of it into BUF. Return the number of bytes placed into BUF if 1357 bytes of it into BUF. Return the number of bytes placed into BUF if
1340 successful, otherwise -1 and errno set. 1358 successful, otherwise -1 and errno set.
1341 See the POSIX:2008 specification 1359 See the POSIX:2008 specification
1342 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/readlink.html>. */ 1360 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/readlink.html>. */
1343# if @REPLACE_READLINK@ 1361# if @REPLACE_READLINK@
1344# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1362# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1345# define readlink rpl_readlink 1363# define readlink rpl_readlink
@@ -1449,7 +1467,7 @@ _GL_WARN_ON_USE (sethostname, "sethostname is unportable - "
1449/* Pause the execution of the current thread for N seconds. 1467/* Pause the execution of the current thread for N seconds.
1450 Returns the number of seconds left to sleep. 1468 Returns the number of seconds left to sleep.
1451 See the POSIX:2008 specification 1469 See the POSIX:2008 specification
1452 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/sleep.html>. */ 1470 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/sleep.html>. */
1453# if @REPLACE_SLEEP@ 1471# if @REPLACE_SLEEP@
1454# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1472# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1455# undef sleep 1473# undef sleep
@@ -1533,7 +1551,7 @@ _GL_WARN_ON_USE (symlinkat, "symlinkat is not portable - "
1533/* Change the size of the file designated by FILENAME to become equal to LENGTH. 1551/* Change the size of the file designated by FILENAME to become equal to LENGTH.
1534 Return 0 if successful, otherwise -1 and errno set. 1552 Return 0 if successful, otherwise -1 and errno set.
1535 See the POSIX:2008 specification 1553 See the POSIX:2008 specification
1536 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/truncate.html>. */ 1554 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/truncate.html>. */
1537# if @REPLACE_TRUNCATE@ 1555# if @REPLACE_TRUNCATE@
1538# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1556# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1539# undef truncate 1557# undef truncate
@@ -1640,7 +1658,7 @@ _GL_WARN_ON_USE (unlinkat, "unlinkat is not portable - "
1640/* Pause the execution of the current thread for N microseconds. 1658/* Pause the execution of the current thread for N microseconds.
1641 Returns 0 on completion, or -1 on range error. 1659 Returns 0 on completion, or -1 on range error.
1642 See the POSIX:2001 specification 1660 See the POSIX:2001 specification
1643 <http://www.opengroup.org/susv3xsh/usleep.html>. */ 1661 <https://pubs.opengroup.org/onlinepubs/009695399/functions/usleep.html>. */
1644# if @REPLACE_USLEEP@ 1662# if @REPLACE_USLEEP@
1645# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1663# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1646# undef usleep 1664# undef usleep
@@ -1667,7 +1685,7 @@ _GL_WARN_ON_USE (usleep, "usleep is unportable - "
1667#if @GNULIB_WRITE@ 1685#if @GNULIB_WRITE@
1668/* Write up to COUNT bytes starting at BUF to file descriptor FD. 1686/* Write up to COUNT bytes starting at BUF to file descriptor FD.
1669 See the POSIX:2008 specification 1687 See the POSIX:2008 specification
1670 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/write.html>. */ 1688 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/write.html>. */
1671# if @REPLACE_WRITE@ 1689# if @REPLACE_WRITE@
1672# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1690# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1673# undef write 1691# undef write
diff --git a/m4/canonicalize.m4 b/m4/canonicalize.m4
index b61747bd1a5..cb0896fbd8b 100644
--- a/m4/canonicalize.m4
+++ b/m4/canonicalize.m4
@@ -1,4 +1,4 @@
1# canonicalize.m4 serial 30 1# canonicalize.m4 serial 31
2 2
3dnl Copyright (C) 2003-2007, 2009-2019 Free Software Foundation, Inc. 3dnl Copyright (C) 2003-2007, 2009-2019 Free Software Foundation, Inc.
4 4
@@ -117,8 +117,8 @@ AC_DEFUN([gl_FUNC_REALPATH_WORKS],
117 *-musl*) gl_cv_func_realpath_works="guessing yes" ;; 117 *-musl*) gl_cv_func_realpath_works="guessing yes" ;;
118 # Guess no on native Windows. 118 # Guess no on native Windows.
119 mingw*) gl_cv_func_realpath_works="guessing no" ;; 119 mingw*) gl_cv_func_realpath_works="guessing no" ;;
120 # If we don't know, assume the worst. 120 # If we don't know, obey --enable-cross-guesses.
121 *) gl_cv_func_realpath_works="guessing no" ;; 121 *) gl_cv_func_realpath_works="$gl_cross_guess_normal" ;;
122 esac 122 esac
123 ]) 123 ])
124 rm -rf conftest.a conftest.d 124 rm -rf conftest.a conftest.d
diff --git a/m4/extern-inline.m4 b/m4/extern-inline.m4
index ec9f2218bf3..84421cef847 100644
--- a/m4/extern-inline.m4
+++ b/m4/extern-inline.m4
@@ -32,7 +32,7 @@ AC_DEFUN([gl_EXTERN_INLINE],
32 https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html 32 https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html
33 33
34 DragonFly; see 34 DragonFly; see
35 http://muscles.dragonflybsd.org/bulk/bleeding-edge-potential/latest-per-pkg/ah-tty-0.3.12.log 35 http://muscles.dragonflybsd.org/bulk/clang-master-potential/20141111_102002/logs/ah-tty-0.3.12.log
36 36
37 FreeBSD; see: 37 FreeBSD; see:
38 https://lists.gnu.org/r/bug-gnulib/2014-07/msg00104.html 38 https://lists.gnu.org/r/bug-gnulib/2014-07/msg00104.html
diff --git a/m4/fcntl_h.m4 b/m4/fcntl_h.m4
index a86fdae5feb..60dc5e21037 100644
--- a/m4/fcntl_h.m4
+++ b/m4/fcntl_h.m4
@@ -1,4 +1,4 @@
1# serial 15 1# serial 16
2# Configure fcntl.h. 2# Configure fcntl.h.
3dnl Copyright (C) 2006-2007, 2009-2019 Free Software Foundation, Inc. 3dnl Copyright (C) 2006-2007, 2009-2019 Free Software Foundation, Inc.
4dnl This file is free software; the Free Software Foundation 4dnl This file is free software; the Free Software Foundation
@@ -37,6 +37,7 @@ AC_DEFUN([gl_FCNTL_MODULE_INDICATOR],
37 37
38AC_DEFUN([gl_FCNTL_H_DEFAULTS], 38AC_DEFUN([gl_FCNTL_H_DEFAULTS],
39[ 39[
40 GNULIB_CREAT=0; AC_SUBST([GNULIB_CREAT])
40 GNULIB_FCNTL=0; AC_SUBST([GNULIB_FCNTL]) 41 GNULIB_FCNTL=0; AC_SUBST([GNULIB_FCNTL])
41 GNULIB_NONBLOCKING=0; AC_SUBST([GNULIB_NONBLOCKING]) 42 GNULIB_NONBLOCKING=0; AC_SUBST([GNULIB_NONBLOCKING])
42 GNULIB_OPEN=0; AC_SUBST([GNULIB_OPEN]) 43 GNULIB_OPEN=0; AC_SUBST([GNULIB_OPEN])
@@ -44,6 +45,7 @@ AC_DEFUN([gl_FCNTL_H_DEFAULTS],
44 dnl Assume proper GNU behavior unless another module says otherwise. 45 dnl Assume proper GNU behavior unless another module says otherwise.
45 HAVE_FCNTL=1; AC_SUBST([HAVE_FCNTL]) 46 HAVE_FCNTL=1; AC_SUBST([HAVE_FCNTL])
46 HAVE_OPENAT=1; AC_SUBST([HAVE_OPENAT]) 47 HAVE_OPENAT=1; AC_SUBST([HAVE_OPENAT])
48 REPLACE_CREAT=0; AC_SUBST([REPLACE_CREAT])
47 REPLACE_FCNTL=0; AC_SUBST([REPLACE_FCNTL]) 49 REPLACE_FCNTL=0; AC_SUBST([REPLACE_FCNTL])
48 REPLACE_OPEN=0; AC_SUBST([REPLACE_OPEN]) 50 REPLACE_OPEN=0; AC_SUBST([REPLACE_OPEN])
49 REPLACE_OPENAT=0; AC_SUBST([REPLACE_OPENAT]) 51 REPLACE_OPENAT=0; AC_SUBST([REPLACE_OPENAT])
diff --git a/m4/fdopendir.m4 b/m4/fdopendir.m4
index b2b3b037316..ad48e4ef2d5 100644
--- a/m4/fdopendir.m4
+++ b/m4/fdopendir.m4
@@ -1,4 +1,4 @@
1# serial 11 1# serial 12
2# See if we need to provide fdopendir. 2# See if we need to provide fdopendir.
3 3
4dnl Copyright (C) 2009-2019 Free Software Foundation, Inc. 4dnl Copyright (C) 2009-2019 Free Software Foundation, Inc.
@@ -49,8 +49,8 @@ DIR *fdopendir (int);
49 *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;; 49 *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
50 # Guess yes on musl systems. 50 # Guess yes on musl systems.
51 *-musl*) gl_cv_func_fdopendir_works="guessing yes" ;; 51 *-musl*) gl_cv_func_fdopendir_works="guessing yes" ;;
52 # If we don't know, assume the worst. 52 # If we don't know, obey --enable-cross-guesses.
53 *) gl_cv_func_fdopendir_works="guessing no" ;; 53 *) gl_cv_func_fdopendir_works="$gl_cross_guess_normal" ;;
54 esac 54 esac
55 ])]) 55 ])])
56 case "$gl_cv_func_fdopendir_works" in 56 case "$gl_cv_func_fdopendir_works" in
diff --git a/m4/getgroups.m4 b/m4/getgroups.m4
index c93447bb11c..556c177449b 100644
--- a/m4/getgroups.m4
+++ b/m4/getgroups.m4
@@ -1,4 +1,4 @@
1# serial 22 1# serial 23
2 2
3dnl From Jim Meyering. 3dnl From Jim Meyering.
4dnl A wrapper around AC_FUNC_GETGROUPS. 4dnl A wrapper around AC_FUNC_GETGROUPS.
@@ -9,8 +9,6 @@ dnl A wrapper around AC_FUNC_GETGROUPS.
9# gives unlimited permission to copy and/or distribute it, 9# gives unlimited permission to copy and/or distribute it,
10# with or without modifications, as long as this notice is preserved. 10# with or without modifications, as long as this notice is preserved.
11 11
12m4_version_prereq([2.70], [] ,[
13
14# This is taken from the following Autoconf patch: 12# This is taken from the following Autoconf patch:
15# https://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=7fbb553727ed7e0e689a17594b58559ecf3ea6e9 13# https://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=7fbb553727ed7e0e689a17594b58559ecf3ea6e9
16AC_DEFUN([AC_FUNC_GETGROUPS], 14AC_DEFUN([AC_FUNC_GETGROUPS],
@@ -44,8 +42,8 @@ AC_DEFUN([AC_FUNC_GETGROUPS],
44 *-gnu* | gnu*) ac_cv_func_getgroups_works="guessing yes" ;; 42 *-gnu* | gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
45 # Guess yes on musl systems. 43 # Guess yes on musl systems.
46 *-musl*) ac_cv_func_getgroups_works="guessing yes" ;; 44 *-musl*) ac_cv_func_getgroups_works="guessing yes" ;;
47 # If we don't know, assume the worst. 45 # If we don't know, obey --enable-cross-guesses.
48 *) ac_cv_func_getgroups_works="guessing no" ;; 46 *) ac_cv_func_getgroups_works="$gl_cross_guess_normal" ;;
49 esac 47 esac
50 ]) 48 ])
51 ]) 49 ])
@@ -61,8 +59,6 @@ AC_DEFUN([AC_FUNC_GETGROUPS],
61 LIBS=$ac_save_LIBS 59 LIBS=$ac_save_LIBS
62])# AC_FUNC_GETGROUPS 60])# AC_FUNC_GETGROUPS
63 61
64])
65
66AC_DEFUN([gl_FUNC_GETGROUPS], 62AC_DEFUN([gl_FUNC_GETGROUPS],
67[ 63[
68 AC_REQUIRE([AC_TYPE_GETGROUPS]) 64 AC_REQUIRE([AC_TYPE_GETGROUPS])
@@ -99,8 +95,8 @@ AC_DEFUN([gl_FUNC_GETGROUPS],
99 *-gnu* | gnu*) gl_cv_func_getgroups_works="guessing yes" ;; 95 *-gnu* | gnu*) gl_cv_func_getgroups_works="guessing yes" ;;
100 # Guess yes on musl systems. 96 # Guess yes on musl systems.
101 *-musl*) gl_cv_func_getgroups_works="guessing yes" ;; 97 *-musl*) gl_cv_func_getgroups_works="guessing yes" ;;
102 # If we don't know, assume the worst. 98 # If we don't know, obey --enable-cross-guesses.
103 *) gl_cv_func_getgroups_works="guessing no" ;; 99 *) gl_cv_func_getgroups_works="$gl_cross_guess_normal" ;;
104 esac 100 esac
105 ])]) 101 ])])
106 case "$gl_cv_func_getgroups_works" in 102 case "$gl_cv_func_getgroups_works" in
diff --git a/m4/getopt.m4 b/m4/getopt.m4
index 5991bf83e89..8cc78278739 100644
--- a/m4/getopt.m4
+++ b/m4/getopt.m4
@@ -1,4 +1,4 @@
1# getopt.m4 serial 46 1# getopt.m4 serial 47
2dnl Copyright (C) 2002-2006, 2008-2019 Free Software Foundation, Inc. 2dnl Copyright (C) 2002-2006, 2008-2019 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
@@ -302,8 +302,10 @@ dnl is ambiguous with environment values that contain newlines.
302 ]])], 302 ]])],
303 [gl_cv_func_getopt_gnu=yes], 303 [gl_cv_func_getopt_gnu=yes],
304 [gl_cv_func_getopt_gnu=no], 304 [gl_cv_func_getopt_gnu=no],
305 [dnl Cross compiling. Assume the worst, even on glibc platforms. 305 [dnl Cross compiling.
306 gl_cv_func_getopt_gnu="guessing no" 306 dnl Assume the worst, even on glibc platforms.
307 dnl But obey --enable-cross-guesses.
308 gl_cv_func_getopt_gnu="$gl_cross_guess_normal"
307 ]) 309 ])
308 case $gl_had_POSIXLY_CORRECT in 310 case $gl_had_POSIXLY_CORRECT in
309 exported) ;; 311 exported) ;;
diff --git a/m4/gettimeofday.m4 b/m4/gettimeofday.m4
index 5e2ef6f47e2..7eebabd9c70 100644
--- a/m4/gettimeofday.m4
+++ b/m4/gettimeofday.m4
@@ -1,4 +1,4 @@
1# serial 26 1# serial 27
2 2
3# Copyright (C) 2001-2003, 2005, 2007, 2009-2019 Free Software Foundation, Inc. 3# Copyright (C) 2001-2003, 2005, 2007, 2009-2019 Free Software Foundation, Inc.
4# This file is free software; the Free Software Foundation 4# This file is free software; the Free Software Foundation
@@ -109,8 +109,8 @@ AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER],
109 *-musl*) gl_cv_func_gettimeofday_clobber="guessing no" ;; 109 *-musl*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
110 # Guess no on native Windows. 110 # Guess no on native Windows.
111 mingw*) gl_cv_func_gettimeofday_clobber="guessing no" ;; 111 mingw*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
112 # If we don't know, assume the worst. 112 # If we don't know, obey --enable-cross-guesses.
113 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;; 113 *) gl_cv_func_gettimeofday_clobber="$gl_cross_guess_inverted" ;;
114 esac 114 esac
115 ])]) 115 ])])
116 116
diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4
index 57b94ed5325..479c9de9eab 100644
--- a/m4/gnulib-common.m4
+++ b/m4/gnulib-common.m4
@@ -1,4 +1,4 @@
1# gnulib-common.m4 serial 44 1# gnulib-common.m4 serial 45
2dnl Copyright (C) 2007-2019 Free Software Foundation, Inc. 2dnl Copyright (C) 2007-2019 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
@@ -94,7 +94,7 @@ AC_DEFUN([gl_COMMON_BODY], [
94 invoked from such signal handlers. Such functions have some restrictions: 94 invoked from such signal handlers. Such functions have some restrictions:
95 * All functions that it calls should be marked _GL_ASYNC_SAFE as well, 95 * All functions that it calls should be marked _GL_ASYNC_SAFE as well,
96 or should be listed as async-signal-safe in POSIX 96 or should be listed as async-signal-safe in POSIX
97 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_04> 97 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_04>
98 section 2.4.3. Note that malloc(), sprintf(), and fwrite(), in 98 section 2.4.3. Note that malloc(), sprintf(), and fwrite(), in
99 particular, are NOT async-signal-safe. 99 particular, are NOT async-signal-safe.
100 * All memory locations (variables and struct fields) that these functions 100 * All memory locations (variables and struct fields) that these functions
@@ -115,6 +115,33 @@ AC_DEFUN([gl_COMMON_BODY], [
115 errno. */ 115 errno. */
116#define _GL_ASYNC_SAFE 116#define _GL_ASYNC_SAFE
117]) 117])
118 dnl Hint which direction to take regarding cross-compilation guesses:
119 dnl When a user installs a program on a platform they are not intimately
120 dnl familiar with, --enable-cross-guesses=conservative is the appropriate
121 dnl choice. It implements the "If we don't know, assume the worst" principle.
122 dnl However, when an operating system developer (on a platform which is not
123 dnl yet known to gnulib) builds packages for their platform, they want to
124 dnl expose, not hide, possible platform bugs; in this case,
125 dnl --enable-cross-guesses=risky is the appropriate choice.
126 dnl Sets the variables
127 dnl gl_cross_guess_normal (to be used when 'yes' is good and 'no' is bad),
128 dnl gl_cross_guess_inverted (to be used when 'no' is good and 'yes' is bad).
129 AC_ARG_ENABLE([cross-guesses],
130 [AS_HELP_STRING([--enable-cross-guesses={conservative|risky}],
131 [specify policy for cross-compilation guesses])],
132 [if test "x$enableval" != xconservative && test "x$enableval" != xrisky; then
133 AC_MSG_WARN([invalid argument supplied to --enable-cross-guesses])
134 enableval=conservative
135 fi
136 gl_cross_guesses="$enableval"],
137 [gl_cross_guesses=conservative])
138 if test $gl_cross_guesses = risky; then
139 gl_cross_guess_normal="guessing yes"
140 gl_cross_guess_inverted="guessing no"
141 else
142 gl_cross_guess_normal="guessing no"
143 gl_cross_guess_inverted="guessing yes"
144 fi
118 dnl Preparation for running test programs: 145 dnl Preparation for running test programs:
119 dnl Tell glibc to write diagnostics from -D_FORTIFY_SOURCE=2 to stderr, not 146 dnl Tell glibc to write diagnostics from -D_FORTIFY_SOURCE=2 to stderr, not
120 dnl to /dev/tty, so they can be redirected to log files. Such diagnostics 147 dnl to /dev/tty, so they can be redirected to log files. Such diagnostics
diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4
index 77563edc84d..625c2211665 100644
--- a/m4/gnulib-comp.m4
+++ b/m4/gnulib-comp.m4
@@ -1104,6 +1104,7 @@ AC_DEFUN([gl_FILE_LIST], [
1104 m4/nstrftime.m4 1104 m4/nstrftime.m4
1105 m4/off_t.m4 1105 m4/off_t.m4
1106 m4/open-cloexec.m4 1106 m4/open-cloexec.m4
1107 m4/open-slash.m4
1107 m4/open.m4 1108 m4/open.m4
1108 m4/pathmax.m4 1109 m4/pathmax.m4
1109 m4/pipe2.m4 1110 m4/pipe2.m4
diff --git a/m4/largefile.m4 b/m4/largefile.m4
index 1938188c17b..c6dd9a10032 100644
--- a/m4/largefile.m4
+++ b/m4/largefile.m4
@@ -56,7 +56,7 @@ rm -rf conftest*[]dnl
56# By default, many hosts won't let programs access large files; 56# By default, many hosts won't let programs access large files;
57# one must use special compiler options to get large-file access to work. 57# one must use special compiler options to get large-file access to work.
58# For more details about this brain damage please see: 58# For more details about this brain damage please see:
59# http://www.unix-systems.org/version2/whatsnew/lfs20mar.html 59# http://www.unix.org/version2/whatsnew/lfs20mar.html
60AC_DEFUN([AC_SYS_LARGEFILE], 60AC_DEFUN([AC_SYS_LARGEFILE],
61[AC_ARG_ENABLE(largefile, 61[AC_ARG_ENABLE(largefile,
62 [ --disable-largefile omit support for large files]) 62 [ --disable-largefile omit support for large files])
diff --git a/m4/lstat.m4 b/m4/lstat.m4
index ace163867e2..be6d3f24b43 100644
--- a/m4/lstat.m4
+++ b/m4/lstat.m4
@@ -1,4 +1,4 @@
1# serial 32 1# serial 33
2 2
3# Copyright (C) 1997-2001, 2003-2019 Free Software Foundation, Inc. 3# Copyright (C) 1997-2001, 2003-2019 Free Software Foundation, Inc.
4# 4#
@@ -63,8 +63,8 @@ AC_DEFUN([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK],
63 # Guess no on native Windows. 63 # Guess no on native Windows.
64 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;; 64 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
65 *) 65 *)
66 # If we don't know, assume the worst. 66 # If we don't know, obey --enable-cross-guesses.
67 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;; 67 gl_cv_func_lstat_dereferences_slashed_symlink="$gl_cross_guess_normal" ;;
68 esac 68 esac
69 ]) 69 ])
70 rm -f conftest.sym conftest.file 70 rm -f conftest.sym conftest.file
diff --git a/m4/memmem.m4 b/m4/memmem.m4
index af2d5bbcf52..dcccefa7045 100644
--- a/m4/memmem.m4
+++ b/m4/memmem.m4
@@ -1,4 +1,4 @@
1# memmem.m4 serial 25 1# memmem.m4 serial 26
2dnl Copyright (C) 2002-2004, 2007-2019 Free Software Foundation, Inc. 2dnl Copyright (C) 2002-2004, 2007-2019 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
@@ -68,7 +68,7 @@ AC_DEFUN([gl_FUNC_MEMMEM_SIMPLE],
68#endif 68#endif
69 ], 69 ],
70 [gl_cv_func_memmem_works_always="guessing yes"], 70 [gl_cv_func_memmem_works_always="guessing yes"],
71 [gl_cv_func_memmem_works_always="guessing no"]) 71 [gl_cv_func_memmem_works_always="$gl_cross_guess_normal"])
72 ]) 72 ])
73 ]) 73 ])
74 case "$gl_cv_func_memmem_works_always" in 74 case "$gl_cv_func_memmem_works_always" in
@@ -138,7 +138,7 @@ static void quit (int sig) { _exit (sig + 128); }
138#endif 138#endif
139 ], 139 ],
140 [gl_cv_func_memmem_works_fast="guessing yes"], 140 [gl_cv_func_memmem_works_fast="guessing yes"],
141 [gl_cv_func_memmem_works_fast="guessing no"]) 141 [gl_cv_func_memmem_works_fast="$gl_cross_guess_normal"])
142 ]) 142 ])
143 ]) 143 ])
144 case "$gl_cv_func_memmem_works_fast" in 144 case "$gl_cv_func_memmem_works_fast" in
diff --git a/m4/mktime.m4 b/m4/mktime.m4
index a86e1eebc68..405476145c2 100644
--- a/m4/mktime.m4
+++ b/m4/mktime.m4
@@ -1,4 +1,4 @@
1# serial 30 1# serial 31
2dnl Copyright (C) 2002-2003, 2005-2007, 2009-2019 Free Software Foundation, 2dnl Copyright (C) 2002-2003, 2005-2007, 2009-2019 Free Software Foundation,
3dnl Inc. 3dnl Inc.
4dnl This file is free software; the Free Software Foundation 4dnl This file is free software; the Free Software Foundation
@@ -247,7 +247,7 @@ main ()
247 [case "$host_os" in 247 [case "$host_os" in
248 # Guess no on native Windows. 248 # Guess no on native Windows.
249 mingw*) gl_cv_func_working_mktime="guessing no" ;; 249 mingw*) gl_cv_func_working_mktime="guessing no" ;;
250 *) gl_cv_func_working_mktime="guessing no" ;; 250 *) gl_cv_func_working_mktime="$gl_cross_guess_normal" ;;
251 esac 251 esac
252 ]) 252 ])
253 ]) 253 ])
diff --git a/m4/nocrash.m4 b/m4/nocrash.m4
index 4d9f0226906..8577038d796 100644
--- a/m4/nocrash.m4
+++ b/m4/nocrash.m4
@@ -53,7 +53,7 @@ nocrash_init (void)
53 /* Allocate a port on which the thread shall listen for exceptions. */ 53 /* Allocate a port on which the thread shall listen for exceptions. */
54 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port) 54 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
55 == KERN_SUCCESS) { 55 == KERN_SUCCESS) {
56 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */ 56 /* See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
57 if (mach_port_insert_right (self, our_exception_port, our_exception_port, 57 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
58 MACH_MSG_TYPE_MAKE_SEND) 58 MACH_MSG_TYPE_MAKE_SEND)
59 == KERN_SUCCESS) { 59 == KERN_SUCCESS) {
@@ -72,7 +72,7 @@ nocrash_init (void)
72 for a particular thread. This has the effect that when our exception 72 for a particular thread. This has the effect that when our exception
73 port gets the message, the thread specific exception port has already 73 port gets the message, the thread specific exception port has already
74 been asked, and we don't need to bother about it. 74 been asked, and we don't need to bother about it.
75 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */ 75 See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
76 task_set_exception_ports (self, mask, our_exception_port, 76 task_set_exception_ports (self, mask, our_exception_port,
77 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE); 77 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
78 } 78 }
diff --git a/m4/open-slash.m4 b/m4/open-slash.m4
new file mode 100644
index 00000000000..a8756ae8fea
--- /dev/null
+++ b/m4/open-slash.m4
@@ -0,0 +1,59 @@
1# open-slash.m4 serial 1
2dnl Copyright (C) 2007-2019 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved.
6
7dnl Tests whether open() and creat() recognize a trailing slash.
8dnl Sets gl_cv_func_open_slash.
9AC_DEFUN([gl_OPEN_TRAILING_SLASH_BUG],
10[
11 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
12 dnl open("foo/") should not create a file when the file name has a
13 dnl trailing slash. FreeBSD only has the problem on symlinks.
14 AC_CHECK_FUNCS_ONCE([lstat])
15 AC_CACHE_CHECK([whether open recognizes a trailing slash],
16 [gl_cv_func_open_slash],
17 [# Assume that if we have lstat, we can also check symlinks.
18 if test $ac_cv_func_lstat = yes; then
19 touch conftest.tmp
20 ln -s conftest.tmp conftest.lnk
21 fi
22 AC_RUN_IFELSE(
23 [AC_LANG_SOURCE([[
24#include <fcntl.h>
25#if HAVE_UNISTD_H
26# include <unistd.h>
27#endif
28int main ()
29{
30 int result = 0;
31#if HAVE_LSTAT
32 if (open ("conftest.lnk/", O_RDONLY) != -1)
33 result |= 1;
34#endif
35 if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
36 result |= 2;
37 return result;
38}]])],
39 [gl_cv_func_open_slash=yes],
40 [gl_cv_func_open_slash=no],
41 [
42changequote(,)dnl
43 case "$host_os" in
44 freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
45 gl_cv_func_open_slash="guessing no" ;;
46 *)
47 gl_cv_func_open_slash="guessing yes" ;;
48 esac
49changequote([,])dnl
50 ])
51 rm -f conftest.sl conftest.tmp conftest.lnk
52 ])
53 case "$gl_cv_func_open_slash" in
54 *no)
55 AC_DEFINE([OPEN_TRAILING_SLASH_BUG], [1],
56 [Define to 1 if open() fails to recognize a trailing slash.])
57 ;;
58 esac
59])
diff --git a/m4/open.m4 b/m4/open.m4
index 5d73f4de1ac..6cf0bebb176 100644
--- a/m4/open.m4
+++ b/m4/open.m4
@@ -19,48 +19,9 @@ AC_DEFUN([gl_FUNC_OPEN],
19 if test "$gl_cv_macro_O_CLOEXEC" != yes; then 19 if test "$gl_cv_macro_O_CLOEXEC" != yes; then
20 REPLACE_OPEN=1 20 REPLACE_OPEN=1
21 fi 21 fi
22 AC_CACHE_CHECK([whether open recognizes a trailing slash], 22 gl_OPEN_TRAILING_SLASH_BUG
23 [gl_cv_func_open_slash],
24 [# Assume that if we have lstat, we can also check symlinks.
25 if test $ac_cv_func_lstat = yes; then
26 touch conftest.tmp
27 ln -s conftest.tmp conftest.lnk
28 fi
29 AC_RUN_IFELSE(
30 [AC_LANG_SOURCE([[
31#include <fcntl.h>
32#if HAVE_UNISTD_H
33# include <unistd.h>
34#endif
35int main ()
36{
37 int result = 0;
38#if HAVE_LSTAT
39 if (open ("conftest.lnk/", O_RDONLY) != -1)
40 result |= 1;
41#endif
42 if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
43 result |= 2;
44 return result;
45}]])],
46 [gl_cv_func_open_slash=yes],
47 [gl_cv_func_open_slash=no],
48 [
49changequote(,)dnl
50 case "$host_os" in
51 freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
52 gl_cv_func_open_slash="guessing no" ;;
53 *)
54 gl_cv_func_open_slash="guessing yes" ;;
55 esac
56changequote([,])dnl
57 ])
58 rm -f conftest.sl conftest.tmp conftest.lnk
59 ])
60 case "$gl_cv_func_open_slash" in 23 case "$gl_cv_func_open_slash" in
61 *no) 24 *no)
62 AC_DEFINE([OPEN_TRAILING_SLASH_BUG], [1],
63 [Define to 1 if open() fails to recognize a trailing slash.])
64 REPLACE_OPEN=1 25 REPLACE_OPEN=1
65 ;; 26 ;;
66 esac 27 esac
diff --git a/m4/pselect.m4 b/m4/pselect.m4
index 5c72b69587a..250463d80a3 100644
--- a/m4/pselect.m4
+++ b/m4/pselect.m4
@@ -1,4 +1,4 @@
1# pselect.m4 serial 7 1# pselect.m4 serial 8
2dnl Copyright (C) 2011-2019 Free Software Foundation, Inc. 2dnl Copyright (C) 2011-2019 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
@@ -55,8 +55,8 @@ AC_DEFUN([gl_FUNC_PSELECT],
55 linux-* | linux) gl_cv_func_pselect_detects_ebadf="guessing yes" ;; 55 linux-* | linux) gl_cv_func_pselect_detects_ebadf="guessing yes" ;;
56 # Guess yes on glibc systems. 56 # Guess yes on glibc systems.
57 *-gnu* | gnu*) gl_cv_func_pselect_detects_ebadf="guessing yes" ;; 57 *-gnu* | gnu*) gl_cv_func_pselect_detects_ebadf="guessing yes" ;;
58 # If we don't know, assume the worst. 58 # If we don't know, obey --enable-cross-guesses.
59 *) gl_cv_func_pselect_detects_ebadf="guessing no" ;; 59 *) gl_cv_func_pselect_detects_ebadf="$gl_cross_guess_normal" ;;
60 esac 60 esac
61 ]) 61 ])
62 ]) 62 ])
diff --git a/m4/putenv.m4 b/m4/putenv.m4
index 342ba2636ab..1267b901bec 100644
--- a/m4/putenv.m4
+++ b/m4/putenv.m4
@@ -1,4 +1,4 @@
1# putenv.m4 serial 23 1# putenv.m4 serial 24
2dnl Copyright (C) 2002-2019 Free Software Foundation, Inc. 2dnl Copyright (C) 2002-2019 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
@@ -40,8 +40,8 @@ AC_DEFUN([gl_FUNC_PUTENV],
40 *-musl*) gl_cv_func_svid_putenv="guessing yes" ;; 40 *-musl*) gl_cv_func_svid_putenv="guessing yes" ;;
41 # Guess no on native Windows. 41 # Guess no on native Windows.
42 mingw*) gl_cv_func_svid_putenv="guessing no" ;; 42 mingw*) gl_cv_func_svid_putenv="guessing no" ;;
43 # If we don't know, assume the worst. 43 # If we don't know, obey --enable-cross-guesses.
44 *) gl_cv_func_svid_putenv="guessing no" ;; 44 *) gl_cv_func_svid_putenv="$gl_cross_guess_normal" ;;
45 esac 45 esac
46 ]) 46 ])
47 ]) 47 ])
diff --git a/m4/readlink.m4 b/m4/readlink.m4
index 2d7681576cc..7aa6ce03379 100644
--- a/m4/readlink.m4
+++ b/m4/readlink.m4
@@ -1,4 +1,4 @@
1# readlink.m4 serial 14 1# readlink.m4 serial 15
2dnl Copyright (C) 2003, 2007, 2009-2019 Free Software Foundation, Inc. 2dnl Copyright (C) 2003, 2007, 2009-2019 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
@@ -38,8 +38,8 @@ AC_DEFUN([gl_FUNC_READLINK],
38 linux-* | linux) gl_cv_func_readlink_works="guessing yes" ;; 38 linux-* | linux) gl_cv_func_readlink_works="guessing yes" ;;
39 # Guess yes on glibc systems. 39 # Guess yes on glibc systems.
40 *-gnu* | gnu*) gl_cv_func_readlink_works="guessing yes" ;; 40 *-gnu* | gnu*) gl_cv_func_readlink_works="guessing yes" ;;
41 # If we don't know, assume the worst. 41 # If we don't know, obey --enable-cross-guesses.
42 *) gl_cv_func_readlink_works="guessing no" ;; 42 *) gl_cv_func_readlink_works="$gl_cross_guess_normal" ;;
43 esac 43 esac
44 ]) 44 ])
45 rm -f conftest.link conftest.lnk2]) 45 rm -f conftest.link conftest.lnk2])
diff --git a/m4/regex.m4 b/m4/regex.m4
index 35119c5c85f..ad36dc2b020 100644
--- a/m4/regex.m4
+++ b/m4/regex.m4
@@ -1,4 +1,4 @@
1# serial 68 1# serial 69
2 2
3# Copyright (C) 1996-2001, 2003-2019 Free Software Foundation, Inc. 3# Copyright (C) 1996-2001, 2003-2019 Free Software Foundation, Inc.
4# 4#
@@ -243,8 +243,8 @@ AC_DEFUN([gl_REGEX],
243 [case "$host_os" in 243 [case "$host_os" in
244 # Guess no on native Windows. 244 # Guess no on native Windows.
245 mingw*) gl_cv_func_re_compile_pattern_working="guessing no" ;; 245 mingw*) gl_cv_func_re_compile_pattern_working="guessing no" ;;
246 # Otherwise, assume it is not working. 246 # Otherwise obey --enable-cross-guesses.
247 *) gl_cv_func_re_compile_pattern_working="guessing no" ;; 247 *) gl_cv_func_re_compile_pattern_working="$gl_cross_guess_normal" ;;
248 esac 248 esac
249 ]) 249 ])
250 ]) 250 ])
diff --git a/m4/symlink.m4 b/m4/symlink.m4
index 508e94dd410..2bec317e9b8 100644
--- a/m4/symlink.m4
+++ b/m4/symlink.m4
@@ -1,4 +1,4 @@
1# serial 8 1# serial 9
2# See if we need to provide symlink replacement. 2# See if we need to provide symlink replacement.
3 3
4dnl Copyright (C) 2009-2019 Free Software Foundation, Inc. 4dnl Copyright (C) 2009-2019 Free Software Foundation, Inc.
@@ -40,8 +40,8 @@ AC_DEFUN([gl_FUNC_SYMLINK],
40 linux-* | linux) gl_cv_func_symlink_works="guessing yes" ;; 40 linux-* | linux) gl_cv_func_symlink_works="guessing yes" ;;
41 # Guess yes on glibc systems. 41 # Guess yes on glibc systems.
42 *-gnu* | gnu*) gl_cv_func_symlink_works="guessing yes" ;; 42 *-gnu* | gnu*) gl_cv_func_symlink_works="guessing yes" ;;
43 # If we don't know, assume the worst. 43 # If we don't know, obey --enable-cross-guesses.
44 *) gl_cv_func_symlink_works="guessing no" ;; 44 *) gl_cv_func_symlink_works="$gl_cross_guess_normal" ;;
45 esac 45 esac
46 ]) 46 ])
47 rm -f conftest.f conftest.link conftest.lnk2]) 47 rm -f conftest.f conftest.link conftest.lnk2])
diff --git a/m4/unistd_h.m4 b/m4/unistd_h.m4
index a3b3905f84e..18b7140e598 100644
--- a/m4/unistd_h.m4
+++ b/m4/unistd_h.m4
@@ -1,4 +1,4 @@
1# unistd_h.m4 serial 75 1# unistd_h.m4 serial 76
2dnl Copyright (C) 2006-2019 Free Software Foundation, Inc. 2dnl Copyright (C) 2006-2019 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
@@ -41,9 +41,9 @@ AC_DEFUN([gl_UNISTD_H],
41# include <io.h> 41# include <io.h>
42# endif 42# endif
43#endif 43#endif
44 ]], [chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir fchownat 44 ]], [access chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir
45 fdatasync fsync ftruncate getcwd getdomainname getdtablesize getgroups 45 fchownat fdatasync fsync ftruncate getcwd getdomainname getdtablesize
46 gethostname getlogin getlogin_r getpagesize getpass 46 getgroups gethostname getlogin getlogin_r getpagesize getpass
47 getusershell setusershell endusershell 47 getusershell setusershell endusershell
48 group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite 48 group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite
49 readlink readlinkat rmdir sethostname sleep symlink symlinkat 49 readlink readlinkat rmdir sethostname sleep symlink symlinkat
@@ -61,6 +61,7 @@ AC_DEFUN([gl_UNISTD_MODULE_INDICATOR],
61 61
62AC_DEFUN([gl_UNISTD_H_DEFAULTS], 62AC_DEFUN([gl_UNISTD_H_DEFAULTS],
63[ 63[
64 GNULIB_ACCESS=0; AC_SUBST([GNULIB_ACCESS])
64 GNULIB_CHDIR=0; AC_SUBST([GNULIB_CHDIR]) 65 GNULIB_CHDIR=0; AC_SUBST([GNULIB_CHDIR])
65 GNULIB_CHOWN=0; AC_SUBST([GNULIB_CHOWN]) 66 GNULIB_CHOWN=0; AC_SUBST([GNULIB_CHOWN])
66 GNULIB_CLOSE=0; AC_SUBST([GNULIB_CLOSE]) 67 GNULIB_CLOSE=0; AC_SUBST([GNULIB_CLOSE])
@@ -159,6 +160,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
159 HAVE_DECL_TTYNAME_R=1; AC_SUBST([HAVE_DECL_TTYNAME_R]) 160 HAVE_DECL_TTYNAME_R=1; AC_SUBST([HAVE_DECL_TTYNAME_R])
160 HAVE_OS_H=0; AC_SUBST([HAVE_OS_H]) 161 HAVE_OS_H=0; AC_SUBST([HAVE_OS_H])
161 HAVE_SYS_PARAM_H=0; AC_SUBST([HAVE_SYS_PARAM_H]) 162 HAVE_SYS_PARAM_H=0; AC_SUBST([HAVE_SYS_PARAM_H])
163 REPLACE_ACCESS=0; AC_SUBST([REPLACE_ACCESS])
162 REPLACE_CHOWN=0; AC_SUBST([REPLACE_CHOWN]) 164 REPLACE_CHOWN=0; AC_SUBST([REPLACE_CHOWN])
163 REPLACE_CLOSE=0; AC_SUBST([REPLACE_CLOSE]) 165 REPLACE_CLOSE=0; AC_SUBST([REPLACE_CLOSE])
164 REPLACE_DUP=0; AC_SUBST([REPLACE_DUP]) 166 REPLACE_DUP=0; AC_SUBST([REPLACE_DUP])
diff --git a/m4/utimens.m4 b/m4/utimens.m4
index dda86b09d77..6ed65934064 100644
--- a/m4/utimens.m4
+++ b/m4/utimens.m4
@@ -3,7 +3,7 @@ dnl This file is free software; the Free Software Foundation
3dnl gives unlimited permission to copy and/or distribute it, 3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved. 4dnl with or without modifications, as long as this notice is preserved.
5 5
6dnl serial 9 6dnl serial 10
7 7
8AC_DEFUN([gl_UTIMENS], 8AC_DEFUN([gl_UTIMENS],
9[ 9[
@@ -35,8 +35,8 @@ AC_DEFUN([gl_UTIMENS],
35 linux-* | linux) gl_cv_func_futimesat_works="guessing yes" ;; 35 linux-* | linux) gl_cv_func_futimesat_works="guessing yes" ;;
36 # Guess yes on glibc systems. 36 # Guess yes on glibc systems.
37 *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;; 37 *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;;
38 # If we don't know, assume the worst. 38 # If we don't know, obey --enable-cross-guesses.
39 *) gl_cv_func_futimesat_works="guessing no" ;; 39 *) gl_cv_func_futimesat_works="$gl_cross_guess_normal" ;;
40 esac 40 esac
41 ]) 41 ])
42 rm -f conftest.file]) 42 rm -f conftest.file])
diff --git a/m4/utimes.m4 b/m4/utimes.m4
index 5806d8fbbb6..703f823ad53 100644
--- a/m4/utimes.m4
+++ b/m4/utimes.m4
@@ -1,5 +1,5 @@
1# Detect some bugs in glibc's implementation of utimes. 1# Detect some bugs in glibc's implementation of utimes.
2# serial 6 2# serial 7
3 3
4dnl Copyright (C) 2003-2005, 2009-2019 Free Software Foundation, Inc. 4dnl Copyright (C) 2003-2005, 2009-2019 Free Software Foundation, Inc.
5dnl This file is free software; the Free Software Foundation 5dnl This file is free software; the Free Software Foundation
@@ -147,7 +147,7 @@ main ()
147 *-musl*) gl_cv_func_working_utimes="guessing yes" ;; 147 *-musl*) gl_cv_func_working_utimes="guessing yes" ;;
148 # Guess no on native Windows. 148 # Guess no on native Windows.
149 mingw*) gl_cv_func_working_utimes="guessing no" ;; 149 mingw*) gl_cv_func_working_utimes="guessing no" ;;
150 *) gl_cv_func_working_utimes="guessing no" ;; 150 *) gl_cv_func_working_utimes="$gl_cross_guess_normal" ;;
151 esac 151 esac
152 ]) 152 ])
153 ]) 153 ])