Commit 78669517 authored by Paul Eggert's avatar Paul Eggert

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.
parent a33cda16
Pipeline #3267 failed with stage
in 65 minutes and 52 seconds
......@@ -2,7 +2,7 @@
# Attempt to guess a canonical system name.
# Copyright 1992-2019 Free Software Foundation, Inc.
timestamp='2019-07-24'
timestamp='2019-09-10'
# This file is free software; you can redistribute it and/or modify it
# 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
*:Sortix:*:*)
echo "$UNAME_MACHINE"-unknown-sortix
exit ;;
*:Twizzler:*:*)
echo "$UNAME_MACHINE"-unknown-twizzler
exit ;;
*:Redox:*:*)
echo "$UNAME_MACHINE"-unknown-redox
exit ;;
......
......@@ -1343,7 +1343,7 @@ case $os in
| hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
| sym* | kopensolaris* | plan9* \
| amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
| aos* | aros* | cloudabi* | sortix* \
| aos* | aros* | cloudabi* | sortix* | twizzler* \
| nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
| clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
| knetbsd* | mirbsd* | netbsd* \
......
......@@ -3,7 +3,7 @@
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
\def\texinfoversion{2019-08-18.20}
\def\texinfoversion{2019-09-20.22}
%
% Copyright 1985, 1986, 1988, 1990-2019 Free Software Foundation, Inc.
%
......@@ -1052,7 +1052,7 @@
tex.sprint(
string.format(string.char(0x5c) .. string.char(0x25) .. '03o' ..
string.char(0x5c) .. string.char(0x25) .. '03o',
(c / 256), (c % 256)))
math.floor(c / 256), math.floor(c % 256)))
else
c = c - 0x10000
local c_hi = c / 1024 + 0xd800
......@@ -1062,8 +1062,8 @@
string.char(0x5c) .. string.char(0x25) .. '03o' ..
string.char(0x5c) .. string.char(0x25) .. '03o' ..
string.char(0x5c) .. string.char(0x25) .. '03o',
(c_hi / 256), (c_hi % 256),
(c_lo / 256), (c_lo % 256)))
math.floor(c_hi / 256), math.floor(c_hi % 256),
math.floor(c_lo / 256), math.floor(c_lo % 256)))
end
end
end
......@@ -1076,15 +1076,19 @@
function PDFescstr(str)
for c in string.bytes(str) do
if c <= 0x20 or c >= 0x80 or c == 0x28 or c == 0x29 or c == 0x5c then
tex.sprint(
tex.sprint(-2,
string.format(string.char(0x5c) .. string.char(0x25) .. '03o',
c))
else
tex.sprint(string.char(c))
tex.sprint(-2, string.char(c))
end
end
end
}
% The -2 in the arguments here gives all the input to TeX catcode 12
% (other) or 10 (space), preventing undefined control sequence errors. See
% https://lists.gnu.org/archive/html/bug-texinfo/2019-08/msg00031.html
%
\endgroup
\def\pdfescapestring#1{\directlua{PDFescstr('\luaescapestring{#1}')}}
\ifnum\luatexversion>84
......@@ -4843,6 +4847,7 @@
\definedummyletter\ %
\definedummyletter\{%
\definedummyletter\}%
\definedummyletter\&%
%
% Do the redefinitions.
\definedummies
......@@ -4913,6 +4918,7 @@
\definedummyword\TeX
%
% Assorted special characters.
\definedummyword\ampchar
\definedummyword\atchar
\definedummyword\arrow
\definedummyword\backslashchar
......
......@@ -54,7 +54,7 @@
The PREADLINKAT function specifies how to read links. It operates
like POSIX readlinkat()
<http://pubs.opengroup.org/onlinepubs/9699919799/functions/readlink.html>
<https://pubs.opengroup.org/onlinepubs/9699919799/functions/readlink.html>
but can assume that its first argument is the same as FD.
If successful, return the buffer address; otherwise return NULL and
......
......@@ -40,7 +40,7 @@ struct allocator;
The PREADLINKAT function specifies how to read links. It operates
like POSIX readlinkat()
<http://pubs.opengroup.org/onlinepubs/9699919799/functions/readlink.html>
<https://pubs.opengroup.org/onlinepubs/9699919799/functions/readlink.html>
but can assume that its first argument is the same as FD.
If successful, return the buffer address; otherwise return NULL and
......
......@@ -71,7 +71,7 @@ COUNT_LEADING_ZEROS_INLINE int
count_leading_zeros_32 (unsigned int x)
{
/* <https://github.com/gibsjose/BitHacks>
<http://www.fit.vutbr.cz/~ibarina/pub/bithacks.pdf> */
<https://www.fit.vutbr.cz/~ibarina/pub/bithacks.pdf> */
static const char de_Bruijn_lookup[32] = {
31, 22, 30, 21, 18, 10, 29, 2, 20, 17, 15, 13, 9, 6, 28, 1,
23, 19, 11, 3, 16, 14, 7, 24, 12, 4, 8, 25, 5, 26, 27, 0
......
......@@ -69,7 +69,7 @@ COUNT_TRAILING_ZEROS_INLINE int
count_trailing_zeros_32 (unsigned int x)
{
/* <https://github.com/gibsjose/BitHacks>
<http://www.fit.vutbr.cz/~ibarina/pub/bithacks.pdf> */
<https://www.fit.vutbr.cz/~ibarina/pub/bithacks.pdf> */
static const char de_Bruijn_lookup[32] = {
0, 1, 28, 2, 29, 14, 24, 3, 30, 22, 20, 15, 25, 17, 4, 8,
31, 27, 13, 23, 21, 19, 16, 7, 26, 12, 18, 6, 11, 5, 10, 9
......
......@@ -28,13 +28,13 @@
The basic algorithm is described in:
"An O(ND) Difference Algorithm and its Variations", Eugene W. Myers,
Algorithmica Vol. 1, 1986, pp. 251-266,
<http://dx.doi.org/10.1007/BF01840446>.
<https://doi.org/10.1007/BF01840446>.
See especially section 4.2, which describes the variation used below.
The basic algorithm was independently discovered as described in:
"Algorithms for Approximate String Matching", Esko Ukkonen,
Information and Control Vol. 64, 1985, pp. 100-118,
<http://dx.doi.org/10.1016/S0019-9958(85)80046-2>.
<https://doi.org/10.1016/S0019-9958(85)80046-2>.
Unless the 'find_minimal' flag is set, this code uses the TOO_EXPENSIVE
heuristic, by Paul Eggert, to limit the cost to O(N**1.5 log N)
......
......@@ -39,6 +39,12 @@
#endif
#@INCLUDE_NEXT@ @NEXT_FCNTL_H@
/* Native Windows platforms declare open(), creat() in <io.h>. */
#if (@GNULIB_CREAT@ || @GNULIB_OPEN@ || defined GNULIB_POSIXCHECK) \
&& (defined _WIN32 && ! defined __CYGWIN__)
# include <io.h>
#endif
#else
/* Normal invocation convention. */
......@@ -59,6 +65,12 @@
/* The include_next requires a split double-inclusion guard. */
#@INCLUDE_NEXT@ @NEXT_FCNTL_H@
/* Native Windows platforms declare open(), creat() in <io.h>. */
#if (@GNULIB_CREAT@ || @GNULIB_OPEN@ || defined GNULIB_POSIXCHECK) \
&& (defined _WIN32 && ! defined __CYGWIN__)
# include <io.h>
#endif
#ifndef _@GUARD_PREFIX@_FCNTL_H
#define _@GUARD_PREFIX@_FCNTL_H
......@@ -66,12 +78,6 @@
# include <unistd.h>
#endif
/* Native Windows platforms declare open(), creat() in <io.h>. */
#if (@GNULIB_OPEN@ || defined GNULIB_POSIXCHECK) \
&& (defined _WIN32 && ! defined __CYGWIN__)
# include <io.h>
#endif
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
......@@ -82,6 +88,26 @@
/* Declare overridden functions. */
#if @GNULIB_CREAT@
# if @REPLACE_CREAT@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef creat
# define creat rpl_creat
# endif
_GL_FUNCDECL_RPL (creat, int, (const char *filename, mode_t mode)
_GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL (creat, int, (const char *filename, mode_t mode));
# else
_GL_CXXALIAS_SYS (creat, int, (const char *filename, mode_t mode));
# endif
_GL_CXXALIASWARN (creat);
#elif defined GNULIB_POSIXCHECK
# undef creat
/* Assume creat is always declared. */
_GL_WARN_ON_USE (creat, "creat is not always POSIX compliant - "
"use gnulib module creat for portability");
#endif
#if @GNULIB_FCNTL@
# if @REPLACE_FCNTL@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
......
......@@ -105,7 +105,7 @@ FTOASTR (char *buf, size_t bufsize, int flags, int width, FLOAT x)
Andrysco M, Jhala R, Lerner S. Printing floating-point numbers:
a faster, always correct method. ACM SIGPLAN notices - POPL '16.
2016;51(1):555-67 <http://dx.doi.org/10.1145/2914770.2837654>; draft at
2016;51(1):555-67 <https://doi.org/10.1145/2914770.2837654>; draft at
<https://cseweb.ucsd.edu/~lerner/papers/fp-printing-popl16.pdf>. */
PROMOTED_FLOAT promoted_x = x;
......
......@@ -108,7 +108,7 @@ get_permissions (const char *name, int desc, mode_t mode,
When fetching the source ACL, we simply fetch both ACL types.
When setting the destination ACL, we try either ACL types, assuming
that the kernel will translate the ACL from one form to the other.
(See in <http://docs.sun.com/app/docs/doc/819-2241/6n4huc7ia?l=en&a=view>
(See in <https://docs.oracle.com/cd/E86824_01/html/E54765/acl-2.html>
the description of ENOTSUP.) */
for (;;)
{
......
......@@ -249,6 +249,7 @@ GL_GENERATE_STDINT_H = @GL_GENERATE_STDINT_H@
GMALLOC_OBJ = @GMALLOC_OBJ@
GMP_LIB = @GMP_LIB@
GMP_OBJ = @GMP_OBJ@
GNULIB_ACCESS = @GNULIB_ACCESS@
GNULIB_ALPHASORT = @GNULIB_ALPHASORT@
GNULIB_ATOLL = @GNULIB_ATOLL@
GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
......@@ -258,6 +259,7 @@ GNULIB_CHOWN = @GNULIB_CHOWN@
GNULIB_CLOSE = @GNULIB_CLOSE@
GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@
GNULIB_COPY_FILE_RANGE = @GNULIB_COPY_FILE_RANGE@
GNULIB_CREAT = @GNULIB_CREAT@
GNULIB_CTIME = @GNULIB_CTIME@
GNULIB_DIRFD = @GNULIB_DIRFD@
GNULIB_DPRINTF = @GNULIB_DPRINTF@
......@@ -838,11 +840,13 @@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
RALLOC_OBJ = @RALLOC_OBJ@
RANLIB = @RANLIB@
REPLACE_ACCESS = @REPLACE_ACCESS@
REPLACE_CALLOC = @REPLACE_CALLOC@
REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
REPLACE_CHOWN = @REPLACE_CHOWN@
REPLACE_CLOSE = @REPLACE_CLOSE@
REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@
REPLACE_CREAT = @REPLACE_CREAT@
REPLACE_CTIME = @REPLACE_CTIME@
REPLACE_DIRFD = @REPLACE_DIRFD@
REPLACE_DPRINTF = @REPLACE_DPRINTF@
......@@ -1609,12 +1613,14 @@ fcntl.h: fcntl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_FCNTL_H''@|$(NEXT_FCNTL_H)|g' \
-e 's/@''GNULIB_CREAT''@/$(GNULIB_CREAT)/g' \
-e 's/@''GNULIB_FCNTL''@/$(GNULIB_FCNTL)/g' \
-e 's/@''GNULIB_NONBLOCKING''@/$(GNULIB_NONBLOCKING)/g' \
-e 's/@''GNULIB_OPEN''@/$(GNULIB_OPEN)/g' \
-e 's/@''GNULIB_OPENAT''@/$(GNULIB_OPENAT)/g' \
-e 's|@''HAVE_FCNTL''@|$(HAVE_FCNTL)|g' \
-e 's|@''HAVE_OPENAT''@|$(HAVE_OPENAT)|g' \
-e 's|@''REPLACE_CREAT''@|$(REPLACE_CREAT)|g' \
-e 's|@''REPLACE_FCNTL''@|$(REPLACE_FCNTL)|g' \
-e 's|@''REPLACE_OPEN''@|$(REPLACE_OPEN)|g' \
-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
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \
-e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \
-e 's/@''GNULIB_ACCESS''@/$(GNULIB_ACCESS)/g' \
-e 's/@''GNULIB_CHDIR''@/$(GNULIB_CHDIR)/g' \
-e 's/@''GNULIB_CHOWN''@/$(GNULIB_CHOWN)/g' \
-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
-e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \
-e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \
| \
sed -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \
sed -e 's|@''REPLACE_ACCESS''@|$(REPLACE_ACCESS)|g' \
-e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \
-e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \
-e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \
-e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \
......
......@@ -13,7 +13,7 @@
You should have received a copy of the GNU General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
<https://www.gnu.org/licenses/>. */
#ifndef _IEEE754_H
......
......@@ -17,7 +17,7 @@
/*
* ISO C 99 <inttypes.h> for platforms that lack it.
* <http://www.opengroup.org/susv3xbd/inttypes.h.html>
* <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/inttypes.h.html>
*/
#if __GNUC__ >= 3
......
......@@ -78,7 +78,7 @@ my_tzset (void)
- Time zone names based on geography, without slashes, e.g.
"Singapore".
- Time zone names that contain explicit DST rules. Syntax: see
<http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_03>
<https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_03>
The Microsoft CRT understands only the first kind. It produces incorrect
results if the value of TZ is of the other kinds.
But in a Cygwin environment, /etc/profile.d/tzset.sh sets TZ to a value
......
......@@ -94,20 +94,13 @@ open (const char *filename, int flags, ...)
#if OPEN_TRAILING_SLASH_BUG
/* If the filename ends in a slash and one of O_CREAT, O_WRONLY, O_RDWR
is specified, then fail.
Rationale: POSIX <http://www.opengroup.org/susv3/basedefs/xbd_chap04.html>
says that
"A pathname that contains at least one non-slash character and that
ends with one or more trailing slashes shall be resolved as if a
single dot character ( '.' ) were appended to the pathname."
and
"The special filename dot shall refer to the directory specified by
its predecessor."
Rationale: POSIX <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html>
If the named file already exists as a directory, then
- if O_CREAT is specified, open() must fail because of the semantics
of O_CREAT,
- if O_WRONLY or O_RDWR is specified, open() must fail because POSIX
<http://www.opengroup.org/susv3/functions/open.html> says that it
fails with errno = EISDIR in this case.
<https://pubs.opengroup.org/onlinepubs/9699919799/functions/open.html>
says that it fails with errno = EISDIR in this case.
If the named file does not exist or does not name a directory, then
- if O_CREAT is specified, open() must fail since open() cannot create
directories,
......@@ -171,14 +164,6 @@ open (const char *filename, int flags, ...)
#if OPEN_TRAILING_SLASH_BUG
/* If the filename ends in a slash and fd does not refer to a directory,
then fail.
Rationale: POSIX <http://www.opengroup.org/susv3/basedefs/xbd_chap04.html>
says that
"A pathname that contains at least one non-slash character and that
ends with one or more trailing slashes shall be resolved as if a
single dot character ( '.' ) were appended to the pathname."
and
"The special filename dot shall refer to the directory specified by
its predecessor."
If the named file without the slash is not a directory, open() must fail
with ENOTDIR. */
if (fd >= 0)
......
......@@ -20,7 +20,7 @@
/* POSIX:2008 defines PATH_MAX to be the maximum number of bytes in a filename,
including the terminating NUL byte.
<http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/limits.h.html>
<https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/limits.h.html>
PATH_MAX is not defined on systems which have no limit on filename length,
such as GNU/Hurd.
......
......@@ -107,7 +107,7 @@ pipe2 (int fd[2], int flags)
if (pipe (fd) < 0)
return -1;
/* POSIX <http://www.opengroup.org/onlinepubs/9699919799/functions/pipe.html>
/* POSIX <https://pubs.opengroup.org/onlinepubs/9699919799/functions/pipe.html>
says that initially, the O_NONBLOCK and FD_CLOEXEC flags are cleared on
both fd[0] and fd[1]. */
......
......@@ -19,7 +19,7 @@
/*
* POSIX 2008 <stddef.h> for platforms that have issues.
* <http://www.opengroup.org/susv3xbd/stddef.h.html>
* <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/stddef.h.html>
*/
#if __GNUC__ >= 3
......
......@@ -17,7 +17,7 @@
/*
* ISO C 99 <stdint.h> for platforms that lack it.
* <http://www.opengroup.org/susv3xbd/stdint.h.html>
* <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/stdint.h.html>
*/
#ifndef _@GUARD_PREFIX@_STDINT_H
......
......@@ -238,8 +238,8 @@ _GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - "
element (or NULL if it doesn't contain an "=" sign),
- It returns the index of the "token" in the given array of tokens.
Otherwise it returns -1, and *OPTIONP and *VALUEP are undefined.
For more details see the POSIX:2001 specification.
http://www.opengroup.org/susv3xsh/getsubopt.html */
For more details see the POSIX specification.
https://pubs.opengroup.org/onlinepubs/9699919799/functions/getsubopt.html */
# if !@HAVE_GETSUBOPT@
_GL_FUNCDECL_SYS (getsubopt, int,
(char **optionp, char *const *tokens, char **valuep)
......
......@@ -49,7 +49,7 @@
character shift table similar to the Boyer-Moore algorithm to
achieve improved (potentially sub-linear) performance.
See http://www-igm.univ-mlv.fr/~lecroq/string/node26.html#SECTION00260,
See https://www-igm.univ-mlv.fr/~lecroq/string/node26.html#SECTION00260,
https://en.wikipedia.org/wiki/Boyer-Moore_string_search_algorithm,
https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.34.6641&rep=rep1&type=pdf
*/
......
......@@ -693,7 +693,7 @@ _GL_WARN_ON_USE (strcasestr, "strcasestr does work correctly on character "
This is a variant of strtok() that is multithread-safe.
For the POSIX documentation for this function, see:
http://www.opengroup.org/susv3xsh/strtok.html
https://pubs.opengroup.org/onlinepubs/9699919799/functions/strtok.html
Caveat: It modifies the original string.
Caveat: These functions cannot be used on constant strings.
......
......@@ -84,8 +84,8 @@ struct timespec
# endif
# if !GNULIB_defined_struct_time_t_must_be_integral
/* Per http://austingroupbugs.net/view.php?id=327, POSIX requires
time_t to be an integer type, even though C99 permits floating
/* https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_types.h.html
requires time_t to be an integer type, even though C99 permits floating
point. We don't know of any implementation that uses floating
point, and it is much easier to write code that doesn't have to
worry about that corner case, so we force the issue. */
......@@ -97,7 +97,7 @@ struct __time_t_must_be_integral {
/* Sleep for at least RQTP seconds unless interrupted, If interrupted,
return -1 and store the remaining time into RMTP. See
<http://www.opengroup.org/susv3xsh/nanosleep.html>. */
<https://pubs.opengroup.org/onlinepubs/9699919799/functions/nanosleep.html>. */
# if @GNULIB_NANOSLEEP@
# if @REPLACE_NANOSLEEP@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
......@@ -153,8 +153,8 @@ _GL_CXXALIASWARN (mktime);
# endif
/* Convert TIMER to RESULT, assuming local time and UTC respectively. See
<http://www.opengroup.org/susv3xsh/localtime_r.html> and
<http://www.opengroup.org/susv3xsh/gmtime_r.html>. */
<https://pubs.opengroup.org/onlinepubs/9699919799/functions/localtime_r.html> and
<https://pubs.opengroup.org/onlinepubs/9699919799/functions/gmtime_r.html>. */
# if @GNULIB_TIME_R@
# if @REPLACE_LOCALTIME_R@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
......@@ -203,8 +203,8 @@ _GL_CXXALIASWARN (gmtime_r);
# endif
/* Convert TIMER to RESULT, assuming local time and UTC respectively. See
<http://www.opengroup.org/susv3xsh/localtime.html> and
<http://www.opengroup.org/susv3xsh/gmtime.html>. */
<https://pubs.opengroup.org/onlinepubs/9699919799/functions/localtime.html> and
<https://pubs.opengroup.org/onlinepubs/9699919799/functions/gmtime.html>. */
# if @GNULIB_LOCALTIME@ || @REPLACE_LOCALTIME@
# if @REPLACE_LOCALTIME@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
......@@ -237,7 +237,7 @@ _GL_CXXALIASWARN (gmtime);
/* Parse BUF as a timestamp, assuming FORMAT specifies its layout, and store
the resulting broken-down time into TM. See
<http://www.opengroup.org/susv3xsh/strptime.html>. */
<https://pubs.opengroup.org/onlinepubs/9699919799/functions/strptime.html>. */
# if @GNULIB_STRPTIME@
# if ! @HAVE_STRPTIME@
_GL_FUNCDECL_SYS (strptime, char *, (char const *restrict __buf,
......@@ -252,7 +252,7 @@ _GL_CXXALIASWARN (strptime);
# endif
/* Convert *TP to a date and time string. See
<http://pubs.opengroup.org/onlinepubs/9699919799/functions/ctime.html>. */
<https://pubs.opengroup.org/onlinepubs/9699919799/functions/ctime.html>. */
# if @GNULIB_CTIME@
# if @REPLACE_CTIME@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
......@@ -268,7 +268,7 @@ _GL_CXXALIASWARN (ctime);
# endif
/* Convert *TP to a date and time string. See
<http://pubs.opengroup.org/onlinepubs/9699919799/functions/strftime.html>. */
<https://pubs.opengroup.org/onlinepubs/9699919799/functions/strftime.html>. */
# if @GNULIB_STRFTIME@
# if @REPLACE_STRFTIME@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
......
......@@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
<https://www.gnu.org/licenses/>. */
#ifndef _LIBC
# include <libc-config.h>
......
This diff is collapsed.
# canonicalize.m4 serial 30
# canonicalize.m4 serial 31
dnl Copyright (C) 2003-2007, 2009-2019 Free Software Foundation, Inc.
......@@ -117,8 +117,8 @@ AC_DEFUN([gl_FUNC_REALPATH_WORKS],
*-musl*) gl_cv_func_realpath_works="guessing yes" ;;
# Guess no on native Windows.
mingw*) gl_cv_func_realpath_works="guessing no" ;;
# If we don't know, assume the worst.
*) gl_cv_func_realpath_works="guessing no" ;;
# If we don't know, obey --enable-cross-guesses.
*) gl_cv_func_realpath_works="$gl_cross_guess_normal" ;;
esac
])
rm -rf conftest.a conftest.d
......
......@@ -32,7 +32,7 @@ AC_DEFUN([gl_EXTERN_INLINE],
https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html
DragonFly; see
http://muscles.dragonflybsd.org/bulk/bleeding-edge-potential/latest-per-pkg/ah-tty-0.3.12.log
http://muscles.dragonflybsd.org/bulk/clang-master-potential/20141111_102002/logs/ah-tty-0.3.12.log
FreeBSD; see:
https://lists.gnu.org/r/bug-gnulib/2014-07/msg00104.html
......
# serial 15
# serial 16
# Configure fcntl.h.
dnl Copyright (C) 2006-2007, 2009-2019 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
......@@ -37,6 +37,7 @@ AC_DEFUN([gl_FCNTL_MODULE_INDICATOR],
AC_DEFUN([gl_FCNTL_H_DEFAULTS],
[
GNULIB_CREAT=0; AC_SUBST([GNULIB_CREAT])
GNULIB_FCNTL=0; AC_SUBST([GNULIB_FCNTL])
GNULIB_NONBLOCKING=0; AC_SUBST([GNULIB_NONBLOCKING])
GNULIB_OPEN=0; AC_SUBST([GNULIB_OPEN])
......@@ -44,6 +45,7 @@ AC_DEFUN([gl_FCNTL_H_DEFAULTS],
dnl Assume proper GNU behavior unless another module says otherwise.
HAVE_FCNTL=1; AC_SUBST([HAVE_FCNTL])
HAVE_OPENAT=1; AC_SUBST([HAVE_OPENAT])
REPLACE_CREAT=0; AC_SUBST([REPLACE_CREAT])
REPLACE_FCNTL=0; AC_SUBST([REPLACE_FCNTL])
REPLACE_OPEN=0; AC_SUBST([REPLACE_OPEN])
REPLACE_OPENAT=0; AC_SUBST([REPLACE_OPENAT])
......
# serial 11
# serial 12
# See if we need to provide fdopendir.
dnl Copyright (C) 2009-2019 Free Software Foundation, Inc.
......@@ -49,8 +49,8 @@ DIR *fdopendir (int);
*-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
# Guess yes on musl systems.
*-musl*) gl_cv_func_fdopendir_works="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_fdopendir_works="guessing no" ;;
# If we don't know, obey --enable-cross-guesses.
*) gl_cv_func_fdopendir_works="$gl_cross_guess_normal" ;;
esac
])])
case "$gl_cv_func_fdopendir_works" in
......
# serial 22
# serial 23
dnl From Jim Meyering.
dnl A wrapper around AC_FUNC_GETGROUPS.
......@@ -9,8 +9,6 @@ dnl A wrapper around AC_FUNC_GETGROUPS.
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
m4_version_prereq([2.70], [] ,[
# This is taken from the following Autoconf patch:
# https://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=7fbb553727ed7e0e689a17594b58559ecf3ea6e9
AC_DEFUN([AC_FUNC_GETGROUPS],
......@@ -44,8 +42,8 @@ AC_DEFUN([AC_FUNC_GETGROUPS],
*-gnu* | gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
# Guess yes on musl systems.
*-musl*) ac_cv_func_getgroups_works="guessing yes" ;;
# If we don't know, assume the worst.
*) ac_cv_func_getgroups_works="guessing no" ;;
# If we don't know, obey --enable-cross-guesses.
*) ac_cv_func_getgroups_works="$gl_cross_guess_normal" ;;
esac
])
])
......@@ -61,8 +59,6 @@ AC_DEFUN([AC_FUNC_GETGROUPS],
LIBS=$ac_save_LIBS
])# AC_FUNC_GETGROUPS
])
AC_DEFUN([gl_FUNC_GETGROUPS],
[
AC_REQUIRE([AC_TYPE_GETGROUPS])
......@@ -99,8 +95,8 @@ AC_DEFUN([gl_FUNC_GETGROUPS],
*-gnu* | gnu*) gl_cv_func_getgroups_works="guessing yes" ;;
# Guess yes on musl systems.
*-musl*) gl_cv_func_getgroups_works="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_getgroups_works="guessing no" ;;
# If we don't know, obey --enable-cross-guesses.
*) gl_cv_func_getgroups_works="$gl_cross_guess_normal" ;;
esac
])])
case "$gl_cv_func_getgroups_works" in
......
# getopt.m4 serial 46
# getopt.m4 serial 47
dnl Copyright (C) 2002-2006, 2008-2019 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
......@@ -302,8 +302,10 @@ dnl is ambiguous with environment values that contain newlines.
]])],
[gl_cv_func_getopt_gnu=yes],
[gl_cv_func_getopt_gnu=no],
[dnl Cross compiling. Assume the worst, even on glibc platforms.
gl_cv_func_getopt_gnu="guessing no"
[dnl Cross compiling.
dnl Assume the worst, even on glibc platforms.
dnl But obey --enable-cross-guesses.
gl_cv_func_getopt_gnu="$gl_cross_guess_normal"
])
case $gl_had_POSIXLY_CORRECT in
exported) ;;
......
# serial 26
# serial 27
# Copyright (C) 2001-2003, 2005, 2007, 2009-2019 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
......@@ -109,8 +109,8 @@ AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER],
*-musl*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
# Guess no on native Windows.
mingw*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
# If we don't know, assume the worst.
*) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
# If we don't know, obey --enable-cross-guesses.
*) gl_cv_func_gettimeofday_clobber="$gl_cross_guess_inverted" ;;
esac
])])
......
# gnulib-common.m4 serial 44
# gnulib-common.m4 serial 45
dnl Copyright (C) 2007-2019 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
......@@ -94,7 +94,7 @@ AC_DEFUN([gl_COMMON_BODY], [
invoked from such signal handlers. Such functions have some restrictions:
* All functions that it calls should be marked _GL_ASYNC_SAFE as well,
or should be listed as async-signal-safe in POSIX
<http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_04>
<https://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_04>
section 2.4.3. Note that malloc(), sprintf(), and fwrite(), in
particular, are NOT async-signal-safe.
* All memory locations (variables and struct fields) that these functions
......@@ -115,6 +115,33 @@ AC_DEFUN([gl_COMMON_BODY], [
errno. */
#define _GL_ASYNC_SAFE
])
dnl Hint which direction to take regarding cross-compilation guesses:
dnl When a user installs a program on a platform they are not intimately
dnl familiar with, --enable-cross-guesses=conservative is the appropriate
dnl choice. It implements the "If we don't know, assume the worst" principle.
dnl However, when an operating system developer (on a platform which is not
dnl yet known to gnulib) builds packages for their platform, they want to
dnl expose, not hide, possible platform bugs; in this case,
dnl --enable-cross-guesses=risky is the appropriate choice.
dnl Sets the variables
dnl gl_cross_guess_normal (to be used when 'yes' is good and 'no' is bad),
dnl gl_cross_guess_inverted (to be used when 'no' is good and 'yes' is bad).
AC_ARG_ENABLE([cross-guesses],
[AS_HELP_STRING([--enable-cross-guesses={conservative|risky}],
[specify policy for cross-compilation guesses])],
[if test "x$enableval" != xconservative && test "x$enableval" != xrisky; then
AC_MSG_WARN([invalid argument supplied to --enable-cross-guesses])
enableval=conservative
fi
gl_cross_guesses="$enableval"],
[gl_cross_guesses=conservative])
if test $gl_cross_guesses = risky; then
gl_cross_guess_normal="guessing yes"
gl_cross_guess_inverted="guessing no"
else
gl_cross_guess_normal="guessing no"
gl_cross_guess_inverted="guessing yes"
fi
dnl Preparation for running test programs:
dnl Tell glibc to write diagnostics from -D_FORTIFY_SOURCE=2 to stderr, not
dnl to /dev/tty, so they can be redirected to log files. Such diagnostics
......
......@@ -1104,6 +1104,7 @@ AC_DEFUN([gl_FILE_LIST], [
m4/nstrftime.m4
m4/off_t.m4
m4/open-cloexec.m4
m4/open-slash.m4
m4/open.m4
m4/pathmax.m4
m4/pipe2.m4
......
......@@ -56,7 +56,7 @@ rm -rf conftest*[]dnl
# By default, many hosts won't let programs access large files;
# one must use special compiler options to get large-file access to work.
# For more details about this brain damage please see:
# http://www.unix-systems.org/version2/whatsnew/lfs20mar.html
# http://www.unix.org/version2/whatsnew/lfs20mar.html
AC_DEFUN([AC_SYS_LARGEFILE],
[AC_ARG_ENABLE(largefile,
[ --disable-largefile omit support for large files])
......
# serial 32
# serial 33
# Copyright (C) 1997-2001, 2003-2019 Free Software Foundation, Inc.
#
......@@ -63,8 +63,8 @@ AC_DEFUN([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK],
# Guess no on native Windows.
gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
*)
# If we don't know, assume the worst.
gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
# If we don't know, obey --enable-cross-guesses.
gl_cv_func_lstat_dereferences_slashed_symlink="$gl_cross_guess_normal" ;;
esac
])
rm -f conftest.sym conftest.file
......
# memmem.m4 serial 25
# memmem.m4 serial 26
dnl Copyright (C) 2002-2004, 2007-2019 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
......@@ -68,7 +68,7 @@ AC_DEFUN([gl_FUNC_MEMMEM_SIMPLE],
#endif
],
[gl_cv_func_memmem_works_always="guessing yes"],
[gl_cv_func_memmem_works_always="guessing no"])
[gl_cv_func_memmem_works_always="$gl_cross_guess_normal"])
])
])
case "$gl_cv_func_memmem_works_always" in
......@@ -138,7 +138,7 @@ static void quit (int sig) { _exit (sig + 128); }
#endif
],
[gl_cv_func_memmem_works_fast="guessing yes"],
[gl_cv_func_memmem_works_fast="guessing no"])
[gl_cv_func_memmem_works_fast="$gl_cross_guess_normal"])
])
])
case "$gl_cv_func_memmem_works_fast" in
......
# serial 30
# serial 31
dnl Copyright (C) 2002-2003, 2005-2007, 2009-2019 Free Software Foundation,