]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gnulib: update to 776af40e0
authorPaul E. Murphy <murphyp@linux.ibm.com>
Fri, 22 Jan 2021 19:55:45 +0000 (13:55 -0600)
committerSimon Marchi <simon.marchi@polymtl.ca>
Fri, 5 Feb 2021 18:35:20 +0000 (13:35 -0500)
This fixes PR27184, a failure to compile gdb due to
cdefs.h being out of sync with glibc on ppc64le targets
which are compiled with -mabi=ieeelongdouble and glibc
2.32.

Likewise, update usage of _GL_ATTRIBUTE_FORMAT_PRINTF to
_GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD.

Likewise, disable newly added rpl_free gnulib api in
gdbserver support libraries.

Likewise, undefine read/write macros before redefining them
on mingw targets.

Likewise, wrap C++ usage of free with GNULIB_NAMESPACE namespace
as needed.

Change-Id: I86517613c0d8ac8f5ea45bbc4ebe2b54a3aef29f

399 files changed:
gdbserver/ChangeLog
gdbserver/Makefile.in
gdbserver/remote-utils.cc
gdbsupport/ChangeLog
gdbsupport/common-defs.h
gdbsupport/common-utils.h
gnulib/ChangeLog
gnulib/Makefile.in
gnulib/aclocal.m4
gnulib/config.in
gnulib/configure
gnulib/import/Makefile.am
gnulib/import/Makefile.in
gnulib/import/_Noreturn.h
gnulib/import/alloca.c
gnulib/import/alloca.in.h
gnulib/import/arg-nonnull.h
gnulib/import/arpa_inet.in.h
gnulib/import/assure.h
gnulib/import/at-func.c
gnulib/import/attribute.h
gnulib/import/basename-lgpl.c
gnulib/import/basename-lgpl.h [new file with mode: 0644]
gnulib/import/btowc.c
gnulib/import/c++defs.h
gnulib/import/canonicalize-lgpl.c
gnulib/import/cdefs.h
gnulib/import/chdir-long.c
gnulib/import/chdir-long.h
gnulib/import/cloexec.c
gnulib/import/cloexec.h
gnulib/import/close.c
gnulib/import/closedir.c
gnulib/import/count-one-bits.h
gnulib/import/ctype.in.h
gnulib/import/dirent-private.h
gnulib/import/dirent.in.h
gnulib/import/dirfd.c
gnulib/import/dirname-lgpl.c
gnulib/import/dirname.h
gnulib/import/dup-safer-flag.c
gnulib/import/dup-safer.c
gnulib/import/dup.c
gnulib/import/dup2.c
gnulib/import/eloop-threshold.h [new file with mode: 0644]
gnulib/import/errno.in.h
gnulib/import/error.c
gnulib/import/error.h
gnulib/import/exitfail.c
gnulib/import/exitfail.h
gnulib/import/extra/update-copyright
gnulib/import/fchdir.c
gnulib/import/fcntl.c
gnulib/import/fcntl.in.h
gnulib/import/fd-hook.c
gnulib/import/fd-hook.h
gnulib/import/fd-safer-flag.c
gnulib/import/fd-safer.c
gnulib/import/fdopendir.c
gnulib/import/filename.h
gnulib/import/filenamecat-lgpl.c
gnulib/import/filenamecat.h
gnulib/import/flexmember.h
gnulib/import/float+.h
gnulib/import/float.c
gnulib/import/float.in.h
gnulib/import/fnmatch.c
gnulib/import/fnmatch.in.h
gnulib/import/fnmatch_loop.c
gnulib/import/fpucw.h
gnulib/import/free.c [new file with mode: 0644]
gnulib/import/frexp.c
gnulib/import/frexpl.c
gnulib/import/fstat.c
gnulib/import/fstatat.c
gnulib/import/getcwd-lgpl.c
gnulib/import/getcwd.c
gnulib/import/getdtablesize.c
gnulib/import/getlogin_r.c
gnulib/import/getprogname.c
gnulib/import/getprogname.h
gnulib/import/getrandom.c
gnulib/import/gettext.h
gnulib/import/gettimeofday.c
gnulib/import/glob-libc.h
gnulib/import/glob.c
gnulib/import/glob.in.h
gnulib/import/glob_internal.h
gnulib/import/glob_pattern_p.c
gnulib/import/globfree.c
gnulib/import/glthread/lock.c
gnulib/import/glthread/lock.h
gnulib/import/glthread/threadlib.c
gnulib/import/hard-locale.c
gnulib/import/hard-locale.h
gnulib/import/idx.h [new file with mode: 0644]
gnulib/import/inet_ntop.c
gnulib/import/intprops.h
gnulib/import/inttypes.in.h
gnulib/import/isblank.c
gnulib/import/isnan.c
gnulib/import/isnand-nolibm.h
gnulib/import/isnand.c
gnulib/import/isnanl-nolibm.h
gnulib/import/isnanl.c
gnulib/import/itold.c
gnulib/import/lc-charset-dispatch.c
gnulib/import/lc-charset-dispatch.h
gnulib/import/libc-config.h
gnulib/import/limits.in.h
gnulib/import/localcharset.c
gnulib/import/localcharset.h
gnulib/import/locale.in.h
gnulib/import/localtime-buffer.c [deleted file]
gnulib/import/localtime-buffer.h [deleted file]
gnulib/import/lstat.c
gnulib/import/m4/00gnulib.m4
gnulib/import/m4/__inline.m4
gnulib/import/m4/absolute-header.m4
gnulib/import/m4/alloca.m4
gnulib/import/m4/arpa_inet_h.m4
gnulib/import/m4/btowc.m4
gnulib/import/m4/builtin-expect.m4
gnulib/import/m4/canonicalize.m4
gnulib/import/m4/chdir-long.m4
gnulib/import/m4/clock_time.m4 [new file with mode: 0644]
gnulib/import/m4/close.m4
gnulib/import/m4/closedir.m4
gnulib/import/m4/codeset.m4
gnulib/import/m4/ctype.m4
gnulib/import/m4/d-ino.m4
gnulib/import/m4/d-type.m4
gnulib/import/m4/dirent_h.m4
gnulib/import/m4/dirfd.m4
gnulib/import/m4/dirname.m4 [deleted file]
gnulib/import/m4/double-slash-root.m4
gnulib/import/m4/dup.m4
gnulib/import/m4/dup2.m4
gnulib/import/m4/eealloc.m4
gnulib/import/m4/environ.m4
gnulib/import/m4/errno_h.m4
gnulib/import/m4/error.m4
gnulib/import/m4/exponentd.m4
gnulib/import/m4/exponentl.m4
gnulib/import/m4/extensions.m4
gnulib/import/m4/extern-inline.m4
gnulib/import/m4/fchdir.m4
gnulib/import/m4/fcntl-o.m4
gnulib/import/m4/fcntl.m4
gnulib/import/m4/fcntl_h.m4
gnulib/import/m4/fdopendir.m4
gnulib/import/m4/filenamecat.m4
gnulib/import/m4/flexmember.m4
gnulib/import/m4/float_h.m4
gnulib/import/m4/fnmatch.m4
gnulib/import/m4/fnmatch_h.m4
gnulib/import/m4/fpieee.m4
gnulib/import/m4/free.m4 [new file with mode: 0644]
gnulib/import/m4/frexp.m4
gnulib/import/m4/frexpl.m4
gnulib/import/m4/fstat.m4
gnulib/import/m4/fstatat.m4
gnulib/import/m4/getcwd-abort-bug.m4
gnulib/import/m4/getcwd-path-max.m4
gnulib/import/m4/getcwd.m4
gnulib/import/m4/getdtablesize.m4
gnulib/import/m4/getlogin.m4
gnulib/import/m4/getlogin_r.m4
gnulib/import/m4/getpagesize.m4
gnulib/import/m4/getprogname.m4
gnulib/import/m4/getrandom.m4
gnulib/import/m4/gettimeofday.m4
gnulib/import/m4/glob.m4
gnulib/import/m4/glob_h.m4
gnulib/import/m4/gnulib-cache.m4
gnulib/import/m4/gnulib-common.m4
gnulib/import/m4/gnulib-comp.m4
gnulib/import/m4/gnulib-tool.m4
gnulib/import/m4/include_next.m4
gnulib/import/m4/inet_ntop.m4
gnulib/import/m4/inttypes-pri.m4 [deleted file]
gnulib/import/m4/inttypes.m4
gnulib/import/m4/isblank.m4
gnulib/import/m4/isnand.m4
gnulib/import/m4/isnanl.m4
gnulib/import/m4/largefile.m4
gnulib/import/m4/limits-h.m4
gnulib/import/m4/localcharset.m4
gnulib/import/m4/locale-fr.m4
gnulib/import/m4/locale-ja.m4
gnulib/import/m4/locale-zh.m4
gnulib/import/m4/locale_h.m4
gnulib/import/m4/localtime-buffer.m4 [deleted file]
gnulib/import/m4/lock.m4
gnulib/import/m4/lstat.m4
gnulib/import/m4/malloc.m4
gnulib/import/m4/malloca.m4
gnulib/import/m4/math_h.m4
gnulib/import/m4/mbrtowc.m4
gnulib/import/m4/mbsinit.m4
gnulib/import/m4/mbsrtowcs.m4
gnulib/import/m4/mbstate_t.m4
gnulib/import/m4/mbtowc.m4
gnulib/import/m4/memchr.m4
gnulib/import/m4/memmem.m4
gnulib/import/m4/mempcpy.m4
gnulib/import/m4/memrchr.m4
gnulib/import/m4/minmax.m4
gnulib/import/m4/mkdir.m4
gnulib/import/m4/mkdtemp.m4
gnulib/import/m4/mkostemp.m4
gnulib/import/m4/mmap-anon.m4
gnulib/import/m4/mode_t.m4
gnulib/import/m4/msvc-inval.m4
gnulib/import/m4/msvc-nothrow.m4
gnulib/import/m4/multiarch.m4
gnulib/import/m4/netinet_in_h.m4
gnulib/import/m4/nocrash.m4
gnulib/import/m4/off_t.m4
gnulib/import/m4/open-cloexec.m4
gnulib/import/m4/open-slash.m4
gnulib/import/m4/open.m4
gnulib/import/m4/openat.m4
gnulib/import/m4/opendir.m4
gnulib/import/m4/pathmax.m4
gnulib/import/m4/pid_t.m4 [new file with mode: 0644]
gnulib/import/m4/pipe.m4 [new file with mode: 0644]
gnulib/import/m4/pthread_rwlock_rdlock.m4
gnulib/import/m4/rawmemchr.m4
gnulib/import/m4/readdir.m4
gnulib/import/m4/readlink.m4
gnulib/import/m4/realloc.m4
gnulib/import/m4/rename.m4
gnulib/import/m4/rewinddir.m4
gnulib/import/m4/rmdir.m4
gnulib/import/m4/save-cwd.m4
gnulib/import/m4/setenv.m4
gnulib/import/m4/setlocale_null.m4
gnulib/import/m4/signal_h.m4
gnulib/import/m4/socklen.m4
gnulib/import/m4/sockpfaf.m4
gnulib/import/m4/ssize_t.m4
gnulib/import/m4/stat-time.m4
gnulib/import/m4/stat.m4
gnulib/import/m4/std-gnu11.m4
gnulib/import/m4/stdalign.m4
gnulib/import/m4/stdbool.m4
gnulib/import/m4/stddef_h.m4
gnulib/import/m4/stdint.m4
gnulib/import/m4/stdio_h.m4
gnulib/import/m4/stdlib_h.m4
gnulib/import/m4/strchrnul.m4
gnulib/import/m4/strdup.m4
gnulib/import/m4/strerror.m4
gnulib/import/m4/strerror_r.m4
gnulib/import/m4/string_h.m4
gnulib/import/m4/strnlen.m4
gnulib/import/m4/strstr.m4
gnulib/import/m4/strtok_r.m4
gnulib/import/m4/sys_random_h.m4
gnulib/import/m4/sys_socket_h.m4
gnulib/import/m4/sys_stat_h.m4
gnulib/import/m4/sys_time_h.m4
gnulib/import/m4/sys_types_h.m4
gnulib/import/m4/sys_uio_h.m4
gnulib/import/m4/tempname.m4
gnulib/import/m4/threadlib.m4
gnulib/import/m4/time_h.m4
gnulib/import/m4/time_r.m4
gnulib/import/m4/unistd-safer.m4
gnulib/import/m4/unistd_h.m4
gnulib/import/m4/visibility.m4
gnulib/import/m4/warn-on-use.m4
gnulib/import/m4/wchar_h.m4
gnulib/import/m4/wchar_t.m4
gnulib/import/m4/wctype_h.m4
gnulib/import/m4/wint_t.m4
gnulib/import/m4/wmemchr.m4
gnulib/import/m4/wmempcpy.m4
gnulib/import/m4/zzgnulib.m4
gnulib/import/malloc.c
gnulib/import/malloc/scratch_buffer.h
gnulib/import/malloc/scratch_buffer_dupfree.c [new file with mode: 0644]
gnulib/import/malloc/scratch_buffer_grow.c
gnulib/import/malloc/scratch_buffer_grow_preserve.c
gnulib/import/malloc/scratch_buffer_set_array_size.c
gnulib/import/malloca.c
gnulib/import/malloca.h
gnulib/import/math.in.h
gnulib/import/mbrtowc-impl-utf8.h
gnulib/import/mbrtowc-impl.h
gnulib/import/mbrtowc.c
gnulib/import/mbsinit.c
gnulib/import/mbsrtowcs-impl.h
gnulib/import/mbsrtowcs-state.c
gnulib/import/mbsrtowcs.c
gnulib/import/mbtowc-impl.h
gnulib/import/mbtowc-lock.c
gnulib/import/mbtowc-lock.h
gnulib/import/mbtowc.c
gnulib/import/memchr.c
gnulib/import/memchr.valgrind
gnulib/import/memmem.c
gnulib/import/mempcpy.c
gnulib/import/memrchr.c
gnulib/import/minmax.h
gnulib/import/mkdir.c
gnulib/import/mkdtemp.c
gnulib/import/mkostemp.c
gnulib/import/msvc-inval.c
gnulib/import/msvc-inval.h
gnulib/import/msvc-nothrow.c
gnulib/import/msvc-nothrow.h
gnulib/import/netinet_in.in.h
gnulib/import/open.c
gnulib/import/openat-die.c
gnulib/import/openat-priv.h
gnulib/import/openat-proc.c
gnulib/import/openat.c
gnulib/import/openat.h
gnulib/import/opendir.c
gnulib/import/pathmax.h
gnulib/import/pipe-safer.c
gnulib/import/pipe.c [new file with mode: 0644]
gnulib/import/rawmemchr.c
gnulib/import/rawmemchr.valgrind
gnulib/import/readdir.c
gnulib/import/readlink.c
gnulib/import/realloc.c
gnulib/import/rename.c
gnulib/import/rewinddir.c
gnulib/import/rmdir.c
gnulib/import/same-inode.h
gnulib/import/save-cwd.c
gnulib/import/save-cwd.h
gnulib/import/scratch_buffer.h
gnulib/import/setenv.c
gnulib/import/setlocale-lock.c
gnulib/import/setlocale_null.c
gnulib/import/setlocale_null.h
gnulib/import/signal.in.h
gnulib/import/stat-time.h
gnulib/import/stat-w32.c
gnulib/import/stat-w32.h
gnulib/import/stat.c
gnulib/import/stdalign.in.h
gnulib/import/stdbool.in.h
gnulib/import/stddef.in.h
gnulib/import/stdint.in.h
gnulib/import/stdio.in.h
gnulib/import/stdlib.in.h
gnulib/import/str-two-way.h
gnulib/import/strchrnul.c
gnulib/import/strchrnul.valgrind
gnulib/import/strdup.c
gnulib/import/streq.h
gnulib/import/strerror-override.c
gnulib/import/strerror-override.h
gnulib/import/strerror.c
gnulib/import/strerror_r.c
gnulib/import/string.in.h
gnulib/import/stripslash.c
gnulib/import/strnlen.c
gnulib/import/strnlen1.c
gnulib/import/strnlen1.h
gnulib/import/strstr.c
gnulib/import/strtok_r.c
gnulib/import/sys_random.in.h
gnulib/import/sys_socket.in.h
gnulib/import/sys_stat.in.h
gnulib/import/sys_time.in.h
gnulib/import/sys_types.in.h
gnulib/import/sys_uio.in.h
gnulib/import/tempname.c
gnulib/import/tempname.h
gnulib/import/time.in.h
gnulib/import/time_r.c
gnulib/import/unistd--.h
gnulib/import/unistd-safer.h
gnulib/import/unistd.in.h
gnulib/import/unsetenv.c
gnulib/import/verify.h
gnulib/import/warn-on-use.h
gnulib/import/wchar.in.h
gnulib/import/wctype.in.h
gnulib/import/windows-initguard.h
gnulib/import/windows-mutex.c
gnulib/import/windows-mutex.h
gnulib/import/windows-once.c
gnulib/import/windows-once.h
gnulib/import/windows-recmutex.c
gnulib/import/windows-recmutex.h
gnulib/import/windows-rwlock.c
gnulib/import/windows-rwlock.h
gnulib/import/wmemchr-impl.h
gnulib/import/wmemchr.c
gnulib/import/wmempcpy.c
gnulib/import/xalloc-oversized.h
gnulib/update-gnulib.sh

index 3f940831a1db7eaf125212f31c3bf10be25fa61d..def4049cee59356e73d1aa46be3d83f611f579a6 100644 (file)
@@ -1,3 +1,10 @@
+2021-02-05  Paul E. Murphy  <murphyp@linux.ibm.com>
+
+       * Makefile.in (UNDO_GNULIB_CFLAGS): Disable
+       gnulib free replacement too.
+       * common-defs.h [USE_WIN32API](read, write): Undefine
+       gnulib versions before defining these macros.
+
 2021-02-03  Pedro Alves  <pedro@palves.net>
 
        * linux-low.cc (linux_process_target::complete_ongoing_step_over):
index a14d3a7bc18fbd75330e1eb427c6d484c2304f9c..8e174da8dcf5550742df77a1c6088c9d058950ee 100644 (file)
@@ -490,7 +490,7 @@ UST_CFLAGS = $(ustinc) -DCONFIG_UST_GDB_INTEGRATION
 # Undo gnulib replacements for the IPA shared library build.
 # The gnulib headers are still needed, but gnulib is not linked
 # into the IPA lib so replacement apis don't work.
-UNDO_GNULIB_CFLAGS = -Drpl_strerror_r=strerror_r
+UNDO_GNULIB_CFLAGS = -Drpl_strerror_r=strerror_r -Drpl_free=free
 
 # Note, we only build the IPA if -fvisibility=hidden is supported in
 # the first place.
index cfdf1c1883c9c0e90f44ba14363bdace19d7f771..4f63d73785d26c59530429d813c233b4805a190f 100644 (file)
@@ -102,6 +102,10 @@ static int remote_desc = -1;
 static int listen_desc = -1;
 
 #ifdef USE_WIN32API
+/* gnulib wraps these as macros, undo them.  */
+# undef read
+# undef write
+
 # define read(fd, buf, len) recv (fd, (char *) buf, len, 0)
 # define write(fd, buf, len) send (fd, (char *) buf, len, 0)
 #endif
index fe6138ca2ded84c309b6451ec69fc8388aeeefca..c8fa9e73148b5ad103f330ea9a1d9b7051a355c2 100644 (file)
@@ -1,3 +1,10 @@
+2021-02-05  Paul E. Murphy  <murphy@linux.ibm.com>
+
+       * common-defs.h (ATTRIBUTE_PRINTF): Rename
+       _GL_ATTRIBUTE_FORMAT_PRINTF to _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD.
+       * common-utils.h (xfree): Use GNULIB_NAMESPACE namespace when calling
+       free if this macro is defined.
+
 2021-01-23  Lancelot SIX  <lsix@lancelotsix.com>
 
        * gdb_tilde_expand.cc (gdb_tilde_expand): Improve
index e5ece3baccc15e8295d914b28ab7847ea2c533cb..5b644010cd9fff3fbadf3b2150efc664eba4dc01 100644 (file)
 /* This is defined by ansidecl.h, but we prefer gnulib's version.  On
    MinGW, gnulib might enable __USE_MINGW_ANSI_STDIO, which may or not
    require use of attribute gnu_printf instead of printf.  gnulib
-   checks that at configure time.  Since _GL_ATTRIBUTE_FORMAT_PRINTF
+   checks that at configure time.  Since _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD
    is compatible with ATTRIBUTE_PRINTF, simply use it.  */
 #undef ATTRIBUTE_PRINTF
-#define ATTRIBUTE_PRINTF _GL_ATTRIBUTE_FORMAT_PRINTF
+#define ATTRIBUTE_PRINTF _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD
 
 #if GCC_VERSION >= 3004
 #define ATTRIBUTE_UNUSED_RESULT __attribute__ ((__warn_unused_result__))
index 4429f086fce34d201a85ab087742b862ac57748a..28c08ee976678cb0563523b62966e1edc6debc55 100644 (file)
@@ -59,7 +59,11 @@ xfree (T *ptr)
 data type.  Use operator delete instead.");
 
   if (ptr != NULL)
-    free (ptr);                /* ARI: free */
+#ifdef GNULIB_NAMESPACE
+    GNULIB_NAMESPACE::free (ptr);      /* ARI: free */
+#else
+    free (ptr);                                /* ARI: free */
+#endif
 }
 
 
index 909df781797453044258cc33474a575483c5c574..c16fc3f4e9a64c248417ff1bcdc8cccfcb4402db 100644 (file)
@@ -1,3 +1,9 @@
+2021-02-05  Paul E. Murphy  <murphyp@linux.ibm.com>
+
+       * update-gnulib.sh (GNULIB_COMMIT_SHA1): Bump to
+       776af40e09b476a41073131a90022572f448c189.
+       * Makefile.in, config.in, configure, import/*: Re-generate.
+
 2020-10-09  Andrew Burgess  <andrew.burgess@embecosm.com>
 
        * Makefile.gnulib.inc.in: New file.
index c1c216809446959889973f3b37af5009f1a012f9..29767ab7d5fdde43341455b4ddfb52af83eca13f 100644 (file)
@@ -14,7 +14,7 @@
 
 @SET_MAKE@
 
-# Copyright (C) 2019-2020 Free Software Foundation, Inc.
+# Copyright (C) 2019-2021 Free Software Foundation, Inc.
 
 # This file is part of GDB.
 
@@ -121,6 +121,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \
        $(top_srcdir)/import/m4/builtin-expect.m4 \
        $(top_srcdir)/import/m4/canonicalize.m4 \
        $(top_srcdir)/import/m4/chdir-long.m4 \
+       $(top_srcdir)/import/m4/clock_time.m4 \
        $(top_srcdir)/import/m4/close.m4 \
        $(top_srcdir)/import/m4/closedir.m4 \
        $(top_srcdir)/import/m4/codeset.m4 \
@@ -129,7 +130,6 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \
        $(top_srcdir)/import/m4/d-type.m4 \
        $(top_srcdir)/import/m4/dirent_h.m4 \
        $(top_srcdir)/import/m4/dirfd.m4 \
-       $(top_srcdir)/import/m4/dirname.m4 \
        $(top_srcdir)/import/m4/double-slash-root.m4 \
        $(top_srcdir)/import/m4/dup.m4 $(top_srcdir)/import/m4/dup2.m4 \
        $(top_srcdir)/import/m4/eealloc.m4 \
@@ -151,6 +151,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \
        $(top_srcdir)/import/m4/fnmatch.m4 \
        $(top_srcdir)/import/m4/fnmatch_h.m4 \
        $(top_srcdir)/import/m4/fpieee.m4 \
+       $(top_srcdir)/import/m4/free.m4 \
        $(top_srcdir)/import/m4/frexp.m4 \
        $(top_srcdir)/import/m4/frexpl.m4 \
        $(top_srcdir)/import/m4/fstat.m4 \
@@ -171,7 +172,6 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \
        $(top_srcdir)/import/m4/gnulib-comp.m4 \
        $(top_srcdir)/import/m4/include_next.m4 \
        $(top_srcdir)/import/m4/inet_ntop.m4 \
-       $(top_srcdir)/import/m4/inttypes-pri.m4 \
        $(top_srcdir)/import/m4/inttypes.m4 \
        $(top_srcdir)/import/m4/isblank.m4 \
        $(top_srcdir)/import/m4/isnand.m4 \
@@ -183,7 +183,6 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \
        $(top_srcdir)/import/m4/locale-ja.m4 \
        $(top_srcdir)/import/m4/locale-zh.m4 \
        $(top_srcdir)/import/m4/locale_h.m4 \
-       $(top_srcdir)/import/m4/localtime-buffer.m4 \
        $(top_srcdir)/import/m4/lock.m4 \
        $(top_srcdir)/import/m4/lstat.m4 \
        $(top_srcdir)/import/m4/malloc.m4 \
@@ -216,6 +215,8 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \
        $(top_srcdir)/import/m4/openat.m4 \
        $(top_srcdir)/import/m4/opendir.m4 \
        $(top_srcdir)/import/m4/pathmax.m4 \
+       $(top_srcdir)/import/m4/pid_t.m4 \
+       $(top_srcdir)/import/m4/pipe.m4 \
        $(top_srcdir)/import/m4/pthread_rwlock_rdlock.m4 \
        $(top_srcdir)/import/m4/rawmemchr.m4 \
        $(top_srcdir)/import/m4/readdir.m4 \
@@ -383,6 +384,7 @@ GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@
 GNULIB_ACCESS = @GNULIB_ACCESS@
 GNULIB_ACOSF = @GNULIB_ACOSF@
 GNULIB_ACOSL = @GNULIB_ACOSL@
+GNULIB_ALIGNED_ALLOC = @GNULIB_ALIGNED_ALLOC@
 GNULIB_ALPHASORT = @GNULIB_ALPHASORT@
 GNULIB_ASINF = @GNULIB_ASINF@
 GNULIB_ASINL = @GNULIB_ASINL@
@@ -422,6 +424,13 @@ GNULIB_DUP3 = @GNULIB_DUP3@
 GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
 GNULIB_ENVIRON = @GNULIB_ENVIRON@
 GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
+GNULIB_EXECL = @GNULIB_EXECL@
+GNULIB_EXECLE = @GNULIB_EXECLE@
+GNULIB_EXECLP = @GNULIB_EXECLP@
+GNULIB_EXECV = @GNULIB_EXECV@
+GNULIB_EXECVE = @GNULIB_EXECVE@
+GNULIB_EXECVP = @GNULIB_EXECVP@
+GNULIB_EXECVPE = @GNULIB_EXECVPE@
 GNULIB_EXP2 = @GNULIB_EXP2@
 GNULIB_EXP2F = @GNULIB_EXP2F@
 GNULIB_EXP2L = @GNULIB_EXP2L@
@@ -464,6 +473,7 @@ GNULIB_FPURGE = @GNULIB_FPURGE@
 GNULIB_FPUTC = @GNULIB_FPUTC@
 GNULIB_FPUTS = @GNULIB_FPUTS@
 GNULIB_FREAD = @GNULIB_FREAD@
+GNULIB_FREE_POSIX = @GNULIB_FREE_POSIX@
 GNULIB_FREOPEN = @GNULIB_FREOPEN@
 GNULIB_FREXP = @GNULIB_FREXP@
 GNULIB_FREXPF = @GNULIB_FREXPF@
@@ -501,6 +511,7 @@ GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@
 GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@
 GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
 GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
+GNULIB_GETUMASK = @GNULIB_GETUMASK@
 GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
 GNULIB_GLOB = @GNULIB_GLOB@
 GNULIB_GRANTPT = @GNULIB_GRANTPT@
@@ -575,10 +586,58 @@ GNULIB_MBSSPN = @GNULIB_MBSSPN@
 GNULIB_MBSSTR = @GNULIB_MBSSTR@
 GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
 GNULIB_MBTOWC = @GNULIB_MBTOWC@
+GNULIB_MDA_ACCESS = @GNULIB_MDA_ACCESS@
+GNULIB_MDA_CHDIR = @GNULIB_MDA_CHDIR@
+GNULIB_MDA_CHMOD = @GNULIB_MDA_CHMOD@
+GNULIB_MDA_CLOSE = @GNULIB_MDA_CLOSE@
+GNULIB_MDA_CREAT = @GNULIB_MDA_CREAT@
+GNULIB_MDA_DUP = @GNULIB_MDA_DUP@
+GNULIB_MDA_DUP2 = @GNULIB_MDA_DUP2@
+GNULIB_MDA_ECVT = @GNULIB_MDA_ECVT@
+GNULIB_MDA_EXECL = @GNULIB_MDA_EXECL@
+GNULIB_MDA_EXECLE = @GNULIB_MDA_EXECLE@
+GNULIB_MDA_EXECLP = @GNULIB_MDA_EXECLP@
+GNULIB_MDA_EXECV = @GNULIB_MDA_EXECV@
+GNULIB_MDA_EXECVE = @GNULIB_MDA_EXECVE@
+GNULIB_MDA_EXECVP = @GNULIB_MDA_EXECVP@
+GNULIB_MDA_EXECVPE = @GNULIB_MDA_EXECVPE@
+GNULIB_MDA_FCLOSEALL = @GNULIB_MDA_FCLOSEALL@
+GNULIB_MDA_FCVT = @GNULIB_MDA_FCVT@
+GNULIB_MDA_FDOPEN = @GNULIB_MDA_FDOPEN@
+GNULIB_MDA_FILENO = @GNULIB_MDA_FILENO@
+GNULIB_MDA_GCVT = @GNULIB_MDA_GCVT@
+GNULIB_MDA_GETCWD = @GNULIB_MDA_GETCWD@
+GNULIB_MDA_GETPID = @GNULIB_MDA_GETPID@
+GNULIB_MDA_GETW = @GNULIB_MDA_GETW@
+GNULIB_MDA_ISATTY = @GNULIB_MDA_ISATTY@
+GNULIB_MDA_J0 = @GNULIB_MDA_J0@
+GNULIB_MDA_J1 = @GNULIB_MDA_J1@
+GNULIB_MDA_JN = @GNULIB_MDA_JN@
+GNULIB_MDA_LSEEK = @GNULIB_MDA_LSEEK@
+GNULIB_MDA_MEMCCPY = @GNULIB_MDA_MEMCCPY@
+GNULIB_MDA_MKDIR = @GNULIB_MDA_MKDIR@
+GNULIB_MDA_MKTEMP = @GNULIB_MDA_MKTEMP@
+GNULIB_MDA_OPEN = @GNULIB_MDA_OPEN@
+GNULIB_MDA_PUTENV = @GNULIB_MDA_PUTENV@
+GNULIB_MDA_PUTW = @GNULIB_MDA_PUTW@
+GNULIB_MDA_READ = @GNULIB_MDA_READ@
+GNULIB_MDA_RMDIR = @GNULIB_MDA_RMDIR@
+GNULIB_MDA_STRDUP = @GNULIB_MDA_STRDUP@
+GNULIB_MDA_SWAB = @GNULIB_MDA_SWAB@
+GNULIB_MDA_TEMPNAM = @GNULIB_MDA_TEMPNAM@
+GNULIB_MDA_TZSET = @GNULIB_MDA_TZSET@
+GNULIB_MDA_UMASK = @GNULIB_MDA_UMASK@
+GNULIB_MDA_UNLINK = @GNULIB_MDA_UNLINK@
+GNULIB_MDA_WCSDUP = @GNULIB_MDA_WCSDUP@
+GNULIB_MDA_WRITE = @GNULIB_MDA_WRITE@
+GNULIB_MDA_Y0 = @GNULIB_MDA_Y0@
+GNULIB_MDA_Y1 = @GNULIB_MDA_Y1@
+GNULIB_MDA_YN = @GNULIB_MDA_YN@
 GNULIB_MEMCHR = @GNULIB_MEMCHR@
 GNULIB_MEMMEM = @GNULIB_MEMMEM@
 GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
 GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
+GNULIB_MKDIR = @GNULIB_MKDIR@
 GNULIB_MKDIRAT = @GNULIB_MKDIRAT@
 GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
 GNULIB_MKFIFO = @GNULIB_MKFIFO@
@@ -607,6 +666,7 @@ GNULIB_PERROR = @GNULIB_PERROR@
 GNULIB_PIPE = @GNULIB_PIPE@
 GNULIB_PIPE2 = @GNULIB_PIPE2@
 GNULIB_POPEN = @GNULIB_POPEN@
+GNULIB_POSIX_MEMALIGN = @GNULIB_POSIX_MEMALIGN@
 GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@
 GNULIB_POWF = @GNULIB_POWF@
 GNULIB_PREAD = @GNULIB_PREAD@
@@ -660,7 +720,9 @@ GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
 GNULIB_SETLOCALE_NULL = @GNULIB_SETLOCALE_NULL@
 GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@
 GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@
+GNULIB_SIGABBREV_NP = @GNULIB_SIGABBREV_NP@
 GNULIB_SIGACTION = @GNULIB_SIGACTION@
+GNULIB_SIGDESCR_NP = @GNULIB_SIGDESCR_NP@
 GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@
 GNULIB_SIGNBIT = @GNULIB_SIGNBIT@
 GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@
@@ -682,6 +744,7 @@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
 GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
 GNULIB_STRDUP = @GNULIB_STRDUP@
 GNULIB_STRERROR = @GNULIB_STRERROR@
+GNULIB_STRERRORNAME_NP = @GNULIB_STRERRORNAME_NP@
 GNULIB_STRERROR_R = @GNULIB_STRERROR_R@
 GNULIB_STRFTIME = @GNULIB_STRFTIME@
 GNULIB_STRNCAT = @GNULIB_STRNCAT@
@@ -707,6 +770,7 @@ GNULIB_TANF = @GNULIB_TANF@
 GNULIB_TANHF = @GNULIB_TANHF@
 GNULIB_TANL = @GNULIB_TANL@
 GNULIB_TIMEGM = @GNULIB_TIMEGM@
+GNULIB_TIMESPEC_GET = @GNULIB_TIMESPEC_GET@
 GNULIB_TIME_R = @GNULIB_TIME_R@
 GNULIB_TIME_RZ = @GNULIB_TIME_RZ@
 GNULIB_TMPFILE = @GNULIB_TMPFILE@
@@ -779,6 +843,7 @@ GREP = @GREP@
 HAVE_ACCEPT4 = @HAVE_ACCEPT4@
 HAVE_ACOSF = @HAVE_ACOSF@
 HAVE_ACOSL = @HAVE_ACOSL@
+HAVE_ALIGNED_ALLOC = @HAVE_ALIGNED_ALLOC@
 HAVE_ALLOCA_H = @HAVE_ALLOCA_H@
 HAVE_ALPHASORT = @HAVE_ALPHASORT@
 HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@
@@ -813,13 +878,17 @@ HAVE_DECL_CEILL = @HAVE_DECL_CEILL@
 HAVE_DECL_COPYSIGNF = @HAVE_DECL_COPYSIGNF@
 HAVE_DECL_COSL = @HAVE_DECL_COSL@
 HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@
+HAVE_DECL_ECVT = @HAVE_DECL_ECVT@
 HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
+HAVE_DECL_EXECVPE = @HAVE_DECL_EXECVPE@
 HAVE_DECL_EXP2 = @HAVE_DECL_EXP2@
 HAVE_DECL_EXP2F = @HAVE_DECL_EXP2F@
 HAVE_DECL_EXP2L = @HAVE_DECL_EXP2L@
 HAVE_DECL_EXPL = @HAVE_DECL_EXPL@
 HAVE_DECL_EXPM1L = @HAVE_DECL_EXPM1L@
 HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
+HAVE_DECL_FCLOSEALL = @HAVE_DECL_FCLOSEALL@
+HAVE_DECL_FCVT = @HAVE_DECL_FCVT@
 HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@
 HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@
 HAVE_DECL_FLOORF = @HAVE_DECL_FLOORF@
@@ -828,6 +897,7 @@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@
 HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@
 HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@
 HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@
+HAVE_DECL_GCVT = @HAVE_DECL_GCVT@
 HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
 HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@
 HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
@@ -880,14 +950,15 @@ HAVE_DECL_TRUNCL = @HAVE_DECL_TRUNCL@
 HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@
 HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@
 HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
+HAVE_DECL_WCSDUP = @HAVE_DECL_WCSDUP@
 HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@
 HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
 HAVE_DIRENT_H = @HAVE_DIRENT_H@
 HAVE_DPRINTF = @HAVE_DPRINTF@
-HAVE_DUP2 = @HAVE_DUP2@
 HAVE_DUP3 = @HAVE_DUP3@
 HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
 HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
+HAVE_EXECVPE = @HAVE_EXECVPE@
 HAVE_EXPF = @HAVE_EXPF@
 HAVE_EXPL = @HAVE_EXPL@
 HAVE_EXPLICIT_BZERO = @HAVE_EXPLICIT_BZERO@
@@ -930,6 +1001,7 @@ HAVE_GETPASS = @HAVE_GETPASS@
 HAVE_GETRANDOM = @HAVE_GETRANDOM@
 HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
 HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@
+HAVE_GETUMASK = @HAVE_GETUMASK@
 HAVE_GLOB = @HAVE_GLOB@
 HAVE_GLOB_H = @HAVE_GLOB_H@
 HAVE_GLOB_PATTERN_P = @HAVE_GLOB_PATTERN_P@
@@ -972,7 +1044,6 @@ HAVE_MBSLEN = @HAVE_MBSLEN@
 HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@
 HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@
 HAVE_MBTOWC = @HAVE_MBTOWC@
-HAVE_MEMCHR = @HAVE_MEMCHR@
 HAVE_MEMPCPY = @HAVE_MEMPCPY@
 HAVE_MKDIRAT = @HAVE_MKDIRAT@
 HAVE_MKDTEMP = @HAVE_MKDTEMP@
@@ -997,6 +1068,7 @@ HAVE_PCLOSE = @HAVE_PCLOSE@
 HAVE_PIPE = @HAVE_PIPE@
 HAVE_PIPE2 = @HAVE_PIPE2@
 HAVE_POPEN = @HAVE_POPEN@
+HAVE_POSIX_MEMALIGN = @HAVE_POSIX_MEMALIGN@
 HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@
 HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@
 HAVE_POWF = @HAVE_POWF@
@@ -1030,7 +1102,9 @@ HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@
 HAVE_SETENV = @HAVE_SETENV@
 HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@
 HAVE_SETSTATE = @HAVE_SETSTATE@
+HAVE_SIGABBREV_NP = @HAVE_SIGABBREV_NP@
 HAVE_SIGACTION = @HAVE_SIGACTION@
+HAVE_SIGDESCR_NP = @HAVE_SIGDESCR_NP@
 HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@
 HAVE_SIGINFO_T = @HAVE_SIGINFO_T@
 HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
@@ -1048,6 +1122,7 @@ HAVE_STPCPY = @HAVE_STPCPY@
 HAVE_STPNCPY = @HAVE_STPNCPY@
 HAVE_STRCASESTR = @HAVE_STRCASESTR@
 HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
+HAVE_STRERRORNAME_NP = @HAVE_STRERRORNAME_NP@
 HAVE_STRPBRK = @HAVE_STRPBRK@
 HAVE_STRPTIME = @HAVE_STRPTIME@
 HAVE_STRSEP = @HAVE_STRSEP@
@@ -1076,9 +1151,9 @@ HAVE_TANF = @HAVE_TANF@
 HAVE_TANHF = @HAVE_TANHF@
 HAVE_TANL = @HAVE_TANL@
 HAVE_TIMEGM = @HAVE_TIMEGM@
+HAVE_TIMESPEC_GET = @HAVE_TIMESPEC_GET@
 HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@
 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@
-HAVE_TZSET = @HAVE_TZSET@
 HAVE_UNISTD_H = @HAVE_UNISTD_H@
 HAVE_UNLINKAT = @HAVE_UNLINKAT@
 HAVE_UNLOCKPT = @HAVE_UNLOCKPT@
@@ -1153,6 +1228,7 @@ LIBPTHREAD = @LIBPTHREAD@
 LIBS = @LIBS@
 LIBSTDTHREAD = @LIBSTDTHREAD@
 LIBTHREAD = @LIBTHREAD@
+LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
 LIB_GETLOGIN = @LIB_GETLOGIN@
 LIB_GETRANDOM = @LIB_GETRANDOM@
 LIB_HARD_LOCALE = @LIB_HARD_LOCALE@
@@ -1244,12 +1320,12 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
 PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
 PRIPTR_PREFIX = @PRIPTR_PREFIX@
-PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
 PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
 PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
 RANLIB = @RANLIB@
 REPLACE_ACCESS = @REPLACE_ACCESS@
 REPLACE_ACOSF = @REPLACE_ACOSF@
+REPLACE_ALIGNED_ALLOC = @REPLACE_ALIGNED_ALLOC@
 REPLACE_ASINF = @REPLACE_ASINF@
 REPLACE_ATAN2F = @REPLACE_ATAN2F@
 REPLACE_ATANF = @REPLACE_ATANF@
@@ -1273,6 +1349,13 @@ REPLACE_DPRINTF = @REPLACE_DPRINTF@
 REPLACE_DUP = @REPLACE_DUP@
 REPLACE_DUP2 = @REPLACE_DUP2@
 REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
+REPLACE_EXECL = @REPLACE_EXECL@
+REPLACE_EXECLE = @REPLACE_EXECLE@
+REPLACE_EXECLP = @REPLACE_EXECLP@
+REPLACE_EXECV = @REPLACE_EXECV@
+REPLACE_EXECVE = @REPLACE_EXECVE@
+REPLACE_EXECVP = @REPLACE_EXECVP@
+REPLACE_EXECVPE = @REPLACE_EXECVPE@
 REPLACE_EXP2 = @REPLACE_EXP2@
 REPLACE_EXP2L = @REPLACE_EXP2L@
 REPLACE_EXPF = @REPLACE_EXPF@
@@ -1289,6 +1372,7 @@ REPLACE_FCNTL = @REPLACE_FCNTL@
 REPLACE_FDOPEN = @REPLACE_FDOPEN@
 REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@
 REPLACE_FFLUSH = @REPLACE_FFLUSH@
+REPLACE_FFSLL = @REPLACE_FFSLL@
 REPLACE_FLOOR = @REPLACE_FLOOR@
 REPLACE_FLOORF = @REPLACE_FLOORF@
 REPLACE_FLOORL = @REPLACE_FLOORL@
@@ -1302,6 +1386,7 @@ REPLACE_FNMATCH = @REPLACE_FNMATCH@
 REPLACE_FOPEN = @REPLACE_FOPEN@
 REPLACE_FPRINTF = @REPLACE_FPRINTF@
 REPLACE_FPURGE = @REPLACE_FPURGE@
+REPLACE_FREE = @REPLACE_FREE@
 REPLACE_FREELOCALE = @REPLACE_FREELOCALE@
 REPLACE_FREOPEN = @REPLACE_FREOPEN@
 REPLACE_FREXP = @REPLACE_FREXP@
@@ -1384,7 +1469,9 @@ REPLACE_MEMCHR = @REPLACE_MEMCHR@
 REPLACE_MEMMEM = @REPLACE_MEMMEM@
 REPLACE_MKDIR = @REPLACE_MKDIR@
 REPLACE_MKFIFO = @REPLACE_MKFIFO@
+REPLACE_MKFIFOAT = @REPLACE_MKFIFOAT@
 REPLACE_MKNOD = @REPLACE_MKNOD@
+REPLACE_MKNODAT = @REPLACE_MKNODAT@
 REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
 REPLACE_MKTIME = @REPLACE_MKTIME@
 REPLACE_MODF = @REPLACE_MODF@
@@ -1400,6 +1487,7 @@ REPLACE_OPENAT = @REPLACE_OPENAT@
 REPLACE_OPENDIR = @REPLACE_OPENDIR@
 REPLACE_PERROR = @REPLACE_PERROR@
 REPLACE_POPEN = @REPLACE_POPEN@
+REPLACE_POSIX_MEMALIGN = @REPLACE_POSIX_MEMALIGN@
 REPLACE_PREAD = @REPLACE_PREAD@
 REPLACE_PRINTF = @REPLACE_PRINTF@
 REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@
@@ -1431,7 +1519,7 @@ REPLACE_SETENV = @REPLACE_SETENV@
 REPLACE_SETLOCALE = @REPLACE_SETLOCALE@
 REPLACE_SETSTATE = @REPLACE_SETSTATE@
 REPLACE_SIGNBIT = @REPLACE_SIGNBIT@
-REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@
+REPLACE_SIGNBIT_USING_BUILTINS = @REPLACE_SIGNBIT_USING_BUILTINS@
 REPLACE_SINF = @REPLACE_SINF@
 REPLACE_SINHF = @REPLACE_SINHF@
 REPLACE_SLEEP = @REPLACE_SLEEP@
@@ -1447,6 +1535,7 @@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
 REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@
 REPLACE_STRDUP = @REPLACE_STRDUP@
 REPLACE_STRERROR = @REPLACE_STRERROR@
+REPLACE_STRERRORNAME_NP = @REPLACE_STRERRORNAME_NP@
 REPLACE_STRERROR_R = @REPLACE_STRERROR_R@
 REPLACE_STRFTIME = @REPLACE_STRFTIME@
 REPLACE_STRNCAT = @REPLACE_STRNCAT@
@@ -1506,6 +1595,7 @@ STDINT_H = @STDINT_H@
 STRIP = @STRIP@
 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
 TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
+TIME_H_DEFINES_TIME_UTC = @TIME_H_DEFINES_TIME_UTC@
 UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@
 UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@
 UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@
index af6abc1542f4b0f468a1e8593b5d59ae9abc8ea1..55fb90ab60b01482aa97e04c2155be49ca3c909b 100644 (file)
@@ -1193,6 +1193,7 @@ m4_include([import/m4/btowc.m4])
 m4_include([import/m4/builtin-expect.m4])
 m4_include([import/m4/canonicalize.m4])
 m4_include([import/m4/chdir-long.m4])
+m4_include([import/m4/clock_time.m4])
 m4_include([import/m4/close.m4])
 m4_include([import/m4/closedir.m4])
 m4_include([import/m4/codeset.m4])
@@ -1201,7 +1202,6 @@ m4_include([import/m4/d-ino.m4])
 m4_include([import/m4/d-type.m4])
 m4_include([import/m4/dirent_h.m4])
 m4_include([import/m4/dirfd.m4])
-m4_include([import/m4/dirname.m4])
 m4_include([import/m4/double-slash-root.m4])
 m4_include([import/m4/dup.m4])
 m4_include([import/m4/dup2.m4])
@@ -1224,6 +1224,7 @@ m4_include([import/m4/float_h.m4])
 m4_include([import/m4/fnmatch.m4])
 m4_include([import/m4/fnmatch_h.m4])
 m4_include([import/m4/fpieee.m4])
+m4_include([import/m4/free.m4])
 m4_include([import/m4/frexp.m4])
 m4_include([import/m4/frexpl.m4])
 m4_include([import/m4/fstat.m4])
@@ -1244,7 +1245,6 @@ m4_include([import/m4/gnulib-common.m4])
 m4_include([import/m4/gnulib-comp.m4])
 m4_include([import/m4/include_next.m4])
 m4_include([import/m4/inet_ntop.m4])
-m4_include([import/m4/inttypes-pri.m4])
 m4_include([import/m4/inttypes.m4])
 m4_include([import/m4/isblank.m4])
 m4_include([import/m4/isnand.m4])
@@ -1256,7 +1256,6 @@ m4_include([import/m4/locale-fr.m4])
 m4_include([import/m4/locale-ja.m4])
 m4_include([import/m4/locale-zh.m4])
 m4_include([import/m4/locale_h.m4])
-m4_include([import/m4/localtime-buffer.m4])
 m4_include([import/m4/lock.m4])
 m4_include([import/m4/lstat.m4])
 m4_include([import/m4/malloc.m4])
@@ -1289,6 +1288,8 @@ m4_include([import/m4/open.m4])
 m4_include([import/m4/openat.m4])
 m4_include([import/m4/opendir.m4])
 m4_include([import/m4/pathmax.m4])
+m4_include([import/m4/pid_t.m4])
+m4_include([import/m4/pipe.m4])
 m4_include([import/m4/pthread_rwlock_rdlock.m4])
 m4_include([import/m4/rawmemchr.m4])
 m4_include([import/m4/readdir.m4])
index 4a20b470fb20044d139170a2ea1961d98f41d810..164fab278853828cb57236c8ca131e0c850fa479 100644 (file)
 /* Define to the number of bits in type 'wint_t'. */
 #undef BITSIZEOF_WINT_T
 
-/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
-   systems. This function is required for `alloca.c' support on those systems.
-   */
-#undef CRAY_STACKSEG_END
-
-/* Define to 1 if using `alloca.c'. */
+/* Define to 1 if using 'alloca.c'. */
 #undef C_ALLOCA
 
 /* Define as the bit index in the word where to find bit 0 of the exponent of
@@ -67,9 +62,6 @@
    and handles trailing slash correctly. */
 #undef FUNC_REALPATH_WORKS
 
-/* Define if gettimeofday clobbers the localtime buffer. */
-#undef GETTIMEOFDAY_CLOBBERS_LOCALTIME
-
 /* Define this to 'void' or 'struct timezone' to match the system's
    declaration of the second argument to gettimeofday. */
 #undef GETTIMEOFDAY_TIMEZONE
    whether the gnulib module strerror_r-posix shall be considered present. */
 #undef GNULIB_STRERROR_R_POSIX
 
+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
+   whether the gnulib module tempname shall be considered present. */
+#undef GNULIB_TEMPNAME
+
 /* Define to 1 when the gnulib module btowc should be tested. */
 #undef GNULIB_TEST_BTOWC
 
 /* Define to 1 when the gnulib module fnmatch should be tested. */
 #undef GNULIB_TEST_FNMATCH
 
+/* Define to 1 when the gnulib module free-posix should be tested. */
+#undef GNULIB_TEST_FREE_POSIX
+
 /* Define to 1 when the gnulib module frexp should be tested. */
 #undef GNULIB_TEST_FREXP
 
 /* Define to 1 when the gnulib module memrchr should be tested. */
 #undef GNULIB_TEST_MEMRCHR
 
+/* Define to 1 when the gnulib module mkdir should be tested. */
+#undef GNULIB_TEST_MKDIR
+
 /* Define to 1 when the gnulib module mkdtemp should be tested. */
 #undef GNULIB_TEST_MKDTEMP
 
 /* Define to 1 when the gnulib module opendir should be tested. */
 #undef GNULIB_TEST_OPENDIR
 
+/* Define to 1 when the gnulib module pipe should be tested. */
+#undef GNULIB_TEST_PIPE
+
 /* Define to 1 when the gnulib module rawmemchr should be tested. */
 #undef GNULIB_TEST_RAWMEMCHR
 
 /* Define to 1 if you have the `catgets' function. */
 #undef HAVE_CATGETS
 
+/* Define to 1 if you have the `clock_gettime' function. */
+#undef HAVE_CLOCK_GETTIME
+
+/* Define to 1 if you have the `clock_settime' function. */
+#undef HAVE_CLOCK_SETTIME
+
 /* Define to 1 if you have the `closedir' function. */
 #undef HAVE_CLOSEDIR
 
    */
 #undef HAVE_DECL_DIRFD
 
+/* Define to 1 if you have the declaration of `ecvt', and to 0 if you don't.
+   */
+#undef HAVE_DECL_ECVT
+
+/* Define to 1 if you have the declaration of `execvpe', and to 0 if you
+   don't. */
+#undef HAVE_DECL_EXECVPE
+
 /* Define to 1 if you have the declaration of `fchdir', and to 0 if you don't.
    */
 #undef HAVE_DECL_FCHDIR
 
+/* Define to 1 if you have the declaration of `fcloseall', and to 0 if you
+   don't. */
+#undef HAVE_DECL_FCLOSEALL
+
+/* Define to 1 if you have the declaration of `fcvt', and to 0 if you don't.
+   */
+#undef HAVE_DECL_FCVT
+
 /* Define to 1 if you have the declaration of `fdopendir', and to 0 if you
    don't. */
 #undef HAVE_DECL_FDOPENDIR
 
+/* Define to 1 if you have the declaration of `gcvt', and to 0 if you don't.
+   */
+#undef HAVE_DECL_GCVT
+
 /* Define to 1 if you have the declaration of `getcwd', and to 0 if you don't.
    */
 #undef HAVE_DECL_GETCWD
    don't. */
 #undef HAVE_DECL_UNSETENV
 
+/* Define to 1 if you have the declaration of `wcsdup', and to 0 if you don't.
+   */
+#undef HAVE_DECL_WCSDUP
+
 /* Define to 1 if you have the declaration of `__argv', and to 0 if you don't.
    */
 #undef HAVE_DECL___ARGV
 /* Define to 1 if you have the <dlfcn.h> header file. */
 #undef HAVE_DLFCN_H
 
-/* Define to 1 if you have the 'dup2' function. */
-#undef HAVE_DUP2
-
 /* Define if you have the declaration of environ. */
 #undef HAVE_ENVIRON_DECL
 
+/* Define to 1 if you have the `faccessat' function. */
+#undef HAVE_FACCESSAT
+
 /* Define to 1 if you have the `fchdir' function. */
 #undef HAVE_FCHDIR
 
    when it succeeds. */
 #undef HAVE_MINIMALLY_WORKING_GETCWD
 
+/* Define to 1 if you have the <minix/config.h> header file. */
+#undef HAVE_MINIX_CONFIG_H
+
 /* Define to 1 if <limits.h> defines the MIN and MAX macros. */
 #undef HAVE_MINMAX_IN_LIMITS_H
 
 /* Define to 1 if the system has the type `sa_family_t'. */
 #undef HAVE_SA_FAMILY_T
 
+/* Define to 1 if you have the <sdkddkver.h> header file. */
+#undef HAVE_SDKDDKVER_H
+
 /* Define to 1 if you have the <search.h> header file. */
 #undef HAVE_SEARCH_H
 
 /* Define to 1 if you have the `strchrnul' function. */
 #undef HAVE_STRCHRNUL
 
-/* Define to 1 if you have the `strdup' function. */
-#undef HAVE_STRDUP
-
 /* Define to 1 if you have the `strerror_r' function. */
 #undef HAVE_STRERROR_R
 
 /* Define to the version of this package. */
 #undef PACKAGE_VERSION
 
-/* Define if <inttypes.h> exists and defines unusable PRI* macros. */
-#undef PRI_MACROS_BROKEN
-
 /* Define to the type that is the result of default argument promotions of
    type mode_t. */
 #undef PROMOTED_MODE_T
 /* Define to 1 if readlink fails to recognize a trailing slash. */
 #undef READLINK_TRAILING_SLASH_BUG
 
+/* Define to 1 if readlink sets errno instead of truncating a too-long link.
+   */
+#undef READLINK_TRUNCATE_BUG
+
 /* Define if rename does not work when the destination file exists, as on
    Cygwin 1.5 or Windows. */
 #undef RENAME_DEST_EXISTS_BUG
 /* If using the C implementation of alloca, define if you know the
    direction of stack growth for your system; otherwise it will be
    automatically deduced at runtime.
-       STACK_DIRECTION > 0 => grows toward higher addresses
-       STACK_DIRECTION < 0 => grows toward lower addresses
-       STACK_DIRECTION = 0 => direction of growth unknown */
+        STACK_DIRECTION > 0 => grows toward higher addresses
+        STACK_DIRECTION < 0 => grows toward lower addresses
+        STACK_DIRECTION = 0 => direction of growth unknown */
 #undef STACK_DIRECTION
 
 /* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
 #ifndef _DARWIN_C_SOURCE
 # undef _DARWIN_C_SOURCE
 #endif
+/* Enable general extensions on Solaris.  */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
 /* Enable GNU extensions on systems that have them.  */
 #ifndef _GNU_SOURCE
 # undef _GNU_SOURCE
 #endif
-/* Enable NetBSD extensions on NetBSD.  */
+/* Enable X/Open compliant socket functions that do not require linking
+   with -lxnet on HP-UX 11.11.  */
+#ifndef _HPUX_ALT_XOPEN_SOCKET_API
+# undef _HPUX_ALT_XOPEN_SOCKET_API
+#endif
+/* Identify the host operating system as Minix.
+   This macro does not affect the system headers' behavior.
+   A future release of Autoconf may stop defining this macro.  */
+#ifndef _MINIX
+# undef _MINIX
+#endif
+/* Enable general extensions on NetBSD.
+   Enable NetBSD compatibility extensions on Minix.  */
 #ifndef _NETBSD_SOURCE
 # undef _NETBSD_SOURCE
 #endif
-/* Enable OpenBSD extensions on NetBSD.  */
+/* Enable OpenBSD compatibility extensions on NetBSD.
+   Oddly enough, this does nothing on OpenBSD.  */
 #ifndef _OPENBSD_SOURCE
 # undef _OPENBSD_SOURCE
 #endif
-/* Enable threading extensions on Solaris.  */
+/* Define to 1 if needed for POSIX-compatible behavior.  */
+#ifndef _POSIX_SOURCE
+# undef _POSIX_SOURCE
+#endif
+/* Define to 2 if needed for POSIX-compatible behavior.  */
+#ifndef _POSIX_1_SOURCE
+# undef _POSIX_1_SOURCE
+#endif
+/* Enable POSIX-compatible threading on Solaris.  */
 #ifndef _POSIX_PTHREAD_SEMANTICS
 # undef _POSIX_PTHREAD_SEMANTICS
 #endif
 #ifndef _TANDEM_SOURCE
 # undef _TANDEM_SOURCE
 #endif
-/* Enable X/Open extensions if necessary.  HP-UX 11.11 defines
-   mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of
-   whether compiling with -Ae or -D_HPUX_SOURCE=1.  */
+/* Enable X/Open extensions.  Define to 500 only if necessary
+   to make mbstate_t available.  */
 #ifndef _XOPEN_SOURCE
 # undef _XOPEN_SOURCE
 #endif
-/* Enable X/Open compliant socket functions that do not require linking
-   with -lxnet on HP-UX 11.11.  */
-#ifndef _HPUX_ALT_XOPEN_SOCKET_API
-# undef _HPUX_ALT_XOPEN_SOCKET_API
-#endif
-/* Enable general extensions on Solaris.  */
-#ifndef __EXTENSIONS__
-# undef __EXTENSIONS__
-#endif
 
 
 /* Define if the native Windows multithreading API can be used. */
 #endif
 
 
+/* Define to enable the declarations of ISO C 11 types and functions. */
+#undef _ISOC11_SOURCE
+
 /* Define for large files, on AIX-style hosts. */
 #undef _LARGE_FILES
 
 /* Define to 1 on Solaris. */
 #undef _LCONV_C99
 
-/* Define to 1 if on MINIX. */
-#undef _MINIX
-
-/* Define to 1 to make NetBSD features available. MINIX 3 needs this. */
-#undef _NETBSD_SOURCE
-
 /* The _Noreturn keyword of C11.  */
 #ifndef _Noreturn
 # if (defined __cplusplus \
                 ? 6000000 <= __apple_build_version__ \
                 : 3 < __clang_major__ + (5 <= __clang_minor__))))
    /* _Noreturn works as-is.  */
-# elif _GL_GNUC_PREREQ (2, 8) || 0x5110 <= __SUNPRO_C
+# elif _GL_GNUC_PREREQ (2, 8) || defined __clang__ || 0x5110 <= __SUNPRO_C
 #  define _Noreturn __attribute__ ((__noreturn__))
 # elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0)
 #  define _Noreturn __declspec (noreturn)
 #endif
 
 
-/* Define to 2 if the system does not provide POSIX.1 features except with
-   this defined. */
-#undef _POSIX_1_SOURCE
-
 /* Define to 1 in order to get the POSIX compatible declarations of socket
    functions. */
 #undef _POSIX_PII_SOCKET
 
-/* Define to 1 if you need to in order for 'stat' and other things to work. */
-#undef _POSIX_SOURCE
-
 /* For standard stat data types on VMS. */
 #undef _USE_STD_STAT
 
 # define _GL_ATTR_cold _GL_GNUC_PREREQ (4, 3)
 # define _GL_ATTR_const _GL_GNUC_PREREQ (2, 95)
 # define _GL_ATTR_deprecated _GL_GNUC_PREREQ (3, 1)
+# define _GL_ATTR_diagnose_if 0
 # define _GL_ATTR_error _GL_GNUC_PREREQ (4, 3)
 # define _GL_ATTR_externally_visible _GL_GNUC_PREREQ (4, 1)
 # define _GL_ATTR_fallthrough _GL_GNUC_PREREQ (7, 0)
 #endif
 
 /* Avoid __attribute__ ((cold)) on MinGW; see thread starting at
-   <https://lists.gnu.org/r/emacs-devel/2019-04/msg01152.html>. */
+   <https://lists.gnu.org/r/emacs-devel/2019-04/msg01152.html>.
+   Also, Oracle Studio 12.6 requires 'cold' not '__cold__'.  */
 #if _GL_HAS_ATTRIBUTE (cold) && !defined __MINGW32__
-# define _GL_ATTRIBUTE_COLD __attribute__ ((__cold__))
+# ifndef __SUNPRO_C
+#  define _GL_ATTRIBUTE_COLD __attribute__ ((__cold__))
+# else
+#  define _GL_ATTRIBUTE_COLD __attribute__ ((cold))
+# endif
 #else
 # define _GL_ATTRIBUTE_COLD
 #endif
 #if _GL_HAS_ATTRIBUTE (error)
 # define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__error__ (msg)))
 # define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__warning__ (msg)))
+#elif _GL_HAS_ATTRIBUTE (diagnose_if)
+# define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__diagnose_if__ (1, msg, "error")))
+# define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__diagnose_if__ (1, msg, "warning")))
 #else
 # define _GL_ATTRIBUTE_ERROR(msg)
 # define _GL_ATTRIBUTE_WARNING(msg)
 # define _GL_ATTRIBUTE_LEAF
 #endif
 
-#if _GL_HAS_ATTRIBUTE (may_alias)
+/* Oracle Studio 12.6 mishandles may_alias despite __has_attribute OK.  */
+#if _GL_HAS_ATTRIBUTE (may_alias) && !defined __SUNPRO_C
 # define _GL_ATTRIBUTE_MAY_ALIAS __attribute__ ((__may_alias__))
 #else
 # define _GL_ATTRIBUTE_MAY_ALIAS
 /* Define to a type if <wchar.h> does not define. */
 #undef mbstate_t
 
+/* _GL_CMP (n1, n2) performs a three-valued comparison on n1 vs. n2, where
+   n1 and n2 are expressions without side effects, that evaluate to real
+   numbers (excluding NaN).
+   It returns
+     1  if n1 > n2
+     0  if n1 == n2
+     -1 if n1 < n2
+   The naïve code   (n1 > n2 ? 1 : n1 < n2 ? -1 : 0)  produces a conditional
+   jump with nearly all GCC versions up to GCC 10.
+   This variant     (n1 < n2 ? -1 : n1 > n2)  produces a conditional with many
+   GCC versions up to GCC 9.
+   The better code  (n1 > n2) - (n1 < n2)  from Hacker's Delight Â§ 2-9
+   avoids conditional jumps in all GCC versions >= 3.4.  */
+#define _GL_CMP(n1, n2) (((n1) > (n2)) - ((n1) < (n2)))
+
+
 /* Define to `int' if <sys/types.h> does not define. */
 #undef mode_t
 
 /* Define to the type of st_nlink in struct stat, or a supertype. */
 #undef nlink_t
 
-/* Define to `int' if <sys/types.h> does not define. */
+/* Define as a signed integer type capable of holding a process identifier. */
 #undef pid_t
 
 /* Define to the equivalent of the C99 'restrict' keyword, or to
    nothing if this is not supported.  Do not define if restrict is
-   supported directly.  */
+   supported only directly.  */
 #undef restrict
 /* Work around a bug in older versions of Sun C++, which did not
    #define __restrict__ or support _Restrict or __restrict__
index 6c58a46e42eddf618e60e348910007fffcca48d1..63b2b1fc4318fc08b99d0af03d861650f321c6c7 100644 (file)
@@ -583,6 +583,7 @@ PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
 ac_unique_file="import/memmem.c"
+ac_header_list=
 # Factoring default headers for most tests.
 ac_includes_default="\
 #include <stdio.h>
@@ -621,7 +622,6 @@ ac_includes_default="\
 
 gl_use_threads_default=
 gl_use_winpthreads_default=
-ac_header_list=
 ac_func_list=
 gl_fnmatch_required=POSIX
 ac_subst_vars='am__EXEEXT_FALSE
@@ -698,12 +698,40 @@ NEXT_WCHAR_H
 HAVE_UNISTD_H
 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
 NEXT_UNISTD_H
+TIME_H_DEFINES_TIME_UTC
 UNISTD_H_DEFINES_STRUCT_TIMESPEC
 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
 TIME_H_DEFINES_STRUCT_TIMESPEC
 NEXT_AS_FIRST_DIRECTIVE_TIME_H
 NEXT_TIME_H
+REPLACE_LOCALTIME
+REPLACE_GMTIME
+REPLACE_TZSET
+REPLACE_TIMEGM
+REPLACE_STRFTIME
+REPLACE_NANOSLEEP
+REPLACE_MKTIME
+REPLACE_LOCALTIME_R
+REPLACE_CTIME
+HAVE_TIMEZONE_T
+HAVE_TIMESPEC_GET
+HAVE_TIMEGM
+HAVE_STRPTIME
+HAVE_NANOSLEEP
+HAVE_DECL_LOCALTIME_R
+GNULIB_MDA_TZSET
+GNULIB_TZSET
+GNULIB_TIME_RZ
+GNULIB_TIME_R
+GNULIB_TIMESPEC_GET
+GNULIB_TIMEGM
+GNULIB_STRPTIME
+GNULIB_STRFTIME
+GNULIB_NANOSLEEP
+GNULIB_LOCALTIME
+GNULIB_MKTIME
+GNULIB_CTIME
 HAVE_SYS_UIO_H
 NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H
 NEXT_SYS_UIO_H
@@ -793,6 +821,13 @@ HAVE_DECL_GETDELIM
 HAVE_DECL_FTELLO
 HAVE_DECL_FSEEKO
 HAVE_DECL_FPURGE
+HAVE_DECL_FCLOSEALL
+GNULIB_MDA_TEMPNAM
+GNULIB_MDA_PUTW
+GNULIB_MDA_GETW
+GNULIB_MDA_FILENO
+GNULIB_MDA_FDOPEN
+GNULIB_MDA_FCLOSEALL
 GNULIB_VSPRINTF_POSIX
 GNULIB_VSNPRINTF
 GNULIB_VPRINTF_POSIX
@@ -854,6 +889,7 @@ NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H
 NEXT_NETINET_IN_H
 UNDEFINE_STRTOK_R
 REPLACE_STRSIGNAL
+REPLACE_STRERRORNAME_NP
 REPLACE_STRERROR_R
 REPLACE_STRERROR
 REPLACE_STRTOK_R
@@ -867,8 +903,12 @@ REPLACE_STRCHRNUL
 REPLACE_STPNCPY
 REPLACE_MEMMEM
 REPLACE_MEMCHR
+REPLACE_FFSLL
 HAVE_STRVERSCMP
 HAVE_DECL_STRSIGNAL
+HAVE_SIGDESCR_NP
+HAVE_SIGABBREV_NP
+HAVE_STRERRORNAME_NP
 HAVE_DECL_STRERROR_R
 HAVE_DECL_STRTOK_R
 HAVE_STRCASESTR
@@ -884,13 +924,17 @@ HAVE_RAWMEMCHR
 HAVE_DECL_MEMRCHR
 HAVE_MEMPCPY
 HAVE_DECL_MEMMEM
-HAVE_MEMCHR
 HAVE_FFSLL
 HAVE_FFSL
 HAVE_EXPLICIT_BZERO
+GNULIB_MDA_STRDUP
+GNULIB_MDA_MEMCCPY
 HAVE_MBSLEN
 GNULIB_STRVERSCMP
 GNULIB_STRSIGNAL
+GNULIB_SIGDESCR_NP
+GNULIB_SIGABBREV_NP
+GNULIB_STRERRORNAME_NP
 GNULIB_STRERROR_R
 GNULIB_STRERROR
 GNULIB_MBSTOK_R
@@ -971,7 +1015,6 @@ NEXT_INTTYPES_H
 UINT64_MAX_EQ_ULONG_MAX
 UINT32_MAX_LT_UINTMAX_MAX
 PRIPTR_PREFIX
-PRI_MACROS_BROKEN
 INT64_MAX_EQ_LONG_MAX
 INT32_MAX_LT_INTMAX_MAX
 REPLACE_STRTOUMAX
@@ -1056,31 +1099,6 @@ REPLACE_GLOB
 HAVE_GLOB_PATTERN_P
 HAVE_GLOB
 GNULIB_GLOB
-REPLACE_LOCALTIME
-REPLACE_GMTIME
-REPLACE_TZSET
-REPLACE_TIMEGM
-REPLACE_STRFTIME
-REPLACE_NANOSLEEP
-REPLACE_MKTIME
-REPLACE_LOCALTIME_R
-REPLACE_CTIME
-HAVE_TIMEZONE_T
-HAVE_TZSET
-HAVE_TIMEGM
-HAVE_STRPTIME
-HAVE_NANOSLEEP
-HAVE_DECL_LOCALTIME_R
-GNULIB_TZSET
-GNULIB_TIME_RZ
-GNULIB_TIME_R
-GNULIB_TIMEGM
-GNULIB_STRPTIME
-GNULIB_STRFTIME
-GNULIB_NANOSLEEP
-GNULIB_LOCALTIME
-GNULIB_MKTIME
-GNULIB_CTIME
 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
 NEXT_SYS_TIME_H
 REPLACE_STRUCT_TIMEVAL
@@ -1102,7 +1120,9 @@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
 NEXT_SYS_STAT_H
 REPLACE_UTIMENSAT
 REPLACE_STAT
+REPLACE_MKNODAT
 REPLACE_MKNOD
+REPLACE_MKFIFOAT
 REPLACE_MKFIFO
 REPLACE_MKDIR
 REPLACE_LSTAT
@@ -1118,9 +1138,13 @@ HAVE_MKFIFO
 HAVE_MKDIRAT
 HAVE_LSTAT
 HAVE_LCHMOD
+HAVE_GETUMASK
 HAVE_FUTIMENS
 HAVE_FSTATAT
 HAVE_FCHMODAT
+GNULIB_MDA_UMASK
+GNULIB_MDA_MKDIR
+GNULIB_MDA_CHMOD
 GNULIB_OVERRIDES_STRUCT_STAT
 GNULIB_UTIMENSAT
 GNULIB_STAT
@@ -1129,8 +1153,10 @@ GNULIB_MKNOD
 GNULIB_MKFIFOAT
 GNULIB_MKFIFO
 GNULIB_MKDIRAT
+GNULIB_MKDIR
 GNULIB_LSTAT
 GNULIB_LCHMOD
+GNULIB_GETUMASK
 GNULIB_FUTIMENS
 GNULIB_FSTATAT
 GNULIB_FSTAT
@@ -1147,7 +1173,7 @@ REPLACE_SQRTL
 REPLACE_SQRTF
 REPLACE_SINHF
 REPLACE_SINF
-REPLACE_SIGNBIT_USING_GCC
+REPLACE_SIGNBIT_USING_BUILTINS
 REPLACE_SIGNBIT
 REPLACE_ROUNDL
 REPLACE_ROUNDF
@@ -1313,6 +1339,12 @@ HAVE_ASINL
 HAVE_ASINF
 HAVE_ACOSL
 HAVE_ACOSF
+GNULIB_MDA_YN
+GNULIB_MDA_Y1
+GNULIB_MDA_Y0
+GNULIB_MDA_JN
+GNULIB_MDA_J1
+GNULIB_MDA_J0
 GNULIB_TRUNCL
 GNULIB_TRUNCF
 GNULIB_TRUNC
@@ -1431,6 +1463,8 @@ REPLACE_FCNTL
 REPLACE_CREAT
 HAVE_OPENAT
 HAVE_FCNTL
+GNULIB_MDA_OPEN
+GNULIB_MDA_CREAT
 GNULIB_OPENAT
 GNULIB_OPEN
 GNULIB_NONBLOCKING
@@ -1477,6 +1511,7 @@ GNULIB_READDIR
 GNULIB_OPENDIR
 HAVE_WINSOCK2_H
 HAVE_MSVC_INVALID_PARAMETER_HANDLER
+LIB_CLOCK_GETTIME
 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
 UNISTD_H_HAVE_WINSOCK2_H
 UNISTD_H_HAVE_SYS_RANDOM_H
@@ -1510,6 +1545,13 @@ REPLACE_GETCWD
 REPLACE_FTRUNCATE
 REPLACE_FCHOWNAT
 REPLACE_FACCESSAT
+REPLACE_EXECVPE
+REPLACE_EXECVP
+REPLACE_EXECVE
+REPLACE_EXECV
+REPLACE_EXECLP
+REPLACE_EXECLE
+REPLACE_EXECL
 REPLACE_DUP2
 REPLACE_DUP
 REPLACE_CLOSE
@@ -1527,6 +1569,7 @@ HAVE_DECL_GETLOGIN
 HAVE_DECL_GETDOMAINNAME
 HAVE_DECL_FDATASYNC
 HAVE_DECL_FCHDIR
+HAVE_DECL_EXECVPE
 HAVE_DECL_ENVIRON
 HAVE_USLEEP
 HAVE_UNLINKAT
@@ -1557,11 +1600,32 @@ HAVE_FDATASYNC
 HAVE_FCHOWNAT
 HAVE_FCHDIR
 HAVE_FACCESSAT
+HAVE_EXECVPE
 HAVE_EUIDACCESS
 HAVE_DUP3
-HAVE_DUP2
 HAVE_COPY_FILE_RANGE
 HAVE_CHOWN
+GNULIB_MDA_WRITE
+GNULIB_MDA_UNLINK
+GNULIB_MDA_SWAB
+GNULIB_MDA_RMDIR
+GNULIB_MDA_READ
+GNULIB_MDA_LSEEK
+GNULIB_MDA_ISATTY
+GNULIB_MDA_GETPID
+GNULIB_MDA_GETCWD
+GNULIB_MDA_EXECVPE
+GNULIB_MDA_EXECVP
+GNULIB_MDA_EXECVE
+GNULIB_MDA_EXECV
+GNULIB_MDA_EXECLP
+GNULIB_MDA_EXECLE
+GNULIB_MDA_EXECL
+GNULIB_MDA_DUP2
+GNULIB_MDA_DUP
+GNULIB_MDA_CLOSE
+GNULIB_MDA_CHDIR
+GNULIB_MDA_ACCESS
 GNULIB_WRITE
 GNULIB_USLEEP
 GNULIB_UNLINKAT
@@ -1606,6 +1670,13 @@ GNULIB_FDATASYNC
 GNULIB_FCHOWNAT
 GNULIB_FCHDIR
 GNULIB_FACCESSAT
+GNULIB_EXECVPE
+GNULIB_EXECVP
+GNULIB_EXECVE
+GNULIB_EXECV
+GNULIB_EXECLP
+GNULIB_EXECLE
+GNULIB_EXECL
 GNULIB_EUIDACCESS
 GNULIB_ENVIRON
 GNULIB_DUP3
@@ -1630,12 +1701,15 @@ REPLACE_QSORT_R
 REPLACE_PUTENV
 REPLACE_PTSNAME_R
 REPLACE_PTSNAME
+REPLACE_POSIX_MEMALIGN
 REPLACE_MKSTEMP
 REPLACE_MBTOWC
 REPLACE_MALLOC
 REPLACE_INITSTATE
+REPLACE_FREE
 REPLACE_CANONICALIZE_FILE_NAME
 REPLACE_CALLOC
+REPLACE_ALIGNED_ALLOC
 HAVE_DECL_UNSETENV
 HAVE_UNLOCKPT
 HAVE_SYS_LOADAVG_H
@@ -1659,6 +1733,7 @@ HAVE_QSORT_R
 HAVE_PTSNAME_R
 HAVE_PTSNAME
 HAVE_POSIX_OPENPT
+HAVE_POSIX_MEMALIGN
 HAVE_MKSTEMPS
 HAVE_MKSTEMP
 HAVE_MKOSTEMPS
@@ -1670,9 +1745,18 @@ HAVE_INITSTATE
 HAVE_GRANTPT
 HAVE_GETSUBOPT
 HAVE_DECL_GETLOADAVG
+HAVE_DECL_GCVT
+HAVE_DECL_FCVT
+HAVE_DECL_ECVT
 HAVE_CANONICALIZE_FILE_NAME
 HAVE_ATOLL
+HAVE_ALIGNED_ALLOC
 HAVE__EXIT
+GNULIB_MDA_PUTENV
+GNULIB_MDA_MKTEMP
+GNULIB_MDA_GCVT
+GNULIB_MDA_FCVT
+GNULIB_MDA_ECVT
 GNULIB_WCTOMB
 GNULIB_UNSETENV
 GNULIB_UNLOCKPT
@@ -1694,6 +1778,7 @@ GNULIB_PUTENV
 GNULIB_PTSNAME_R
 GNULIB_PTSNAME
 GNULIB_POSIX_OPENPT
+GNULIB_POSIX_MEMALIGN
 GNULIB_MKSTEMPS
 GNULIB_MKSTEMP
 GNULIB_MKOSTEMPS
@@ -1704,9 +1789,11 @@ GNULIB_MALLOC_POSIX
 GNULIB_GRANTPT
 GNULIB_GETSUBOPT
 GNULIB_GETLOADAVG
+GNULIB_FREE_POSIX
 GNULIB_CANONICALIZE_FILE_NAME
 GNULIB_CALLOC_POSIX
 GNULIB_ATOLL
+GNULIB_ALIGNED_ALLOC
 GNULIB__EXIT
 LOCALE_FR
 REPLACE_WCSTOK
@@ -1725,6 +1812,7 @@ REPLACE_WCTOB
 REPLACE_BTOWC
 REPLACE_MBSTATE_T
 HAVE_DECL_WCWIDTH
+HAVE_DECL_WCSDUP
 HAVE_DECL_WCTOB
 HAVE_WCSFTIME
 HAVE_WCSWIDTH
@@ -1765,6 +1853,7 @@ HAVE_MBRLEN
 HAVE_MBRTOWC
 HAVE_MBSINIT
 HAVE_BTOWC
+GNULIB_MDA_WCSDUP
 GNULIB_WCSFTIME
 GNULIB_WCSWIDTH
 GNULIB_WCSTOK
@@ -2680,6 +2769,37 @@ fi
 
 } # ac_fn_c_try_compile
 
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_compile
+
 # ac_fn_c_try_cpp LINENO
 # ----------------------
 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
@@ -2717,93 +2837,6 @@ fi
 
 } # ac_fn_c_try_cpp
 
-# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
-# -------------------------------------------------------
-# Tests whether HEADER exists, giving a warning if it cannot be compiled using
-# the include files in INCLUDES and setting the cache variable VAR
-# accordingly.
-ac_fn_c_check_header_mongrel ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if eval \${$3+:} false; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
-  $as_echo_n "(cached) " >&6
-fi
-eval ac_res=\$$3
-              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
-$as_echo_n "checking $2 usability... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_header_compiler=yes
-else
-  ac_header_compiler=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
-$as_echo_n "checking $2 presence... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <$2>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-  ac_header_preproc=yes
-else
-  ac_header_preproc=no
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
-  yes:no: )
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-    ;;
-esac
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  eval "$3=\$ac_header_compiler"
-fi
-eval ac_res=\$$3
-              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-fi
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_check_header_mongrel
-
 # ac_fn_c_try_run LINENO
 # ----------------------
 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
@@ -2846,37 +2879,6 @@ fi
 
 } # ac_fn_c_try_run
 
-# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
-# -------------------------------------------------------
-# Tests whether HEADER exists and can be compiled using the include files in
-# INCLUDES, setting the cache variable VAR accordingly.
-ac_fn_c_check_header_compile ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  eval "$3=yes"
-else
-  eval "$3=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$3
-              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_check_header_compile
-
 # ac_fn_c_try_link LINENO
 # -----------------------
 # Try to link conftest.$ac_ext, and return whether this succeeded.
@@ -2977,6 +2979,93 @@ $as_echo "$ac_res" >&6; }
 
 } # ac_fn_c_check_type
 
+# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
+# the include files in INCLUDES and setting the cache variable VAR
+# accordingly.
+ac_fn_c_check_header_mongrel ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if eval \${$3+:} false; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
+$as_echo_n "checking $2 usability... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_header_compiler=yes
+else
+  ac_header_compiler=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
+$as_echo_n "checking $2 presence... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <$2>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  ac_header_preproc=yes
+else
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
+  yes:no: )
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+    ;;
+esac
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  eval "$3=\$ac_header_compiler"
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_mongrel
+
 # ac_fn_c_check_func LINENO FUNC VAR
 # ----------------------------------
 # Tests whether FUNC exists, setting the cache variable VAR accordingly
@@ -3618,13 +3707,14 @@ $as_echo "$as_me: creating cache $cache_file" >&6;}
   >$cache_file
 fi
 
+as_fn_append ac_header_list " wchar.h"
+as_fn_append ac_header_list " minix/config.h"
 as_fn_append ac_header_list " arpa/inet.h"
 as_fn_append ac_header_list " features.h"
 as_fn_append ac_header_list " sys/socket.h"
 as_fn_append ac_func_list " btowc"
 as_fn_append ac_func_list " canonicalize_file_name"
-as_fn_append ac_func_list " getcwd"
-as_fn_append ac_func_list " readlink"
+as_fn_append ac_func_list " faccessat"
 as_fn_append ac_func_list " realpath"
 as_fn_append ac_header_list " sys/param.h"
 as_fn_append ac_header_list " unistd.h"
@@ -3656,9 +3746,9 @@ as_fn_append ac_header_list " threads.h"
 as_fn_append ac_header_list " netdb.h"
 as_fn_append ac_header_list " netinet/in.h"
 as_fn_append ac_header_list " limits.h"
-as_fn_append ac_header_list " wchar.h"
-as_fn_append ac_header_list " stdint.h"
 as_fn_append ac_header_list " inttypes.h"
+as_fn_append ac_header_list " sys/types.h"
+as_fn_append ac_header_list " stdint.h"
 as_fn_append ac_func_list " isblank"
 as_fn_append ac_header_list " xlocale.h"
 as_fn_append ac_func_list " lstat"
@@ -3669,9 +3759,10 @@ as_fn_append ac_header_list " sys/mman.h"
 as_fn_append ac_func_list " mprotect"
 as_fn_append ac_func_list " mkostemp"
 as_fn_append ac_func_list " openat"
+as_fn_append ac_func_list " pipe"
+as_fn_append ac_func_list " readlink"
 as_fn_append ac_func_list " link"
 as_fn_append ac_func_list " setenv"
-as_fn_append ac_func_list " strdup"
 as_fn_append ac_func_list " strerror_r"
 as_fn_append ac_func_list " __xpg_strerror_r"
 as_fn_append ac_func_list " catgets"
@@ -3679,7 +3770,6 @@ as_fn_append ac_func_list " snprintf"
 as_fn_append ac_header_list " sys/random.h"
 as_fn_append ac_header_list " sys/uio.h"
 as_fn_append ac_func_list " localtime_r"
-as_fn_append ac_func_list " pipe"
 as_fn_append ac_header_list " crtdefs.h"
 as_fn_append ac_func_list " iswcntrl"
 as_fn_append ac_header_list " wctype.h"
@@ -5164,6 +5254,7 @@ $as_echo "$gl_cv_compiler_check_decl_option" >&6; }
 
 
 
+
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -5562,28 +5653,28 @@ done
 
 
 
-  ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
-if test "x$ac_cv_header_minix_config_h" = xyes; then :
-  MINIX=yes
-else
-  MINIX=
-fi
 
 
-  if test "$MINIX" = yes; then
+  for ac_header in $ac_header_list
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
 
-$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
+fi
+
+done
 
 
-$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
 
 
-$as_echo "#define _MINIX 1" >>confdefs.h
 
 
-$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
 
-  fi
 
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
@@ -5613,36 +5704,6 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
-  test $ac_cv_safe_to_define___extensions__ = yes &&
-    $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
-
-  $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
-
-  $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
-
-  $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
-
-  $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
-
-  $as_echo "#define _OPENBSD_SOURCE 1" >>confdefs.h
-
-  $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
-
-  $as_echo "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
-
-  $as_echo "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
-
-  $as_echo "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
-
-  $as_echo "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
-
-  $as_echo "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
-
-  $as_echo "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
-
-  $as_echo "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
-
-  $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
 $as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
@@ -5650,7 +5711,8 @@ if ${ac_cv_should_define__xopen_source+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_cv_should_define__xopen_source=no
-     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+    if test $ac_cv_header_wchar_h = yes; then :
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
           #include <wchar.h>
@@ -5669,9 +5731,9 @@ else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-             #define _XOPEN_SOURCE 500
-             #include <wchar.h>
-             mbstate_t x;
+            #define _XOPEN_SOURCE 500
+            #include <wchar.h>
+            mbstate_t x;
 int
 main ()
 {
@@ -5687,13 +5749,59 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
+fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
 $as_echo "$ac_cv_should_define__xopen_source" >&6; }
-  test $ac_cv_should_define__xopen_source = yes &&
-    $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
+
+  $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
+
+  $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
+
+  $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
 
   $as_echo "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
 
+  $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
+
+  $as_echo "#define _OPENBSD_SOURCE 1" >>confdefs.h
+
+  $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
+
+  $as_echo "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
+
+  $as_echo "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
+
+  $as_echo "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
+
+  $as_echo "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
+
+  $as_echo "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
+
+  $as_echo "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
+
+  $as_echo "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
+
+  $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
+
+  if test $ac_cv_header_minix_config_h = yes; then :
+  MINIX=yes
+    $as_echo "#define _MINIX 1" >>confdefs.h
+
+    $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
+
+    $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
+
+else
+  MINIX=
+fi
+  if test $ac_cv_safe_to_define___extensions__ = yes; then :
+  $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
+
+fi
+  if test $ac_cv_should_define__xopen_source = yes; then :
+  $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
+
+fi
 
 # Needs to run before gl_EARLY so it can override AC_SYS_LARGEFILE included
 # there.
@@ -6027,7 +6135,7 @@ else
     We can't simply define LARGE_OFF_T to be 9223372036854775807,
     since some C++ compilers masquerading as C compilers
     incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
                        && LARGE_OFF_T % 2147483647 == 1)
                       ? 1 : -1];
@@ -6073,7 +6181,7 @@ else
     We can't simply define LARGE_OFF_T to be 9223372036854775807,
     since some C++ compilers masquerading as C compilers
     incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
                        && LARGE_OFF_T % 2147483647 == 1)
                       ? 1 : -1];
@@ -6097,7 +6205,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     We can't simply define LARGE_OFF_T to be 9223372036854775807,
     since some C++ compilers masquerading as C compilers
     incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
                        && LARGE_OFF_T % 2147483647 == 1)
                       ? 1 : -1];
@@ -6142,7 +6250,7 @@ else
     We can't simply define LARGE_OFF_T to be 9223372036854775807,
     since some C++ compilers masquerading as C compilers
     incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
                        && LARGE_OFF_T % 2147483647 == 1)
                       ? 1 : -1];
@@ -6166,7 +6274,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     We can't simply define LARGE_OFF_T to be 9223372036854775807,
     since some C++ compilers masquerading as C compilers
     incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
                        && LARGE_OFF_T % 2147483647 == 1)
                       ? 1 : -1];
@@ -6205,7 +6313,13 @@ fi
 
 
 
+  case "$host_os" in
+    openbsd*)
+
+$as_echo "#define _ISOC11_SOURCE 1" >>confdefs.h
 
+      ;;
+  esac
 
 
 
@@ -6555,12 +6669,14 @@ fi
   # Code from module assure:
   # Code from module at-internal:
   # Code from module attribute:
+  # Code from module basename-lgpl:
   # Code from module btowc:
   # Code from module builtin-expect:
   # Code from module c99:
   # Code from module canonicalize-lgpl:
   # Code from module chdir:
   # Code from module chdir-long:
+  # Code from module clock-time:
   # Code from module cloexec:
   # Code from module close:
   # Code from module closedir:
@@ -6574,6 +6690,7 @@ fi
   # Code from module double-slash-root:
   # Code from module dup:
   # Code from module dup2:
+  # Code from module eloop-threshold:
   # Code from module environ:
   # Code from module errno:
   # Code from module error:
@@ -6596,6 +6713,7 @@ fi
   # Code from module fpieee:
 
   # Code from module fpucw:
+  # Code from module free-posix:
   # Code from module frexp:
   # Code from module frexpl:
   # Code from module fstat:
@@ -6611,6 +6729,7 @@ fi
   # Code from module glob:
   # Code from module glob-h:
   # Code from module hard-locale:
+  # Code from module idx:
   # Code from module include_next:
   # Code from module inet_ntop:
   # Code from module intprops:
@@ -6625,7 +6744,6 @@ fi
   # Code from module limits-h:
   # Code from module localcharset:
   # Code from module locale:
-  # Code from module localtime-buffer:
   # Code from module lock:
   # Code from module lstat:
   # Code from module malloc-posix:
@@ -6655,6 +6773,7 @@ fi
   # Code from module openat-h:
   # Code from module opendir:
   # Code from module pathmax:
+  # Code from module pipe-posix:
   # Code from module rawmemchr:
   # Code from module readdir:
   # Code from module readlink:
@@ -6765,6 +6884,7 @@ ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
 
 
 
+
                         # Check whether --enable-cross-guesses was given.
 if test "${enable_cross_guesses+set}" = set; then :
   enableval=$enable_cross_guesses; if test "x$enableval" != xconservative && test "x$enableval" != xrisky; then
@@ -6901,47 +7021,6 @@ ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
 $as_echo "#define C_ALLOCA 1" >>confdefs.h
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
-$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
-if ${ac_cv_os_cray+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#if defined CRAY && ! defined CRAY2
-webecray
-#else
-wenotbecray
-#endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "webecray" >/dev/null 2>&1; then :
-  ac_cv_os_cray=yes
-else
-  ac_cv_os_cray=no
-fi
-rm -f conftest*
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
-$as_echo "$ac_cv_os_cray" >&6; }
-if test $ac_cv_os_cray = yes; then
-  for ac_func in _getb67 GETB67 getb67; do
-    as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
-
-cat >>confdefs.h <<_ACEOF
-#define CRAY_STACKSEG_END $ac_func
-_ACEOF
-
-    break
-fi
-
-  done
-fi
-
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
 $as_echo_n "checking stack direction for C alloca... " >&6; }
 if ${ac_cv_c_stack_direction+:} false; then :
@@ -6980,39 +7059,22 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 fi
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
-$as_echo "$ac_cv_c_stack_direction" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define STACK_DIRECTION $ac_cv_c_stack_direction
-_ACEOF
-
-
-fi
-
-
-  GNULIB_INET_NTOP=0;
-  GNULIB_INET_PTON=0;
-    HAVE_DECL_INET_NTOP=1;
-  HAVE_DECL_INET_PTON=1;
-  REPLACE_INET_NTOP=0;
-  REPLACE_INET_PTON=0;
-
-
-
-
-  for ac_header in $ac_header_list
-do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
+$as_echo "$ac_cv_c_stack_direction" >&6; }
+cat >>confdefs.h <<_ACEOF
+#define STACK_DIRECTION $ac_cv_c_stack_direction
 _ACEOF
 
+
 fi
 
-done
+
+  GNULIB_INET_NTOP=0;
+  GNULIB_INET_PTON=0;
+    HAVE_DECL_INET_NTOP=1;
+  HAVE_DECL_INET_PTON=1;
+  REPLACE_INET_NTOP=0;
+  REPLACE_INET_PTON=0;
 
 
 
@@ -7098,12 +7160,13 @@ $as_echo "$gl_cv_have_include_next" >&6; }
 
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
-$as_echo_n "checking whether system header files limit the line length... " >&6; }
-if ${gl_cv_pragma_columns+:} false; then :
+
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether source code line length is unlimited" >&5
+$as_echo_n "checking whether source code line length is unlimited... " >&6; }
+if ${gl_cv_source_line_length_unlimited+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 #ifdef __TANDEM
@@ -7113,17 +7176,17 @@ choke me
 _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
   $EGREP "choke me" >/dev/null 2>&1; then :
-  gl_cv_pragma_columns=yes
+  gl_cv_source_line_length_unlimited=no
 else
-  gl_cv_pragma_columns=no
+  gl_cv_source_line_length_unlimited=yes
 fi
 rm -f conftest*
 
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
-$as_echo "$gl_cv_pragma_columns" >&6; }
-  if test $gl_cv_pragma_columns = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_source_line_length_unlimited" >&5
+$as_echo "$gl_cv_source_line_length_unlimited" >&6; }
+  if test $gl_cv_source_line_length_unlimited = no; then
     PRAGMA_COLUMNS="#pragma COLUMNS 10000"
   else
     PRAGMA_COLUMNS=
@@ -7243,6 +7306,7 @@ $as_echo "$MKDIR_P" >&6; }
   GNULIB_WCSTOK=0;
   GNULIB_WCSWIDTH=0;
   GNULIB_WCSFTIME=0;
+    GNULIB_MDA_WCSDUP=1;
     HAVE_BTOWC=1;
   HAVE_MBSINIT=1;
   HAVE_MBRTOWC=1;
@@ -7283,6 +7347,7 @@ $as_echo "$MKDIR_P" >&6; }
   HAVE_WCSWIDTH=1;
   HAVE_WCSFTIME=1;
   HAVE_DECL_WCTOB=1;
+  HAVE_DECL_WCSDUP=1;
   HAVE_DECL_WCWIDTH=1;
   REPLACE_MBSTATE_T=0;
   REPLACE_BTOWC=0;
@@ -7301,67 +7366,60 @@ $as_echo "$MKDIR_P" >&6; }
   REPLACE_WCSTOK=0;
 
 
-            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
 $as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
 if ${gl_cv_header_wchar_h_correct_inline+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   gl_cv_header_wchar_h_correct_inline=yes
-     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+     case "$host_os" in
+       *-gnu* | gnu*)
+         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-       #define wcstod renamed_wcstod
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-extern int zero (void);
-int main () { return zero(); }
+
+             #define wcstod renamed_wcstod
+             #include <wchar.h>
+             extern int zero (void);
+             int main () { return zero(); }
 
 _ACEOF
-                              save_ac_compile="$ac_compile"
-     ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
-     if echo '#include "conftest.c"' >conftest1.c &&
-        { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+                                                      save_ac_compile="$ac_compile"
+         ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
+         if echo '#include "conftest.c"' >conftest1.c \
+            && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-         #define wcstod renamed_wcstod
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-int zero (void) { return 0; }
+
+               #define wcstod renamed_wcstod
+               #include <wchar.h>
+               int zero (void) { return 0; }
 
 _ACEOF
-              ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
-       if echo '#include "conftest.c"' >conftest2.c &&
-          { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+                      ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
+           if echo '#include "conftest.c"' >conftest2.c \
+              && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-         if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
-           :
-         else
-           gl_cv_header_wchar_h_correct_inline=no
+             if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
+               :
+             else
+               gl_cv_header_wchar_h_correct_inline=no
+             fi
+           fi
          fi
-       fi
-     fi
-     ac_compile="$save_ac_compile"
-     rm -f conftest12.c conftest12.$ac_objext conftest$ac_exeext
+         ac_compile="$save_ac_compile"
+         rm -f conftest12.c conftest12.$ac_objext conftest$ac_exeext
+         ;;
+     esac
 
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
@@ -7573,9 +7631,11 @@ $as_echo "$gt_cv_locale_fr" >&6; }
 
 
   GNULIB__EXIT=0;
+  GNULIB_ALIGNED_ALLOC=0;
   GNULIB_ATOLL=0;
   GNULIB_CALLOC_POSIX=0;
   GNULIB_CANONICALIZE_FILE_NAME=0;
+  GNULIB_FREE_POSIX=0;
   GNULIB_GETLOADAVG=0;
   GNULIB_GETSUBOPT=0;
   GNULIB_GRANTPT=0;
@@ -7586,6 +7646,7 @@ $as_echo "$gt_cv_locale_fr" >&6; }
   GNULIB_MKOSTEMPS=0;
   GNULIB_MKSTEMP=0;
   GNULIB_MKSTEMPS=0;
+  GNULIB_POSIX_MEMALIGN=0;
   GNULIB_POSIX_OPENPT=0;
   GNULIB_PTSNAME=0;
   GNULIB_PTSNAME_R=0;
@@ -7607,9 +7668,18 @@ $as_echo "$gt_cv_locale_fr" >&6; }
   GNULIB_UNLOCKPT=0;
   GNULIB_UNSETENV=0;
   GNULIB_WCTOMB=0;
+    GNULIB_MDA_ECVT=1;
+  GNULIB_MDA_FCVT=1;
+  GNULIB_MDA_GCVT=1;
+  GNULIB_MDA_MKTEMP=1;
+  GNULIB_MDA_PUTENV=1;
     HAVE__EXIT=1;
+  HAVE_ALIGNED_ALLOC=1;
   HAVE_ATOLL=1;
   HAVE_CANONICALIZE_FILE_NAME=1;
+  HAVE_DECL_ECVT=1;
+  HAVE_DECL_FCVT=1;
+  HAVE_DECL_GCVT=1;
   HAVE_DECL_GETLOADAVG=1;
   HAVE_GETSUBOPT=1;
   HAVE_GRANTPT=1;
@@ -7621,6 +7691,7 @@ $as_echo "$gt_cv_locale_fr" >&6; }
   HAVE_MKOSTEMPS=1;
   HAVE_MKSTEMP=1;
   HAVE_MKSTEMPS=1;
+  HAVE_POSIX_MEMALIGN=1;
   HAVE_POSIX_OPENPT=1;
   HAVE_PTSNAME=1;
   HAVE_PTSNAME_R=1;
@@ -7644,12 +7715,15 @@ $as_echo "$gt_cv_locale_fr" >&6; }
   HAVE_SYS_LOADAVG_H=0;
   HAVE_UNLOCKPT=1;
   HAVE_DECL_UNSETENV=1;
+  REPLACE_ALIGNED_ALLOC=0;
   REPLACE_CALLOC=0;
   REPLACE_CANONICALIZE_FILE_NAME=0;
+  REPLACE_FREE=0;
   REPLACE_INITSTATE=0;
   REPLACE_MALLOC=0;
   REPLACE_MBTOWC=0;
   REPLACE_MKSTEMP=0;
+  REPLACE_POSIX_MEMALIGN=0;
   REPLACE_PTSNAME=0;
   REPLACE_PTSNAME_R=0;
   REPLACE_PUTENV=0;
@@ -7666,6 +7740,71 @@ $as_echo "$gt_cv_locale_fr" >&6; }
   REPLACE_WCTOMB=0;
 
 
+         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
+$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
+if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  rm -f conftest.sym conftest.file
+     echo >conftest.file
+     if test "$cross_compiling" = yes; then :
+  case "$host_os" in
+          linux-* | linux)
+            # Guess yes on Linux systems.
+            gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
+          *-gnu* | gnu*)
+            # Guess yes on glibc systems.
+            gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
+          mingw*)
+            # Guess no on native Windows.
+            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
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+struct stat sbuf;
+            if (symlink ("conftest.file", "conftest.sym") != 0)
+              return 1;
+            /* Linux will dereference the symlink and fail, as required by
+               POSIX.  That is better in the sense that it means we will not
+               have to compile and use the lstat wrapper.  */
+            return lstat ("conftest.sym/", &sbuf) == 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_lstat_dereferences_slashed_symlink=yes
+else
+  gl_cv_func_lstat_dereferences_slashed_symlink=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+     rm -f conftest.sym conftest.file
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
+$as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
+  case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
+    *yes)
+
+cat >>confdefs.h <<_ACEOF
+#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
+_ACEOF
+
+      ;;
+  esac
 
 
 
@@ -7720,6 +7859,7 @@ if ${gl_cv_func_realpath_works+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
+    rm -rf conftest.a conftest.d
     touch conftest.a
     mkdir conftest.d
     if test "$cross_compiling" = yes; then :
@@ -7924,6 +8064,24 @@ $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
 
 
 
+  case "$host_os" in
+    mingw*) ;;
+    *)      for ac_func in getcwd
+do :
+  ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
+if test "x$ac_cv_func_getcwd" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_GETCWD 1
+_ACEOF
+
+fi
+done
+ ;;
+  esac
+
+
+
+
 
 
   GNULIB_ACCESS=0;
@@ -7936,6 +8094,13 @@ $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
   GNULIB_DUP3=0;
   GNULIB_ENVIRON=0;
   GNULIB_EUIDACCESS=0;
+  GNULIB_EXECL=0;
+  GNULIB_EXECLE=0;
+  GNULIB_EXECLP=0;
+  GNULIB_EXECV=0;
+  GNULIB_EXECVE=0;
+  GNULIB_EXECVP=0;
+  GNULIB_EXECVPE=0;
   GNULIB_FACCESSAT=0;
   GNULIB_FCHDIR=0;
   GNULIB_FCHOWNAT=0;
@@ -7980,11 +8145,32 @@ $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
   GNULIB_UNLINKAT=0;
   GNULIB_USLEEP=0;
   GNULIB_WRITE=0;
+    GNULIB_MDA_ACCESS=1;
+  GNULIB_MDA_CHDIR=1;
+  GNULIB_MDA_CLOSE=1;
+  GNULIB_MDA_DUP=1;
+  GNULIB_MDA_DUP2=1;
+  GNULIB_MDA_EXECL=1;
+  GNULIB_MDA_EXECLE=1;
+  GNULIB_MDA_EXECLP=1;
+  GNULIB_MDA_EXECV=1;
+  GNULIB_MDA_EXECVE=1;
+  GNULIB_MDA_EXECVP=1;
+  GNULIB_MDA_EXECVPE=1;
+  GNULIB_MDA_GETCWD=1;
+  GNULIB_MDA_GETPID=1;
+  GNULIB_MDA_ISATTY=1;
+  GNULIB_MDA_LSEEK=1;
+  GNULIB_MDA_READ=1;
+  GNULIB_MDA_RMDIR=1;
+  GNULIB_MDA_SWAB=1;
+  GNULIB_MDA_UNLINK=1;
+  GNULIB_MDA_WRITE=1;
     HAVE_CHOWN=1;
   HAVE_COPY_FILE_RANGE=1;
-  HAVE_DUP2=1;
   HAVE_DUP3=1;
   HAVE_EUIDACCESS=1;
+  HAVE_EXECVPE=1;
   HAVE_FACCESSAT=1;
   HAVE_FCHDIR=1;
   HAVE_FCHOWNAT=1;
@@ -8015,6 +8201,7 @@ $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
   HAVE_UNLINKAT=1;
   HAVE_USLEEP=1;
   HAVE_DECL_ENVIRON=1;
+  HAVE_DECL_EXECVPE=1;
   HAVE_DECL_FCHDIR=1;
   HAVE_DECL_FDATASYNC=1;
   HAVE_DECL_GETDOMAINNAME=1;
@@ -8032,6 +8219,13 @@ $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
   REPLACE_CLOSE=0;
   REPLACE_DUP=0;
   REPLACE_DUP2=0;
+  REPLACE_EXECL=0;
+  REPLACE_EXECLE=0;
+  REPLACE_EXECLP=0;
+  REPLACE_EXECV=0;
+  REPLACE_EXECVE=0;
+  REPLACE_EXECVP=0;
+  REPLACE_EXECVPE=0;
   REPLACE_FACCESSAT=0;
   REPLACE_FCHOWNAT=0;
   REPLACE_FTRUNCATE=0;
@@ -8117,6 +8311,61 @@ $as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
 
 
 
+gl_mda_defines='
+#if defined _WIN32 && !defined __CYGWIN__
+#define access    _access
+#define chdir     _chdir
+#define chmod     _chmod
+#define close     _close
+#define creat     _creat
+#define dup       _dup
+#define dup2      _dup2
+#define ecvt      _ecvt
+#define execl     _execl
+#define execle    _execle
+#define execlp    _execlp
+#define execv     _execv
+#define execve    _execve
+#define execvp    _execvp
+#define execvpe   _execvpe
+#define fcloseall _fcloseall
+#define fcvt      _fcvt
+#define fdopen    _fdopen
+#define fileno    _fileno
+#define gcvt      _gcvt
+#define getcwd    _getcwd
+#define getpid    _getpid
+#define getw      _getw
+#define isatty    _isatty
+#define j0        _j0
+#define j1        _j1
+#define jn        _jn
+#define lfind     _lfind
+#define lsearch   _lsearch
+#define lseek     _lseek
+#define memccpy   _memccpy
+#define mkdir     _mkdir
+#define mktemp    _mktemp
+#define open      _open
+#define putenv    _putenv
+#define putw      _putw
+#define read      _read
+#define rmdir     _rmdir
+#define strdup    _strdup
+#define swab      _swab
+#define tempnam   _tempnam
+#define tzset     _tzset
+#define umask     _umask
+#define unlink    _unlink
+#define utime     _utime
+#define wcsdup    _wcsdup
+#define write     _write
+#define y0        _y0
+#define y1        _y1
+#define yn        _yn
+#endif
+'
+
 
 
 
@@ -8654,6 +8903,8 @@ _ACEOF
   GNULIB_NONBLOCKING=0;
   GNULIB_OPEN=0;
   GNULIB_OPENAT=0;
+    GNULIB_MDA_CREAT=1;
+  GNULIB_MDA_OPEN=1;
     HAVE_FCNTL=1;
   HAVE_OPENAT=1;
   REPLACE_CREAT=0;
@@ -8695,6 +8946,10 @@ else
            # defined sleep(n) _sleep ((n) * 1000)
            #endif
            #include <fcntl.h>
+
+
+$gl_mda_defines
+
            #ifndef O_NOATIME
             #define O_NOATIME 0
            #endif
@@ -8817,17 +9072,43 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 
-ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
+
+  ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
+"
 if test "x$ac_cv_type_pid_t" = xyes; then :
 
 else
+                                          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+          #if defined _WIN64 && !defined __CYGWIN__
+          LLP64
+          #endif
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_pid_type='int'
+else
+  gl_pid_type='__int64'
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 cat >>confdefs.h <<_ACEOF
-#define pid_t int
+#define pid_t $gl_pid_type
 _ACEOF
 
+
 fi
 
+
 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
 if test "x$ac_cv_type_mode_t" = xyes; then :
 
@@ -8977,14 +9258,7 @@ else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 $ac_includes_default
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
+             #include <wchar.h>
 int
 main ()
 {
@@ -9110,6 +9384,12 @@ $as_echo "#define mbstate_t int" >>confdefs.h
   GNULIB_TRUNC=0;
   GNULIB_TRUNCF=0;
   GNULIB_TRUNCL=0;
+    GNULIB_MDA_J0=1;
+  GNULIB_MDA_J1=1;
+  GNULIB_MDA_JN=1;
+  GNULIB_MDA_Y0=1;
+  GNULIB_MDA_Y1=1;
+  GNULIB_MDA_YN=1;
     HAVE_ACOSF=1;
   HAVE_ACOSL=1;
   HAVE_ASINF=1;
@@ -9275,7 +9555,7 @@ $as_echo "#define mbstate_t int" >>confdefs.h
   REPLACE_ROUNDF=0;
   REPLACE_ROUNDL=0;
   REPLACE_SIGNBIT=0;
-  REPLACE_SIGNBIT_USING_GCC=0;
+  REPLACE_SIGNBIT_USING_BUILTINS=0;
   REPLACE_SINF=0;
   REPLACE_SINHF=0;
   REPLACE_SQRTF=0;
@@ -9680,6 +9960,7 @@ extern
 "C"
 #endif
 long double frexpl (long double, int *);
+long double zero = 0.0L;
 int main()
 {
   int result = 0;
@@ -9737,7 +10018,8 @@ int main()
       }
   }
   /* Test on infinite numbers.  */
-  x = 1.0L / 0.0L;
+  /* The Microsoft MSVC 14 compiler chokes on the expression 1.0 / 0.0.  */
+  x = 1.0L / zero;
   {
     int exp;
     long double y = frexpl (x, &exp);
@@ -9790,8 +10072,10 @@ $as_echo "#define HAVE_FREXPL 1" >>confdefs.h
   GNULIB_FSTAT=0;
   GNULIB_FSTATAT=0;
   GNULIB_FUTIMENS=0;
+  GNULIB_GETUMASK=0;
   GNULIB_LCHMOD=0;
   GNULIB_LSTAT=0;
+  GNULIB_MKDIR=0;
   GNULIB_MKDIRAT=0;
   GNULIB_MKFIFO=0;
   GNULIB_MKFIFOAT=0;
@@ -9800,9 +10084,13 @@ $as_echo "#define HAVE_FREXPL 1" >>confdefs.h
   GNULIB_STAT=0;
   GNULIB_UTIMENSAT=0;
   GNULIB_OVERRIDES_STRUCT_STAT=0;
+    GNULIB_MDA_CHMOD=1;
+  GNULIB_MDA_MKDIR=1;
+  GNULIB_MDA_UMASK=1;
     HAVE_FCHMODAT=1;
   HAVE_FSTATAT=1;
   HAVE_FUTIMENS=1;
+  HAVE_GETUMASK=1;
   HAVE_LCHMOD=1;
   HAVE_LSTAT=1;
   HAVE_MKDIRAT=1;
@@ -9818,7 +10106,9 @@ $as_echo "#define HAVE_FREXPL 1" >>confdefs.h
   REPLACE_LSTAT=0;
   REPLACE_MKDIR=0;
   REPLACE_MKFIFO=0;
+  REPLACE_MKFIFOAT=0;
   REPLACE_MKNOD=0;
+  REPLACE_MKNODAT=0;
   REPLACE_STAT=0;
   REPLACE_UTIMENSAT=0;
 
@@ -9950,8 +10240,10 @@ if ${ac_cv_c_restrict+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_cv_c_restrict=no
-   # The order here caters to the fact that C++ does not require restrict.
-   for ac_kw in __restrict __restrict__ _Restrict restrict; do
+   # Put '__restrict__' first, to avoid problems with glibc and non-GCC; see:
+   # https://lists.gnu.org/archive/html/bug-autoconf/2016-02/msg00006.html
+   # Put 'restrict' last, because C++ lacks it.
+   for ac_kw in __restrict__ __restrict _Restrict restrict; do
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 typedef int *int_ptr;
 
 
 
-         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
-$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
-if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  rm -f conftest.sym conftest.file
-     echo >conftest.file
-     if test "$cross_compiling" = yes; then :
-  case "$host_os" in
-          linux-* | linux)
-            # Guess yes on Linux systems.
-            gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
-          *-gnu* | gnu*)
-            # Guess yes on glibc systems.
-            gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
-          mingw*)
-            # Guess no on native Windows.
-            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
-
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-struct stat sbuf;
-            if (symlink ("conftest.file", "conftest.sym") != 0)
-              return 1;
-            /* Linux will dereference the symlink and fail, as required by
-               POSIX.  That is better in the sense that it means we will not
-               have to compile and use the lstat wrapper.  */
-            return lstat ("conftest.sym/", &sbuf) == 0;
 
-  ;
-  return 0;
-}
+  case "$host_os" in
+    mingw*)
+      for ac_header in sdkddkver.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "sdkddkver.h" "ac_cv_header_sdkddkver_h" "$ac_includes_default"
+if test "x$ac_cv_header_sdkddkver_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_SDKDDKVER_H 1
 _ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  gl_cv_func_lstat_dereferences_slashed_symlink=yes
-else
-  gl_cv_func_lstat_dereferences_slashed_symlink=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-     rm -f conftest.sym conftest.file
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
-$as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
-  case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
-    *yes)
 
-cat >>confdefs.h <<_ACEOF
-#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
-_ACEOF
+done
 
       ;;
   esac
@@ -10204,6 +10448,10 @@ else
 #        else /* on Windows with MSVC */
 #         include <direct.h>
 #        endif
+
+
+$gl_mda_defines
+
 #        ifndef getcwd
          char *getcwd ();
 #        endif
@@ -10213,7 +10461,7 @@ main ()
 {
 
 #if defined _WIN32 && ! defined __CYGWIN__
-/* mingw cwd does not start with '/', but getcwd does allocate.
+/* mingw cwd does not start with '/', but _getcwd does allocate.
    However, mingw fails to honor non-zero size.  */
 #else
            if (chdir ("/") != 0)
@@ -10258,6 +10506,10 @@ else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <unistd.h>
+
+
+$gl_mda_defines
+
 int
 main ()
 {
@@ -10564,38 +10816,6 @@ $as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
 
 
 
-  NEED_LOCALTIME_BUFFER=0
-
-
-  GNULIB_CTIME=0;
-  GNULIB_MKTIME=0;
-  GNULIB_LOCALTIME=0;
-  GNULIB_NANOSLEEP=0;
-  GNULIB_STRFTIME=0;
-  GNULIB_STRPTIME=0;
-  GNULIB_TIMEGM=0;
-  GNULIB_TIME_R=0;
-  GNULIB_TIME_RZ=0;
-  GNULIB_TZSET=0;
-    HAVE_DECL_LOCALTIME_R=1;
-  HAVE_NANOSLEEP=1;
-  HAVE_STRPTIME=1;
-  HAVE_TIMEGM=1;
-  HAVE_TZSET=1;
-    HAVE_TIMEZONE_T=0;
-        REPLACE_CTIME=GNULIB_PORTCHECK;
-  REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
-  REPLACE_MKTIME=GNULIB_PORTCHECK;
-  REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
-  REPLACE_STRFTIME=GNULIB_PORTCHECK;
-  REPLACE_TIMEGM=GNULIB_PORTCHECK;
-  REPLACE_TZSET=GNULIB_PORTCHECK;
-
-      : ${GNULIB_GETTIMEOFDAY=0};
-        REPLACE_GMTIME=0;
-  REPLACE_LOCALTIME=0;
-
-
   GNULIB_GLOB=0;
     HAVE_GLOB=1;
   HAVE_GLOB_PATTERN_P=1;
@@ -11793,14 +12013,6 @@ if ${gt_cv_c_wint_t+:} false; then :
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
-   before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
 #include <wchar.h>
             wint_t foo = (wchar_t)'\0';
 int
@@ -11825,25 +12037,15 @@ $as_echo "$gt_cv_c_wint_t" >&6; }
 $as_echo "#define HAVE_WINT_T 1" >>confdefs.h
 
 
-            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wint_t is too small" >&5
-$as_echo_n "checking whether wint_t is too small... " >&6; }
-if ${gl_cv_type_wint_t_too_small+:} false; then :
+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wint_t is large enough" >&5
+$as_echo_n "checking whether wint_t is large enough... " >&6; }
+if ${gl_cv_type_wint_t_large_enough+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#if !(defined __GLIBC__ && !defined __UCLIBC__)
-# include <stddef.h>
-# include <stdio.h>
-# include <time.h>
-#endif
 #include <wchar.h>
-            int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
+              int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
 
 int
 main ()
@@ -11854,15 +12056,15 @@ main ()
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_type_wint_t_too_small=no
+  gl_cv_type_wint_t_large_enough=yes
 else
-  gl_cv_type_wint_t_too_small=yes
+  gl_cv_type_wint_t_large_enough=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_too_small" >&5
-$as_echo "$gl_cv_type_wint_t_too_small" >&6; }
-    if test $gl_cv_type_wint_t_too_small = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_large_enough" >&5
+$as_echo "$gl_cv_type_wint_t_large_enough" >&6; }
+    if test $gl_cv_type_wint_t_large_enough = no; then
       GNULIB_OVERRIDES_WINT_T=1
     else
       GNULIB_OVERRIDES_WINT_T=0
@@ -11877,40 +12079,51 @@ $as_echo "$gl_cv_type_wint_t_too_small" >&6; }
 
 
 
-    gl_cv_c_multiarch=no
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler produces multi-arch binaries" >&5
+$as_echo_n "checking whether the compiler produces multi-arch binaries... " >&6; }
+if ${gl_cv_c_multiarch+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  gl_cv_c_multiarch=no
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #ifndef __APPLE_CC__
-         not a universal capable compiler
-        #endif
-        typedef int dummy;
+            not a universal capable compiler
+           #endif
+           typedef int dummy;
 
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
 
-               arch=
-     prev=
-     for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
-       if test -n "$prev"; then
-         case $word in
-           i?86 | x86_64 | ppc | ppc64)
-             if test -z "$arch" || test "$arch" = "$word"; then
-               arch="$word"
-             else
-               gl_cv_c_multiarch=yes
-             fi
-             ;;
-         esac
-         prev=
-       else
-         if test "x$word" = "x-arch"; then
-           prev=arch
-         fi
-       fi
-     done
+                        arch=
+        prev=
+        for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
+          if test -n "$prev"; then
+            case $word in
+              i?86 | x86_64 | ppc | ppc64 | arm | arm64)
+                if test -z "$arch" || test "$arch" = "$word"; then
+                  arch="$word"
+                else
+                  gl_cv_c_multiarch=yes
+                fi
+                ;;
+            esac
+            prev=
+          else
+            if test "x$word" = "x-arch"; then
+              prev=arch
+            fi
+          fi
+        done
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_multiarch" >&5
+$as_echo "$gl_cv_c_multiarch" >&6; }
   if test $gl_cv_c_multiarch = yes; then
     APPLE_UNIVERSAL_BUILD=1
   else
@@ -11938,14 +12151,16 @@ $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
   fi
 
 
-      if test $ac_cv_header_inttypes_h = yes; then
+
+  if test $ac_cv_header_inttypes_h = yes; then
     HAVE_INTTYPES_H=1
   else
     HAVE_INTTYPES_H=0
   fi
 
 
-      if test $ac_cv_header_sys_types_h = yes; then
+
+  if test $ac_cv_header_sys_types_h = yes; then
     HAVE_SYS_TYPES_H=1
   else
     HAVE_SYS_TYPES_H=0
@@ -12058,13 +12273,9 @@ else
 #endif
 
 
-  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-     included before <wchar.h>.  */
   #include <stddef.h>
   #include <signal.h>
   #if HAVE_WCHAR_H
-  # include <stdio.h>
-  # include <time.h>
   # include <wchar.h>
   #endif
 
@@ -12144,7 +12355,7 @@ uintmax_t j = UINTMAX_MAX;
 /* Check that SIZE_MAX has the correct type, if possible.  */
 #if 201112 <= __STDC_VERSION__
 int k = _Generic (SIZE_MAX, size_t: 0);
-#elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
+#elif (2 <= __GNUC__ || 4 <= __clang_major__ || defined __IBM__TYPEOF__ \
        || (0x5110 <= __SUNPRO_C && !__STDC__))
 extern size_t k;
 extern __typeof__ (SIZE_MAX) k;
@@ -12238,13 +12449,9 @@ else
 #include <stdint.h>
 
 
-  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-     included before <wchar.h>.  */
   #include <stddef.h>
   #include <signal.h>
   #if HAVE_WCHAR_H
-  # include <stdio.h>
-  # include <time.h>
   # include <wchar.h>
   #endif
 
@@ -12328,12 +12535,12 @@ $as_echo "$gl_cv_header_working_stdint_h" >&6; }
   case "$gl_cv_header_working_stdint_h" in
     *yes)
       HAVE_C99_STDINT_H=1
-                  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h predates C++11" >&5
-$as_echo_n "checking whether stdint.h predates C++11... " >&6; }
-if ${gl_cv_header_stdint_predates_cxx11_h+:} false; then :
+                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h works without ISO C predefines" >&5
+$as_echo_n "checking whether stdint.h works without ISO C predefines... " >&6; }
+if ${gl_cv_header_stdint_without_STDC_macros+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  gl_cv_header_stdint_predates_cxx11_h=yes
+  gl_cv_header_stdint_without_STDC_macros=no
          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -12342,13 +12549,9 @@ else
 #include <stdint.h>
 
 
-  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-     included before <wchar.h>.  */
   #include <stddef.h>
   #include <signal.h>
   #if HAVE_WCHAR_H
-  # include <stdio.h>
-  # include <time.h>
   # include <wchar.h>
   #endif
 
@@ -12365,14 +12568,15 @@ main ()
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_header_stdint_predates_cxx11_h=no
+  gl_cv_header_stdint_without_STDC_macros=yes
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_predates_cxx11_h" >&5
-$as_echo "$gl_cv_header_stdint_predates_cxx11_h" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_without_STDC_macros" >&5
+$as_echo "$gl_cv_header_stdint_without_STDC_macros" >&6; }
 
-      if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then
+      if test $gl_cv_header_stdint_without_STDC_macros = no; then
 
 $as_echo "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
 
@@ -12396,13 +12600,9 @@ else
               #endif
               #include <stdint.h>
 
-  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-     included before <wchar.h>.  */
   #include <stddef.h>
   #include <signal.h>
   #if HAVE_WCHAR_H
-  # include <stdio.h>
-  # include <time.h>
   # include <wchar.h>
   #endif
 
@@ -12459,13 +12659,9 @@ if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
-  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-     included before <wchar.h>.  */
   #include <stddef.h>
   #include <signal.h>
   #if HAVE_WCHAR_H
-  # include <stdio.h>
-  # include <time.h>
   # include <wchar.h>
   #endif
 
@@ -12504,13 +12700,9 @@ if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
-  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-     included before <wchar.h>.  */
   #include <stddef.h>
   #include <signal.h>
   #if HAVE_WCHAR_H
-  # include <stdio.h>
-  # include <time.h>
   # include <wchar.h>
   #endif
 
@@ -12550,13 +12742,9 @@ else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-     included before <wchar.h>.  */
   #include <stddef.h>
   #include <signal.h>
   #if HAVE_WCHAR_H
-  # include <stdio.h>
-  # include <time.h>
   # include <wchar.h>
   #endif
 
@@ -12627,13 +12815,9 @@ else
          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-     included before <wchar.h>.  */
   #include <stddef.h>
   #include <signal.h>
   #if HAVE_WCHAR_H
-  # include <stdio.h>
-  # include <time.h>
   # include <wchar.h>
   #endif
 
@@ -12699,13 +12883,9 @@ else
          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-     included before <wchar.h>.  */
   #include <stddef.h>
   #include <signal.h>
   #if HAVE_WCHAR_H
-  # include <stdio.h>
-  # include <time.h>
   # include <wchar.h>
   #endif
 
@@ -12776,8 +12956,6 @@ fi
 
 
 
-
-
   GNULIB_IMAXABS=0;
   GNULIB_IMAXDIV=0;
   GNULIB_STRTOIMAX=0;
@@ -12791,7 +12969,6 @@ fi
   REPLACE_STRTOUMAX=0;
   INT32_MAX_LT_INTMAX_MAX=1;
   INT64_MAX_EQ_LONG_MAX='defined _LP64';
-  PRI_MACROS_BROKEN=0;
   PRIPTR_PREFIX=__PRIPTR_PREFIX;
   UINT32_MAX_LT_UINTMAX_MAX=1;
   UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
@@ -12889,65 +13066,6 @@ $as_echo "$gl_cv_next_inttypes_h" >&6; }
 
 
 
-  for ac_header in inttypes.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
-if test "x$ac_cv_header_inttypes_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_INTTYPES_H 1
-_ACEOF
-
-fi
-
-done
-
-  if test $ac_cv_header_inttypes_h = yes; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
-$as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
-if ${gt_cv_inttypes_pri_broken+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <inttypes.h>
-#ifdef PRId32
-char *p = PRId32;
-#endif
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gt_cv_inttypes_pri_broken=no
-else
-  gt_cv_inttypes_pri_broken=yes
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
-$as_echo "$gt_cv_inttypes_pri_broken" >&6; }
-  fi
-  if test "$gt_cv_inttypes_pri_broken" = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define PRI_MACROS_BROKEN 1
-_ACEOF
-
-    PRI_MACROS_BROKEN=1
-  else
-    PRI_MACROS_BROKEN=0
-  fi
-
-
-
 
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
@@ -13578,6 +13696,9 @@ $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
 
 
 
+
+
+
   STDDEF_H=
 
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
@@ -13589,10 +13710,17 @@ else
 /* end confdefs.h.  */
 #include <stddef.h>
             unsigned int s = sizeof (max_align_t);
-            #if defined __GNUC__ || defined __IBM__ALIGNOF__
+            #if defined __GNUC__ || defined __clang__ || defined __IBM__ALIGNOF__
             int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
             int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
             #endif
+            typedef struct { char a; max_align_t b; } max_helper;
+            typedef struct { char a; long b; } long_helper;
+            typedef struct { char a; double b; } double_helper;
+            typedef struct { char a; long double b; } long_double_helper;
+            int check3[2 * (offsetof (long_helper, b) <= offsetof (max_helper, b)) - 1];
+            int check4[2 * (offsetof (double_helper, b) <= offsetof (max_helper, b)) - 1];
+            int check5[2 * (offsetof (long_double_helper, b) <= offsetof (max_helper, b)) - 1];
 
 int
 main ()
@@ -14251,6 +14379,16 @@ $as_echo "#define USE_POSIX_THREADS 1" >>confdefs.h
 $as_echo "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
 
               LIBTHREAD= LTLIBTHREAD=
+            else
+              case "$host_os" in
+                freebsd* | dragonfly*)
+                  if test "x$LIBTHREAD" != "x$LIBMULTITHREAD"; then
+
+$as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
+
+                  fi
+                  ;;
+              esac
             fi
           fi
         fi
@@ -14741,19 +14879,7 @@ $as_echo "$gl_cv_func_malloc_posix" >&6; }
 
 
 
-      for ac_header in stdlib.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
-if test "x$ac_cv_header_stdlib_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_STDLIB_H 1
-_ACEOF
-
-fi
-
-done
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
 if ${ac_cv_func_malloc_0_nonnull+:} false; then :
   $as_echo_n "(cached) " >&6
@@ -14771,11 +14897,7 @@ else
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#if defined STDC_HEADERS || defined HAVE_STDLIB_H
-            # include <stdlib.h>
-            #else
-            char *malloc ();
-            #endif
+#include <stdlib.h>
 
 int
 main ()
@@ -15324,13 +15446,17 @@ esac
   GNULIB_MBSTOK_R=0;
   GNULIB_STRERROR=0;
   GNULIB_STRERROR_R=0;
+  GNULIB_STRERRORNAME_NP=0;
+  GNULIB_SIGABBREV_NP=0;
+  GNULIB_SIGDESCR_NP=0;
   GNULIB_STRSIGNAL=0;
   GNULIB_STRVERSCMP=0;
   HAVE_MBSLEN=0;
+    GNULIB_MDA_MEMCCPY=1;
+  GNULIB_MDA_STRDUP=1;
     HAVE_EXPLICIT_BZERO=1;
   HAVE_FFSL=1;
   HAVE_FFSLL=1;
-  HAVE_MEMCHR=1;
   HAVE_DECL_MEMMEM=1;
   HAVE_MEMPCPY=1;
   HAVE_DECL_MEMRCHR=1;
@@ -15346,8 +15472,12 @@ esac
   HAVE_STRCASESTR=1;
   HAVE_DECL_STRTOK_R=1;
   HAVE_DECL_STRERROR_R=1;
+  HAVE_STRERRORNAME_NP=1;
+  HAVE_SIGABBREV_NP=1;
+  HAVE_SIGDESCR_NP=1;
   HAVE_DECL_STRSIGNAL=1;
   HAVE_STRVERSCMP=1;
+  REPLACE_FFSLL=0;
   REPLACE_MEMCHR=0;
   REPLACE_MEMMEM=0;
   REPLACE_STPNCPY=0;
@@ -15361,6 +15491,7 @@ esac
   REPLACE_STRTOK_R=0;
   REPLACE_STRERROR=0;
   REPLACE_STRERROR_R=0;
+  REPLACE_STRERRORNAME_NP=0;
   REPLACE_STRSIGNAL=0;
   UNDEFINE_STRTOK_R=0;
 
@@ -15433,31 +15564,29 @@ $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
 
 
 
-
-  if test $HAVE_MEMCHR = 1; then
-    # Detect platform-specific bugs in some versions of glibc:
-    # memchr should not dereference anything with length 0
-    #   https://bugzilla.redhat.com/show_bug.cgi?id=499689
-    # memchr should not dereference overestimated length after a match
-    #   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
-    #   https://sourceware.org/bugzilla/show_bug.cgi?id=10162
-    # memchr should cast the second argument to 'unsigned char'.
-    #   This bug exists in Android 4.3.
-    # Assume that memchr works on platforms that lack mprotect.
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
+  # Detect platform-specific bugs in some versions of glibc:
+  # memchr should not dereference anything with length 0
+  #   https://bugzilla.redhat.com/show_bug.cgi?id=499689
+  # memchr should not dereference overestimated length after a match
+  #   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
+  #   https://sourceware.org/bugzilla/show_bug.cgi?id=10162
+  # memchr should cast the second argument to 'unsigned char'.
+  #   This bug exists in Android 4.3.
+  # Assume that memchr works on platforms that lack mprotect.
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
 $as_echo_n "checking whether memchr works... " >&6; }
 if ${gl_cv_func_memchr_works+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test "$cross_compiling" = yes; then :
   case "$host_os" in
-                             # Guess no on Android.
-            linux*-android*) gl_cv_func_memchr_works="guessing no" ;;
-                             # Guess yes on native Windows.
-            mingw*)          gl_cv_func_memchr_works="guessing yes" ;;
-                             # If we don't know, obey --enable-cross-guesses.
-            *)               gl_cv_func_memchr_works="$gl_cross_guess_normal" ;;
-          esac
+                           # Guess no on Android.
+          linux*-android*) gl_cv_func_memchr_works="guessing no" ;;
+                           # Guess yes on native Windows.
+          mingw*)          gl_cv_func_memchr_works="guessing yes" ;;
+                           # If we don't know, obey --enable-cross-guesses.
+          *)               gl_cv_func_memchr_works="$gl_cross_guess_normal" ;;
+        esac
 
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -15501,6 +15630,7 @@ main ()
 #endif
   if (fence)
     {
+      /* Test against bugs on glibc systems.  */
       if (memchr (fence, 0, 0))
         result |= 1;
       strcpy (fence - 9, "12345678");
@@ -15508,6 +15638,9 @@ main ()
         result |= 2;
       if (memchr (fence - 1, 0, 3) != fence - 1)
         result |= 4;
+      /* Test against bug on AIX 7.2.  */
+      if (memchr (fence - 4, '6', 16) != fence - 4)
+        result |= 8;
     }
   /* Test against bug on Android 4.3.  */
   {
@@ -15516,7 +15649,7 @@ main ()
     input[1] = 'b';
     input[2] = 'c';
     if (memchr (input, 0x789abc00 | 'b', 3) != input + 1)
-      result |= 8;
+      result |= 16;
   }
   return result;
 
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
 $as_echo "$gl_cv_func_memchr_works" >&6; }
-    case "$gl_cv_func_memchr_works" in
-      *yes) ;;
-      *) REPLACE_MEMCHR=1 ;;
-    esac
-  fi
+  case "$gl_cv_func_memchr_works" in
+    *yes) ;;
+    *) REPLACE_MEMCHR=1 ;;
+  esac
 
 ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
 if test "x$ac_cv_have_decl_memmem" = xyes; then :
@@ -15825,6 +15957,10 @@ _ACEOF
 
 
 
+
+
+
+
   GNULIB_DPRINTF=0;
   GNULIB_FCLOSE=0;
   GNULIB_FDOPEN=0;
@@ -15878,7 +16014,14 @@ _ACEOF
   GNULIB_VPRINTF_POSIX=0;
   GNULIB_VSNPRINTF=0;
   GNULIB_VSPRINTF_POSIX=0;
-    HAVE_DECL_FPURGE=1;
+    GNULIB_MDA_FCLOSEALL=1;
+  GNULIB_MDA_FDOPEN=1;
+  GNULIB_MDA_FILENO=1;
+  GNULIB_MDA_GETW=1;
+  GNULIB_MDA_PUTW=1;
+  GNULIB_MDA_TEMPNAM=1;
+    HAVE_DECL_FCLOSEALL=1;
+  HAVE_DECL_FPURGE=1;
   HAVE_DECL_FSEEKO=1;
   HAVE_DECL_FTELLO=1;
   HAVE_DECL_GETDELIM=1;
@@ -16145,7 +16288,49 @@ _ACEOF
 fi
 
 
+ac_fn_c_check_decl "$LINENO" "fcloseall" "ac_cv_have_decl_fcloseall" "$ac_includes_default"
+if test "x$ac_cv_have_decl_fcloseall" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FCLOSEALL $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "ecvt" "ac_cv_have_decl_ecvt" "$ac_includes_default"
+if test "x$ac_cv_have_decl_ecvt" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_ECVT $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "fcvt" "ac_cv_have_decl_fcvt" "$ac_includes_default"
+if test "x$ac_cv_have_decl_fcvt" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FCVT $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "gcvt" "ac_cv_have_decl_gcvt" "$ac_includes_default"
+if test "x$ac_cv_have_decl_gcvt" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
 
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GCVT $ac_have_decl
+_ACEOF
 
 ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
 if test "x$ac_cv_have_decl_strdup" = xyes; then :
@@ -16500,7 +16685,7 @@ _ACEOF
 
 
 
-  if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
+  if test $REPLACE_MEMCHR = 1; then
     REPLACE_STRSTR=1
   else
             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
@@ -16697,6 +16882,37 @@ $as_echo "$gl_cv_next_sys_types_h" >&6; }
 
 
 
+  GNULIB_CTIME=0;
+  GNULIB_MKTIME=0;
+  GNULIB_LOCALTIME=0;
+  GNULIB_NANOSLEEP=0;
+  GNULIB_STRFTIME=0;
+  GNULIB_STRPTIME=0;
+  GNULIB_TIMEGM=0;
+  GNULIB_TIMESPEC_GET=0;
+  GNULIB_TIME_R=0;
+  GNULIB_TIME_RZ=0;
+  GNULIB_TZSET=0;
+    GNULIB_MDA_TZSET=1;
+    HAVE_DECL_LOCALTIME_R=1;
+  HAVE_NANOSLEEP=1;
+  HAVE_STRPTIME=1;
+  HAVE_TIMEGM=1;
+  HAVE_TIMESPEC_GET=1;
+    HAVE_TIMEZONE_T=0;
+        REPLACE_CTIME=GNULIB_PORTCHECK;
+  REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
+  REPLACE_MKTIME=GNULIB_PORTCHECK;
+  REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
+  REPLACE_STRFTIME=GNULIB_PORTCHECK;
+  REPLACE_TIMEGM=GNULIB_PORTCHECK;
+  REPLACE_TZSET=GNULIB_PORTCHECK;
+
+      : ${GNULIB_GETTIMEOFDAY=0};
+        REPLACE_GMTIME=0;
+  REPLACE_LOCALTIME=0;
+
+
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
 $as_echo_n "checking for struct timespec in <time.h>... " >&6; }
@@ -16905,9 +17121,51 @@ $as_echo "$gl_cv_next_time_h" >&6; }
 
 
 
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME_UTC in <time.h>" >&5
+$as_echo_n "checking for TIME_UTC in <time.h>... " >&6; }
+if ${gl_cv_time_h_has_TIME_UTC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <time.h>
+
+int
+main ()
+{
+static int x = TIME_UTC; x++;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_time_h_has_TIME_UTC=yes
+else
+  gl_cv_time_h_has_TIME_UTC=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_h_has_TIME_UTC" >&5
+$as_echo "$gl_cv_time_h_has_TIME_UTC" >&6; }
+  if test $gl_cv_time_h_has_TIME_UTC = yes; then
+    TIME_H_DEFINES_TIME_UTC=1
+  else
+    TIME_H_DEFINES_TIME_UTC=0
+  fi
+
+
 
 
+ac_fn_c_check_decl "$LINENO" "execvpe" "ac_cv_have_decl_execvpe" "$ac_includes_default"
+if test "x$ac_cv_have_decl_execvpe" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
 
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_EXECVPE $ac_have_decl
+_ACEOF
 
 ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
 if test "x$ac_cv_have_decl_unsetenv" = xyes; then :
@@ -17183,14 +17441,6 @@ else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
 #include <wchar.h>
 int main ()
 {
@@ -17235,14 +17485,7 @@ else
 /* end confdefs.h.  */
 
 #include <locale.h>
-#include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
 #include <stdio.h>
-#include <time.h>
 #include <wchar.h>
 int main ()
 {
@@ -17451,9 +17694,9 @@ $as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
 
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system has an arbitrary file name length limit" >&5
-$as_echo_n "checking whether this system has an arbitrary file name length limit... " >&6; }
-if ${gl_cv_have_arbitrary_file_name_length_limit+:} false; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system supports file names of any length" >&5
+$as_echo_n "checking whether this system supports file names of any length... " >&6; }
+if ${gl_cv_have_unlimited_file_name_length+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -17485,29 +17728,112 @@ have_arbitrary_file_name_length_limit
 _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
   $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then :
-  gl_cv_have_arbitrary_file_name_length_limit=yes
+  gl_cv_have_unlimited_file_name_length=no
+else
+  gl_cv_have_unlimited_file_name_length=yes
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_unlimited_file_name_length" >&5
+$as_echo "$gl_cv_have_unlimited_file_name_length" >&6; }
+
+  if test $gl_cv_have_unlimited_file_name_length = no; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
+
+    :
+  fi
+
+
+
+  # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
+  # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
+
+  # Save and restore LIBS so e.g., -lrt, isn't added to it.  Otherwise, *all*
+  # programs in the package would end up linked with that potentially-shared
+  # library, inducing unnecessary run-time overhead.
+  LIB_CLOCK_GETTIME=
+
+  gl_saved_libs=$LIBS
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
+$as_echo_n "checking for library containing clock_gettime... " >&6; }
+if ${ac_cv_search_clock_gettime+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  gl_cv_have_arbitrary_file_name_length_limit=no
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char clock_gettime ();
+int
+main ()
+{
+return clock_gettime ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' rt posix4; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_clock_gettime=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_clock_gettime+:} false; then :
+  break
 fi
-rm -f conftest*
+done
+if ${ac_cv_search_clock_gettime+:} false; then :
 
+else
+  ac_cv_search_clock_gettime=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
+$as_echo "$ac_cv_search_clock_gettime" >&6; }
+ac_res=$ac_cv_search_clock_gettime
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+  test "$ac_cv_search_clock_gettime" = "none required" ||
+                    LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_arbitrary_file_name_length_limit" >&5
-$as_echo "$gl_cv_have_arbitrary_file_name_length_limit" >&6; }
-
-  if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then
-
-
-
-
-
 
+    for ac_func in clock_gettime clock_settime
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
 
+fi
+done
 
-  gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
+  LIBS=$gl_saved_libs
 
-    :
-  fi
 
 
 $as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
@@ -18083,10 +18409,6 @@ $as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
 
 
 
-
-
-
-
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
 $as_echo_n "checking whether // is distinct from /... " >&6; }
 if ${gl_cv_double_slash_root+:} false; then :
@@ -18162,6 +18484,10 @@ else
 #include <unistd.h>
                          #include <fcntl.h>
                          #include <errno.h>
+
+
+$gl_mda_defines
+
 int
 main ()
 {
@@ -18225,95 +18551,92 @@ $as_echo "#define GNULIB_TEST_DUP 1" >>confdefs.h
 
 
 
-
-
-$as_echo "#define HAVE_DUP2 1" >>confdefs.h
-
-
-  if test $HAVE_DUP2 = 1; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
 $as_echo_n "checking whether dup2 works... " >&6; }
 if ${gl_cv_func_dup2_works+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test "$cross_compiling" = yes; then :
   case "$host_os" in
-           mingw*) # on this platform, dup2 always returns 0 for success
-             gl_cv_func_dup2_works="guessing no" ;;
-           cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
-             gl_cv_func_dup2_works="guessing no" ;;
-           aix* | freebsd*)
-                   # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
-                   # not EBADF.
-             gl_cv_func_dup2_works="guessing no" ;;
-           haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
-             gl_cv_func_dup2_works="guessing no" ;;
-           *-android*) # implemented using dup3(), which fails if oldfd == newfd
-             gl_cv_func_dup2_works="guessing no" ;;
-           os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
-             gl_cv_func_dup2_works="guessing no" ;;
-           *) gl_cv_func_dup2_works="guessing yes" ;;
-         esac
+         mingw*) # on this platform, dup2 always returns 0 for success
+           gl_cv_func_dup2_works="guessing no" ;;
+         cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
+           gl_cv_func_dup2_works="guessing no" ;;
+         aix* | freebsd*)
+                 # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
+                 # not EBADF.
+           gl_cv_func_dup2_works="guessing no" ;;
+         haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
+           gl_cv_func_dup2_works="guessing no" ;;
+         *-android*) # implemented using dup3(), which fails if oldfd == newfd
+           gl_cv_func_dup2_works="guessing no" ;;
+         os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
+           gl_cv_func_dup2_works="guessing no" ;;
+         *) gl_cv_func_dup2_works="guessing yes" ;;
+       esac
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-         #include <errno.h>
-             #include <fcntl.h>
-             #include <limits.h>
-             #include <sys/resource.h>
-             #include <unistd.h>
-             #ifndef RLIM_SAVED_CUR
-             # define RLIM_SAVED_CUR RLIM_INFINITY
-             #endif
-             #ifndef RLIM_SAVED_MAX
-             # define RLIM_SAVED_MAX RLIM_INFINITY
-             #endif
+       #include <errno.h>
+           #include <fcntl.h>
+           #include <limits.h>
+           #include <sys/resource.h>
+           #include <unistd.h>
+
+
+$gl_mda_defines
+
+           #ifndef RLIM_SAVED_CUR
+           # define RLIM_SAVED_CUR RLIM_INFINITY
+           #endif
+           #ifndef RLIM_SAVED_MAX
+           # define RLIM_SAVED_MAX RLIM_INFINITY
+           #endif
 
 int
 main ()
 {
 int result = 0;
-             int bad_fd = INT_MAX;
-             struct rlimit rlim;
-             if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
-                 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
-                 && rlim.rlim_cur != RLIM_INFINITY
-                 && rlim.rlim_cur != RLIM_SAVED_MAX
-                 && rlim.rlim_cur != RLIM_SAVED_CUR)
-               bad_fd = rlim.rlim_cur;
-             #ifdef FD_CLOEXEC
-               if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
-                 result |= 1;
-             #endif
-             if (dup2 (1, 1) != 1)
-               result |= 2;
-             #ifdef FD_CLOEXEC
-               if (fcntl (1, F_GETFD) != FD_CLOEXEC)
-                 result |= 4;
-             #endif
-             close (0);
-             if (dup2 (0, 0) != -1)
-               result |= 8;
-             /* Many gnulib modules require POSIX conformance of EBADF.  */
-             if (dup2 (2, bad_fd) == -1 && errno != EBADF)
-               result |= 16;
-             /* Flush out some cygwin core dumps.  */
-             if (dup2 (2, -1) != -1 || errno != EBADF)
-               result |= 32;
-             dup2 (2, 255);
-             dup2 (2, 256);
-             /* On OS/2 kLIBC, dup2() does not work on a directory fd.  */
-             {
-               int fd = open (".", O_RDONLY);
-               if (fd == -1)
-                 result |= 64;
-               else if (dup2 (fd, fd + 1) == -1)
-                 result |= 128;
-
-               close (fd);
-             }
-             return result;
+           int bad_fd = INT_MAX;
+           struct rlimit rlim;
+           if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
+               && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
+               && rlim.rlim_cur != RLIM_INFINITY
+               && rlim.rlim_cur != RLIM_SAVED_MAX
+               && rlim.rlim_cur != RLIM_SAVED_CUR)
+             bad_fd = rlim.rlim_cur;
+           #ifdef FD_CLOEXEC
+             if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
+               result |= 1;
+           #endif
+           if (dup2 (1, 1) != 1)
+             result |= 2;
+           #ifdef FD_CLOEXEC
+             if (fcntl (1, F_GETFD) != FD_CLOEXEC)
+               result |= 4;
+           #endif
+           close (0);
+           if (dup2 (0, 0) != -1)
+             result |= 8;
+           /* Many gnulib modules require POSIX conformance of EBADF.  */
+           if (dup2 (2, bad_fd) == -1 && errno != EBADF)
+             result |= 16;
+           /* Flush out some cygwin core dumps.  */
+           if (dup2 (2, -1) != -1 || errno != EBADF)
+             result |= 32;
+           dup2 (2, 255);
+           dup2 (2, 256);
+           /* On OS/2 kLIBC, dup2() does not work on a directory fd.  */
+           {
+             int fd = open (".", O_RDONLY);
+             if (fd == -1)
+               result |= 64;
+             else if (dup2 (fd, fd + 1) == -1)
+               result |= 128;
+             close (fd);
+           }
+           return result;
   ;
   return 0;
 }
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
 $as_echo "$gl_cv_func_dup2_works" >&6; }
-    case "$gl_cv_func_dup2_works" in
-      *yes) ;;
-      *)
-        REPLACE_DUP2=1
-        for ac_func in setdtablesize
+  case "$gl_cv_func_dup2_works" in
+    *yes) ;;
+    *)
+      REPLACE_DUP2=1
+      for ac_func in setdtablesize
 do :
   ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
 if test "x$ac_cv_func_setdtablesize" = xyes; then :
@@ -18347,9 +18670,8 @@ _ACEOF
 fi
 done
 
-        ;;
-    esac
-  fi
+      ;;
+  esac
 
 
 
@@ -18359,13 +18681,11 @@ done
   fi
 
     if test $HAVE_FCHDIR = 0; then
-      if test $HAVE_DUP2 = 1; then
-        REPLACE_DUP2=1
-      fi
+      REPLACE_DUP2=1
     fi
 
 
-  if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
+  if test $REPLACE_DUP2 = 1; then
 
 
 
@@ -18488,21 +18808,24 @@ if ${gl_cv_func_open_directory_works+:} false; then :
 else
   if test "$cross_compiling" = yes; then :
   case "$host_os" in
-                            # Guess yes on Linux systems.
-           linux-* | linux) gl_cv_func_open_directory_works="guessing yes" ;;
-                            # Guess yes on glibc systems.
-           *-gnu* | gnu*)   gl_cv_func_open_directory_works="guessing yes" ;;
-                            # Guess no on native Windows.
-           mingw*)          gl_cv_func_open_directory_works="guessing no" ;;
-                            # If we don't know, obey --enable-cross-guesses.
-           *)               gl_cv_func_open_directory_works="$gl_cross_guess_normal" ;;
-         esac
+                             # Guess yes on Linux systems.
+            linux-* | linux) gl_cv_func_open_directory_works="guessing yes" ;;
+                             # Guess yes on glibc systems.
+            *-gnu* | gnu*)   gl_cv_func_open_directory_works="guessing yes" ;;
+                             # Guess no on native Windows.
+            mingw*)          gl_cv_func_open_directory_works="guessing no" ;;
+                             # If we don't know, obey --enable-cross-guesses.
+            *)               gl_cv_func_open_directory_works="$gl_cross_guess_normal" ;;
+          esac
 
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <fcntl.h>
 
+
+$gl_mda_defines
+
 int
 main ()
 {
@@ -18583,6 +18906,10 @@ else
               #include <limits.h>
               #include <sys/resource.h>
               #include <unistd.h>
+
+
+$gl_mda_defines
+
               #ifndef RLIM_SAVED_CUR
               # define RLIM_SAVED_CUR RLIM_INFINITY
               #endif
@@ -18650,28 +18977,40 @@ $as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
  ;;
     esac
 
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
 $as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
 if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then :
   $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  case "$host_os" in
+                     # Guess no on NetBSD.
+            netbsd*) gl_cv_func_fcntl_f_dupfd_cloexec="guessing no" ;;
+            *)       gl_cv_func_fcntl_f_dupfd_cloexec="$gl_cross_guess_normal" ;;
+          esac
+
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
 #include <fcntl.h>
-#ifndef F_DUPFD_CLOEXEC
-choke me
-#endif
+              #include <unistd.h>
+              int main (int argc, char *argv[])
+              {
+                if (argc == 1)
+                  /* parent process */
+                  {
+                    if (fcntl (1, F_DUPFD_CLOEXEC, 10) < 0)
+                      return 1;
+                    return execl ("./conftest", "./conftest", "child", NULL);
+                  }
+                else
+                  /* child process */
+                  return (fcntl (10, F_GETFL) < 0 ? 0 : 42);
+              }
 
-int
-main ()
-{
 
-  ;
-  return 0;
-}
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"; then :
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -18695,15 +19034,21 @@ else
   gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
 else
   gl_cv_func_fcntl_f_dupfd_cloexec=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
 $as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
-    if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
-
+    case "$gl_cv_func_fcntl_f_dupfd_cloexec" in
+      *yes) ;;
+      *)
 
 
   if test $ac_cv_func_fcntl = no; then
@@ -18712,7 +19057,8 @@ $as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
     REPLACE_FCNTL=1
   fi
 
-          fi
+                        ;;
+    esac
   fi
 
 
@@ -18902,6 +19248,10 @@ else
 #include <dirent.h>
 #include <fcntl.h>
 #include <unistd.h>
+
+
+$gl_mda_defines
+
 #if !HAVE_DECL_FDOPENDIR
 extern
 # ifdef __cplusplus
@@ -18914,11 +19264,12 @@ int
 main ()
 {
 int result = 0;
-     int fd = open ("conftest.c", O_RDONLY);
-     if (fd < 0) result |= 1;
-     if (fdopendir (fd)) result |= 2;
-     if (close (fd)) result |= 4;
-     return result;
+              int fd = open ("conftest.c", O_RDONLY);
+              if (fd < 0) result |= 1;
+              if (fdopendir (fd)) result |= 2;
+              if (close (fd)) result |= 4;
+              return result;
+
   ;
   return 0;
 }
@@ -19466,6 +19817,76 @@ _ACEOF
 
 
 
+
+
+                          { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether free is known to preserve errno" >&5
+$as_echo_n "checking whether free is known to preserve errno... " >&6; }
+if ${gl_cv_func_free_preserves_errno+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+
+int
+main ()
+{
+#if 2 < __GLIBC__ + (33 <= __GLIBC_MINOR__)
+            #elif defined __OpenBSD__
+            #elif defined __sun
+            #else
+              #error "'free' is not known to preserve errno"
+            #endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_func_free_preserves_errno=yes
+else
+  gl_cv_func_free_preserves_errno=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_free_preserves_errno" >&5
+$as_echo "$gl_cv_func_free_preserves_errno" >&6; }
+
+  case $gl_cv_func_free_preserves_errno in
+   *yes) ;;
+   *) REPLACE_FREE=1 ;;
+  esac
+
+  if test $REPLACE_FREE = 1; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS free.$ac_objext"
+
+    :
+  fi
+
+
+
+
+
+          GNULIB_FREE_POSIX=1
+
+
+
+
+
+$as_echo "#define GNULIB_TEST_FREE_POSIX 1" >>confdefs.h
+
+
+
+
   if test $gl_func_frexp != yes; then
 
 
@@ -19576,6 +19997,7 @@ $as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
     esac
 
 
+
   :
 
   fi
@@ -19780,8 +20202,10 @@ else
 /* Use the getcwd function, not any macro.  */
 #undef getcwd
 
-/* Don't get link errors because mkdir is redefined to rpl_mkdir.  */
-#undef mkdir
+
+
+$gl_mda_defines
+
 
 #ifndef S_IRWXU
 # define S_IRWXU 0700
@@ -20000,9 +20424,9 @@ _ACEOF
 
   fi
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd aborts when 4k < cwd_length < 16k" >&5
-$as_echo_n "checking whether getcwd aborts when 4k < cwd_length < 16k... " >&6; }
-if ${gl_cv_func_getcwd_abort_bug+:} false; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd succeeds when 4k < cwd_length < 16k" >&5
+$as_echo_n "checking whether getcwd succeeds when 4k < cwd_length < 16k... " >&6; }
+if ${gl_cv_func_getcwd_succeeds_beyond_4k+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   # Remove any remnants of a previous test.
@@ -20011,10 +20435,10 @@ else
      ac_clean_files="$ac_clean_files confdir-14B---"
           if test "$cross_compiling" = yes; then :
   case "$host_os" in
-                   # Guess no on musl systems.
-          *-musl*) gl_cv_func_getcwd_abort_bug="guessing no" ;;
-                   # Guess yes otherwise, even on glibc systems.
-          *)       gl_cv_func_getcwd_abort_bug="guessing yes"
+                   # Guess yes on musl systems.
+          *-musl*) gl_cv_func_getcwd_succeeds_beyond_4k="guessing yes" ;;
+                   # Guess no otherwise, even on glibc systems.
+          *)       gl_cv_func_getcwd_succeeds_beyond_4k="guessing no"
         esac
 
 else
@@ -20053,8 +20477,9 @@ else
 #endif
 
 
-/* Don't get link errors because mkdir is redefined to rpl_mkdir.  */
-#undef mkdir
+
+$gl_mda_defines
+
 
 #ifndef S_IRWXU
 # define S_IRWXU 0700
@@ -20137,13 +20562,13 @@ main ()
 
 _ACEOF
 if ac_fn_c_try_run "$LINENO"; then :
-  gl_cv_func_getcwd_abort_bug=no
+  gl_cv_func_getcwd_succeeds_beyond_4k=yes
 else
                                                   ret=$?
         if test $ret -ge 128 || test $ret = 4; then
-          gl_cv_func_getcwd_abort_bug=yes
+          gl_cv_func_getcwd_succeeds_beyond_4k=no
         else
-          gl_cv_func_getcwd_abort_bug=no
+          gl_cv_func_getcwd_succeeds_beyond_4k=yes
         fi
 
 fi
 
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_abort_bug" >&5
-$as_echo "$gl_cv_func_getcwd_abort_bug" >&6; }
-  case "$gl_cv_func_getcwd_abort_bug" in
-    *yes)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_succeeds_beyond_4k" >&5
+$as_echo "$gl_cv_func_getcwd_succeeds_beyond_4k" >&6; }
+  case "$gl_cv_func_getcwd_succeeds_beyond_4k" in
+    *no)
       gl_abort_bug=yes
       ;;
     *)
@@ -20301,14 +20726,19 @@ else
 /* end confdefs.h.  */
 
              #include <unistd.h>
+
+
+$gl_mda_defines
+
+
 int
 main ()
 {
 int size = getdtablesize();
-                if (dup2 (0, getdtablesize()) != -1)
-                  return 1;
-                if (size != getdtablesize())
-                  return 2;
+                 if (dup2 (0, getdtablesize()) != -1)
+                   return 1;
+                 if (size != getdtablesize())
+                   return 2;
 
   ;
   return 0;
@@ -20583,7 +21013,8 @@ if ${gl_cv_func_getrandom_ok+:} false; then :
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-/* Additional includes are needed before <sys/random.h> on Mac OS X.  */
+/* Additional includes are needed before <sys/random.h> on uClibc
+                 and Mac OS X.  */
               #include <sys/types.h>
               #include <stdlib.h>
               #include <sys/random.h>
@@ -20617,7 +21048,9 @@ $as_echo "$gl_cv_func_getrandom_ok" >&6; }
     mingw*)
       for ac_header in bcrypt.h
 do :
-  ac_fn_c_check_header_mongrel "$LINENO" "bcrypt.h" "ac_cv_header_bcrypt_h" "$ac_includes_default"
+  ac_fn_c_check_header_compile "$LINENO" "bcrypt.h" "ac_cv_header_bcrypt_h" "#include <windows.h>
+
+"
 if test "x$ac_cv_header_bcrypt_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_BCRYPT_H 1
@@ -20711,82 +21144,6 @@ $as_echo "#define GNULIB_TEST_GETRANDOM 1" >>confdefs.h
   if test $ac_cv_func_gettimeofday != yes; then
     HAVE_GETTIMEOFDAY=0
   else
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
-$as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
-if ${gl_cv_func_gettimeofday_clobber+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test "$cross_compiling" = yes; then :
-  # When cross-compiling:
-      case "$host_os" in
-                       # Guess all is fine on glibc systems.
-        *-gnu* | gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
-                       # Guess all is fine on musl systems.
-        *-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, obey --enable-cross-guesses.
-        *)             gl_cv_func_gettimeofday_clobber="$gl_cross_guess_inverted" ;;
-      esac
-
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <string.h>
-          #include <sys/time.h>
-          #include <time.h>
-          #include <stdlib.h>
-
-int
-main ()
-{
-
-          time_t t = 0;
-          struct tm *lt;
-          struct tm saved_lt;
-          struct timeval tv;
-          lt = localtime (&t);
-          saved_lt = *lt;
-          gettimeofday (&tv, NULL);
-          return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  gl_cv_func_gettimeofday_clobber=no
-else
-  gl_cv_func_gettimeofday_clobber=yes
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
-$as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
-
- case "$gl_cv_func_gettimeofday_clobber" in
-   *yes)
-     REPLACE_GETTIMEOFDAY=1
-
-$as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
-
-
-
-
-  NEED_LOCALTIME_BUFFER=1
-  REPLACE_GMTIME=1
-  REPLACE_LOCALTIME=1
-
-     ;;
- esac
-
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
 $as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
 if ${gl_cv_func_gettimeofday_posix_signature+:} false; then :
@@ -21248,11 +21605,30 @@ _ACEOF
 
 
 
-
-
   PRIPTR_PREFIX=
   if test -n "$STDINT_H"; then
-        PRIPTR_PREFIX='"l"'
+            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+         #ifdef _WIN64
+         LLP64
+         #endif
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  PRIPTR_PREFIX='"l"'
+else
+  PRIPTR_PREFIX='"ll"'
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   else
         for glpfx in '' l ll I64; do
       case $glpfx in
@@ -21539,7 +21915,7 @@ else
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <math.h>
-             #if __GNUC__ >= 4
+             #if (__GNUC__ >= 4) || (__clang_major__ >= 4)
              # undef isnand
              # define isnand(x) __builtin_isnan ((double)(x))
              #else
@@ -21600,12 +21976,9 @@ else
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <math.h>
-             #ifndef __has_builtin
-             # define __has_builtin(name) 0
-             #endif
-             #if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanl))
+             #if (__GNUC__ >= 4) || (__clang_major__ >= 4)
              # undef isnanl
-             # define isnanl(x) __builtin_isnanl ((long double)(x))
+             # define isnanl(x) __builtin_isnan ((long double)(x))
              #elif defined isnan
              # undef isnanl
              # define isnanl(x) isnan ((long double)(x))
@@ -21673,12 +22046,9 @@ else
 #include <float.h>
 #include <limits.h>
 #include <math.h>
-#ifndef __has_builtin
-# define __has_builtin(name) 0
-#endif
-#if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanl))
+#if (__GNUC__ >= 4) || (__clang_major__ >= 4)
 # undef isnanl
-# define isnanl(x) __builtin_isnanl ((long double)(x))
+# define isnanl(x) __builtin_isnan ((long double)(x))
 #elif defined isnan
 # undef isnanl
 # define isnanl(x) isnan ((long double)(x))
@@ -22184,17 +22554,6 @@ $as_echo "$gl_cv_next_locale_h" >&6; }
 
 
 
-
-
-
-
-
-
-
-  gl_LIBOBJS="$gl_LIBOBJS localtime-buffer.$ac_objext"
-
-
-
   if test "$gl_threads_api" = posix; then
     # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
     # pthread_rwlock_* functions.
@@ -22694,13 +23053,6 @@ else
 
 #include <locale.h>
 #include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
 #include <wchar.h>
 int main ()
 {
@@ -22737,13 +23089,6 @@ else
 
 #include <locale.h>
 #include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
 #include <wchar.h>
 int main ()
 {
@@ -22802,13 +23147,6 @@ else
 #include <locale.h>
 #include <stdlib.h>
 #include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
 #include <wchar.h>
 int main ()
 {
@@ -22862,14 +23200,7 @@ $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
   if test $ac_cv_func_mbrtowc = no; then
     HAVE_MBRTOWC=0
     ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
+      #include <wchar.h>
 
 "
 if test "x$ac_cv_have_decl_mbrtowc" = xyes; then :
@@ -22914,13 +23245,6 @@ else
 #include <locale.h>
 #include <stdlib.h>
 #include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
 #include <wchar.h>
 int main ()
 {
@@ -22990,13 +23314,6 @@ else
 
 #include <locale.h>
 #include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
 #include <wchar.h>
 int main ()
 {
@@ -23058,13 +23375,6 @@ else
 
 #include <locale.h>
 #include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
 #include <wchar.h>
 int main ()
 {
@@ -23193,13 +23503,6 @@ else
 
 #include <locale.h>
 #include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
 #include <wchar.h>
 int main ()
 {
@@ -23254,13 +23557,6 @@ else
 
 #include <locale.h>
 #include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
 #include <wchar.h>
 int main ()
 {
@@ -23329,13 +23625,6 @@ else
 
 #include <locale.h>
 #include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
 #include <wchar.h>
 int main ()
 {
@@ -23826,13 +24115,6 @@ else
 
 #include <locale.h>
 #include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
 #include <wchar.h>
 int main ()
 {
@@ -23869,13 +24151,6 @@ else
 
 #include <locale.h>
 #include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
 #include <wchar.h>
 int main ()
 {
@@ -23934,13 +24209,6 @@ else
 #include <locale.h>
 #include <stdlib.h>
 #include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
 #include <wchar.h>
 int main ()
 {
@@ -23994,14 +24262,7 @@ $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
   if test $ac_cv_func_mbsinit = no; then
     HAVE_MBSINIT=0
     ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
+      #include <wchar.h>
 
 "
 if test "x$ac_cv_have_decl_mbsinit" = xyes; then :
@@ -24098,13 +24359,6 @@ else
 
 #include <locale.h>
 #include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
 #include <wchar.h>
 int main ()
 {
@@ -24141,13 +24395,6 @@ else
 
 #include <locale.h>
 #include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
 #include <wchar.h>
 int main ()
 {
@@ -24206,13 +24453,6 @@ else
 #include <locale.h>
 #include <stdlib.h>
 #include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
 #include <wchar.h>
 int main ()
 {
@@ -24266,14 +24506,7 @@ $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
   if test $ac_cv_func_mbsrtowcs = no; then
     HAVE_MBSRTOWCS=0
     ac_fn_c_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
+      #include <wchar.h>
 
 "
 if test "x$ac_cv_have_decl_mbsrtowcs" = xyes; then :
@@ -24320,13 +24553,6 @@ else
 
 #include <locale.h>
 #include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
 #include <wchar.h>
 int main ()
 {
@@ -24506,7 +24732,7 @@ $as_echo "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h
 
 
 
-  if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
+  if test $REPLACE_MEMCHR = 1; then
 
 
 
@@ -24905,14 +25131,14 @@ if ${gl_cv_func_mkdir_trailing_slash_works+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   rm -rf conftest.dir
-      if test "$cross_compiling" = yes; then :
+     if test "$cross_compiling" = yes; then :
   case "$host_os" in
-                          # Guess yes on Linux systems.
-         linux-* | linux) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
-                          # Guess yes on glibc systems.
-         *-gnu* | gnu*)   gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
-                          # Guess yes on MSVC, no on mingw.
-         mingw*)          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+                           # Guess yes on Linux systems.
+          linux-* | linux) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
+                           # Guess yes on glibc systems.
+          *-gnu* | gnu*)   gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
+                           # Guess yes on MSVC, no on mingw.
+          mingw*)          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 #ifdef _MSC_VER
@@ -24928,17 +25154,20 @@ else
 fi
 rm -f conftest*
 
-                          ;;
-                          # If we don't know, obey --enable-cross-guesses.
-         *)               gl_cv_func_mkdir_trailing_slash_works="$gl_cross_guess_normal" ;;
-       esac
+                           ;;
+                           # If we don't know, obey --enable-cross-guesses.
+          *)               gl_cv_func_mkdir_trailing_slash_works="$gl_cross_guess_normal" ;;
+        esac
 
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#       include <sys/types.h>
-#       include <sys/stat.h>
+          #include <sys/types.h>
+          #include <sys/stat.h>
+
+
+$gl_mda_defines
 
 int
 main ()
@@ -24957,8 +25186,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-    rm -rf conftest.dir
-
+     rm -rf conftest.dir
 
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5
@@ -24976,24 +25204,27 @@ if ${gl_cv_func_mkdir_trailing_dot_works+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   rm -rf conftest.dir
-      if test "$cross_compiling" = yes; then :
+     if test "$cross_compiling" = yes; then :
   case "$host_os" in
-                        # Guess yes on glibc systems.
-         *-gnu* | gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
-                        # Guess yes on musl systems.
-         *-musl*)       gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
-                        # Guess no on native Windows.
-         mingw*)        gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
-                        # If we don't know, obey --enable-cross-guesses.
-         *)             gl_cv_func_mkdir_trailing_dot_works="$gl_cross_guess_normal" ;;
-       esac
+                         # Guess yes on glibc systems.
+          *-gnu* | gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
+                         # Guess yes on musl systems.
+          *-musl*)       gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
+                         # Guess no on native Windows.
+          mingw*)        gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
+                         # If we don't know, obey --enable-cross-guesses.
+          *)             gl_cv_func_mkdir_trailing_dot_works="$gl_cross_guess_normal" ;;
+        esac
 
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#       include <sys/types.h>
-#       include <sys/stat.h>
+          #include <sys/types.h>
+          #include <sys/stat.h>
+
+
+$gl_mda_defines
 
 int
 main ()
@@ -25012,7 +25243,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-    rm -rf conftest.dir
+     rm -rf conftest.dir
 
 
 fi
@@ -25042,6 +25273,21 @@ $as_echo "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
   fi
 
 
+
+
+
+          GNULIB_MKDIR=1
+
+
+
+
+
+$as_echo "#define GNULIB_TEST_MKDIR 1" >>confdefs.h
+
+
+
+
+
   for ac_func in mkdtemp
 do :
   ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
@@ -25347,6 +25593,10 @@ else
 #if HAVE_UNISTD_H
 # include <unistd.h>
 #endif
+
+
+$gl_mda_defines
+
 int main ()
 {
   int result = 0;
@@ -25562,6 +25812,41 @@ $as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
 
 
 
+  if test $ac_cv_func_pipe != yes; then
+    HAVE_PIPE=0
+  fi
+
+  if test $HAVE_PIPE = 0; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS pipe.$ac_objext"
+
+  fi
+
+
+
+
+
+          GNULIB_PIPE=1
+
+
+
+
+
+$as_echo "#define GNULIB_TEST_PIPE 1" >>confdefs.h
+
+
+
+
+
+
+
   for ac_func in rawmemchr
 do :
   ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
@@ -25685,7 +25970,7 @@ fi
 $as_echo "$gl_cv_decl_readlink_works" >&6; }
             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
 $as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
-if ${gl_cv_func_readlink_works+:} false; then :
+if ${gl_cv_func_readlink_trailing_slash+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   # We have readlink, so assume ln -s works.
@@ -25693,12 +25978,15 @@ else
        ln -s conftest.link conftest.lnk2
        if test "$cross_compiling" = yes; then :
   case "$host_os" in
-                             # Guess yes on Linux systems.
-            linux-* | linux) gl_cv_func_readlink_works="guessing yes" ;;
-                             # Guess yes on glibc systems.
-            *-gnu* | gnu*)   gl_cv_func_readlink_works="guessing yes" ;;
-                             # If we don't know, obey --enable-cross-guesses.
-            *)               gl_cv_func_readlink_works="$gl_cross_guess_normal" ;;
+            # Guess yes on Linux or glibc systems.
+            linux-* | linux | *-gnu* | gnu*)
+              gl_cv_func_readlink_trailing_slash="guessing yes" ;;
+            # Guess no on AIX or HP-UX.
+            aix* | hpux*)
+              gl_cv_func_readlink_trailing_slash="guessing no" ;;
+            # If we don't know, obey --enable-cross-guesses.
+            *)
+              gl_cv_func_readlink_trailing_slash="$gl_cross_guess_normal" ;;
           esac
 
 else
@@ -25716,9 +26004,9 @@ char buf[20];
 }
 _ACEOF
 if ac_fn_c_try_run "$LINENO"; then :
-  gl_cv_func_readlink_works=yes
+  gl_cv_func_readlink_trailing_slash=yes
 else
-  gl_cv_func_readlink_works=no
+  gl_cv_func_readlink_trailing_slash=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
@@ -25726,9 +26014,9 @@ fi
 
       rm -f conftest.link conftest.lnk2
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
-$as_echo "$gl_cv_func_readlink_works" >&6; }
-    case "$gl_cv_func_readlink_works" in
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_trailing_slash" >&5
+$as_echo "$gl_cv_func_readlink_trailing_slash" >&6; }
+    case "$gl_cv_func_readlink_trailing_slash" in
       *yes)
         if test "$gl_cv_decl_readlink_works" != yes; then
           REPLACE_READLINK=1
@@ -25741,6 +26029,67 @@ $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
         REPLACE_READLINK=1
         ;;
     esac
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink truncates results correctly" >&5
+$as_echo_n "checking whether readlink truncates results correctly... " >&6; }
+if ${gl_cv_func_readlink_truncate+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  # We have readlink, so assume ln -s works.
+       ln -s ab conftest.link
+       if test "$cross_compiling" = yes; then :
+  case "$host_os" in
+            # Guess yes on Linux or glibc systems.
+            linux-* | linux | *-gnu* | gnu*)
+              gl_cv_func_readlink_truncate="guessing yes" ;;
+            # Guess no on AIX or HP-UX.
+            aix* | hpux*)
+              gl_cv_func_readlink_truncate="guessing no" ;;
+            # If we don't know, obey --enable-cross-guesses.
+            *)
+              gl_cv_func_readlink_truncate="$gl_cross_guess_normal" ;;
+          esac
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <unistd.h>
+
+int
+main ()
+{
+char c;
+      return readlink ("conftest.link", &c, 1) != 1;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_readlink_truncate=yes
+else
+  gl_cv_func_readlink_truncate=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+      rm -f conftest.link conftest.lnk2
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_truncate" >&5
+$as_echo "$gl_cv_func_readlink_truncate" >&6; }
+    case $gl_cv_func_readlink_truncate in
+      *yes)
+        if test "$gl_cv_decl_readlink_works" != yes; then
+          REPLACE_READLINK=1
+        fi
+        ;;
+      *)
+
+$as_echo "#define READLINK_TRUNCATE_BUG 1" >>confdefs.h
+
+        REPLACE_READLINK=1
+        ;;
+    esac
   fi
 
   if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
@@ -25985,6 +26334,9 @@ else
 #               include <stdlib.h>
 #               include <unistd.h>
 
+
+$gl_mda_defines
+
 int
 main ()
 {
@@ -26223,17 +26575,20 @@ else
            # include <direct.h>
            #endif
 
+
+$gl_mda_defines
+
 int
 main ()
 {
 int result = 0;
-      if (!rmdir ("conftest.file/"))
-        result |= 1;
-      else if (errno != ENOTDIR)
-        result |= 2;
-      if (!rmdir ("conftest.dir/./"))
-        result |= 4;
-      return result;
+           if (!rmdir ("conftest.file/"))
+             result |= 1;
+           else if (errno != ENOTDIR)
+             result |= 2;
+           if (!rmdir ("conftest.dir/./"))
+             result |= 4;
+           return result;
 
   ;
   return 0;
@@ -27005,6 +27360,7 @@ $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
     esac
 
 
+
   :
 
   fi
@@ -27273,6 +27629,9 @@ fi
 
 
 
+
+
+
   STDDEF_H=
 
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
@@ -27284,10 +27643,17 @@ else
 /* end confdefs.h.  */
 #include <stddef.h>
             unsigned int s = sizeof (max_align_t);
-            #if defined __GNUC__ || defined __IBM__ALIGNOF__
+            #if defined __GNUC__ || defined __clang__ || defined __IBM__ALIGNOF__
             int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
             int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
             #endif
+            typedef struct { char a; max_align_t b; } max_helper;
+            typedef struct { char a; long b; } long_helper;
+            typedef struct { char a; double b; } double_helper;
+            typedef struct { char a; long double b; } long_double_helper;
+            int check3[2 * (offsetof (long_helper, b) <= offsetof (max_helper, b)) - 1];
+            int check4[2 * (offsetof (double_helper, b) <= offsetof (max_helper, b)) - 1];
+            int check5[2 * (offsetof (long_double_helper, b) <= offsetof (max_helper, b)) - 1];
 
 int
 main ()
@@ -27595,6 +27961,11 @@ _ACEOF
 
 
 
+  if test $ac_cv_have_decl_fcloseall = no; then
+    HAVE_DECL_FCLOSEALL=0
+  fi
+
+
 
 
 
@@ -27675,6 +28046,19 @@ $as_echo "$gl_cv_next_stdlib_h" >&6; }
 
 
 
+  if test $ac_cv_have_decl_ecvt = no; then
+    HAVE_DECL_ECVT=0
+  fi
+
+  if test $ac_cv_have_decl_fcvt = no; then
+    HAVE_DECL_FCVT=0
+  fi
+
+  if test $ac_cv_have_decl_gcvt = no; then
+    HAVE_DECL_GCVT=0
+  fi
+
+
 
 
 
@@ -27786,18 +28170,15 @@ $as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
 
 
 
-
-  if test $ac_cv_func_strdup = yes; then
-    if test $gl_cv_func_malloc_posix != yes; then
-      REPLACE_STRDUP=1
-    fi
+  if test $gl_cv_func_malloc_posix != yes; then
+    REPLACE_STRDUP=1
   fi
 
   if test $ac_cv_have_decl_strdup = no; then
     HAVE_DECL_STRDUP=0
   fi
 
-  if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
+  if test $REPLACE_STRDUP = 1; then
 
 
 
@@ -28249,7 +28630,7 @@ $as_echo "$gl_cv_func_strstr_linear" >&6; }
 
 
 
-  if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
+  if test $REPLACE_MEMCHR = 1; then
     REPLACE_STRSTR=1
   else
             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
@@ -28787,6 +29168,13 @@ $as_echo "$gl_cv_next_sys_uio_h" >&6; }
 
 
 
+cat >>confdefs.h <<_ACEOF
+#define GNULIB_TEMPNAME 1
+_ACEOF
+
+
+
+
 
 
 
@@ -29041,6 +29429,11 @@ $as_echo "$gl_cv_next_unistd_h" >&6; }
 
 
 
+  if test $ac_cv_have_decl_execvpe = no; then
+    HAVE_DECL_EXECVPE=0
+  fi
+
+
 
 
 
@@ -29112,39 +29505,42 @@ if ${gl_cv_func_unsetenv_works+:} false; then :
 else
   if test "$cross_compiling" = yes; then :
   case "$host_os" in
-                 # Guess yes on glibc systems.
-         *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
-                 # If we don't know, obey --enable-cross-guesses.
-         *)      gl_cv_func_unsetenv_works="$gl_cross_guess_normal" ;;
-       esac
+                    # Guess yes on glibc systems.
+            *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
+                    # If we don't know, obey --enable-cross-guesses.
+            *)      gl_cv_func_unsetenv_works="$gl_cross_guess_normal" ;;
+          esac
 
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-       #include <stdlib.h>
-       #include <errno.h>
-       extern char **environ;
+            #include <stdlib.h>
+            #include <errno.h>
+            extern char **environ;
+
+
+$gl_mda_defines
 
 int
 main ()
 {
 
-       char entry1[] = "a=1";
-       char entry2[] = "b=2";
-       char *env[] = { entry1, entry2, NULL };
-       if (putenv ((char *) "a=1")) return 1;
-       if (putenv (entry2)) return 2;
-       entry2[0] = 'a';
-       unsetenv ("a");
-       if (getenv ("a")) return 3;
-       if (!unsetenv ("") || errno != EINVAL) return 4;
-       entry2[0] = 'b';
-       environ = env;
-       if (!getenv ("a")) return 5;
-       entry2[0] = 'a';
-       unsetenv ("a");
-       if (getenv ("a")) return 6;
+            char entry1[] = "a=1";
+            char entry2[] = "b=2";
+            char *env[] = { entry1, entry2, NULL };
+            if (putenv ((char *) "a=1")) return 1;
+            if (putenv (entry2)) return 2;
+            entry2[0] = 'a';
+            unsetenv ("a");
+            if (getenv ("a")) return 3;
+            if (!unsetenv ("") || errno != EINVAL) return 4;
+            entry2[0] = 'b';
+            environ = env;
+            if (!getenv ("a")) return 5;
+            entry2[0] = 'a';
+            unsetenv ("a");
+            if (getenv ("a")) return 6;
 
   ;
   return 0;
@@ -29159,6 +29555,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
+
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
 $as_echo "$gl_cv_func_unsetenv_works" >&6; }
@@ -29307,6 +29704,24 @@ $as_echo "$gl_cv_next_wchar_h" >&6; }
 
 
 
+  ac_fn_c_check_decl "$LINENO" "wcsdup" "ac_cv_have_decl_wcsdup" "
+      #include <wchar.h>
+
+"
+if test "x$ac_cv_have_decl_wcsdup" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_WCSDUP $ac_have_decl
+_ACEOF
+
+  if test $ac_cv_have_decl_wcsdup = no; then
+    HAVE_DECL_WCSDUP=0
+  fi
+
 
 
 
@@ -29441,13 +29856,6 @@ else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-               /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
-                  included before <wchar.h>.
-                  BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
-                  must be included before <wchar.h>.  */
-               #include <stddef.h>
-               #include <stdio.h>
-               #include <time.h>
                #include <wchar.h>
                #include <wctype.h>
                int main () { return iswprint ('x') == 0; }
@@ -29504,14 +29912,7 @@ done
     if test $ac_cv_func_towlower = yes; then
       REPLACE_TOWLOWER=0
     else
-      ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
-             included before <wchar.h>.
-             BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
-             must be included before <wchar.h>.  */
-          #include <stddef.h>
-          #include <stdio.h>
-          #include <time.h>
-          #include <wchar.h>
+      ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "#include <wchar.h>
           #if HAVE_WCTYPE_H
           # include <wctype.h>
           #endif
@@ -29547,14 +29948,7 @@ if ${gl_cv_type_wctype_t+:} false; then :
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
-               included before <wchar.h>.
-               BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
-               must be included before <wchar.h>.  */
-            #include <stddef.h>
-            #include <stdio.h>
-            #include <time.h>
-            #include <wchar.h>
+#include <wchar.h>
             #if HAVE_WCTYPE_H
             # include <wctype.h>
             #endif
@@ -29589,14 +29983,7 @@ if ${gl_cv_type_wctrans_t+:} false; then :
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
-               included before <wchar.h>.
-               BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
-               must be included before <wchar.h>.  */
-            #include <stddef.h>
-            #include <stdio.h>
-            #include <time.h>
-            #include <wchar.h>
+#include <wchar.h>
             #include <wctype.h>
             wctrans_t a;
 
@@ -29695,14 +30082,6 @@ if ${gl_cv_func_wmemchr+:} false; then :
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
-   before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
 #include <wchar.h>
 
 int
index 84de424a1734102f27db1f440c81324181c117e9..de8d7dec0ba8da17956e5b62f958dbdd7a624550 100644 (file)
@@ -1,6 +1,6 @@
 ## DO NOT EDIT! GENERATED AUTOMATICALLY!
 ## Process this file with automake to produce Makefile.in.
-# Copyright (C) 2002-2020 Free Software Foundation, Inc.
+# Copyright (C) 2002-2021 Free Software Foundation, Inc.
 #
 # 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
@@ -103,7 +103,7 @@ EXTRA_libgnu_a_SOURCES =
 # Use this preprocessor expression to decide whether #include_next works.
 # Do not rely on a 'configure'-time test for this, since the expression
 # might appear in an installed header, which is used by some other compiler.
-HAVE_INCLUDE_NEXT = (__GNUC__ || 60000000 <= __DECC_VER)
+HAVE_INCLUDE_NEXT = (__GNUC__ || __clang__ || 60000000 <= __DECC_VER)
 
 ## end   gnulib module absolute-header
 
@@ -198,6 +198,14 @@ EXTRA_DIST += attribute.h
 
 ## end   gnulib module attribute
 
+## begin gnulib module basename-lgpl
+
+libgnu_a_SOURCES += basename-lgpl.c
+
+EXTRA_DIST += basename-lgpl.h
+
+## end   gnulib module basename-lgpl
+
 ## begin gnulib module btowc
 
 
@@ -345,7 +353,7 @@ EXTRA_libgnu_a_SOURCES += dirfd.c
 
 ## begin gnulib module dirname-lgpl
 
-libgnu_a_SOURCES += dirname-lgpl.c basename-lgpl.c stripslash.c
+libgnu_a_SOURCES += dirname-lgpl.c stripslash.c
 
 EXTRA_DIST += dirname.h
 
@@ -369,6 +377,13 @@ EXTRA_libgnu_a_SOURCES += dup2.c
 
 ## end   gnulib module dup2
 
+## begin gnulib module eloop-threshold
+
+
+EXTRA_DIST += eloop-threshold.h
+
+## end   gnulib module eloop-threshold
+
 ## begin gnulib module errno
 
 BUILT_SOURCES += $(ERRNO_H)
@@ -457,6 +472,8 @@ fcntl.h: fcntl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
              -e 's/@''GNULIB_NONBLOCKING''@/$(GNULIB_NONBLOCKING)/g' \
              -e 's/@''GNULIB_OPEN''@/$(GNULIB_OPEN)/g' \
              -e 's/@''GNULIB_OPENAT''@/$(GNULIB_OPENAT)/g' \
+             -e 's/@''GNULIB_MDA_CREAT''@/$(GNULIB_MDA_CREAT)/g' \
+             -e 's/@''GNULIB_MDA_OPEN''@/$(GNULIB_MDA_OPEN)/g' \
              -e 's|@''HAVE_FCNTL''@|$(HAVE_FCNTL)|g' \
              -e 's|@''HAVE_OPENAT''@|$(HAVE_OPENAT)|g' \
              -e 's|@''REPLACE_CREAT''@|$(REPLACE_CREAT)|g' \
@@ -560,6 +577,15 @@ EXTRA_libgnu_a_SOURCES += fnmatch.c fnmatch_loop.c
 
 ## end   gnulib module fnmatch
 
+## begin gnulib module fnmatch-gnu
+
+
+EXTRA_DIST += fnmatch.c
+
+EXTRA_libgnu_a_SOURCES += fnmatch.c
+
+## end   gnulib module fnmatch-gnu
+
 ## begin gnulib module fnmatch-h
 
 BUILT_SOURCES += $(FNMATCH_H)
@@ -601,6 +627,15 @@ EXTRA_DIST += fpucw.h
 
 ## end   gnulib module fpucw
 
+## begin gnulib module free-posix
+
+
+EXTRA_DIST += free.c
+
+EXTRA_libgnu_a_SOURCES += free.c
+
+## end   gnulib module free-posix
+
 ## begin gnulib module frexp
 
 
@@ -756,6 +791,12 @@ EXTRA_DIST += hard-locale.h
 
 ## end   gnulib module hard-locale
 
+## begin gnulib module idx
+
+libgnu_a_SOURCES += idx.h
+
+## end   gnulib module idx
+
 ## begin gnulib module inet_ntop
 
 
@@ -786,7 +827,6 @@ inttypes.h: inttypes.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_U
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -e 's|@''NEXT_INTTYPES_H''@|$(NEXT_INTTYPES_H)|g' \
-             -e 's/@''PRI_MACROS_BROKEN''@/$(PRI_MACROS_BROKEN)/g' \
              -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \
              -e 's/@''PRIPTR_PREFIX''@/$(PRIPTR_PREFIX)/g' \
              -e 's/@''GNULIB_IMAXABS''@/$(GNULIB_IMAXABS)/g' \
@@ -927,15 +967,6 @@ EXTRA_DIST += locale.in.h
 
 ## end   gnulib module locale
 
-## begin gnulib module localtime-buffer
-
-
-EXTRA_DIST += localtime-buffer.c localtime-buffer.h
-
-EXTRA_libgnu_a_SOURCES += localtime-buffer.c
-
-## end   gnulib module localtime-buffer
-
 ## begin gnulib module lock
 
 libgnu_a_SOURCES += glthread/lock.h glthread/lock.c
@@ -1079,6 +1110,12 @@ math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
              -e 's/@''GNULIB_TRUNC''@/$(GNULIB_TRUNC)/g' \
              -e 's/@''GNULIB_TRUNCF''@/$(GNULIB_TRUNCF)/g' \
              -e 's/@''GNULIB_TRUNCL''@/$(GNULIB_TRUNCL)/g' \
+             -e 's/@''GNULIB_MDA_J0''@/$(GNULIB_MDA_J0)/g' \
+             -e 's/@''GNULIB_MDA_J1''@/$(GNULIB_MDA_J1)/g' \
+             -e 's/@''GNULIB_MDA_JN''@/$(GNULIB_MDA_JN)/g' \
+             -e 's/@''GNULIB_MDA_Y0''@/$(GNULIB_MDA_Y0)/g' \
+             -e 's/@''GNULIB_MDA_Y1''@/$(GNULIB_MDA_Y1)/g' \
+             -e 's/@''GNULIB_MDA_YN''@/$(GNULIB_MDA_YN)/g' \
          | \
          sed -e 's|@''HAVE_ACOSF''@|$(HAVE_ACOSF)|g' \
              -e 's|@''HAVE_ACOSL''@|$(HAVE_ACOSL)|g' \
@@ -1247,7 +1284,7 @@ math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
              -e 's|@''REPLACE_ROUNDF''@|$(REPLACE_ROUNDF)|g' \
              -e 's|@''REPLACE_ROUNDL''@|$(REPLACE_ROUNDL)|g' \
              -e 's|@''REPLACE_SIGNBIT''@|$(REPLACE_SIGNBIT)|g' \
-             -e 's|@''REPLACE_SIGNBIT_USING_GCC''@|$(REPLACE_SIGNBIT_USING_GCC)|g' \
+             -e 's|@''REPLACE_SIGNBIT_USING_BUILTINS''@|$(REPLACE_SIGNBIT_USING_BUILTINS)|g' \
              -e 's|@''REPLACE_SINF''@|$(REPLACE_SINF)|g' \
              -e 's|@''REPLACE_SINHF''@|$(REPLACE_SINHF)|g' \
              -e 's|@''REPLACE_SQRTF''@|$(REPLACE_SQRTF)|g' \
@@ -1313,6 +1350,15 @@ EXTRA_libgnu_a_SOURCES += memchr.c
 
 ## end   gnulib module memchr
 
+## begin gnulib module memmem
+
+
+EXTRA_DIST += memmem.c
+
+EXTRA_libgnu_a_SOURCES += memmem.c
+
+## end   gnulib module memmem
+
 ## begin gnulib module memmem-simple
 
 
@@ -1469,6 +1515,15 @@ EXTRA_DIST += pathmax.h
 
 ## end   gnulib module pathmax
 
+## begin gnulib module pipe-posix
+
+
+EXTRA_DIST += pipe.c
+
+EXTRA_libgnu_a_SOURCES += pipe.c
+
+## end   gnulib module pipe-posix
+
 ## begin gnulib module rawmemchr
 
 
@@ -1549,7 +1604,7 @@ EXTRA_DIST += save-cwd.h
 
 ## begin gnulib module scratch_buffer
 
-libgnu_a_SOURCES += malloc/scratch_buffer_grow.c                 malloc/scratch_buffer_grow_preserve.c                 malloc/scratch_buffer_set_array_size.c
+libgnu_a_SOURCES += malloc/scratch_buffer_dupfree.c                 malloc/scratch_buffer_grow.c                 malloc/scratch_buffer_grow_preserve.c                 malloc/scratch_buffer_set_array_size.c
 
 EXTRA_DIST += malloc/scratch_buffer.h scratch_buffer.h
 
@@ -1875,8 +1930,15 @@ stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
              -e 's/@''GNULIB_VPRINTF_POSIX''@/$(GNULIB_VPRINTF_POSIX)/g' \
              -e 's/@''GNULIB_VSNPRINTF''@/$(GNULIB_VSNPRINTF)/g' \
              -e 's/@''GNULIB_VSPRINTF_POSIX''@/$(GNULIB_VSPRINTF_POSIX)/g' \
+             -e 's/@''GNULIB_MDA_FCLOSEALL''@/$(GNULIB_MDA_FCLOSEALL)/g' \
+             -e 's/@''GNULIB_MDA_FDOPEN''@/$(GNULIB_MDA_FDOPEN)/g' \
+             -e 's/@''GNULIB_MDA_FILENO''@/$(GNULIB_MDA_FILENO)/g' \
+             -e 's/@''GNULIB_MDA_GETW''@/$(GNULIB_MDA_GETW)/g' \
+             -e 's/@''GNULIB_MDA_PUTW''@/$(GNULIB_MDA_PUTW)/g' \
+             -e 's/@''GNULIB_MDA_TEMPNAM''@/$(GNULIB_MDA_TEMPNAM)/g' \
              < $(srcdir)/stdio.in.h | \
-         sed -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \
+         sed -e 's|@''HAVE_DECL_FCLOSEALL''@|$(HAVE_DECL_FCLOSEALL)|g' \
+             -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \
              -e 's|@''HAVE_DECL_FSEEKO''@|$(HAVE_DECL_FSEEKO)|g' \
              -e 's|@''HAVE_DECL_FTELLO''@|$(HAVE_DECL_FTELLO)|g' \
              -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \
@@ -1952,9 +2014,11 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \
              -e 's/@''GNULIB__EXIT''@/$(GNULIB__EXIT)/g' \
+             -e 's/@''GNULIB_ALIGNED_ALLOC''@/$(GNULIB_ALIGNED_ALLOC)/g' \
              -e 's/@''GNULIB_ATOLL''@/$(GNULIB_ATOLL)/g' \
              -e 's/@''GNULIB_CALLOC_POSIX''@/$(GNULIB_CALLOC_POSIX)/g' \
              -e 's/@''GNULIB_CANONICALIZE_FILE_NAME''@/$(GNULIB_CANONICALIZE_FILE_NAME)/g' \
+             -e 's/@''GNULIB_FREE_POSIX''@/$(GNULIB_FREE_POSIX)/g' \
              -e 's/@''GNULIB_GETLOADAVG''@/$(GNULIB_GETLOADAVG)/g' \
              -e 's/@''GNULIB_GETSUBOPT''@/$(GNULIB_GETSUBOPT)/g' \
              -e 's/@''GNULIB_GRANTPT''@/$(GNULIB_GRANTPT)/g' \
@@ -1965,6 +2029,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
              -e 's/@''GNULIB_MKOSTEMPS''@/$(GNULIB_MKOSTEMPS)/g' \
              -e 's/@''GNULIB_MKSTEMP''@/$(GNULIB_MKSTEMP)/g' \
              -e 's/@''GNULIB_MKSTEMPS''@/$(GNULIB_MKSTEMPS)/g' \
+             -e 's/@''GNULIB_POSIX_MEMALIGN''@/$(GNULIB_POSIX_MEMALIGN)/g' \
              -e 's/@''GNULIB_POSIX_OPENPT''@/$(GNULIB_POSIX_OPENPT)/g' \
              -e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \
              -e 's/@''GNULIB_PTSNAME_R''@/$(GNULIB_PTSNAME_R)/g' \
@@ -1986,10 +2051,19 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
              -e 's/@''GNULIB_UNLOCKPT''@/$(GNULIB_UNLOCKPT)/g' \
              -e 's/@''GNULIB_UNSETENV''@/$(GNULIB_UNSETENV)/g' \
              -e 's/@''GNULIB_WCTOMB''@/$(GNULIB_WCTOMB)/g' \
+             -e 's/@''GNULIB_MDA_ECVT''@/$(GNULIB_MDA_ECVT)/g' \
+             -e 's/@''GNULIB_MDA_FCVT''@/$(GNULIB_MDA_FCVT)/g' \
+             -e 's/@''GNULIB_MDA_GCVT''@/$(GNULIB_MDA_GCVT)/g' \
+             -e 's/@''GNULIB_MDA_MKTEMP''@/$(GNULIB_MDA_MKTEMP)/g' \
+             -e 's/@''GNULIB_MDA_PUTENV''@/$(GNULIB_MDA_PUTENV)/g' \
              < $(srcdir)/stdlib.in.h | \
          sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \
+             -e 's|@''HAVE_ALIGNED_ALLOC''@|$(HAVE_ALIGNED_ALLOC)|g' \
              -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \
              -e 's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \
+             -e 's|@''HAVE_DECL_ECVT''@|$(HAVE_DECL_ECVT)|g' \
+             -e 's|@''HAVE_DECL_FCVT''@|$(HAVE_DECL_FCVT)|g' \
+             -e 's|@''HAVE_DECL_GCVT''@|$(HAVE_DECL_GCVT)|g' \
              -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \
              -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \
              -e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \
@@ -2001,6 +2075,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
              -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \
              -e 's|@''HAVE_MKSTEMP''@|$(HAVE_MKSTEMP)|g' \
              -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \
+             -e 's|@''HAVE_POSIX_MEMALIGN''@|$(HAVE_POSIX_MEMALIGN)|g' \
              -e 's|@''HAVE_POSIX_OPENPT''@|$(HAVE_POSIX_OPENPT)|g' \
              -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \
              -e 's|@''HAVE_PTSNAME_R''@|$(HAVE_PTSNAME_R)|g' \
@@ -2023,12 +2098,15 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
              -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \
              -e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \
              -e 's|@''HAVE_DECL_UNSETENV''@|$(HAVE_DECL_UNSETENV)|g' \
+             -e 's|@''REPLACE_ALIGNED_ALLOC''@|$(REPLACE_ALIGNED_ALLOC)|g' \
              -e 's|@''REPLACE_CALLOC''@|$(REPLACE_CALLOC)|g' \
              -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \
+             -e 's|@''REPLACE_FREE''@|$(REPLACE_FREE)|g' \
              -e 's|@''REPLACE_INITSTATE''@|$(REPLACE_INITSTATE)|g' \
              -e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \
              -e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \
              -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \
+             -e 's|@''REPLACE_POSIX_MEMALIGN''@|$(REPLACE_POSIX_MEMALIGN)|g' \
              -e 's|@''REPLACE_PTSNAME''@|$(REPLACE_PTSNAME)|g' \
              -e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \
              -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \
@@ -2157,14 +2235,18 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's/@''GNULIB_STRTOK_R''@/$(GNULIB_STRTOK_R)/g' \
              -e 's/@''GNULIB_STRERROR''@/$(GNULIB_STRERROR)/g' \
              -e 's/@''GNULIB_STRERROR_R''@/$(GNULIB_STRERROR_R)/g' \
+             -e 's/@''GNULIB_STRERRORNAME_NP''@/$(GNULIB_STRERRORNAME_NP)/g' \
+             -e 's/@''GNULIB_SIGABBREV_NP''@/$(GNULIB_SIGABBREV_NP)/g' \
+             -e 's/@''GNULIB_SIGDESCR_NP''@/$(GNULIB_SIGDESCR_NP)/g' \
              -e 's/@''GNULIB_STRSIGNAL''@/$(GNULIB_STRSIGNAL)/g' \
              -e 's/@''GNULIB_STRVERSCMP''@/$(GNULIB_STRVERSCMP)/g' \
+             -e 's/@''GNULIB_MDA_MEMCCPY''@/$(GNULIB_MDA_MEMCCPY)/g' \
+             -e 's/@''GNULIB_MDA_STRDUP''@/$(GNULIB_MDA_STRDUP)/g' \
              < $(srcdir)/string.in.h | \
          sed -e 's|@''HAVE_EXPLICIT_BZERO''@|$(HAVE_EXPLICIT_BZERO)|g' \
              -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \
              -e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \
              -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \
-             -e 's|@''HAVE_MEMCHR''@|$(HAVE_MEMCHR)|g' \
              -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \
              -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \
              -e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \
@@ -2180,8 +2262,12 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \
              -e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \
              -e 's|@''HAVE_DECL_STRERROR_R''@|$(HAVE_DECL_STRERROR_R)|g' \
+             -e 's|@''HAVE_STRERRORNAME_NP''@|$(HAVE_STRERRORNAME_NP)|g' \
+             -e 's|@''HAVE_SIGABBREV_NP''@|$(HAVE_SIGABBREV_NP)|g' \
+             -e 's|@''HAVE_SIGDESCR_NP''@|$(HAVE_SIGDESCR_NP)|g' \
              -e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \
              -e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \
+             -e 's|@''REPLACE_FFSLL''@|$(REPLACE_FFSLL)|g' \
              -e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \
              -e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \
              -e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \
@@ -2195,6 +2281,7 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \
              -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \
              -e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \
+             -e 's|@''REPLACE_STRERRORNAME_NP''@|$(REPLACE_STRERRORNAME_NP)|g' \
              -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \
              -e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \
              -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
@@ -2224,6 +2311,15 @@ libgnu_a_SOURCES += strnlen1.h strnlen1.c
 
 ## end   gnulib module strnlen1
 
+## begin gnulib module strstr
+
+
+EXTRA_DIST += strstr.c
+
+EXTRA_libgnu_a_SOURCES += strstr.c
+
+## end   gnulib module strstr
+
 ## begin gnulib module strstr-simple
 
 
@@ -2347,8 +2443,10 @@ sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNU
              -e 's/@''GNULIB_FSTAT''@/$(GNULIB_FSTAT)/g' \
              -e 's/@''GNULIB_FSTATAT''@/$(GNULIB_FSTATAT)/g' \
              -e 's/@''GNULIB_FUTIMENS''@/$(GNULIB_FUTIMENS)/g' \
+             -e 's/@''GNULIB_GETUMASK''@/$(GNULIB_GETUMASK)/g' \
              -e 's/@''GNULIB_LCHMOD''@/$(GNULIB_LCHMOD)/g' \
              -e 's/@''GNULIB_LSTAT''@/$(GNULIB_LSTAT)/g' \
+             -e 's/@''GNULIB_MKDIR''@/$(GNULIB_MKDIR)/g' \
              -e 's/@''GNULIB_MKDIRAT''@/$(GNULIB_MKDIRAT)/g' \
              -e 's/@''GNULIB_MKFIFO''@/$(GNULIB_MKFIFO)/g' \
              -e 's/@''GNULIB_MKFIFOAT''@/$(GNULIB_MKFIFOAT)/g' \
@@ -2357,9 +2455,13 @@ sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNU
              -e 's/@''GNULIB_STAT''@/$(GNULIB_STAT)/g' \
              -e 's/@''GNULIB_UTIMENSAT''@/$(GNULIB_UTIMENSAT)/g' \
              -e 's/@''GNULIB_OVERRIDES_STRUCT_STAT''@/$(GNULIB_OVERRIDES_STRUCT_STAT)/g' \
+             -e 's/@''GNULIB_MDA_CHMOD''@/$(GNULIB_MDA_CHMOD)/g' \
+             -e 's/@''GNULIB_MDA_MKDIR''@/$(GNULIB_MDA_MKDIR)/g' \
+             -e 's/@''GNULIB_MDA_UMASK''@/$(GNULIB_MDA_UMASK)/g' \
              -e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \
              -e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \
              -e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \
+             -e 's|@''HAVE_GETUMASK''@|$(HAVE_GETUMASK)|g' \
              -e 's|@''HAVE_LCHMOD''@|$(HAVE_LCHMOD)|g' \
              -e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \
              -e 's|@''HAVE_MKDIRAT''@|$(HAVE_MKDIRAT)|g' \
@@ -2375,7 +2477,9 @@ sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNU
              -e 's|@''REPLACE_LSTAT''@|$(REPLACE_LSTAT)|g' \
              -e 's|@''REPLACE_MKDIR''@|$(REPLACE_MKDIR)|g' \
              -e 's|@''REPLACE_MKFIFO''@|$(REPLACE_MKFIFO)|g' \
+             -e 's|@''REPLACE_MKFIFOAT''@|$(REPLACE_MKFIFOAT)|g' \
              -e 's|@''REPLACE_MKNOD''@|$(REPLACE_MKNOD)|g' \
+             -e 's|@''REPLACE_MKNODAT''@|$(REPLACE_MKNODAT)|g' \
              -e 's|@''REPLACE_STAT''@|$(REPLACE_STAT)|g' \
              -e 's|@''REPLACE_UTIMENSAT''@|$(REPLACE_UTIMENSAT)|g' \
              -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
@@ -2512,15 +2616,17 @@ time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
              -e 's/@''GNULIB_STRFTIME''@/$(GNULIB_STRFTIME)/g' \
              -e 's/@''GNULIB_STRPTIME''@/$(GNULIB_STRPTIME)/g' \
              -e 's/@''GNULIB_TIMEGM''@/$(GNULIB_TIMEGM)/g' \
+             -e 's/@''GNULIB_TIMESPEC_GET''@/$(GNULIB_TIMESPEC_GET)/g' \
              -e 's/@''GNULIB_TIME_R''@/$(GNULIB_TIME_R)/g' \
              -e 's/@''GNULIB_TIME_RZ''@/$(GNULIB_TIME_RZ)/g' \
              -e 's/@''GNULIB_TZSET''@/$(GNULIB_TZSET)/g' \
+             -e 's/@''GNULIB_MDA_TZSET''@/$(GNULIB_MDA_TZSET)/g' \
              -e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \
              -e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \
              -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \
              -e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \
+             -e 's|@''HAVE_TIMESPEC_GET''@|$(HAVE_TIMESPEC_GET)|g' \
              -e 's|@''HAVE_TIMEZONE_T''@|$(HAVE_TIMEZONE_T)|g' \
-             -e 's|@''HAVE_TZSET''@|$(HAVE_TZSET)|g' \
              -e 's|@''REPLACE_CTIME''@|$(REPLACE_CTIME)|g' \
              -e 's|@''REPLACE_GMTIME''@|$(REPLACE_GMTIME)|g' \
              -e 's|@''REPLACE_LOCALTIME''@|$(REPLACE_LOCALTIME)|g' \
@@ -2534,6 +2640,7 @@ time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
              -e 's|@''SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
              -e 's|@''TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
              -e 's|@''UNISTD_H_DEFINES_STRUCT_TIMESPEC''@|$(UNISTD_H_DEFINES_STRUCT_TIMESPEC)|g' \
+             -e 's|@''TIME_H_DEFINES_TIME_UTC''@|$(TIME_H_DEFINES_TIME_UTC)|g' \
              -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
              -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
              -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
@@ -2582,6 +2689,13 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's/@''GNULIB_DUP3''@/$(GNULIB_DUP3)/g' \
              -e 's/@''GNULIB_ENVIRON''@/$(GNULIB_ENVIRON)/g' \
              -e 's/@''GNULIB_EUIDACCESS''@/$(GNULIB_EUIDACCESS)/g' \
+             -e 's/@''GNULIB_EXECL''@/$(GNULIB_EXECL)/g' \
+             -e 's/@''GNULIB_EXECLE''@/$(GNULIB_EXECLE)/g' \
+             -e 's/@''GNULIB_EXECLP''@/$(GNULIB_EXECLP)/g' \
+             -e 's/@''GNULIB_EXECV''@/$(GNULIB_EXECV)/g' \
+             -e 's/@''GNULIB_EXECVE''@/$(GNULIB_EXECVE)/g' \
+             -e 's/@''GNULIB_EXECVP''@/$(GNULIB_EXECVP)/g' \
+             -e 's/@''GNULIB_EXECVPE''@/$(GNULIB_EXECVPE)/g' \
              -e 's/@''GNULIB_FACCESSAT''@/$(GNULIB_FACCESSAT)/g' \
              -e 's/@''GNULIB_FCHDIR''@/$(GNULIB_FCHDIR)/g' \
              -e 's/@''GNULIB_FCHOWNAT''@/$(GNULIB_FCHOWNAT)/g' \
@@ -2627,12 +2741,33 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's/@''GNULIB_UNLINKAT''@/$(GNULIB_UNLINKAT)/g' \
              -e 's/@''GNULIB_USLEEP''@/$(GNULIB_USLEEP)/g' \
              -e 's/@''GNULIB_WRITE''@/$(GNULIB_WRITE)/g' \
+             -e 's/@''GNULIB_MDA_ACCESS''@/$(GNULIB_MDA_ACCESS)/g' \
+             -e 's/@''GNULIB_MDA_CHDIR''@/$(GNULIB_MDA_CHDIR)/g' \
+             -e 's/@''GNULIB_MDA_CLOSE''@/$(GNULIB_MDA_CLOSE)/g' \
+             -e 's/@''GNULIB_MDA_DUP''@/$(GNULIB_MDA_DUP)/g' \
+             -e 's/@''GNULIB_MDA_DUP2''@/$(GNULIB_MDA_DUP2)/g' \
+             -e 's/@''GNULIB_MDA_EXECL''@/$(GNULIB_MDA_EXECL)/g' \
+             -e 's/@''GNULIB_MDA_EXECLE''@/$(GNULIB_MDA_EXECLE)/g' \
+             -e 's/@''GNULIB_MDA_EXECLP''@/$(GNULIB_MDA_EXECLP)/g' \
+             -e 's/@''GNULIB_MDA_EXECV''@/$(GNULIB_MDA_EXECV)/g' \
+             -e 's/@''GNULIB_MDA_EXECVE''@/$(GNULIB_MDA_EXECVE)/g' \
+             -e 's/@''GNULIB_MDA_EXECVP''@/$(GNULIB_MDA_EXECVP)/g' \
+             -e 's/@''GNULIB_MDA_EXECVPE''@/$(GNULIB_MDA_EXECVPE)/g' \
+             -e 's/@''GNULIB_MDA_GETCWD''@/$(GNULIB_MDA_GETCWD)/g' \
+             -e 's/@''GNULIB_MDA_GETPID''@/$(GNULIB_MDA_GETPID)/g' \
+             -e 's/@''GNULIB_MDA_ISATTY''@/$(GNULIB_MDA_ISATTY)/g' \
+             -e 's/@''GNULIB_MDA_LSEEK''@/$(GNULIB_MDA_LSEEK)/g' \
+             -e 's/@''GNULIB_MDA_READ''@/$(GNULIB_MDA_READ)/g' \
+             -e 's/@''GNULIB_MDA_RMDIR''@/$(GNULIB_MDA_RMDIR)/g' \
+             -e 's/@''GNULIB_MDA_SWAB''@/$(GNULIB_MDA_SWAB)/g' \
+             -e 's/@''GNULIB_MDA_UNLINK''@/$(GNULIB_MDA_UNLINK)/g' \
+             -e 's/@''GNULIB_MDA_WRITE''@/$(GNULIB_MDA_WRITE)/g' \
              < $(srcdir)/unistd.in.h | \
          sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \
              -e 's|@''HAVE_COPY_FILE_RANGE''@|$(HAVE_COPY_FILE_RANGE)|g' \
-             -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \
              -e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \
              -e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \
+             -e 's|@''HAVE_EXECVPE''@|$(HAVE_EXECVPE)|g' \
              -e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \
              -e 's|@''HAVE_FCHDIR''@|$(HAVE_FCHDIR)|g' \
              -e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \
@@ -2662,6 +2797,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \
              -e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \
              -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \
+             -e 's|@''HAVE_DECL_EXECVPE''@|$(HAVE_DECL_EXECVPE)|g' \
              -e 's|@''HAVE_DECL_FCHDIR''@|$(HAVE_DECL_FCHDIR)|g' \
              -e 's|@''HAVE_DECL_FDATASYNC''@|$(HAVE_DECL_FDATASYNC)|g' \
              -e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' \
@@ -2680,6 +2816,13 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \
              -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \
              -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \
+             -e 's|@''REPLACE_EXECL''@|$(REPLACE_EXECL)|g' \
+             -e 's|@''REPLACE_EXECLE''@|$(REPLACE_EXECLE)|g' \
+             -e 's|@''REPLACE_EXECLP''@|$(REPLACE_EXECLP)|g' \
+             -e 's|@''REPLACE_EXECV''@|$(REPLACE_EXECV)|g' \
+             -e 's|@''REPLACE_EXECVE''@|$(REPLACE_EXECVE)|g' \
+             -e 's|@''REPLACE_EXECVP''@|$(REPLACE_EXECVP)|g' \
+             -e 's|@''REPLACE_EXECVPE''@|$(REPLACE_EXECVPE)|g' \
              -e 's|@''REPLACE_FACCESSAT''@|$(REPLACE_FACCESSAT)|g' \
              -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \
              -e 's|@''REPLACE_FTRUNCATE''@|$(REPLACE_FTRUNCATE)|g' \
@@ -2814,6 +2957,7 @@ wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
              -e 's/@''GNULIB_WCSTOK''@/$(GNULIB_WCSTOK)/g' \
              -e 's/@''GNULIB_WCSWIDTH''@/$(GNULIB_WCSWIDTH)/g' \
              -e 's/@''GNULIB_WCSFTIME''@/$(GNULIB_WCSFTIME)/g' \
+             -e 's/@''GNULIB_MDA_WCSDUP''@/$(GNULIB_MDA_WCSDUP)/g' \
              < $(srcdir)/wchar.in.h | \
          sed -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \
              -e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \
@@ -2856,6 +3000,7 @@ wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
              -e 's|@''HAVE_WCSWIDTH''@|$(HAVE_WCSWIDTH)|g' \
              -e 's|@''HAVE_WCSFTIME''@|$(HAVE_WCSFTIME)|g' \
              -e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \
+             -e 's|@''HAVE_DECL_WCSDUP''@|$(HAVE_DECL_WCSDUP)|g' \
              -e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \
          | \
          sed -e 's|@''REPLACE_MBSTATE_T''@|$(REPLACE_MBSTATE_T)|g' \
index 476cde8dd57ee2b8ce5899533cfda81d0256935f..224a51764196cb4d3b1f063fd530bef16ce5f674 100644 (file)
@@ -14,7 +14,7 @@
 
 @SET_MAKE@
 
-# Copyright (C) 2002-2020 Free Software Foundation, Inc.
+# Copyright (C) 2002-2021 Free Software Foundation, Inc.
 #
 # 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
@@ -178,6 +178,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \
        $(top_srcdir)/import/m4/builtin-expect.m4 \
        $(top_srcdir)/import/m4/canonicalize.m4 \
        $(top_srcdir)/import/m4/chdir-long.m4 \
+       $(top_srcdir)/import/m4/clock_time.m4 \
        $(top_srcdir)/import/m4/close.m4 \
        $(top_srcdir)/import/m4/closedir.m4 \
        $(top_srcdir)/import/m4/codeset.m4 \
@@ -186,7 +187,6 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \
        $(top_srcdir)/import/m4/d-type.m4 \
        $(top_srcdir)/import/m4/dirent_h.m4 \
        $(top_srcdir)/import/m4/dirfd.m4 \
-       $(top_srcdir)/import/m4/dirname.m4 \
        $(top_srcdir)/import/m4/double-slash-root.m4 \
        $(top_srcdir)/import/m4/dup.m4 $(top_srcdir)/import/m4/dup2.m4 \
        $(top_srcdir)/import/m4/eealloc.m4 \
@@ -208,6 +208,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \
        $(top_srcdir)/import/m4/fnmatch.m4 \
        $(top_srcdir)/import/m4/fnmatch_h.m4 \
        $(top_srcdir)/import/m4/fpieee.m4 \
+       $(top_srcdir)/import/m4/free.m4 \
        $(top_srcdir)/import/m4/frexp.m4 \
        $(top_srcdir)/import/m4/frexpl.m4 \
        $(top_srcdir)/import/m4/fstat.m4 \
@@ -228,7 +229,6 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \
        $(top_srcdir)/import/m4/gnulib-comp.m4 \
        $(top_srcdir)/import/m4/include_next.m4 \
        $(top_srcdir)/import/m4/inet_ntop.m4 \
-       $(top_srcdir)/import/m4/inttypes-pri.m4 \
        $(top_srcdir)/import/m4/inttypes.m4 \
        $(top_srcdir)/import/m4/isblank.m4 \
        $(top_srcdir)/import/m4/isnand.m4 \
@@ -240,7 +240,6 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \
        $(top_srcdir)/import/m4/locale-ja.m4 \
        $(top_srcdir)/import/m4/locale-zh.m4 \
        $(top_srcdir)/import/m4/locale_h.m4 \
-       $(top_srcdir)/import/m4/localtime-buffer.m4 \
        $(top_srcdir)/import/m4/lock.m4 \
        $(top_srcdir)/import/m4/lstat.m4 \
        $(top_srcdir)/import/m4/malloc.m4 \
@@ -273,6 +272,8 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \
        $(top_srcdir)/import/m4/openat.m4 \
        $(top_srcdir)/import/m4/opendir.m4 \
        $(top_srcdir)/import/m4/pathmax.m4 \
+       $(top_srcdir)/import/m4/pid_t.m4 \
+       $(top_srcdir)/import/m4/pipe.m4 \
        $(top_srcdir)/import/m4/pthread_rwlock_rdlock.m4 \
        $(top_srcdir)/import/m4/rawmemchr.m4 \
        $(top_srcdir)/import/m4/readdir.m4 \
@@ -341,15 +342,16 @@ am__v_AR_1 =
 libgnu_a_AR = $(AR) $(ARFLAGS)
 am__DEPENDENCIES_1 =
 am__dirstamp = $(am__leading_dot)dirstamp
-am_libgnu_a_OBJECTS = openat-proc.$(OBJEXT) cloexec.$(OBJEXT) \
-       count-one-bits.$(OBJEXT) dirname-lgpl.$(OBJEXT) \
-       basename-lgpl.$(OBJEXT) stripslash.$(OBJEXT) \
-       exitfail.$(OBJEXT) fd-hook.$(OBJEXT) fd-safer-flag.$(OBJEXT) \
+am_libgnu_a_OBJECTS = openat-proc.$(OBJEXT) basename-lgpl.$(OBJEXT) \
+       cloexec.$(OBJEXT) count-one-bits.$(OBJEXT) \
+       dirname-lgpl.$(OBJEXT) stripslash.$(OBJEXT) exitfail.$(OBJEXT) \
+       fd-hook.$(OBJEXT) fd-safer-flag.$(OBJEXT) \
        dup-safer-flag.$(OBJEXT) filenamecat-lgpl.$(OBJEXT) \
        getprogname.$(OBJEXT) hard-locale.$(OBJEXT) \
        localcharset.$(OBJEXT) glthread/lock.$(OBJEXT) \
        malloca.$(OBJEXT) math.$(OBJEXT) openat-die.$(OBJEXT) \
-       save-cwd.$(OBJEXT) malloc/scratch_buffer_grow.$(OBJEXT) \
+       save-cwd.$(OBJEXT) malloc/scratch_buffer_dupfree.$(OBJEXT) \
+       malloc/scratch_buffer_grow.$(OBJEXT) \
        malloc/scratch_buffer_grow_preserve.$(OBJEXT) \
        malloc/scratch_buffer_set_array_size.$(OBJEXT) \
        setlocale_null.$(OBJEXT) stat-time.$(OBJEXT) \
@@ -477,6 +479,7 @@ GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@
 GNULIB_ACCESS = @GNULIB_ACCESS@
 GNULIB_ACOSF = @GNULIB_ACOSF@
 GNULIB_ACOSL = @GNULIB_ACOSL@
+GNULIB_ALIGNED_ALLOC = @GNULIB_ALIGNED_ALLOC@
 GNULIB_ALPHASORT = @GNULIB_ALPHASORT@
 GNULIB_ASINF = @GNULIB_ASINF@
 GNULIB_ASINL = @GNULIB_ASINL@
@@ -516,6 +519,13 @@ GNULIB_DUP3 = @GNULIB_DUP3@
 GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
 GNULIB_ENVIRON = @GNULIB_ENVIRON@
 GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
+GNULIB_EXECL = @GNULIB_EXECL@
+GNULIB_EXECLE = @GNULIB_EXECLE@
+GNULIB_EXECLP = @GNULIB_EXECLP@
+GNULIB_EXECV = @GNULIB_EXECV@
+GNULIB_EXECVE = @GNULIB_EXECVE@
+GNULIB_EXECVP = @GNULIB_EXECVP@
+GNULIB_EXECVPE = @GNULIB_EXECVPE@
 GNULIB_EXP2 = @GNULIB_EXP2@
 GNULIB_EXP2F = @GNULIB_EXP2F@
 GNULIB_EXP2L = @GNULIB_EXP2L@
@@ -558,6 +568,7 @@ GNULIB_FPURGE = @GNULIB_FPURGE@
 GNULIB_FPUTC = @GNULIB_FPUTC@
 GNULIB_FPUTS = @GNULIB_FPUTS@
 GNULIB_FREAD = @GNULIB_FREAD@
+GNULIB_FREE_POSIX = @GNULIB_FREE_POSIX@
 GNULIB_FREOPEN = @GNULIB_FREOPEN@
 GNULIB_FREXP = @GNULIB_FREXP@
 GNULIB_FREXPF = @GNULIB_FREXPF@
@@ -595,6 +606,7 @@ GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@
 GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@
 GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
 GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
+GNULIB_GETUMASK = @GNULIB_GETUMASK@
 GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
 GNULIB_GLOB = @GNULIB_GLOB@
 GNULIB_GRANTPT = @GNULIB_GRANTPT@
@@ -669,10 +681,58 @@ GNULIB_MBSSPN = @GNULIB_MBSSPN@
 GNULIB_MBSSTR = @GNULIB_MBSSTR@
 GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
 GNULIB_MBTOWC = @GNULIB_MBTOWC@
+GNULIB_MDA_ACCESS = @GNULIB_MDA_ACCESS@
+GNULIB_MDA_CHDIR = @GNULIB_MDA_CHDIR@
+GNULIB_MDA_CHMOD = @GNULIB_MDA_CHMOD@
+GNULIB_MDA_CLOSE = @GNULIB_MDA_CLOSE@
+GNULIB_MDA_CREAT = @GNULIB_MDA_CREAT@
+GNULIB_MDA_DUP = @GNULIB_MDA_DUP@
+GNULIB_MDA_DUP2 = @GNULIB_MDA_DUP2@
+GNULIB_MDA_ECVT = @GNULIB_MDA_ECVT@
+GNULIB_MDA_EXECL = @GNULIB_MDA_EXECL@
+GNULIB_MDA_EXECLE = @GNULIB_MDA_EXECLE@
+GNULIB_MDA_EXECLP = @GNULIB_MDA_EXECLP@
+GNULIB_MDA_EXECV = @GNULIB_MDA_EXECV@
+GNULIB_MDA_EXECVE = @GNULIB_MDA_EXECVE@
+GNULIB_MDA_EXECVP = @GNULIB_MDA_EXECVP@
+GNULIB_MDA_EXECVPE = @GNULIB_MDA_EXECVPE@
+GNULIB_MDA_FCLOSEALL = @GNULIB_MDA_FCLOSEALL@
+GNULIB_MDA_FCVT = @GNULIB_MDA_FCVT@
+GNULIB_MDA_FDOPEN = @GNULIB_MDA_FDOPEN@
+GNULIB_MDA_FILENO = @GNULIB_MDA_FILENO@
+GNULIB_MDA_GCVT = @GNULIB_MDA_GCVT@
+GNULIB_MDA_GETCWD = @GNULIB_MDA_GETCWD@
+GNULIB_MDA_GETPID = @GNULIB_MDA_GETPID@
+GNULIB_MDA_GETW = @GNULIB_MDA_GETW@
+GNULIB_MDA_ISATTY = @GNULIB_MDA_ISATTY@
+GNULIB_MDA_J0 = @GNULIB_MDA_J0@
+GNULIB_MDA_J1 = @GNULIB_MDA_J1@
+GNULIB_MDA_JN = @GNULIB_MDA_JN@
+GNULIB_MDA_LSEEK = @GNULIB_MDA_LSEEK@
+GNULIB_MDA_MEMCCPY = @GNULIB_MDA_MEMCCPY@
+GNULIB_MDA_MKDIR = @GNULIB_MDA_MKDIR@
+GNULIB_MDA_MKTEMP = @GNULIB_MDA_MKTEMP@
+GNULIB_MDA_OPEN = @GNULIB_MDA_OPEN@
+GNULIB_MDA_PUTENV = @GNULIB_MDA_PUTENV@
+GNULIB_MDA_PUTW = @GNULIB_MDA_PUTW@
+GNULIB_MDA_READ = @GNULIB_MDA_READ@
+GNULIB_MDA_RMDIR = @GNULIB_MDA_RMDIR@
+GNULIB_MDA_STRDUP = @GNULIB_MDA_STRDUP@
+GNULIB_MDA_SWAB = @GNULIB_MDA_SWAB@
+GNULIB_MDA_TEMPNAM = @GNULIB_MDA_TEMPNAM@
+GNULIB_MDA_TZSET = @GNULIB_MDA_TZSET@
+GNULIB_MDA_UMASK = @GNULIB_MDA_UMASK@
+GNULIB_MDA_UNLINK = @GNULIB_MDA_UNLINK@
+GNULIB_MDA_WCSDUP = @GNULIB_MDA_WCSDUP@
+GNULIB_MDA_WRITE = @GNULIB_MDA_WRITE@
+GNULIB_MDA_Y0 = @GNULIB_MDA_Y0@
+GNULIB_MDA_Y1 = @GNULIB_MDA_Y1@
+GNULIB_MDA_YN = @GNULIB_MDA_YN@
 GNULIB_MEMCHR = @GNULIB_MEMCHR@
 GNULIB_MEMMEM = @GNULIB_MEMMEM@
 GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
 GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
+GNULIB_MKDIR = @GNULIB_MKDIR@
 GNULIB_MKDIRAT = @GNULIB_MKDIRAT@
 GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
 GNULIB_MKFIFO = @GNULIB_MKFIFO@
@@ -701,6 +761,7 @@ GNULIB_PERROR = @GNULIB_PERROR@
 GNULIB_PIPE = @GNULIB_PIPE@
 GNULIB_PIPE2 = @GNULIB_PIPE2@
 GNULIB_POPEN = @GNULIB_POPEN@
+GNULIB_POSIX_MEMALIGN = @GNULIB_POSIX_MEMALIGN@
 GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@
 GNULIB_POWF = @GNULIB_POWF@
 GNULIB_PREAD = @GNULIB_PREAD@
@@ -754,7 +815,9 @@ GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
 GNULIB_SETLOCALE_NULL = @GNULIB_SETLOCALE_NULL@
 GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@
 GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@
+GNULIB_SIGABBREV_NP = @GNULIB_SIGABBREV_NP@
 GNULIB_SIGACTION = @GNULIB_SIGACTION@
+GNULIB_SIGDESCR_NP = @GNULIB_SIGDESCR_NP@
 GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@
 GNULIB_SIGNBIT = @GNULIB_SIGNBIT@
 GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@
@@ -776,6 +839,7 @@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
 GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
 GNULIB_STRDUP = @GNULIB_STRDUP@
 GNULIB_STRERROR = @GNULIB_STRERROR@
+GNULIB_STRERRORNAME_NP = @GNULIB_STRERRORNAME_NP@
 GNULIB_STRERROR_R = @GNULIB_STRERROR_R@
 GNULIB_STRFTIME = @GNULIB_STRFTIME@
 GNULIB_STRNCAT = @GNULIB_STRNCAT@
@@ -801,6 +865,7 @@ GNULIB_TANF = @GNULIB_TANF@
 GNULIB_TANHF = @GNULIB_TANHF@
 GNULIB_TANL = @GNULIB_TANL@
 GNULIB_TIMEGM = @GNULIB_TIMEGM@
+GNULIB_TIMESPEC_GET = @GNULIB_TIMESPEC_GET@
 GNULIB_TIME_R = @GNULIB_TIME_R@
 GNULIB_TIME_RZ = @GNULIB_TIME_RZ@
 GNULIB_TMPFILE = @GNULIB_TMPFILE@
@@ -873,6 +938,7 @@ GREP = @GREP@
 HAVE_ACCEPT4 = @HAVE_ACCEPT4@
 HAVE_ACOSF = @HAVE_ACOSF@
 HAVE_ACOSL = @HAVE_ACOSL@
+HAVE_ALIGNED_ALLOC = @HAVE_ALIGNED_ALLOC@
 HAVE_ALLOCA_H = @HAVE_ALLOCA_H@
 HAVE_ALPHASORT = @HAVE_ALPHASORT@
 HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@
@@ -907,13 +973,17 @@ HAVE_DECL_CEILL = @HAVE_DECL_CEILL@
 HAVE_DECL_COPYSIGNF = @HAVE_DECL_COPYSIGNF@
 HAVE_DECL_COSL = @HAVE_DECL_COSL@
 HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@
+HAVE_DECL_ECVT = @HAVE_DECL_ECVT@
 HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
+HAVE_DECL_EXECVPE = @HAVE_DECL_EXECVPE@
 HAVE_DECL_EXP2 = @HAVE_DECL_EXP2@
 HAVE_DECL_EXP2F = @HAVE_DECL_EXP2F@
 HAVE_DECL_EXP2L = @HAVE_DECL_EXP2L@
 HAVE_DECL_EXPL = @HAVE_DECL_EXPL@
 HAVE_DECL_EXPM1L = @HAVE_DECL_EXPM1L@
 HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
+HAVE_DECL_FCLOSEALL = @HAVE_DECL_FCLOSEALL@
+HAVE_DECL_FCVT = @HAVE_DECL_FCVT@
 HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@
 HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@
 HAVE_DECL_FLOORF = @HAVE_DECL_FLOORF@
@@ -922,6 +992,7 @@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@
 HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@
 HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@
 HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@
+HAVE_DECL_GCVT = @HAVE_DECL_GCVT@
 HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
 HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@
 HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
@@ -974,14 +1045,15 @@ HAVE_DECL_TRUNCL = @HAVE_DECL_TRUNCL@
 HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@
 HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@
 HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
+HAVE_DECL_WCSDUP = @HAVE_DECL_WCSDUP@
 HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@
 HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
 HAVE_DIRENT_H = @HAVE_DIRENT_H@
 HAVE_DPRINTF = @HAVE_DPRINTF@
-HAVE_DUP2 = @HAVE_DUP2@
 HAVE_DUP3 = @HAVE_DUP3@
 HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
 HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
+HAVE_EXECVPE = @HAVE_EXECVPE@
 HAVE_EXPF = @HAVE_EXPF@
 HAVE_EXPL = @HAVE_EXPL@
 HAVE_EXPLICIT_BZERO = @HAVE_EXPLICIT_BZERO@
@@ -1024,6 +1096,7 @@ HAVE_GETPASS = @HAVE_GETPASS@
 HAVE_GETRANDOM = @HAVE_GETRANDOM@
 HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
 HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@
+HAVE_GETUMASK = @HAVE_GETUMASK@
 HAVE_GLOB = @HAVE_GLOB@
 HAVE_GLOB_H = @HAVE_GLOB_H@
 HAVE_GLOB_PATTERN_P = @HAVE_GLOB_PATTERN_P@
@@ -1066,7 +1139,6 @@ HAVE_MBSLEN = @HAVE_MBSLEN@
 HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@
 HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@
 HAVE_MBTOWC = @HAVE_MBTOWC@
-HAVE_MEMCHR = @HAVE_MEMCHR@
 HAVE_MEMPCPY = @HAVE_MEMPCPY@
 HAVE_MKDIRAT = @HAVE_MKDIRAT@
 HAVE_MKDTEMP = @HAVE_MKDTEMP@
@@ -1091,6 +1163,7 @@ HAVE_PCLOSE = @HAVE_PCLOSE@
 HAVE_PIPE = @HAVE_PIPE@
 HAVE_PIPE2 = @HAVE_PIPE2@
 HAVE_POPEN = @HAVE_POPEN@
+HAVE_POSIX_MEMALIGN = @HAVE_POSIX_MEMALIGN@
 HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@
 HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@
 HAVE_POWF = @HAVE_POWF@
@@ -1124,7 +1197,9 @@ HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@
 HAVE_SETENV = @HAVE_SETENV@
 HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@
 HAVE_SETSTATE = @HAVE_SETSTATE@
+HAVE_SIGABBREV_NP = @HAVE_SIGABBREV_NP@
 HAVE_SIGACTION = @HAVE_SIGACTION@
+HAVE_SIGDESCR_NP = @HAVE_SIGDESCR_NP@
 HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@
 HAVE_SIGINFO_T = @HAVE_SIGINFO_T@
 HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
@@ -1142,6 +1217,7 @@ HAVE_STPCPY = @HAVE_STPCPY@
 HAVE_STPNCPY = @HAVE_STPNCPY@
 HAVE_STRCASESTR = @HAVE_STRCASESTR@
 HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
+HAVE_STRERRORNAME_NP = @HAVE_STRERRORNAME_NP@
 HAVE_STRPBRK = @HAVE_STRPBRK@
 HAVE_STRPTIME = @HAVE_STRPTIME@
 HAVE_STRSEP = @HAVE_STRSEP@
@@ -1170,9 +1246,9 @@ HAVE_TANF = @HAVE_TANF@
 HAVE_TANHF = @HAVE_TANHF@
 HAVE_TANL = @HAVE_TANL@
 HAVE_TIMEGM = @HAVE_TIMEGM@
+HAVE_TIMESPEC_GET = @HAVE_TIMESPEC_GET@
 HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@
 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@
-HAVE_TZSET = @HAVE_TZSET@
 HAVE_UNISTD_H = @HAVE_UNISTD_H@
 HAVE_UNLINKAT = @HAVE_UNLINKAT@
 HAVE_UNLOCKPT = @HAVE_UNLOCKPT@
@@ -1247,6 +1323,7 @@ LIBPTHREAD = @LIBPTHREAD@
 LIBS = @LIBS@
 LIBSTDTHREAD = @LIBSTDTHREAD@
 LIBTHREAD = @LIBTHREAD@
+LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
 LIB_GETLOGIN = @LIB_GETLOGIN@
 LIB_GETRANDOM = @LIB_GETRANDOM@
 LIB_HARD_LOCALE = @LIB_HARD_LOCALE@
@@ -1338,12 +1415,12 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
 PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
 PRIPTR_PREFIX = @PRIPTR_PREFIX@
-PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
 PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
 PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
 RANLIB = @RANLIB@
 REPLACE_ACCESS = @REPLACE_ACCESS@
 REPLACE_ACOSF = @REPLACE_ACOSF@
+REPLACE_ALIGNED_ALLOC = @REPLACE_ALIGNED_ALLOC@
 REPLACE_ASINF = @REPLACE_ASINF@
 REPLACE_ATAN2F = @REPLACE_ATAN2F@
 REPLACE_ATANF = @REPLACE_ATANF@
@@ -1367,6 +1444,13 @@ REPLACE_DPRINTF = @REPLACE_DPRINTF@
 REPLACE_DUP = @REPLACE_DUP@
 REPLACE_DUP2 = @REPLACE_DUP2@
 REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
+REPLACE_EXECL = @REPLACE_EXECL@
+REPLACE_EXECLE = @REPLACE_EXECLE@
+REPLACE_EXECLP = @REPLACE_EXECLP@
+REPLACE_EXECV = @REPLACE_EXECV@
+REPLACE_EXECVE = @REPLACE_EXECVE@
+REPLACE_EXECVP = @REPLACE_EXECVP@
+REPLACE_EXECVPE = @REPLACE_EXECVPE@
 REPLACE_EXP2 = @REPLACE_EXP2@
 REPLACE_EXP2L = @REPLACE_EXP2L@
 REPLACE_EXPF = @REPLACE_EXPF@
@@ -1383,6 +1467,7 @@ REPLACE_FCNTL = @REPLACE_FCNTL@
 REPLACE_FDOPEN = @REPLACE_FDOPEN@
 REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@
 REPLACE_FFLUSH = @REPLACE_FFLUSH@
+REPLACE_FFSLL = @REPLACE_FFSLL@
 REPLACE_FLOOR = @REPLACE_FLOOR@
 REPLACE_FLOORF = @REPLACE_FLOORF@
 REPLACE_FLOORL = @REPLACE_FLOORL@
@@ -1396,6 +1481,7 @@ REPLACE_FNMATCH = @REPLACE_FNMATCH@
 REPLACE_FOPEN = @REPLACE_FOPEN@
 REPLACE_FPRINTF = @REPLACE_FPRINTF@
 REPLACE_FPURGE = @REPLACE_FPURGE@
+REPLACE_FREE = @REPLACE_FREE@
 REPLACE_FREELOCALE = @REPLACE_FREELOCALE@
 REPLACE_FREOPEN = @REPLACE_FREOPEN@
 REPLACE_FREXP = @REPLACE_FREXP@
@@ -1478,7 +1564,9 @@ REPLACE_MEMCHR = @REPLACE_MEMCHR@
 REPLACE_MEMMEM = @REPLACE_MEMMEM@
 REPLACE_MKDIR = @REPLACE_MKDIR@
 REPLACE_MKFIFO = @REPLACE_MKFIFO@
+REPLACE_MKFIFOAT = @REPLACE_MKFIFOAT@
 REPLACE_MKNOD = @REPLACE_MKNOD@
+REPLACE_MKNODAT = @REPLACE_MKNODAT@
 REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
 REPLACE_MKTIME = @REPLACE_MKTIME@
 REPLACE_MODF = @REPLACE_MODF@
@@ -1494,6 +1582,7 @@ REPLACE_OPENAT = @REPLACE_OPENAT@
 REPLACE_OPENDIR = @REPLACE_OPENDIR@
 REPLACE_PERROR = @REPLACE_PERROR@
 REPLACE_POPEN = @REPLACE_POPEN@
+REPLACE_POSIX_MEMALIGN = @REPLACE_POSIX_MEMALIGN@
 REPLACE_PREAD = @REPLACE_PREAD@
 REPLACE_PRINTF = @REPLACE_PRINTF@
 REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@
@@ -1525,7 +1614,7 @@ REPLACE_SETENV = @REPLACE_SETENV@
 REPLACE_SETLOCALE = @REPLACE_SETLOCALE@
 REPLACE_SETSTATE = @REPLACE_SETSTATE@
 REPLACE_SIGNBIT = @REPLACE_SIGNBIT@
-REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@
+REPLACE_SIGNBIT_USING_BUILTINS = @REPLACE_SIGNBIT_USING_BUILTINS@
 REPLACE_SINF = @REPLACE_SINF@
 REPLACE_SINHF = @REPLACE_SINHF@
 REPLACE_SLEEP = @REPLACE_SLEEP@
@@ -1541,6 +1630,7 @@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
 REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@
 REPLACE_STRDUP = @REPLACE_STRDUP@
 REPLACE_STRERROR = @REPLACE_STRERROR@
+REPLACE_STRERRORNAME_NP = @REPLACE_STRERRORNAME_NP@
 REPLACE_STRERROR_R = @REPLACE_STRERROR_R@
 REPLACE_STRFTIME = @REPLACE_STRFTIME@
 REPLACE_STRNCAT = @REPLACE_STRNCAT@
@@ -1600,6 +1690,7 @@ STDINT_H = @STDINT_H@
 STRIP = @STRIP@
 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
 TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
+TIME_H_DEFINES_TIME_UTC = @TIME_H_DEFINES_TIME_UTC@
 UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@
 UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@
 UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@
@@ -1680,40 +1771,41 @@ noinst_LIBRARIES = libgnu.a
 noinst_LTLIBRARIES = 
 # No GNU Make output.
 EXTRA_DIST = m4/gnulib-cache.m4 alloca.c alloca.in.h arpa_inet.in.h \
-       assure.h attribute.h btowc.c canonicalize-lgpl.c chdir-long.c \
-       chdir-long.h cloexec.h close.c closedir.c dirent-private.h \
-       count-one-bits.h ctype.in.h dirent.in.h dirfd.c dirname.h \
-       dup.c dup2.c errno.in.h error.c error.h exitfail.h fchdir.c \
-       fcntl.c fcntl.in.h fd-hook.h fdopendir.c filename.h \
+       assure.h attribute.h basename-lgpl.h btowc.c \
+       canonicalize-lgpl.c chdir-long.c chdir-long.h cloexec.h \
+       close.c closedir.c dirent-private.h count-one-bits.h \
+       ctype.in.h dirent.in.h dirfd.c dirname.h dup.c dup2.c \
+       eloop-threshold.h errno.in.h error.c error.h exitfail.h \
+       fchdir.c fcntl.c fcntl.in.h fd-hook.h fdopendir.c filename.h \
        filenamecat.h flexmember.h float.c float.in.h itold.c \
-       fnmatch.c fnmatch_loop.c fnmatch.in.h fpucw.h frexp.c frexp.c \
-       frexpl.c fstat.c stat-w32.c stat-w32.h at-func.c fstatat.c \
-       getcwd.c getcwd-lgpl.c getdtablesize.c getlogin_r.c \
-       getrandom.c gettimeofday.c glob.c glob_internal.h \
+       fnmatch.c fnmatch_loop.c fnmatch.c fnmatch.in.h fpucw.h free.c \
+       frexp.c frexp.c frexpl.c fstat.c stat-w32.c stat-w32.h \
+       at-func.c fstatat.c getcwd.c getcwd-lgpl.c getdtablesize.c \
+       getlogin_r.c getrandom.c gettimeofday.c glob.c glob_internal.h \
        glob_pattern_p.c globfree.c glob-libc.h glob.in.h \
        hard-locale.h inet_ntop.c intprops.h inttypes.in.h isblank.c \
        float+.h isnan.c isnand-nolibm.h isnand.c float+.h isnan.c \
        isnanl-nolibm.h isnanl.c cdefs.h libc-config.h limits.in.h \
-       localcharset.h locale.in.h localtime-buffer.c \
-       localtime-buffer.h lstat.c malloc.c malloca.h math.in.h \
-       lc-charset-dispatch.c lc-charset-dispatch.h \
+       localcharset.h locale.in.h lstat.c malloc.c malloca.h \
+       math.in.h lc-charset-dispatch.c lc-charset-dispatch.h \
        mbrtowc-impl-utf8.h mbrtowc-impl.h mbrtowc.c mbtowc-lock.c \
        mbtowc-lock.h windows-initguard.h mbsinit.c mbsrtowcs-impl.h \
        mbsrtowcs-state.c mbsrtowcs.c mbtowc-impl.h mbtowc.c memchr.c \
-       memchr.valgrind memmem.c str-two-way.h mempcpy.c memrchr.c \
-       mkdir.c mkdtemp.c mkostemp.c msvc-inval.c msvc-inval.h \
-       msvc-nothrow.c msvc-nothrow.h netinet_in.in.h open.c openat.c \
-       openat.h dirent-private.h opendir.c pathmax.h rawmemchr.c \
-       rawmemchr.valgrind dirent-private.h readdir.c readlink.c \
-       realloc.c rename.c dirent-private.h rewinddir.c rmdir.c \
-       same-inode.h save-cwd.h malloc/scratch_buffer.h \
-       scratch_buffer.h setenv.c setlocale-lock.c setlocale_null.h \
-       windows-initguard.h signal.in.h _Noreturn.h arg-nonnull.h \
-       c++defs.h warn-on-use.h stat-w32.c stat-w32.h stat.c \
-       stat-time.h stdalign.in.h stdbool.in.h stddef.in.h stdint.in.h \
-       stdio.in.h stdlib.in.h strchrnul.c strchrnul.valgrind strdup.c \
-       streq.h strerror.c strerror-override.c strerror-override.h \
-       strerror_r.c string.in.h strnlen.c str-two-way.h strstr.c \
+       memchr.valgrind memmem.c memmem.c str-two-way.h mempcpy.c \
+       memrchr.c mkdir.c mkdtemp.c mkostemp.c msvc-inval.c \
+       msvc-inval.h msvc-nothrow.c msvc-nothrow.h netinet_in.in.h \
+       open.c openat.c openat.h dirent-private.h opendir.c pathmax.h \
+       pipe.c rawmemchr.c rawmemchr.valgrind dirent-private.h \
+       readdir.c readlink.c realloc.c rename.c dirent-private.h \
+       rewinddir.c rmdir.c same-inode.h save-cwd.h \
+       malloc/scratch_buffer.h scratch_buffer.h setenv.c \
+       setlocale-lock.c setlocale_null.h windows-initguard.h \
+       signal.in.h _Noreturn.h arg-nonnull.h c++defs.h warn-on-use.h \
+       stat-w32.c stat-w32.h stat.c stat-time.h stdalign.in.h \
+       stdbool.in.h stddef.in.h stdint.in.h stdio.in.h stdlib.in.h \
+       strchrnul.c strchrnul.valgrind strdup.c streq.h strerror.c \
+       strerror-override.c strerror-override.h strerror_r.c \
+       string.in.h strnlen.c strstr.c str-two-way.h strstr.c \
        strtok_r.c sys_random.in.h sys_socket.in.h sys_stat.in.h \
        sys_time.in.h sys_types.in.h sys_uio.in.h tempname.h time.in.h \
        time_r.c unistd.in.h unistd--.h unistd-safer.h unsetenv.c \
@@ -1749,12 +1841,13 @@ DISTCLEANFILES =
 MAINTAINERCLEANFILES = 
 AM_CPPFLAGS = 
 AM_CFLAGS = 
-libgnu_a_SOURCES = openat-priv.h openat-proc.c cloexec.c \
-       count-one-bits.c dirname-lgpl.c basename-lgpl.c stripslash.c \
+libgnu_a_SOURCES = openat-priv.h openat-proc.c basename-lgpl.c \
+       cloexec.c count-one-bits.c dirname-lgpl.c stripslash.c \
        exitfail.c fd-hook.c fd-safer-flag.c dup-safer-flag.c \
        filenamecat-lgpl.c getprogname.h getprogname.c gettext.h \
-       hard-locale.c localcharset.c glthread/lock.h glthread/lock.c \
-       malloca.c math.c minmax.h openat-die.c save-cwd.c \
+       hard-locale.c idx.h localcharset.c glthread/lock.h \
+       glthread/lock.c malloca.c math.c minmax.h openat-die.c \
+       save-cwd.c malloc/scratch_buffer_dupfree.c \
        malloc/scratch_buffer_grow.c \
        malloc/scratch_buffer_grow_preserve.c \
        malloc/scratch_buffer_set_array_size.c setlocale_null.c \
@@ -1766,25 +1859,26 @@ libgnu_a_DEPENDENCIES = $(gl_LIBOBJS) @ALLOCA@
 EXTRA_libgnu_a_SOURCES = alloca.c btowc.c canonicalize-lgpl.c \
        chdir-long.c close.c closedir.c dirfd.c dup.c dup2.c error.c \
        fchdir.c fcntl.c fdopendir.c float.c itold.c fnmatch.c \
-       fnmatch_loop.c frexp.c frexp.c frexpl.c fstat.c stat-w32.c \
-       at-func.c fstatat.c getcwd.c getcwd-lgpl.c getdtablesize.c \
-       getlogin_r.c getrandom.c gettimeofday.c glob.c \
+       fnmatch_loop.c fnmatch.c free.c frexp.c frexp.c frexpl.c \
+       fstat.c stat-w32.c at-func.c fstatat.c getcwd.c getcwd-lgpl.c \
+       getdtablesize.c getlogin_r.c getrandom.c gettimeofday.c glob.c \
        glob_pattern_p.c globfree.c inet_ntop.c isblank.c isnan.c \
-       isnand.c isnan.c isnanl.c localtime-buffer.c lstat.c malloc.c \
+       isnand.c isnan.c isnanl.c lstat.c malloc.c \
        lc-charset-dispatch.c mbrtowc.c mbtowc-lock.c mbsinit.c \
        mbsrtowcs-state.c mbsrtowcs.c mbtowc.c memchr.c memmem.c \
-       mempcpy.c memrchr.c mkdir.c mkdtemp.c mkostemp.c msvc-inval.c \
-       msvc-nothrow.c open.c openat.c opendir.c rawmemchr.c readdir.c \
-       readlink.c realloc.c rename.c rewinddir.c rmdir.c setenv.c \
-       setlocale-lock.c stat-w32.c stat.c strchrnul.c strdup.c \
-       strerror.c strerror-override.c strerror_r.c strnlen.c strstr.c \
-       strtok_r.c time_r.c unsetenv.c windows-mutex.c windows-once.c \
-       windows-recmutex.c windows-rwlock.c wmemchr.c wmempcpy.c
+       memmem.c mempcpy.c memrchr.c mkdir.c mkdtemp.c mkostemp.c \
+       msvc-inval.c msvc-nothrow.c open.c openat.c opendir.c pipe.c \
+       rawmemchr.c readdir.c readlink.c realloc.c rename.c \
+       rewinddir.c rmdir.c setenv.c setlocale-lock.c stat-w32.c \
+       stat.c strchrnul.c strdup.c strerror.c strerror-override.c \
+       strerror_r.c strnlen.c strstr.c strstr.c strtok_r.c time_r.c \
+       unsetenv.c windows-mutex.c windows-once.c windows-recmutex.c \
+       windows-rwlock.c wmemchr.c wmempcpy.c
 
 # Use this preprocessor expression to decide whether #include_next works.
 # Do not rely on a 'configure'-time test for this, since the expression
 # might appear in an installed header, which is used by some other compiler.
-HAVE_INCLUDE_NEXT = (__GNUC__ || 60000000 <= __DECC_VER)
+HAVE_INCLUDE_NEXT = (__GNUC__ || __clang__ || 60000000 <= __DECC_VER)
 
 # Because this Makefile snippet defines a variable used by other
 # gnulib Makefile snippets, it must be present in all makefiles that
@@ -1856,6 +1950,8 @@ malloc/$(am__dirstamp):
 malloc/$(DEPDIR)/$(am__dirstamp):
        @$(MKDIR_P) malloc/$(DEPDIR)
        @: > malloc/$(DEPDIR)/$(am__dirstamp)
+malloc/scratch_buffer_dupfree.$(OBJEXT): malloc/$(am__dirstamp) \
+       malloc/$(DEPDIR)/$(am__dirstamp)
 malloc/scratch_buffer_grow.$(OBJEXT): malloc/$(am__dirstamp) \
        malloc/$(DEPDIR)/$(am__dirstamp)
 malloc/scratch_buffer_grow_preserve.$(OBJEXT): malloc/$(am__dirstamp) \
@@ -1917,6 +2013,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/float.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fnmatch.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fnmatch_loop.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/free.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frexp.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frexpl.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstat.Po@am__quote@
@@ -1940,7 +2037,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/itold.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lc-charset-dispatch.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localcharset.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localtime-buffer.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstat.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/malloc.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/malloca.Po@am__quote@
@@ -1966,6 +2062,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openat.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opendir.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pipe-safer.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pipe.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rawmemchr.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readdir.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readlink.Po@am__quote@
@@ -2004,6 +2101,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wmempcpy.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@glthread/$(DEPDIR)/lock.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@glthread/$(DEPDIR)/threadlib.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@malloc/$(DEPDIR)/scratch_buffer_dupfree.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@malloc/$(DEPDIR)/scratch_buffer_grow.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@malloc/$(DEPDIR)/scratch_buffer_grow_preserve.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@malloc/$(DEPDIR)/scratch_buffer_set_array_size.Po@am__quote@
@@ -2391,6 +2489,8 @@ fcntl.h: fcntl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
              -e 's/@''GNULIB_NONBLOCKING''@/$(GNULIB_NONBLOCKING)/g' \
              -e 's/@''GNULIB_OPEN''@/$(GNULIB_OPEN)/g' \
              -e 's/@''GNULIB_OPENAT''@/$(GNULIB_OPENAT)/g' \
+             -e 's/@''GNULIB_MDA_CREAT''@/$(GNULIB_MDA_CREAT)/g' \
+             -e 's/@''GNULIB_MDA_OPEN''@/$(GNULIB_MDA_OPEN)/g' \
              -e 's|@''HAVE_FCNTL''@|$(HAVE_FCNTL)|g' \
              -e 's|@''HAVE_OPENAT''@|$(HAVE_OPENAT)|g' \
              -e 's|@''REPLACE_CREAT''@|$(REPLACE_CREAT)|g' \
@@ -2477,7 +2577,6 @@ inttypes.h: inttypes.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_U
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -e 's|@''NEXT_INTTYPES_H''@|$(NEXT_INTTYPES_H)|g' \
-             -e 's/@''PRI_MACROS_BROKEN''@/$(PRI_MACROS_BROKEN)/g' \
              -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \
              -e 's/@''PRIPTR_PREFIX''@/$(PRIPTR_PREFIX)/g' \
              -e 's/@''GNULIB_IMAXABS''@/$(GNULIB_IMAXABS)/g' \
@@ -2656,6 +2755,12 @@ math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
              -e 's/@''GNULIB_TRUNC''@/$(GNULIB_TRUNC)/g' \
              -e 's/@''GNULIB_TRUNCF''@/$(GNULIB_TRUNCF)/g' \
              -e 's/@''GNULIB_TRUNCL''@/$(GNULIB_TRUNCL)/g' \
+             -e 's/@''GNULIB_MDA_J0''@/$(GNULIB_MDA_J0)/g' \
+             -e 's/@''GNULIB_MDA_J1''@/$(GNULIB_MDA_J1)/g' \
+             -e 's/@''GNULIB_MDA_JN''@/$(GNULIB_MDA_JN)/g' \
+             -e 's/@''GNULIB_MDA_Y0''@/$(GNULIB_MDA_Y0)/g' \
+             -e 's/@''GNULIB_MDA_Y1''@/$(GNULIB_MDA_Y1)/g' \
+             -e 's/@''GNULIB_MDA_YN''@/$(GNULIB_MDA_YN)/g' \
          | \
          sed -e 's|@''HAVE_ACOSF''@|$(HAVE_ACOSF)|g' \
              -e 's|@''HAVE_ACOSL''@|$(HAVE_ACOSL)|g' \
@@ -2824,7 +2929,7 @@ math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
              -e 's|@''REPLACE_ROUNDF''@|$(REPLACE_ROUNDF)|g' \
              -e 's|@''REPLACE_ROUNDL''@|$(REPLACE_ROUNDL)|g' \
              -e 's|@''REPLACE_SIGNBIT''@|$(REPLACE_SIGNBIT)|g' \
-             -e 's|@''REPLACE_SIGNBIT_USING_GCC''@|$(REPLACE_SIGNBIT_USING_GCC)|g' \
+             -e 's|@''REPLACE_SIGNBIT_USING_BUILTINS''@|$(REPLACE_SIGNBIT_USING_BUILTINS)|g' \
              -e 's|@''REPLACE_SINF''@|$(REPLACE_SINF)|g' \
              -e 's|@''REPLACE_SINHF''@|$(REPLACE_SINHF)|g' \
              -e 's|@''REPLACE_SQRTF''@|$(REPLACE_SQRTF)|g' \
@@ -3033,8 +3138,15 @@ stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
              -e 's/@''GNULIB_VPRINTF_POSIX''@/$(GNULIB_VPRINTF_POSIX)/g' \
              -e 's/@''GNULIB_VSNPRINTF''@/$(GNULIB_VSNPRINTF)/g' \
              -e 's/@''GNULIB_VSPRINTF_POSIX''@/$(GNULIB_VSPRINTF_POSIX)/g' \
+             -e 's/@''GNULIB_MDA_FCLOSEALL''@/$(GNULIB_MDA_FCLOSEALL)/g' \
+             -e 's/@''GNULIB_MDA_FDOPEN''@/$(GNULIB_MDA_FDOPEN)/g' \
+             -e 's/@''GNULIB_MDA_FILENO''@/$(GNULIB_MDA_FILENO)/g' \
+             -e 's/@''GNULIB_MDA_GETW''@/$(GNULIB_MDA_GETW)/g' \
+             -e 's/@''GNULIB_MDA_PUTW''@/$(GNULIB_MDA_PUTW)/g' \
+             -e 's/@''GNULIB_MDA_TEMPNAM''@/$(GNULIB_MDA_TEMPNAM)/g' \
              < $(srcdir)/stdio.in.h | \
-         sed -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \
+         sed -e 's|@''HAVE_DECL_FCLOSEALL''@|$(HAVE_DECL_FCLOSEALL)|g' \
+             -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \
              -e 's|@''HAVE_DECL_FSEEKO''@|$(HAVE_DECL_FSEEKO)|g' \
              -e 's|@''HAVE_DECL_FTELLO''@|$(HAVE_DECL_FTELLO)|g' \
              -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \
@@ -3101,9 +3213,11 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \
              -e 's/@''GNULIB__EXIT''@/$(GNULIB__EXIT)/g' \
+             -e 's/@''GNULIB_ALIGNED_ALLOC''@/$(GNULIB_ALIGNED_ALLOC)/g' \
              -e 's/@''GNULIB_ATOLL''@/$(GNULIB_ATOLL)/g' \
              -e 's/@''GNULIB_CALLOC_POSIX''@/$(GNULIB_CALLOC_POSIX)/g' \
              -e 's/@''GNULIB_CANONICALIZE_FILE_NAME''@/$(GNULIB_CANONICALIZE_FILE_NAME)/g' \
+             -e 's/@''GNULIB_FREE_POSIX''@/$(GNULIB_FREE_POSIX)/g' \
              -e 's/@''GNULIB_GETLOADAVG''@/$(GNULIB_GETLOADAVG)/g' \
              -e 's/@''GNULIB_GETSUBOPT''@/$(GNULIB_GETSUBOPT)/g' \
              -e 's/@''GNULIB_GRANTPT''@/$(GNULIB_GRANTPT)/g' \
@@ -3114,6 +3228,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
              -e 's/@''GNULIB_MKOSTEMPS''@/$(GNULIB_MKOSTEMPS)/g' \
              -e 's/@''GNULIB_MKSTEMP''@/$(GNULIB_MKSTEMP)/g' \
              -e 's/@''GNULIB_MKSTEMPS''@/$(GNULIB_MKSTEMPS)/g' \
+             -e 's/@''GNULIB_POSIX_MEMALIGN''@/$(GNULIB_POSIX_MEMALIGN)/g' \
              -e 's/@''GNULIB_POSIX_OPENPT''@/$(GNULIB_POSIX_OPENPT)/g' \
              -e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \
              -e 's/@''GNULIB_PTSNAME_R''@/$(GNULIB_PTSNAME_R)/g' \
@@ -3135,10 +3250,19 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
              -e 's/@''GNULIB_UNLOCKPT''@/$(GNULIB_UNLOCKPT)/g' \
              -e 's/@''GNULIB_UNSETENV''@/$(GNULIB_UNSETENV)/g' \
              -e 's/@''GNULIB_WCTOMB''@/$(GNULIB_WCTOMB)/g' \
+             -e 's/@''GNULIB_MDA_ECVT''@/$(GNULIB_MDA_ECVT)/g' \
+             -e 's/@''GNULIB_MDA_FCVT''@/$(GNULIB_MDA_FCVT)/g' \
+             -e 's/@''GNULIB_MDA_GCVT''@/$(GNULIB_MDA_GCVT)/g' \
+             -e 's/@''GNULIB_MDA_MKTEMP''@/$(GNULIB_MDA_MKTEMP)/g' \
+             -e 's/@''GNULIB_MDA_PUTENV''@/$(GNULIB_MDA_PUTENV)/g' \
              < $(srcdir)/stdlib.in.h | \
          sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \
+             -e 's|@''HAVE_ALIGNED_ALLOC''@|$(HAVE_ALIGNED_ALLOC)|g' \
              -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \
              -e 's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \
+             -e 's|@''HAVE_DECL_ECVT''@|$(HAVE_DECL_ECVT)|g' \
+             -e 's|@''HAVE_DECL_FCVT''@|$(HAVE_DECL_FCVT)|g' \
+             -e 's|@''HAVE_DECL_GCVT''@|$(HAVE_DECL_GCVT)|g' \
              -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \
              -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \
              -e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \
@@ -3150,6 +3274,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
              -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \
              -e 's|@''HAVE_MKSTEMP''@|$(HAVE_MKSTEMP)|g' \
              -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \
+             -e 's|@''HAVE_POSIX_MEMALIGN''@|$(HAVE_POSIX_MEMALIGN)|g' \
              -e 's|@''HAVE_POSIX_OPENPT''@|$(HAVE_POSIX_OPENPT)|g' \
              -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \
              -e 's|@''HAVE_PTSNAME_R''@|$(HAVE_PTSNAME_R)|g' \
@@ -3172,12 +3297,15 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
              -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \
              -e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \
              -e 's|@''HAVE_DECL_UNSETENV''@|$(HAVE_DECL_UNSETENV)|g' \
+             -e 's|@''REPLACE_ALIGNED_ALLOC''@|$(REPLACE_ALIGNED_ALLOC)|g' \
              -e 's|@''REPLACE_CALLOC''@|$(REPLACE_CALLOC)|g' \
              -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \
+             -e 's|@''REPLACE_FREE''@|$(REPLACE_FREE)|g' \
              -e 's|@''REPLACE_INITSTATE''@|$(REPLACE_INITSTATE)|g' \
              -e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \
              -e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \
              -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \
+             -e 's|@''REPLACE_POSIX_MEMALIGN''@|$(REPLACE_POSIX_MEMALIGN)|g' \
              -e 's|@''REPLACE_PTSNAME''@|$(REPLACE_PTSNAME)|g' \
              -e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \
              -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \
@@ -3245,14 +3373,18 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's/@''GNULIB_STRTOK_R''@/$(GNULIB_STRTOK_R)/g' \
              -e 's/@''GNULIB_STRERROR''@/$(GNULIB_STRERROR)/g' \
              -e 's/@''GNULIB_STRERROR_R''@/$(GNULIB_STRERROR_R)/g' \
+             -e 's/@''GNULIB_STRERRORNAME_NP''@/$(GNULIB_STRERRORNAME_NP)/g' \
+             -e 's/@''GNULIB_SIGABBREV_NP''@/$(GNULIB_SIGABBREV_NP)/g' \
+             -e 's/@''GNULIB_SIGDESCR_NP''@/$(GNULIB_SIGDESCR_NP)/g' \
              -e 's/@''GNULIB_STRSIGNAL''@/$(GNULIB_STRSIGNAL)/g' \
              -e 's/@''GNULIB_STRVERSCMP''@/$(GNULIB_STRVERSCMP)/g' \
+             -e 's/@''GNULIB_MDA_MEMCCPY''@/$(GNULIB_MDA_MEMCCPY)/g' \
+             -e 's/@''GNULIB_MDA_STRDUP''@/$(GNULIB_MDA_STRDUP)/g' \
              < $(srcdir)/string.in.h | \
          sed -e 's|@''HAVE_EXPLICIT_BZERO''@|$(HAVE_EXPLICIT_BZERO)|g' \
              -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \
              -e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \
              -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \
-             -e 's|@''HAVE_MEMCHR''@|$(HAVE_MEMCHR)|g' \
              -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \
              -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \
              -e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \
@@ -3268,8 +3400,12 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \
              -e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \
              -e 's|@''HAVE_DECL_STRERROR_R''@|$(HAVE_DECL_STRERROR_R)|g' \
+             -e 's|@''HAVE_STRERRORNAME_NP''@|$(HAVE_STRERRORNAME_NP)|g' \
+             -e 's|@''HAVE_SIGABBREV_NP''@|$(HAVE_SIGABBREV_NP)|g' \
+             -e 's|@''HAVE_SIGDESCR_NP''@|$(HAVE_SIGDESCR_NP)|g' \
              -e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \
              -e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \
+             -e 's|@''REPLACE_FFSLL''@|$(REPLACE_FFSLL)|g' \
              -e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \
              -e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \
              -e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \
@@ -3283,6 +3419,7 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \
              -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \
              -e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \
+             -e 's|@''REPLACE_STRERRORNAME_NP''@|$(REPLACE_STRERRORNAME_NP)|g' \
              -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \
              -e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \
              -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
@@ -3372,8 +3509,10 @@ sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNU
              -e 's/@''GNULIB_FSTAT''@/$(GNULIB_FSTAT)/g' \
              -e 's/@''GNULIB_FSTATAT''@/$(GNULIB_FSTATAT)/g' \
              -e 's/@''GNULIB_FUTIMENS''@/$(GNULIB_FUTIMENS)/g' \
+             -e 's/@''GNULIB_GETUMASK''@/$(GNULIB_GETUMASK)/g' \
              -e 's/@''GNULIB_LCHMOD''@/$(GNULIB_LCHMOD)/g' \
              -e 's/@''GNULIB_LSTAT''@/$(GNULIB_LSTAT)/g' \
+             -e 's/@''GNULIB_MKDIR''@/$(GNULIB_MKDIR)/g' \
              -e 's/@''GNULIB_MKDIRAT''@/$(GNULIB_MKDIRAT)/g' \
              -e 's/@''GNULIB_MKFIFO''@/$(GNULIB_MKFIFO)/g' \
              -e 's/@''GNULIB_MKFIFOAT''@/$(GNULIB_MKFIFOAT)/g' \
@@ -3382,9 +3521,13 @@ sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNU
              -e 's/@''GNULIB_STAT''@/$(GNULIB_STAT)/g' \
              -e 's/@''GNULIB_UTIMENSAT''@/$(GNULIB_UTIMENSAT)/g' \
              -e 's/@''GNULIB_OVERRIDES_STRUCT_STAT''@/$(GNULIB_OVERRIDES_STRUCT_STAT)/g' \
+             -e 's/@''GNULIB_MDA_CHMOD''@/$(GNULIB_MDA_CHMOD)/g' \
+             -e 's/@''GNULIB_MDA_MKDIR''@/$(GNULIB_MDA_MKDIR)/g' \
+             -e 's/@''GNULIB_MDA_UMASK''@/$(GNULIB_MDA_UMASK)/g' \
              -e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \
              -e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \
              -e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \
+             -e 's|@''HAVE_GETUMASK''@|$(HAVE_GETUMASK)|g' \
              -e 's|@''HAVE_LCHMOD''@|$(HAVE_LCHMOD)|g' \
              -e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \
              -e 's|@''HAVE_MKDIRAT''@|$(HAVE_MKDIRAT)|g' \
@@ -3400,7 +3543,9 @@ sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNU
              -e 's|@''REPLACE_LSTAT''@|$(REPLACE_LSTAT)|g' \
              -e 's|@''REPLACE_MKDIR''@|$(REPLACE_MKDIR)|g' \
              -e 's|@''REPLACE_MKFIFO''@|$(REPLACE_MKFIFO)|g' \
+             -e 's|@''REPLACE_MKFIFOAT''@|$(REPLACE_MKFIFOAT)|g' \
              -e 's|@''REPLACE_MKNOD''@|$(REPLACE_MKNOD)|g' \
+             -e 's|@''REPLACE_MKNODAT''@|$(REPLACE_MKNODAT)|g' \
              -e 's|@''REPLACE_STAT''@|$(REPLACE_STAT)|g' \
              -e 's|@''REPLACE_UTIMENSAT''@|$(REPLACE_UTIMENSAT)|g' \
              -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
@@ -3485,15 +3630,17 @@ time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
              -e 's/@''GNULIB_STRFTIME''@/$(GNULIB_STRFTIME)/g' \
              -e 's/@''GNULIB_STRPTIME''@/$(GNULIB_STRPTIME)/g' \
              -e 's/@''GNULIB_TIMEGM''@/$(GNULIB_TIMEGM)/g' \
+             -e 's/@''GNULIB_TIMESPEC_GET''@/$(GNULIB_TIMESPEC_GET)/g' \
              -e 's/@''GNULIB_TIME_R''@/$(GNULIB_TIME_R)/g' \
              -e 's/@''GNULIB_TIME_RZ''@/$(GNULIB_TIME_RZ)/g' \
              -e 's/@''GNULIB_TZSET''@/$(GNULIB_TZSET)/g' \
+             -e 's/@''GNULIB_MDA_TZSET''@/$(GNULIB_MDA_TZSET)/g' \
              -e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \
              -e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \
              -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \
              -e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \
+             -e 's|@''HAVE_TIMESPEC_GET''@|$(HAVE_TIMESPEC_GET)|g' \
              -e 's|@''HAVE_TIMEZONE_T''@|$(HAVE_TIMEZONE_T)|g' \
-             -e 's|@''HAVE_TZSET''@|$(HAVE_TZSET)|g' \
              -e 's|@''REPLACE_CTIME''@|$(REPLACE_CTIME)|g' \
              -e 's|@''REPLACE_GMTIME''@|$(REPLACE_GMTIME)|g' \
              -e 's|@''REPLACE_LOCALTIME''@|$(REPLACE_LOCALTIME)|g' \
@@ -3507,6 +3654,7 @@ time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
              -e 's|@''SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
              -e 's|@''TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
              -e 's|@''UNISTD_H_DEFINES_STRUCT_TIMESPEC''@|$(UNISTD_H_DEFINES_STRUCT_TIMESPEC)|g' \
+             -e 's|@''TIME_H_DEFINES_TIME_UTC''@|$(TIME_H_DEFINES_TIME_UTC)|g' \
              -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
              -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
              -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
@@ -3536,6 +3684,13 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's/@''GNULIB_DUP3''@/$(GNULIB_DUP3)/g' \
              -e 's/@''GNULIB_ENVIRON''@/$(GNULIB_ENVIRON)/g' \
              -e 's/@''GNULIB_EUIDACCESS''@/$(GNULIB_EUIDACCESS)/g' \
+             -e 's/@''GNULIB_EXECL''@/$(GNULIB_EXECL)/g' \
+             -e 's/@''GNULIB_EXECLE''@/$(GNULIB_EXECLE)/g' \
+             -e 's/@''GNULIB_EXECLP''@/$(GNULIB_EXECLP)/g' \
+             -e 's/@''GNULIB_EXECV''@/$(GNULIB_EXECV)/g' \
+             -e 's/@''GNULIB_EXECVE''@/$(GNULIB_EXECVE)/g' \
+             -e 's/@''GNULIB_EXECVP''@/$(GNULIB_EXECVP)/g' \
+             -e 's/@''GNULIB_EXECVPE''@/$(GNULIB_EXECVPE)/g' \
              -e 's/@''GNULIB_FACCESSAT''@/$(GNULIB_FACCESSAT)/g' \
              -e 's/@''GNULIB_FCHDIR''@/$(GNULIB_FCHDIR)/g' \
              -e 's/@''GNULIB_FCHOWNAT''@/$(GNULIB_FCHOWNAT)/g' \
@@ -3581,12 +3736,33 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's/@''GNULIB_UNLINKAT''@/$(GNULIB_UNLINKAT)/g' \
              -e 's/@''GNULIB_USLEEP''@/$(GNULIB_USLEEP)/g' \
              -e 's/@''GNULIB_WRITE''@/$(GNULIB_WRITE)/g' \
+             -e 's/@''GNULIB_MDA_ACCESS''@/$(GNULIB_MDA_ACCESS)/g' \
+             -e 's/@''GNULIB_MDA_CHDIR''@/$(GNULIB_MDA_CHDIR)/g' \
+             -e 's/@''GNULIB_MDA_CLOSE''@/$(GNULIB_MDA_CLOSE)/g' \
+             -e 's/@''GNULIB_MDA_DUP''@/$(GNULIB_MDA_DUP)/g' \
+             -e 's/@''GNULIB_MDA_DUP2''@/$(GNULIB_MDA_DUP2)/g' \
+             -e 's/@''GNULIB_MDA_EXECL''@/$(GNULIB_MDA_EXECL)/g' \
+             -e 's/@''GNULIB_MDA_EXECLE''@/$(GNULIB_MDA_EXECLE)/g' \
+             -e 's/@''GNULIB_MDA_EXECLP''@/$(GNULIB_MDA_EXECLP)/g' \
+             -e 's/@''GNULIB_MDA_EXECV''@/$(GNULIB_MDA_EXECV)/g' \
+             -e 's/@''GNULIB_MDA_EXECVE''@/$(GNULIB_MDA_EXECVE)/g' \
+             -e 's/@''GNULIB_MDA_EXECVP''@/$(GNULIB_MDA_EXECVP)/g' \
+             -e 's/@''GNULIB_MDA_EXECVPE''@/$(GNULIB_MDA_EXECVPE)/g' \
+             -e 's/@''GNULIB_MDA_GETCWD''@/$(GNULIB_MDA_GETCWD)/g' \
+             -e 's/@''GNULIB_MDA_GETPID''@/$(GNULIB_MDA_GETPID)/g' \
+             -e 's/@''GNULIB_MDA_ISATTY''@/$(GNULIB_MDA_ISATTY)/g' \
+             -e 's/@''GNULIB_MDA_LSEEK''@/$(GNULIB_MDA_LSEEK)/g' \
+             -e 's/@''GNULIB_MDA_READ''@/$(GNULIB_MDA_READ)/g' \
+             -e 's/@''GNULIB_MDA_RMDIR''@/$(GNULIB_MDA_RMDIR)/g' \
+             -e 's/@''GNULIB_MDA_SWAB''@/$(GNULIB_MDA_SWAB)/g' \
+             -e 's/@''GNULIB_MDA_UNLINK''@/$(GNULIB_MDA_UNLINK)/g' \
+             -e 's/@''GNULIB_MDA_WRITE''@/$(GNULIB_MDA_WRITE)/g' \
              < $(srcdir)/unistd.in.h | \
          sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \
              -e 's|@''HAVE_COPY_FILE_RANGE''@|$(HAVE_COPY_FILE_RANGE)|g' \
-             -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \
              -e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \
              -e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \
+             -e 's|@''HAVE_EXECVPE''@|$(HAVE_EXECVPE)|g' \
              -e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \
              -e 's|@''HAVE_FCHDIR''@|$(HAVE_FCHDIR)|g' \
              -e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \
@@ -3616,6 +3792,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \
              -e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \
              -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \
+             -e 's|@''HAVE_DECL_EXECVPE''@|$(HAVE_DECL_EXECVPE)|g' \
              -e 's|@''HAVE_DECL_FCHDIR''@|$(HAVE_DECL_FCHDIR)|g' \
              -e 's|@''HAVE_DECL_FDATASYNC''@|$(HAVE_DECL_FDATASYNC)|g' \
              -e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' \
@@ -3634,6 +3811,13 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \
              -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \
              -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \
+             -e 's|@''REPLACE_EXECL''@|$(REPLACE_EXECL)|g' \
+             -e 's|@''REPLACE_EXECLE''@|$(REPLACE_EXECLE)|g' \
+             -e 's|@''REPLACE_EXECLP''@|$(REPLACE_EXECLP)|g' \
+             -e 's|@''REPLACE_EXECV''@|$(REPLACE_EXECV)|g' \
+             -e 's|@''REPLACE_EXECVE''@|$(REPLACE_EXECVE)|g' \
+             -e 's|@''REPLACE_EXECVP''@|$(REPLACE_EXECVP)|g' \
+             -e 's|@''REPLACE_EXECVPE''@|$(REPLACE_EXECVPE)|g' \
              -e 's|@''REPLACE_FACCESSAT''@|$(REPLACE_FACCESSAT)|g' \
              -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \
              -e 's|@''REPLACE_FTRUNCATE''@|$(REPLACE_FTRUNCATE)|g' \
@@ -3728,6 +3912,7 @@ wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
              -e 's/@''GNULIB_WCSTOK''@/$(GNULIB_WCSTOK)/g' \
              -e 's/@''GNULIB_WCSWIDTH''@/$(GNULIB_WCSWIDTH)/g' \
              -e 's/@''GNULIB_WCSFTIME''@/$(GNULIB_WCSFTIME)/g' \
+             -e 's/@''GNULIB_MDA_WCSDUP''@/$(GNULIB_MDA_WCSDUP)/g' \
              < $(srcdir)/wchar.in.h | \
          sed -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \
              -e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \
@@ -3770,6 +3955,7 @@ wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
              -e 's|@''HAVE_WCSWIDTH''@|$(HAVE_WCSWIDTH)|g' \
              -e 's|@''HAVE_WCSFTIME''@|$(HAVE_WCSFTIME)|g' \
              -e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \
+             -e 's|@''HAVE_DECL_WCSDUP''@|$(HAVE_DECL_WCSDUP)|g' \
              -e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \
          | \
          sed -e 's|@''REPLACE_MBSTATE_T''@|$(REPLACE_MBSTATE_T)|g' \
index 394ca3c2aa2ba7c91e446e0303aeff24665068b8..38afe1d56729772ecaa57672c63bcc4e42e31c5a 100644 (file)
@@ -1,5 +1,5 @@
 /* A C macro for declaring that a function does not return.
-   Copyright (C) 2011-2020 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published
index d0476d53e6c756eca6158a07a49589df9aef0dee..91b9ec38916067e082f2a88867503a7b3960a518 100644 (file)
@@ -39,8 +39,8 @@
 # define memory_full() abort ()
 #endif
 
-/* If compiling with GCC 2, this file's not needed.  */
-#if !defined (__GNUC__) || __GNUC__ < 2
+/* If compiling with GCC or clang, this file is not needed.  */
+#if !(defined __GNUC__ || defined __clang__)
 
 /* If someone has defined alloca as a macro,
    there must be some other way alloca is supposed to work.  */
@@ -62,16 +62,6 @@ lose
 #   endif /* static */
 #  endif /* emacs */
 
-/* If your stack is a linked list of frames, you have to
-   provide an "address metric" ADDRESS_FUNCTION macro.  */
-
-#  if defined (CRAY) && defined (CRAY_STACKSEG_END)
-long i00afunc ();
-#   define ADDRESS_FUNCTION(arg) (char *) i00afunc (&(arg))
-#  else
-#   define ADDRESS_FUNCTION(arg) &(arg)
-#  endif
-
 /* Define STACK_DIRECTION if you know the direction of stack
    growth for your system; otherwise it will be automatically
    deduced at run-time.
@@ -140,7 +130,7 @@ void *
 alloca (size_t size)
 {
   auto char probe;              /* Probes stack depth: */
-  register char *depth = ADDRESS_FUNCTION (probe);
+  register char *depth = &probe;
 
 #  if STACK_DIRECTION == 0
   if (STACK_DIR == 0)           /* Unknown growth direction.  */
@@ -206,273 +196,5 @@ alloca (size_t size)
   }
 }
 
-#  if defined (CRAY) && defined (CRAY_STACKSEG_END)
-
-#   ifdef DEBUG_I00AFUNC
-#    include <stdio.h>
-#   endif
-
-#   ifndef CRAY_STACK
-#    define CRAY_STACK
-#    ifndef CRAY2
-/* Stack structures for CRAY-1, CRAY X-MP, and CRAY Y-MP */
-struct stack_control_header
-  {
-    long shgrow:32;             /* Number of times stack has grown.  */
-    long shaseg:32;             /* Size of increments to stack.  */
-    long shhwm:32;              /* High water mark of stack.  */
-    long shsize:32;             /* Current size of stack (all segments).  */
-  };
-
-/* The stack segment linkage control information occurs at
-   the high-address end of a stack segment.  (The stack
-   grows from low addresses to high addresses.)  The initial
-   part of the stack segment linkage control information is
-   0200 (octal) words.  This provides for register storage
-   for the routine which overflows the stack.  */
-
-struct stack_segment_linkage
-  {
-    long ss[0200];              /* 0200 overflow words.  */
-    long sssize:32;             /* Number of words in this segment.  */
-    long ssbase:32;             /* Offset to stack base.  */
-    long:32;
-    long sspseg:32;             /* Offset to linkage control of previous
-                                   segment of stack.  */
-    long:32;
-    long sstcpt:32;             /* Pointer to task common address block.  */
-    long sscsnm;                /* Private control structure number for
-                                   microtasking.  */
-    long ssusr1;                /* Reserved for user.  */
-    long ssusr2;                /* Reserved for user.  */
-    long sstpid;                /* Process ID for pid based multi-tasking.  */
-    long ssgvup;                /* Pointer to multitasking thread giveup.  */
-    long sscray[7];             /* Reserved for Cray Research.  */
-    long ssa0;
-    long ssa1;
-    long ssa2;
-    long ssa3;
-    long ssa4;
-    long ssa5;
-    long ssa6;
-    long ssa7;
-    long sss0;
-    long sss1;
-    long sss2;
-    long sss3;
-    long sss4;
-    long sss5;
-    long sss6;
-    long sss7;
-  };
-
-#    else /* CRAY2 */
-/* The following structure defines the vector of words
-   returned by the STKSTAT library routine.  */
-struct stk_stat
-  {
-    long now;                   /* Current total stack size.  */
-    long maxc;                  /* Amount of contiguous space which would
-                                   be required to satisfy the maximum
-                                   stack demand to date.  */
-    long high_water;            /* Stack high-water mark.  */
-    long overflows;             /* Number of stack overflow ($STKOFEN) calls.  */
-    long hits;                  /* Number of internal buffer hits.  */
-    long extends;               /* Number of block extensions.  */
-    long stko_mallocs;          /* Block allocations by $STKOFEN.  */
-    long underflows;            /* Number of stack underflow calls ($STKRETN).  */
-    long stko_free;             /* Number of deallocations by $STKRETN.  */
-    long stkm_free;             /* Number of deallocations by $STKMRET.  */
-    long segments;              /* Current number of stack segments.  */
-    long maxs;                  /* Maximum number of stack segments so far.  */
-    long pad_size;              /* Stack pad size.  */
-    long current_address;       /* Current stack segment address.  */
-    long current_size;          /* Current stack segment size.  This
-                                   number is actually corrupted by STKSTAT to
-                                   include the fifteen word trailer area.  */
-    long initial_address;       /* Address of initial segment.  */
-    long initial_size;          /* Size of initial segment.  */
-  };
-
-/* The following structure describes the data structure which trails
-   any stack segment.  I think that the description in 'asdef' is
-   out of date.  I only describe the parts that I am sure about.  */
-
-struct stk_trailer
-  {
-    long this_address;          /* Address of this block.  */
-    long this_size;             /* Size of this block (does not include
-                                   this trailer).  */
-    long unknown2;
-    long unknown3;
-    long link;                  /* Address of trailer block of previous
-                                   segment.  */
-    long unknown5;
-    long unknown6;
-    long unknown7;
-    long unknown8;
-    long unknown9;
-    long unknown10;
-    long unknown11;
-    long unknown12;
-    long unknown13;
-    long unknown14;
-  };
-
-#    endif /* CRAY2 */
-#   endif /* not CRAY_STACK */
-
-#   ifdef CRAY2
-/* Determine a "stack measure" for an arbitrary ADDRESS.
-   I doubt that "lint" will like this much.  */
-
-static long
-i00afunc (long *address)
-{
-  struct stk_stat status;
-  struct stk_trailer *trailer;
-  long *block, size;
-  long result = 0;
-
-  /* We want to iterate through all of the segments.  The first
-     step is to get the stack status structure.  We could do this
-     more quickly and more directly, perhaps, by referencing the
-     $LM00 common block, but I know that this works.  */
-
-  STKSTAT (&status);
-
-  /* Set up the iteration.  */
-
-  trailer = (struct stk_trailer *) (status.current_address
-                                    + status.current_size
-                                    - 15);
-
-  /* There must be at least one stack segment.  Therefore it is
-     a fatal error if "trailer" is null.  */
-
-  if (trailer == NULL)
-    abort ();
-
-  /* Discard segments that do not contain our argument address.  */
-
-  while (trailer != NULL)
-    {
-      block = (long *) trailer->this_address;
-      size = trailer->this_size;
-      if (block == NULL || size == 0)
-        abort ();
-      trailer = (struct stk_trailer *) trailer->link;
-      if ((block <= address) && (address < (block + size)))
-        break;
-    }
-
-  /* Set the result to the offset in this segment and add the sizes
-     of all predecessor segments.  */
-
-  result = address - block;
-
-  if (trailer == NULL)
-    {
-      return result;
-    }
-
-  do
-    {
-      if (trailer->this_size <= 0)
-        abort ();
-      result += trailer->this_size;
-      trailer = (struct stk_trailer *) trailer->link;
-    }
-  while (trailer != NULL);
-
-  /* We are done.  Note that if you present a bogus address (one
-     not in any segment), you will get a different number back, formed
-     from subtracting the address of the first block.  This is probably
-     not what you want.  */
-
-  return (result);
-}
-
-#   else /* not CRAY2 */
-/* Stack address function for a CRAY-1, CRAY X-MP, or CRAY Y-MP.
-   Determine the number of the cell within the stack,
-   given the address of the cell.  The purpose of this
-   routine is to linearize, in some sense, stack addresses
-   for alloca.  */
-
-static long
-i00afunc (long address)
-{
-  long stkl = 0;
-
-  long size, pseg, this_segment, stack;
-  long result = 0;
-
-  struct stack_segment_linkage *ssptr;
-
-  /* Register B67 contains the address of the end of the
-     current stack segment.  If you (as a subprogram) store
-     your registers on the stack and find that you are past
-     the contents of B67, you have overflowed the segment.
-
-     B67 also points to the stack segment linkage control
-     area, which is what we are really interested in.  */
-
-  stkl = CRAY_STACKSEG_END ();
-  ssptr = (struct stack_segment_linkage *) stkl;
-
-  /* If one subtracts 'size' from the end of the segment,
-     one has the address of the first word of the segment.
-
-     If this is not the first segment, 'pseg' will be
-     nonzero.  */
-
-  pseg = ssptr->sspseg;
-  size = ssptr->sssize;
-
-  this_segment = stkl - size;
-
-  /* It is possible that calling this routine itself caused
-     a stack overflow.  Discard stack segments which do not
-     contain the target address.  */
-
-  while (!(this_segment <= address && address <= stkl))
-    {
-#    ifdef DEBUG_I00AFUNC
-      fprintf (stderr, "%011o %011o %011o\n", this_segment, address, stkl);
-#    endif
-      if (pseg == 0)
-        break;
-      stkl = stkl - pseg;
-      ssptr = (struct stack_segment_linkage *) stkl;
-      size = ssptr->sssize;
-      pseg = ssptr->sspseg;
-      this_segment = stkl - size;
-    }
-
-  result = address - this_segment;
-
-  /* If you subtract pseg from the current end of the stack,
-     you get the address of the previous stack segment's end.
-     This seems a little convoluted to me, but I'll bet you save
-     a cycle somewhere.  */
-
-  while (pseg != 0)
-    {
-#    ifdef DEBUG_I00AFUNC
-      fprintf (stderr, "%011o %011o\n", pseg, size);
-#    endif
-      stkl = stkl - pseg;
-      ssptr = (struct stack_segment_linkage *) stkl;
-      size = ssptr->sssize;
-      pseg = ssptr->sspseg;
-      result += size;
-    }
-  return (result);
-}
-
-#   endif /* not CRAY2 */
-#  endif /* CRAY */
-
 # endif /* no alloca */
-#endif /* not GCC 2 */
+#endif /* not GCC || clang */
index 5686b082bbe4b6c8cf9f7a072138d02ae0f2422e..0a6137e037c759a40aa8bcf7ab81d36339815a4a 100644 (file)
@@ -1,6 +1,6 @@
 /* Memory allocation on the stack.
 
-   Copyright (C) 1995, 1999, 2001-2004, 2006-2020 Free Software Foundation,
+   Copyright (C) 1995, 1999, 2001-2004, 2006-2021 Free Software Foundation,
    Inc.
 
    This program is free software; you can redistribute it and/or modify it
@@ -44,7 +44,7 @@
 # endif
 #endif
 #ifndef alloca
-# ifdef __GNUC__
+# if defined __GNUC__ || (__clang_major__ >= 4)
 #  define alloca __builtin_alloca
 # elif defined _AIX
 #  define alloca __alloca
index ac26ca8cfeddbd943315b2b911e4a2bc65eaed34..5b81b50a87dcdd3be137f94d9eadfde180420681 100644 (file)
@@ -1,5 +1,5 @@
 /* A C macro for declaring that specific arguments must not be NULL.
-   Copyright (C) 2009-2020 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published
@@ -18,7 +18,7 @@
    that the values passed as arguments n, ..., m must be non-NULL pointers.
    n = 1 stands for the first argument, n = 2 for the second argument etc.  */
 #ifndef _GL_ARG_NONNULL
-# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3
+# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__
 #  define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
 # else
 #  define _GL_ARG_NONNULL(params)
index 9f13d489c3bc93b861b170695098b4bdc9de818b..5b103da825c18a67b661942b63b35dbdf49ae127 100644 (file)
@@ -1,6 +1,6 @@
 /* A GNU-like <arpa/inet.h>.
 
-   Copyright (C) 2005-2006, 2008-2020 Free Software Foundation, Inc.
+   Copyright (C) 2005-2006, 2008-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 09a4edfa592c62f7f282c00d4dbf78c74cfa76db..b6f40763aba67d0e62abe95e46406fca39bb6430 100644 (file)
@@ -1,6 +1,6 @@
 /* Run-time assert-like macros.
 
-   Copyright (C) 2014-2020 Free Software Foundation, Inc.
+   Copyright (C) 2014-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 90022e05787d36823fc60db8f6cfcc54e23596e6..b6d9de754d1d607d5d695e12f4f7cd431f77c303 100644 (file)
@@ -1,5 +1,5 @@
 /* Define at-style functions like fstatat, unlinkat, fchownat, etc.
-   Copyright (C) 2006, 2009-2020 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 2836b99dad02f245fc1a8e8d606b87705100b527..82245279eb19d676e79f2d0215517f3c96c08d53 100644 (file)
@@ -1,6 +1,6 @@
 /* ATTRIBUTE_* macros for using attributes in GCC and similar compilers
 
-   Copyright 2020 Free Software Foundation, Inc.
+   Copyright 2020-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published
@@ -80,7 +80,7 @@
 /* Attributes for variadic functions.  */
 
 /* The variadic function expects a trailing NULL argument.
-   ATTRIBUTE_SENTINEL () - The last argument is NULL.
+   ATTRIBUTE_SENTINEL () - The last argument is NULL (requires C99).
    ATTRIBUTE_SENTINEL ((N)) - The (N+1)st argument from the end is NULL.  */
 /* Applies to: functions.  */
 #define ATTRIBUTE_SENTINEL(pos) _GL_ATTRIBUTE_SENTINEL (pos)
 /* Applies to: function.  */
 #define ATTRIBUTE_ALWAYS_INLINE _GL_ATTRIBUTE_ALWAYS_INLINE
 
-/* The function does not affect observable state, and always returns a value.
-   Compilers can omit duplicate calls with the same arguments if
-   observable state is not changed between calls.  (This attribute is
-   looser than ATTRIBUTE_CONST.)  */
+/* It is OK for a compiler to omit duplicate calls with the same arguments.
+   This attribute is safe for a function that neither depends on
+   nor affects observable state, and always returns exactly once -
+   e.g., does not loop forever, and does not call longjmp.
+   (This attribute is stricter than ATTRIBUTE_PURE.)  */
 /* Applies to: functions.  */
-#define ATTRIBUTE_PURE _GL_ATTRIBUTE_PURE
+#define ATTRIBUTE_CONST _GL_ATTRIBUTE_CONST
 
-/* The function neither depends on nor affects observable state,
-   and always returns a value.  Compilers can omit duplicate calls with
-   the same arguments.  (This attribute is stricter than ATTRIBUTE_PURE.)  */
+/* It is OK for a compiler to omit duplicate calls with the same
+   arguments if observable state is not changed between calls.
+   This attribute is safe for a function that does not affect
+   observable state, and always returns exactly once.
+   (This attribute is looser than ATTRIBUTE_CONST.)  */
 /* Applies to: functions.  */
-#define ATTRIBUTE_CONST _GL_ATTRIBUTE_CONST
+#define ATTRIBUTE_PURE _GL_ATTRIBUTE_PURE
 
 /* The function is rarely executed.  */
 /* Applies to: functions.  */
index 565469ea3d106fd8711e9cc66eada9bade82b4c2..f8394ede74d91d58eb4c72f0f81bd5d06a96224d 100644 (file)
@@ -1,6 +1,6 @@
 /* basename.c -- return the last element in a file name
 
-   Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2020 Free Software
+   Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2021 Free Software
    Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
 
 #include <config.h>
 
-#include "dirname.h"
+/* Specification.  */
+#include "basename-lgpl.h"
 
+#include <stdbool.h>
 #include <string.h>
 
-/* Return the address of the last file name component of NAME.  If
-   NAME has no relative file name components because it is a file
-   system root, return the empty string.  */
+#include "filename.h"
 
 char *
 last_component (char const *name)
 {
   char const *base = name + FILE_SYSTEM_PREFIX_LEN (name);
   char const *p;
-  bool saw_slash = false;
+  bool last_was_slash = false;
 
   while (ISSLASH (*base))
     base++;
@@ -39,21 +39,17 @@ last_component (char const *name)
   for (p = base; *p; p++)
     {
       if (ISSLASH (*p))
-        saw_slash = true;
-      else if (saw_slash)
+        last_was_slash = true;
+      else if (last_was_slash)
         {
           base = p;
-          saw_slash = false;
+          last_was_slash = false;
         }
     }
 
   return (char *) base;
 }
 
-/* Return the length of the basename NAME.  Typically NAME is the
-   value returned by base_name or last_component.  Act like strlen
-   (NAME), except omit all trailing slashes.  */
-
 size_t
 base_len (char const *name)
 {
diff --git a/gnulib/import/basename-lgpl.h b/gnulib/import/basename-lgpl.h
new file mode 100644 (file)
index 0000000..1e9631a
--- /dev/null
@@ -0,0 +1,78 @@
+/*  Extract the last component (base name) of a file name.
+
+    Copyright (C) 1998, 2001, 2003-2006, 2009-2021 Free Software Foundation,
+    Inc.
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+#ifndef _BASENAME_LGPL_H
+#define _BASENAME_LGPL_H
+
+#include <stddef.h>
+
+#ifndef DOUBLE_SLASH_IS_DISTINCT_ROOT
+# define DOUBLE_SLASH_IS_DISTINCT_ROOT 0
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Return the address of the last file name component of FILENAME.
+   If FILENAME has some trailing slash(es), they are considered to be
+   part of the last component.
+   If FILENAME has no relative file name components because it is a file
+   system root, return the empty string.
+   Examples:
+              FILENAME      RESULT
+              "foo.c"       "foo.c"
+              "foo/bar.c"   "bar.c"
+              "/foo/bar.c"  "bar.c"
+              "foo/bar/"    "bar/"
+              "foo/bar//"   "bar//"
+              "/"           ""
+              "//"          ""
+              ""            ""
+   The return value is a tail of the given FILENAME; do NOT free() it!  */
+
+/* This function was traditionally called 'basename', but we avoid this
+   function name because
+     * Various platforms have different functions in their libc.
+       In particular, the glibc basename(), defined in <string.h>, does
+       not consider trailing slashes to be part of the component:
+              FILENAME      RESULT
+              "foo/bar/"    ""
+              "foo/bar//"   ""
+     * The 'basename' command eliminates trailing slashes and for a root
+       produces a non-empty result:
+              FILENAME      RESULT
+              "foo/bar/"    "bar"
+              "foo/bar//"   "bar"
+              "/"           "/"
+              "//"          "/"
+ */
+extern char *last_component (char const *filename) _GL_ATTRIBUTE_PURE;
+
+/* Return the length of the basename FILENAME.
+   Typically FILENAME is the value returned by base_name or last_component.
+   Act like strlen (FILENAME), except omit all trailing slashes.  */
+extern size_t base_len (char const *filename) _GL_ATTRIBUTE_PURE;
+
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* _BASENAME_LGPL_H */
index 6828b701aa1ad9c514d1a02ec41ca654189b2bde..58186c44d7c90df4eec10fbf576560fc51169d43 100644 (file)
@@ -1,5 +1,5 @@
 /* Convert unibyte character to wide character.
-   Copyright (C) 2008, 2010-2020 Free Software Foundation, Inc.
+   Copyright (C) 2008, 2010-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2008.
 
    This program is free software: you can redistribute it and/or modify
index 3e6aaabc9ce62b647d86f4bc6def0893ced22783..39df1bc76bcd3f02ada45247dd26a16d4cc3b8fc 100644 (file)
@@ -1,5 +1,5 @@
 /* C++ compatible function declaration macros.
-   Copyright (C) 2010-2020 Free Software Foundation, Inc.
+   Copyright (C) 2010-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published
     _GL_EXTERN_C int _gl_cxxalias_dummy
 #endif
 
+/* _GL_CXXALIAS_MDA (func, rettype, parameters);
+   is to be used when func is a Microsoft deprecated alias, on native Windows.
+   It declares a C++ alias called GNULIB_NAMESPACE::func
+   that redirects to _func, if GNULIB_NAMESPACE is defined.
+   Example:
+     _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...));
+ */
+#define _GL_CXXALIAS_MDA(func,rettype,parameters) \
+  _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters)
+
 /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters);
    is like  _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters);
    except that the C function rpl_func may have a slightly different
     _GL_EXTERN_C int _gl_cxxalias_dummy
 #endif
 
+/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters);
+   is like  _GL_CXXALIAS_MDA (func, rettype, parameters);
+   except that the C function func may have a slightly different declaration.
+   A cast is used to silence the "invalid conversion" error that would
+   otherwise occur.  */
+#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \
+  _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters)
+
 /* _GL_CXXALIAS_SYS (func, rettype, parameters);
    declares a C++ alias called GNULIB_NAMESPACE::func
    that redirects to the system provided function func, if GNULIB_NAMESPACE
    _GL_CXXALIASWARN_2 (func, namespace)
 /* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
    we enable the warning only when not optimizing.  */
-# if !__OPTIMIZE__
+# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__)
 #  define _GL_CXXALIASWARN_2(func,namespace) \
     _GL_WARN_ON_USE (func, \
                      "The symbol ::" #func " refers to the system function. " \
    _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace)
 /* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
    we enable the warning only when not optimizing.  */
-# if !__OPTIMIZE__
+# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__)
 #  define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
-    _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \
+    _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \
                          "The symbol ::" #func " refers to the system function. " \
                          "Use " #namespace "::" #func " instead.")
 # else
index 9f990988393d77601b3ae67ef77f0e7898baae97..4bb4c0c2d9609365cad07c3a192e5c344170ada0 100644 (file)
@@ -1,19 +1,20 @@
 /* Return the canonical absolute name of a given file.
-   Copyright (C) 1996-2020 Free Software Foundation, Inc.
+   Copyright (C) 1996-2021 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU General Public
+   License as published by the Free Software Foundation; either
+   version 3 of the License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
 
 #ifndef _LIBC
 /* Don't use __attribute__ __nonnull__ in this compilation unit.  Otherwise gcc
 # define _GL_ARG_NONNULL(params)
 
 # define _GL_USE_STDLIB_ALLOC 1
-# include <config.h>
+# include <libc-config.h>
 #endif
 
-#if !HAVE_CANONICALIZE_FILE_NAME || !FUNC_REALPATH_WORKS || defined _LIBC
-
 /* Specification.  */
 #include <stdlib.h>
 
-#include <alloca.h>
-#include <string.h>
-#include <unistd.h>
+#include <errno.h>
+#include <fcntl.h>
 #include <limits.h>
-#if HAVE_SYS_PARAM_H || defined _LIBC
-# include <sys/param.h>
-#endif
+#include <stdbool.h>
+#include <string.h>
 #include <sys/stat.h>
-#include <errno.h>
-#include <stddef.h>
+#include <unistd.h>
+
+#include <eloop-threshold.h>
+#include <filename.h>
+#include <idx.h>
+#include <intprops.h>
+#include <scratch_buffer.h>
 
 #ifdef _LIBC
 # include <shlib-compat.h>
+# define GCC_LINT 1
+# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
 #else
-# define SHLIB_COMPAT(lib, introduced, obsoleted) 0
-# define versioned_symbol(lib, local, symbol, version) extern int dummy
-# define compat_symbol(lib, local, symbol, version)
-# define weak_alias(local, symbol)
 # define __canonicalize_file_name canonicalize_file_name
 # define __realpath realpath
 # include "pathmax.h"
-# include "malloca.h"
-# include "filename.h"
-# if HAVE_GETCWD
+# define __faccessat faccessat
+# if defined _WIN32 && !defined __CYGWIN__
+#  define __getcwd _getcwd
+# elif HAVE_GETCWD
 #  if IN_RELOCWRAPPER
     /* When building the relocatable program wrapper, use the system's getcwd
        function, not the gnulib override, otherwise we would get a link error.
 # else
 #  define __getcwd(buf, max) getwd (buf)
 # endif
+# define __mempcpy mempcpy
+# define __pathconf pathconf
+# define __rawmemchr rawmemchr
 # define __readlink readlink
-# define __set_errno(e) errno = (e)
-# ifndef MAXSYMLINKS
-#  ifdef SYMLOOP_MAX
-#   define MAXSYMLINKS SYMLOOP_MAX
-#  else
-#   define MAXSYMLINKS 20
-#  endif
-# endif
+# define __stat stat
 #endif
 
-#ifndef DOUBLE_SLASH_IS_DISTINCT_ROOT
-# define DOUBLE_SLASH_IS_DISTINCT_ROOT 0
+/* Suppress bogus GCC -Wmaybe-uninitialized warnings.  */
+#if defined GCC_LINT || defined lint
+# define IF_LINT(Code) Code
+#else
+# define IF_LINT(Code) /* empty */
 #endif
 
-/* Define this independently so that stdint.h is not a prerequisite.  */
-#ifndef SIZE_MAX
-# define SIZE_MAX ((size_t) -1)
+#ifndef DOUBLE_SLASH_IS_DISTINCT_ROOT
+# define DOUBLE_SLASH_IS_DISTINCT_ROOT false
 #endif
 
-#if !FUNC_REALPATH_WORKS || defined _LIBC
+#if defined _LIBC || !FUNC_REALPATH_WORKS
+
+/* Return true if FILE's existence can be shown, false (setting errno)
+   otherwise.  Follow symbolic links.  */
+static bool
+file_accessible (char const *file)
+{
+# if defined _LIBC || HAVE_FACCESSAT
+  return __faccessat (AT_FDCWD, file, F_OK, AT_EACCESS) == 0;
+# else
+  struct stat st;
+  return __stat (file, &st) == 0 || errno == EOVERFLOW;
+# endif
+}
 
-static void
-alloc_failed (void)
+/* True if concatenating END as a suffix to a file name means that the
+   code needs to check that the file name is that of a searchable
+   directory, since the canonicalize_filename_mode_stk code won't
+   check this later anyway when it checks an ordinary file name
+   component within END.  END must either be empty, or start with a
+   slash.  */
+
+static bool _GL_ATTRIBUTE_PURE
+suffix_requires_dir_check (char const *end)
 {
-#if defined _WIN32 && ! defined __CYGWIN__
-  /* Avoid errno problem without using the malloc or realloc modules; see:
-     https://lists.gnu.org/r/bug-gnulib/2016-08/msg00025.html  */
-  errno = ENOMEM;
+  /* If END does not start with a slash, the suffix is OK.  */
+  while (ISSLASH (*end))
+    {
+      /* Two or more slashes act like a single slash.  */
+      do
+        end++;
+      while (ISSLASH (*end));
+
+      switch (*end++)
+        {
+        default: return false;  /* An ordinary file name component is OK.  */
+        case '\0': return true; /* Trailing "/" is trouble.  */
+        case '.': break;        /* Possibly "." or "..".  */
+        }
+      /* Trailing "/.", or "/.." even if not trailing, is trouble.  */
+      if (!*end || (*end == '.' && (!end[1] || ISSLASH (end[1]))))
+        return true;
+    }
+
+  return false;
+}
+
+/* Append this to a file name to test whether it is a searchable directory.
+   On POSIX platforms "/" suffices, but "/./" is sometimes needed on
+   macOS 10.13 <https://bugs.gnu.org/30350>, and should also work on
+   platforms like AIX 7.2 that need at least "/.".  */
+
+#if defined _LIBC || defined LSTAT_FOLLOWS_SLASHED_SYMLINK
+static char const dir_suffix[] = "/";
+#else
+static char const dir_suffix[] = "/./";
 #endif
+
+/* Return true if DIR is a searchable dir, false (setting errno) otherwise.
+   DIREND points to the NUL byte at the end of the DIR string.
+   Store garbage into DIREND[0 .. strlen (dir_suffix)].  */
+
+static bool
+dir_check (char *dir, char *dirend)
+{
+  strcpy (dirend, dir_suffix);
+  return file_accessible (dir);
 }
 
-/* Return the canonical absolute name of file NAME.  A canonical name
-   does not contain any ".", ".." components nor any repeated path
-   separators ('/') or symlinks.  All path components must exist.  If
-   RESOLVED is null, the result is malloc'd; otherwise, if the
-   canonical name is PATH_MAX chars or more, returns null with 'errno'
-   set to ENAMETOOLONG; if the name fits in fewer than PATH_MAX chars,
-   returns the name in RESOLVED.  If the name cannot be resolved and
-   RESOLVED is non-NULL, it contains the path of the first component
-   that cannot be resolved.  If the path can be resolved, RESOLVED
-   holds the same value as the value returned.  */
+static idx_t
+get_path_max (void)
+{
+# ifdef PATH_MAX
+  long int path_max = PATH_MAX;
+# else
+  /* The caller invoked realpath with a null RESOLVED, even though
+     PATH_MAX is not defined as a constant.  The glibc manual says
+     programs should not do this, and POSIX says the behavior is undefined.
+     Historically, glibc here used the result of pathconf, or 1024 if that
+     failed; stay consistent with this (dubious) historical practice.  */
+  int err = errno;
+  long int path_max = __pathconf ("/", _PC_PATH_MAX);
+  __set_errno (err);
+# endif
+  return path_max < 0 ? 1024 : path_max <= IDX_MAX ? path_max : IDX_MAX;
+}
 
-char *
-__realpath (const char *name, char *resolved)
+/* Act like __realpath (see below), with an additional argument
+   rname_buf that can be used as temporary storage.
+
+   If GCC_LINT is defined, do not inline this function with GCC 10.1
+   and later, to avoid creating a pointer to the stack that GCC
+   -Wreturn-local-addr incorrectly complains about.  See:
+   https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93644
+   Although the noinline attribute can hurt performance a bit, no better way
+   to pacify GCC is known; even an explicit #pragma does not pacify GCC.
+   When the GCC bug is fixed this workaround should be limited to the
+   broken GCC versions.  */
+#if __GNUC_PREREQ (10, 1)
+# if defined GCC_LINT || defined lint
+__attribute__ ((__noinline__))
+# elif __OPTIMIZE__ && !__NO_INLINE__
+#  define GCC_BOGUS_WRETURN_LOCAL_ADDR
+# endif
+#endif
+static char *
+realpath_stk (const char *name, char *resolved,
+              struct scratch_buffer *rname_buf)
 {
-  char *rpath, *dest, *extra_buf = NULL;
-  const char *start, *end, *rpath_limit;
-  long int path_max;
+  char *dest;
+  char const *start;
+  char const *end;
   int num_links = 0;
-  size_t prefix_len;
 
   if (name == NULL)
     {
@@ -140,205 +221,148 @@ __realpath (const char *name, char *resolved)
       return NULL;
     }
 
-#ifdef PATH_MAX
-  path_max = PATH_MAX;
-#else
-  path_max = pathconf (name, _PC_PATH_MAX);
-  if (path_max <= 0)
-    path_max = 8192;
-#endif
-
-  if (resolved == NULL)
-    {
-      rpath = malloc (path_max);
-      if (rpath == NULL)
-        {
-          alloc_failed ();
-          return NULL;
-        }
-    }
-  else
-    rpath = resolved;
-  rpath_limit = rpath + path_max;
+  struct scratch_buffer extra_buffer, link_buffer;
+  scratch_buffer_init (&extra_buffer);
+  scratch_buffer_init (&link_buffer);
+  scratch_buffer_init (rname_buf);
+  char *rname_on_stack = rname_buf->data;
+  char *rname = rname_on_stack;
+  bool end_in_extra_buffer = false;
+  bool failed = true;
 
   /* This is always zero for Posix hosts, but can be 2 for MS-Windows
      and MS-DOS X:/foo/bar file names.  */
-  prefix_len = FILE_SYSTEM_PREFIX_LEN (name);
+  idx_t prefix_len = FILE_SYSTEM_PREFIX_LEN (name);
 
   if (!IS_ABSOLUTE_FILE_NAME (name))
     {
-      if (!__getcwd (rpath, path_max))
+      while (!__getcwd (rname, rname_buf->length))
         {
-          rpath[0] = '\0';
-          goto error;
+          if (errno != ERANGE)
+            {
+              dest = rname;
+              goto error;
+            }
+          if (!scratch_buffer_grow (rname_buf))
+            goto error_nomem;
+          rname = rname_buf->data;
         }
-      dest = strchr (rpath, '\0');
+      dest = __rawmemchr (rname, '\0');
       start = name;
-      prefix_len = FILE_SYSTEM_PREFIX_LEN (rpath);
+      prefix_len = FILE_SYSTEM_PREFIX_LEN (rname);
     }
   else
     {
-      dest = rpath;
-      if (prefix_len)
-        {
-          memcpy (rpath, name, prefix_len);
-          dest += prefix_len;
-        }
+      dest = __mempcpy (rname, name, prefix_len);
       *dest++ = '/';
       if (DOUBLE_SLASH_IS_DISTINCT_ROOT)
         {
-          if (ISSLASH (name[1]) && !ISSLASH (name[2]) && !prefix_len)
+          if (prefix_len == 0 /* implies ISSLASH (name[0]) */
+              && ISSLASH (name[1]) && !ISSLASH (name[2]))
             *dest++ = '/';
           *dest = '\0';
         }
       start = name + prefix_len;
     }
 
-  for (end = start; *start; start = end)
+  for ( ; *start; start = end)
     {
-#ifdef _LIBC
-      struct stat64 st;
-#else
-      struct stat st;
-#endif
-
-      /* Skip sequence of multiple path-separators.  */
+      /* Skip sequence of multiple file name separators.  */
       while (ISSLASH (*start))
         ++start;
 
-      /* Find end of path component.  */
+      /* Find end of component.  */
       for (end = start; *end && !ISSLASH (*end); ++end)
         /* Nothing.  */;
 
-      if (end - start == 0)
+      /* Length of this file name component; it can be zero if a file
+         name ends in '/'.  */
+      idx_t startlen = end - start;
+
+      if (startlen == 0)
         break;
-      else if (end - start == 1 && start[0] == '.')
+      else if (startlen == 1 && start[0] == '.')
         /* nothing */;
-      else if (end - start == 2 && start[0] == '.' && start[1] == '.')
+      else if (startlen == 2 && start[0] == '.' && start[1] == '.')
         {
           /* Back up to previous component, ignore if at root already.  */
-          if (dest > rpath + prefix_len + 1)
-            for (--dest; dest > rpath && !ISSLASH (dest[-1]); --dest)
+          if (dest > rname + prefix_len + 1)
+            for (--dest; dest > rname && !ISSLASH (dest[-1]); --dest)
               continue;
           if (DOUBLE_SLASH_IS_DISTINCT_ROOT
-              && dest == rpath + 1 && !prefix_len
+              && dest == rname + 1 && !prefix_len
               && ISSLASH (*dest) && !ISSLASH (dest[1]))
             dest++;
         }
       else
         {
-          size_t new_size;
-
           if (!ISSLASH (dest[-1]))
             *dest++ = '/';
 
-          if (dest + (end - start) >= rpath_limit)
+          while (rname + rname_buf->length - dest
+                 < startlen + sizeof dir_suffix)
             {
-              ptrdiff_t dest_offset = dest - rpath;
-              char *new_rpath;
-
-              if (resolved)
-                {
-                  __set_errno (ENAMETOOLONG);
-                  if (dest > rpath + prefix_len + 1)
-                    dest--;
-                  *dest = '\0';
-                  goto error;
-                }
-              new_size = rpath_limit - rpath;
-              if (end - start + 1 > path_max)
-                new_size += end - start + 1;
-              else
-                new_size += path_max;
-              new_rpath = (char *) realloc (rpath, new_size);
-              if (new_rpath == NULL)
-                {
-                  alloc_failed ();
-                  goto error;
-                }
-              rpath = new_rpath;
-              rpath_limit = rpath + new_size;
-
-              dest = rpath + dest_offset;
+              idx_t dest_offset = dest - rname;
+              if (!scratch_buffer_grow_preserve (rname_buf))
+                goto error_nomem;
+              rname = rname_buf->data;
+              dest = rname + dest_offset;
             }
 
-#ifdef _LIBC
-          dest = __mempcpy (dest, start, end - start);
-#else
-          memcpy (dest, start, end - start);
-          dest += end - start;
-#endif
+          dest = __mempcpy (dest, start, startlen);
           *dest = '\0';
 
-          /* FIXME: if lstat fails with errno == EOVERFLOW,
-             the entry exists.  */
-#ifdef _LIBC
-          if (__lxstat64 (_STAT_VER, rpath, &st) < 0)
-#else
-          if (lstat (rpath, &st) < 0)
-#endif
-            goto error;
-
-          if (S_ISLNK (st.st_mode))
+          char *buf;
+          ssize_t n;
+          while (true)
             {
-              char *buf;
-              size_t len;
-              ssize_t n;
-
-              if (++num_links > MAXSYMLINKS)
+              buf = link_buffer.data;
+              idx_t bufsize = link_buffer.length;
+              n = __readlink (rname, buf, bufsize - 1);
+              if (n < bufsize - 1)
+                break;
+              if (!scratch_buffer_grow (&link_buffer))
+                goto error_nomem;
+            }
+          if (0 <= n)
+            {
+              if (++num_links > __eloop_threshold ())
                 {
                   __set_errno (ELOOP);
                   goto error;
                 }
 
-              buf = malloca (path_max);
-              if (!buf)
-                {
-                  __set_errno (ENOMEM);
-                  goto error;
-                }
-
-              n = __readlink (rpath, buf, path_max - 1);
-              if (n < 0)
-                {
-                  int saved_errno = errno;
-                  freea (buf);
-                  __set_errno (saved_errno);
-                  goto error;
-                }
               buf[n] = '\0';
 
-              if (!extra_buf)
+              char *extra_buf = extra_buffer.data;
+              idx_t end_idx IF_LINT (= 0);
+              if (end_in_extra_buffer)
+                end_idx = end - extra_buf;
+              size_t len = strlen (end);
+              if (INT_ADD_OVERFLOW (len, n))
                 {
-                  extra_buf = malloca (path_max);
-                  if (!extra_buf)
-                    {
-                      freea (buf);
-                      __set_errno (ENOMEM);
-                      goto error;
-                    }
+                  __set_errno (ENOMEM);
+                  goto error_nomem;
                 }
-
-              len = strlen (end);
-              /* Check that n + len + 1 doesn't overflow and is <= path_max. */
-              if (n >= SIZE_MAX - len || n + len >= path_max)
+              while (extra_buffer.length <= len + n)
                 {
-                  freea (buf);
-                  __set_errno (ENAMETOOLONG);
-                  goto error;
+                  if (!scratch_buffer_grow_preserve (&extra_buffer))
+                    goto error_nomem;
+                  extra_buf = extra_buffer.data;
                 }
+              if (end_in_extra_buffer)
+                end = extra_buf + end_idx;
 
               /* Careful here, end may be a pointer into extra_buf... */
               memmove (&extra_buf[n], end, len + 1);
               name = end = memcpy (extra_buf, buf, n);
+              end_in_extra_buffer = true;
 
               if (IS_ABSOLUTE_FILE_NAME (buf))
                 {
-                  size_t pfxlen = FILE_SYSTEM_PREFIX_LEN (buf);
+                  idx_t pfxlen = FILE_SYSTEM_PREFIX_LEN (buf);
 
-                  if (pfxlen)
-                    memcpy (rpath, buf, pfxlen);
-                  dest = rpath + pfxlen;
+                  dest = __mempcpy (rname, buf, pfxlen);
                   *dest++ = '/'; /* It's an absolute symlink */
                   if (DOUBLE_SLASH_IS_DISTINCT_ROOT)
                     {
@@ -353,44 +377,67 @@ __realpath (const char *name, char *resolved)
                 {
                   /* Back up to previous component, ignore if at root
                      already: */
-                  if (dest > rpath + prefix_len + 1)
-                    for (--dest; dest > rpath && !ISSLASH (dest[-1]); --dest)
+                  if (dest > rname + prefix_len + 1)
+                    for (--dest; dest > rname && !ISSLASH (dest[-1]); --dest)
                       continue;
-                  if (DOUBLE_SLASH_IS_DISTINCT_ROOT && dest == rpath + 1
+                  if (DOUBLE_SLASH_IS_DISTINCT_ROOT && dest == rname + 1
                       && ISSLASH (*dest) && !ISSLASH (dest[1]) && !prefix_len)
                     dest++;
                 }
             }
-          else if (!S_ISDIR (st.st_mode) && *end != '\0')
-            {
-              __set_errno (ENOTDIR);
-              goto error;
-            }
+          else if (! (suffix_requires_dir_check (end)
+                      ? dir_check (rname, dest)
+                      : errno == EINVAL))
+            goto error;
         }
     }
-  if (dest > rpath + prefix_len + 1 && ISSLASH (dest[-1]))
+  if (dest > rname + prefix_len + 1 && ISSLASH (dest[-1]))
     --dest;
-  if (DOUBLE_SLASH_IS_DISTINCT_ROOT && dest == rpath + 1 && !prefix_len
+  if (DOUBLE_SLASH_IS_DISTINCT_ROOT && dest == rname + 1 && !prefix_len
       && ISSLASH (*dest) && !ISSLASH (dest[1]))
     dest++;
-  *dest = '\0';
+  failed = false;
 
-  if (extra_buf)
-    freea (extra_buf);
+error:
+  *dest++ = '\0';
+  if (resolved != NULL && dest - rname <= get_path_max ())
+    rname = strcpy (resolved, rname);
 
-  return rpath;
+error_nomem:
+  scratch_buffer_free (&extra_buffer);
+  scratch_buffer_free (&link_buffer);
 
-error:
-  {
-    int saved_errno = errno;
-    if (extra_buf)
-      freea (extra_buf);
-    if (resolved == NULL)
-      free (rpath);
-    __set_errno (saved_errno);
-  }
-  return NULL;
+  if (failed || rname == resolved)
+    {
+      scratch_buffer_free (rname_buf);
+      return failed ? NULL : resolved;
+    }
+
+  return scratch_buffer_dupfree (rname_buf, dest - rname);
 }
+
+/* Return the canonical absolute name of file NAME.  A canonical name
+   does not contain any ".", ".." components nor any repeated file name
+   separators ('/') or symlinks.  All file name components must exist.  If
+   RESOLVED is null, the result is malloc'd; otherwise, if the
+   canonical name is PATH_MAX chars or more, returns null with 'errno'
+   set to ENAMETOOLONG; if the name fits in fewer than PATH_MAX chars,
+   returns the name in RESOLVED.  If the name cannot be resolved and
+   RESOLVED is non-NULL, it contains the name of the first component
+   that cannot be resolved.  If the name can be resolved, RESOLVED
+   holds the same value as the value returned.  */
+
+char *
+__realpath (const char *name, char *resolved)
+{
+  #ifdef GCC_BOGUS_WRETURN_LOCAL_ADDR
+   #warning "GCC might issue a bogus -Wreturn-local-addr warning here."
+   #warning "See <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93644>."
+  #endif
+  struct scratch_buffer rname_buffer;
+  return realpath_stk (name, resolved, &rname_buffer);
+}
+libc_hidden_def (__realpath)
 versioned_symbol (libc, __realpath, realpath, GLIBC_2_3);
 #endif /* !FUNC_REALPATH_WORKS || defined _LIBC */
 
@@ -418,11 +465,3 @@ __canonicalize_file_name (const char *name)
   return __realpath (name, NULL);
 }
 weak_alias (__canonicalize_file_name, canonicalize_file_name)
-
-#else
-
-/* This declaration is solely to ensure that after preprocessing
-   this file is never empty.  */
-typedef int dummy;
-
-#endif
index d8e4a00033309906bba887c7b84240d68bacdab8..03e26d47dcb2fdfe88d0cb0eefc7853e8e459aa8 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2021 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -25,7 +25,7 @@
 
 /* The GNU libc does not support any K&R compilers or the traditional mode
    of ISO C compilers anymore.  Check for some of the combinations not
-   anymore supported.  */
+   supported anymore.  */
 #if defined __GNUC__ && !defined __STDC__
 # error "You need a ISO C conforming compiler to use the glibc headers"
 #endif
 #undef __P
 #undef __PMT
 
-#ifdef __GNUC__
+/* Compilers that are not clang may object to
+       #if defined __clang__ && __has_attribute(...)
+   even though they do not need to evaluate the right-hand side of the &&.  */
+#if defined __clang__ && defined __has_attribute
+# define __glibc_clang_has_attribute(name) __has_attribute (name)
+#else
+# define __glibc_clang_has_attribute(name) 0
+#endif
+
+/* Compilers that are not clang may object to
+       #if defined __clang__ && __has_builtin(...)
+   even though they do not need to evaluate the right-hand side of the &&.  */
+#if defined __clang__ && defined __has_builtin
+# define __glibc_clang_has_builtin(name) __has_builtin (name)
+#else
+# define __glibc_clang_has_builtin(name) 0
+#endif
+
+/* Compilers that are not clang may object to
+       #if defined __clang__ && __has_extension(...)
+   even though they do not need to evaluate the right-hand side of the &&.  */
+#if defined __clang__ && defined __has_extension
+# define __glibc_clang_has_extension(ext) __has_extension (ext)
+#else
+# define __glibc_clang_has_extension(ext) 0
+#endif
+
+#if defined __GNUC__ || defined __clang__
 
 /* All functions, except those with callbacks or those that
    synchronize memory, are leaf functions.  */
 # endif
 
 /* GCC can always grok prototypes.  For C++ programs we add throw()
-   to help it optimize the function calls.  But this works only with
-   gcc 2.8.x and egcs.  For gcc 3.2 and up we even mark C functions
+   to help it optimize the function calls.  But this only works with
+   gcc 2.8.x and egcs.  For gcc 3.4 and up we even mark C functions
    as non-throwing using a function attribute since programs can use
    the -fexceptions options for C code as well.  */
-# if !defined __cplusplus && __GNUC_PREREQ (3, 3)
+# if !defined __cplusplus \
+     && (__GNUC_PREREQ (3, 4) || __glibc_clang_has_attribute (__nothrow__))
 #  define __THROW      __attribute__ ((__nothrow__ __LEAF))
 #  define __THROWNL    __attribute__ ((__nothrow__))
 #  define __NTH(fct)   __attribute__ ((__nothrow__ __LEAF)) fct
 #  define __NTHNL(fct)  __attribute__ ((__nothrow__)) fct
 # else
-#  if defined __cplusplus && __GNUC_PREREQ (2,8)
-#   define __THROW     throw ()
-#   define __THROWNL   throw ()
-#   define __NTH(fct)  __LEAF_ATTR fct throw ()
-#   define __NTHNL(fct) fct throw ()
+#  if defined __cplusplus && (__GNUC_PREREQ (2,8) || __clang_major >= 4)
+#   if __cplusplus >= 201103L
+#    define __THROW    noexcept (true)
+#   else
+#    define __THROW    throw ()
+#   endif
+#   define __THROWNL   __THROW
+#   define __NTH(fct)  __LEAF_ATTR fct __THROW
+#   define __NTHNL(fct) fct __THROW
 #  else
 #   define __THROW
 #   define __THROWNL
 #  endif
 # endif
 
-#else  /* Not GCC.  */
+#else  /* Not GCC or clang.  */
 
 # if (defined __cplusplus                                              \
       || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L))
 # define __THROWNL
 # define __NTH(fct)    fct
 
-#endif /* GCC.  */
-
-/* Compilers that are not clang may object to
-       #if defined __clang__ && __has_extension(...)
-   even though they do not need to evaluate the right-hand side of the &&.  */
-#if defined __clang__ && defined __has_extension
-# define __glibc_clang_has_extension(ext) __has_extension (ext)
-#else
-# define __glibc_clang_has_extension(ext) 0
-#endif
+#endif /* GCC || clang.  */
 
 /* These two macros are not used in glibc anymore.  They are kept here
    only because some other projects expect the macros to be defined.  */
 #define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1)
 #define __bos0(ptr) __builtin_object_size (ptr, 0)
 
+/* Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available.  */
+#if __USE_FORTIFY_LEVEL == 3 && __glibc_clang_prereq (9, 0)
+# define __glibc_objsize0(__o) __builtin_dynamic_object_size (__o, 0)
+# define __glibc_objsize(__o) __builtin_dynamic_object_size (__o, 1)
+#else
+# define __glibc_objsize0(__o) __bos0 (__o)
+# define __glibc_objsize(__o) __bos (__o)
+#endif
+
 #if __GNUC_PREREQ (4,3)
-# define __warndecl(name, msg) \
-  extern void name (void) __attribute__((__warning__ (msg)))
 # define __warnattr(msg) __attribute__((__warning__ (msg)))
 # define __errordecl(name, msg) \
   extern void name (void) __attribute__((__error__ (msg)))
 #else
-# define __warndecl(name, msg) extern void name (void)
 # define __warnattr(msg)
 # define __errordecl(name, msg) extern void name (void)
 #endif
 #if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L && !defined __HP_cc
 # define __flexarr     []
 # define __glibc_c99_flexarr_available 1
-#elif __GNUC_PREREQ (2,97)
-/* GCC 2.97 supports C99 flexible array members as an extension,
+#elif __GNUC_PREREQ (2,97) || defined __clang__
+/* GCC 2.97 and clang support C99 flexible array members as an extension,
    even when in C89 mode or compiling C++ (any version).  */
 # define __flexarr     []
 # define __glibc_c99_flexarr_available 1
    Example:
    int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); */
 
-#if defined __GNUC__ && __GNUC__ >= 2
+#if (defined __GNUC__ && __GNUC__ >= 2) || (__clang_major__ >= 4)
 
 # define __REDIRECT(name, proto, alias) name proto __asm__ (__ASMNAME (#alias))
 # ifdef __cplusplus
 */
 #endif
 
-/* GCC has various useful declarations that can be made with the
-   `__attribute__' syntax.  All of the ways we use this do fine if
-   they are omitted for compilers that don't understand it. */
-#if !defined __GNUC__ || __GNUC__ < 2
+/* GCC and clang have various useful declarations that can be made with
+   the '__attribute__' syntax.  All of the ways we use this do fine if
+   they are omitted for compilers that don't understand it.  */
+#if !(defined __GNUC__ || defined __clang__)
 # define __attribute__(xyz)    /* Ignore */
 #endif
 
 /* At some point during the gcc 2.96 development the `malloc' attribute
    for functions was introduced.  We don't want to use it unconditionally
    (although this would be possible) since it generates warnings.  */
-#if __GNUC_PREREQ (2,96)
+#if __GNUC_PREREQ (2,96) || __glibc_clang_has_attribute (__malloc__)
 # define __attribute_malloc__ __attribute__ ((__malloc__))
 #else
 # define __attribute_malloc__ /* Ignore */
 /* At some point during the gcc 2.96 development the `pure' attribute
    for functions was introduced.  We don't want to use it unconditionally
    (although this would be possible) since it generates warnings.  */
-#if __GNUC_PREREQ (2,96)
+#if __GNUC_PREREQ (2,96) || __glibc_clang_has_attribute (__pure__)
 # define __attribute_pure__ __attribute__ ((__pure__))
 #else
 # define __attribute_pure__ /* Ignore */
 #endif
 
 /* This declaration tells the compiler that the value is constant.  */
-#if __GNUC_PREREQ (2,5)
+#if __GNUC_PREREQ (2,5) || __glibc_clang_has_attribute (__const__)
 # define __attribute_const__ __attribute__ ((__const__))
 #else
 # define __attribute_const__ /* Ignore */
 /* At some point during the gcc 3.1 development the `used' attribute
    for functions was introduced.  We don't want to use it unconditionally
    (although this would be possible) since it generates warnings.  */
-#if __GNUC_PREREQ (3,1)
+#if __GNUC_PREREQ (3,1) || __glibc_clang_has_attribute (__used__)
 # define __attribute_used__ __attribute__ ((__used__))
 # define __attribute_noinline__ __attribute__ ((__noinline__))
 #else
 #endif
 
 /* Since version 3.2, gcc allows marking deprecated functions.  */
-#if __GNUC_PREREQ (3,2)
+#if __GNUC_PREREQ (3,2) || __glibc_clang_has_attribute (__deprecated__)
 # define __attribute_deprecated__ __attribute__ ((__deprecated__))
 #else
 # define __attribute_deprecated__ /* Ignore */
 /* Since version 4.5, gcc also allows one to specify the message printed
    when a deprecated function is used.  clang claims to be gcc 4.2, but
    may also support this feature.  */
-#if __GNUC_PREREQ (4,5) || \
-    __glibc_clang_has_extension (__attribute_deprecated_with_message__)
+#if __GNUC_PREREQ (4,5) \
+    || __glibc_clang_has_extension (__attribute_deprecated_with_message__)
 # define __attribute_deprecated_msg__(msg) \
         __attribute__ ((__deprecated__ (msg)))
 #else
    If several `format_arg' attributes are given for the same function, in
    gcc-3.0 and older, all but the last one are ignored.  In newer gccs,
    all designated arguments are considered.  */
-#if __GNUC_PREREQ (2,8)
+#if __GNUC_PREREQ (2,8) || __glibc_clang_has_attribute (__format_arg__)
 # define __attribute_format_arg__(x) __attribute__ ((__format_arg__ (x)))
 #else
 # define __attribute_format_arg__(x) /* Ignore */
    attribute for functions was introduced.  We don't want to use it
    unconditionally (although this would be possible) since it
    generates warnings.  */
-#if __GNUC_PREREQ (2,97)
+#if __GNUC_PREREQ (2,97) || __glibc_clang_has_attribute (__format__)
 # define __attribute_format_strfmon__(a,b) \
   __attribute__ ((__format__ (__strfmon__, a, b)))
 #else
    must not be NULL.  Do not define __nonnull if it is already defined,
    for portability when this file is used in Gnulib.  */
 #ifndef __nonnull
-# if __GNUC_PREREQ (3,3)
+# if __GNUC_PREREQ (3,3) || __glibc_clang_has_attribute (__nonnull__)
 #  define __nonnull(params) __attribute__ ((__nonnull__ params))
 # else
 #  define __nonnull(params)
 
 /* If fortification mode, we warn about unused results of certain
    function calls which can lead to problems.  */
-#if __GNUC_PREREQ (3,4)
+#if __GNUC_PREREQ (3,4) || __glibc_clang_has_attribute (__warn_unused_result__)
 # define __attribute_warn_unused_result__ \
    __attribute__ ((__warn_unused_result__))
 # if defined __USE_FORTIFY_LEVEL && __USE_FORTIFY_LEVEL > 0
 #endif
 
 /* Forces a function to be always inlined.  */
-#if __GNUC_PREREQ (3,2)
+#if __GNUC_PREREQ (3,2) || __glibc_clang_has_attribute (__always_inline__)
 /* The Linux kernel defines __always_inline in stddef.h (283d7573), and
    it conflicts with this definition.  Therefore undefine it first to
    allow either header to be included first.  */
 
 /* Associate error messages with the source location of the call site rather
    than with the source location inside the function.  */
-#if __GNUC_PREREQ (4,3)
+#if __GNUC_PREREQ (4,3) || __glibc_clang_has_attribute (__artificial__)
 # define __attribute_artificial__ __attribute__ ((__artificial__))
 #else
 # define __attribute_artificial__ /* Ignore */
    run in pedantic mode if the uses are carefully marked using the
    `__extension__' keyword.  But this is not generally available before
    version 2.8.  */
-#if !__GNUC_PREREQ (2,8)
+#if !(__GNUC_PREREQ (2,8) || defined __clang__)
 # define __extension__         /* Ignore */
 #endif
 
-/* __restrict is known in EGCS 1.2 and above. */
-#if !__GNUC_PREREQ (2,92)
+/* __restrict is known in EGCS 1.2 and above, and in clang.
+   It works also in C++ mode (outside of arrays), but only when spelled
+   as '__restrict', not 'restrict'.  */
+#if !(__GNUC_PREREQ (2,92) || __clang_major__ >= 3)
 # if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
 #  define __restrict   restrict
 # else
 
 /* ISO C99 also allows to declare arrays as non-overlapping.  The syntax is
      array_name[restrict]
-   GCC 3.1 supports this.  */
-#if __GNUC_PREREQ (3,1) && !defined __GNUG__
+   GCC 3.1 and clang support this.
+   This syntax is not usable in C++ mode.  */
+#if (__GNUC_PREREQ (3,1) || __clang_major__ >= 3) && !defined __cplusplus
 # define __restrict_arr        __restrict
 #else
 # ifdef __GNUC__
 # endif
 #endif
 
-#if __GNUC__ >= 3
+#if (__GNUC__ >= 3) || __glibc_clang_has_builtin (__builtin_expect)
 # define __glibc_unlikely(cond)        __builtin_expect ((cond), 0)
 # define __glibc_likely(cond)  __builtin_expect ((cond), 1)
 #else
 
 #if (!defined _Noreturn \
      && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \
-     &&  !__GNUC_PREREQ (4,7))
+     &&  !(__GNUC_PREREQ (4,7) \
+           || (3 < __clang_major__ + (5 <= __clang_minor__))))
 # if __GNUC_PREREQ (2,8)
 #  define _Noreturn __attribute__ ((__noreturn__))
 # else
 # define __attribute_nonstring__
 #endif
 
+/* Undefine (also defined in libc-symbols.h).  */
+#undef __attribute_copy__
+#if __GNUC_PREREQ (9, 0)
+/* Copies attributes from the declaration or type referenced by
+   the argument.  */
+# define __attribute_copy__(arg) __attribute__ ((__copy__ (arg)))
+#else
+# define __attribute_copy__(arg)
+#endif
+
 #if (!defined _Static_assert && !defined __cplusplus \
      && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \
-     && (!__GNUC_PREREQ (4, 6) || defined __STRICT_ANSI__))
+     && (!(__GNUC_PREREQ (4, 6) || __clang_major__ >= 4) \
+         || defined __STRICT_ANSI__))
 # define _Static_assert(expr, diagnostic) \
     extern int (*__Static_assert_function (void)) \
       [!!sizeof (struct { int __error_if_negative: (expr) ? 2 : -1; })]
 # include <bits/long-double.h>
 #endif
 
-#if defined __LONG_DOUBLE_MATH_OPTIONAL && defined __NO_LONG_DOUBLE_MATH
+#if __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
+# ifdef __REDIRECT
+
+/* Alias name defined automatically.  */
+#  define __LDBL_REDIR(name, proto) ... unused__ldbl_redir
+#  define __LDBL_REDIR_DECL(name) \
+  extern __typeof (name) name __asm (__ASMNAME ("__" #name "ieee128"));
+
+/* Alias name defined automatically, with leading underscores.  */
+#  define __LDBL_REDIR2_DECL(name) \
+  extern __typeof (__##name) __##name \
+    __asm (__ASMNAME ("__" #name "ieee128"));
+
+/* Alias name defined manually.  */
+#  define __LDBL_REDIR1(name, proto, alias) ... unused__ldbl_redir1
+#  define __LDBL_REDIR1_DECL(name, alias) \
+  extern __typeof (name) name __asm (__ASMNAME (#alias));
+
+#  define __LDBL_REDIR1_NTH(name, proto, alias) \
+  __REDIRECT_NTH (name, proto, alias)
+#  define __REDIRECT_NTH_LDBL(name, proto, alias) \
+  __LDBL_REDIR1_NTH (name, proto, __##alias##ieee128)
+
+/* Unused.  */
+#  define __REDIRECT_LDBL(name, proto, alias) ... unused__redirect_ldbl
+#  define __LDBL_REDIR_NTH(name, proto) ... unused__ldbl_redir_nth
+
+# else
+_Static_assert (0, "IEEE 128-bits long double requires redirection on this platform");
+# endif
+#elif defined __LONG_DOUBLE_MATH_OPTIONAL && defined __NO_LONG_DOUBLE_MATH
 # define __LDBL_COMPAT 1
 # ifdef __REDIRECT
 #  define __LDBL_REDIR1(name, proto, alias) __REDIRECT (name, proto, alias)
 #  define __LDBL_REDIR1_NTH(name, proto, alias) __REDIRECT_NTH (name, proto, alias)
 #  define __LDBL_REDIR_NTH(name, proto) \
   __LDBL_REDIR1_NTH (name, proto, __nldbl_##name)
+#  define __LDBL_REDIR2_DECL(name) \
+  extern __typeof (__##name) __##name __asm (__ASMNAME ("__nldbl___" #name));
 #  define __LDBL_REDIR1_DECL(name, alias) \
   extern __typeof (name) name __asm (__ASMNAME (#alias));
 #  define __LDBL_REDIR_DECL(name) \
   __LDBL_REDIR1_NTH (name, proto, __nldbl_##alias)
 # endif
 #endif
-#if !defined __LDBL_COMPAT || !defined __REDIRECT
+#if (!defined __LDBL_COMPAT && __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0) \
+    || !defined __REDIRECT
 # define __LDBL_REDIR1(name, proto, alias) name proto
 # define __LDBL_REDIR(name, proto) name proto
 # define __LDBL_REDIR1_NTH(name, proto, alias) name proto __THROW
 # define __LDBL_REDIR_NTH(name, proto) name proto __THROW
+# define __LDBL_REDIR2_DECL(name)
 # define __LDBL_REDIR_DECL(name)
 # ifdef __REDIRECT
 #  define __REDIRECT_LDBL(name, proto, alias) __REDIRECT (name, proto, alias)
 # define __HAVE_GENERIC_SELECTION 0
 #endif
 
+#if __GNUC_PREREQ (10, 0)
+/* Designates a 1-based positional argument ref-index of pointer type
+   that can be used to access size-index elements of the pointed-to
+   array according to access mode, or at least one element when
+   size-index is not provided:
+     access (access-mode, <ref-index> [, <size-index>])  */
+#define __attr_access(x) __attribute__ ((__access__ x))
+#else
+#  define __attr_access(x)
+#endif
+
+/* Specify that a function such as setjmp or vfork may return
+   twice.  */
+#if __GNUC_PREREQ (4, 1)
+# define __attribute_returns_twice__ __attribute__ ((__returns_twice__))
+#else
+# define __attribute_returns_twice__ /* Ignore.  */
+#endif
+
 #endif  /* sys/cdefs.h */
index a38d38c42f02fd59b0417776316f7dae7d3f2ef1..0d693b023a120b8efec220fbb3a37ba68da37b22 100644 (file)
@@ -1,5 +1,5 @@
 /* provide a chdir function that tries not to fail due to ENAMETOOLONG
-   Copyright (C) 2004-2020 Free Software Foundation, Inc.
+   Copyright (C) 2004-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 851222fe73a25307543c555fc1a54bacf132d669..17d9aa5285e944516b9fc1059d44ae6044f849c2 100644 (file)
@@ -1,5 +1,5 @@
 /* provide a chdir function that tries not to fail due to ENAMETOOLONG
-   Copyright (C) 2004-2005, 2009-2020 Free Software Foundation, Inc.
+   Copyright (C) 2004-2005, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 510be3d57ec00c7eb57d20934d8da24672155860..8363ddaa609f1bfe24040915b095476ce2aa5224 100644 (file)
@@ -1,6 +1,6 @@
 /* cloexec.c - set or clear the close-on-exec descriptor flag
 
-   Copyright (C) 1991, 2004-2006, 2009-2020 Free Software Foundation, Inc.
+   Copyright (C) 1991, 2004-2006, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index f14a99736d50c62aa421b8cbdafa9b69e485325e..5ca0e6413e7c3530719eec22fa70eeff8ba2aa18 100644 (file)
@@ -1,6 +1,6 @@
 /* cloexec.c - set or clear the close-on-exec descriptor flag
 
-   Copyright (C) 2004, 2009-2020 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 0c8780dc24abba7f58f0d8e9f9fbf10152362905..e1264d523424186b4e9a91a4a58e8ec276a1d161 100644 (file)
@@ -1,5 +1,5 @@
 /* close replacement.
-   Copyright (C) 2008-2020 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -28,7 +28,8 @@
 
 #undef close
 
-#if HAVE_MSVC_INVALID_PARAMETER_HANDLER
+#if defined _WIN32 && !defined __CYGWIN__
+# if HAVE_MSVC_INVALID_PARAMETER_HANDLER
 static int
 close_nothrow (int fd)
 {
@@ -36,7 +37,7 @@ close_nothrow (int fd)
 
   TRY_MSVC_INVAL
     {
-      result = close (fd);
+      result = _close (fd);
     }
   CATCH_MSVC_INVAL
     {
@@ -47,6 +48,9 @@ close_nothrow (int fd)
 
   return result;
 }
+# else
+#  define close_nothrow _close
+# endif
 #else
 # define close_nothrow close
 #endif
index 9afaa1f01553d7b7667cdb40520b0bb211bfe968..0847422c73191f9b1434a3d24394d6b0dc25becc 100644 (file)
@@ -1,5 +1,5 @@
 /* Stop reading the entries of a directory.
-   Copyright (C) 2006-2020 Free Software Foundation, Inc.
+   Copyright (C) 2006-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 6c5b75708cf607fbbf8515503c19c0aad4a1f1ca..1a14f11f152cf6be96a85c52c8a3ffc3eecbabef 100644 (file)
@@ -1,5 +1,5 @@
 /* count-one-bits.h -- counts the number of 1-bits in a word.
-   Copyright (C) 2007-2020 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -38,7 +38,8 @@ extern "C" {
    expand to code that computes the number of 1-bits of the local
    variable 'x' of type TYPE (an unsigned integer type) and return it
    from the current function.  */
-#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) \
+    || (__clang_major__ >= 4)
 # define COUNT_ONE_BITS(GCC_BUILTIN, MSC_BUILTIN, TYPE) \
     return GCC_BUILTIN (x)
 #else
index 555677a447531d82615d1f7e78423f3e847efd27..511a362188ee9315b9a631405b70e7d1b6fe86cd 100644 (file)
@@ -1,6 +1,6 @@
 /* A substitute for ISO C99 <ctype.h>, for platforms on which it is incomplete.
 
-   Copyright (C) 2009-2020 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index a3c684439ffc6f0d3aea172ed73190485890c802..eaba1b9fe4990a196eb0edf5bc6619da4b7fda64 100644 (file)
@@ -1,5 +1,5 @@
 /* Private details of the DIR type.
-   Copyright (C) 2011-2020 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 6fa44f0d28d5f0dc58a827b4ce73ea9c20523396..2e2c5119a11b7ecddd82dbd2548fa255b1a3704d 100644 (file)
@@ -1,5 +1,5 @@
 /* A GNU-like <dirent.h>.
-   Copyright (C) 2006-2020 Free Software Foundation, Inc.
+   Copyright (C) 2006-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -58,7 +58,7 @@ typedef struct gl_directory DIR;
 /* The __attribute__ feature is available in gcc versions 2.5 and later.
    The attribute __pure__ was added in gcc 2.96.  */
 #ifndef _GL_ATTRIBUTE_PURE
-# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
+# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined __clang__
 #  define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
 # else
 #  define _GL_ATTRIBUTE_PURE /* empty */
index f6539772feb1dd914b4a9455ca25fe8472ccd427..ced7531c5e05250ba34c61f0b07ea0959089986c 100644 (file)
@@ -1,6 +1,6 @@
 /* dirfd.c -- return the file descriptor associated with an open DIR*
 
-   Copyright (C) 2001, 2006, 2008-2020 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2006, 2008-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 27d4374c2e71712d64268273b1cdb5b84fe673c3..cfdac0391dfcb9b781142ad19500ece496d9a967 100644 (file)
@@ -1,6 +1,6 @@
 /* dirname.c -- return all but the last element in a file name
 
-   Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2020 Free Software
+   Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2021 Free Software
    Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
index 5379e8e3d2cd853c3e3d134fb5c0bc71e530cc03..25116ab56f497f6bbcee4dff0df8d6b542679615 100644 (file)
@@ -1,6 +1,6 @@
 /*  Take file names apart into directory and base names.
 
-    Copyright (C) 1998, 2001, 2003-2006, 2009-2020 Free Software Foundation,
+    Copyright (C) 1998, 2001, 2003-2006, 2009-2021 Free Software Foundation,
     Inc.
 
     This program is free software: you can redistribute it and/or modify
 # include <stdbool.h>
 # include <stddef.h>
 # include "filename.h"
+# include "basename-lgpl.h"
 
 # ifndef DIRECTORY_SEPARATOR
 #  define DIRECTORY_SEPARATOR '/'
 # endif
 
-# ifndef DOUBLE_SLASH_IS_DISTINCT_ROOT
-#  define DOUBLE_SLASH_IS_DISTINCT_ROOT 0
-# endif
-
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -41,9 +38,7 @@ char *dir_name (char const *file);
 # endif
 
 char *mdir_name (char const *file);
-size_t base_len (char const *file) _GL_ATTRIBUTE_PURE;
 size_t dir_len (char const *file) _GL_ATTRIBUTE_PURE;
-char *last_component (char const *file) _GL_ATTRIBUTE_PURE;
 
 bool strip_trailing_slashes (char *file);
 
index b2c345e0ed6513e60e8b021394c86cbfaca9951f..bba1354406466c53a98d2304ca76919d0e4b2fce 100644 (file)
@@ -1,7 +1,7 @@
 /* Duplicate a file descriptor result, avoiding clobbering
    STD{IN,OUT,ERR}_FILENO, with specific flags.
 
-   Copyright (C) 2001, 2004-2006, 2009-2020 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2004-2006, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 4ada3fe8d231f31f3ff8350c834e2058e6f41e20..2db1520004a7c888f235cc791004f8b870397a59 100644 (file)
@@ -1,6 +1,6 @@
 /* Invoke dup, but avoid some glitches.
 
-   Copyright (C) 2001, 2004-2006, 2009-2020 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2004-2006, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 974d4462ab9dce1217639ddfac79d4ba414a375b..104d4827c6a42726e8bb615f6c27e4c3c4d6a661 100644 (file)
@@ -1,6 +1,6 @@
 /* Duplicate an open file descriptor.
 
-   Copyright (C) 2011-2020 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -28,7 +28,8 @@
 
 #undef dup
 
-#if HAVE_MSVC_INVALID_PARAMETER_HANDLER
+#if defined _WIN32 && !defined __CYGWIN__
+# if HAVE_MSVC_INVALID_PARAMETER_HANDLER
 static int
 dup_nothrow (int fd)
 {
@@ -36,7 +37,7 @@ dup_nothrow (int fd)
 
   TRY_MSVC_INVAL
     {
-      result = dup (fd);
+      result = _dup (fd);
     }
   CATCH_MSVC_INVAL
     {
@@ -47,6 +48,9 @@ dup_nothrow (int fd)
 
   return result;
 }
+# else
+#  define dup_nothrow _dup
+# endif
 #elif defined __KLIBC__
 # include <fcntl.h>
 # include <sys/stat.h>
index 88ef2591313a0f2ab92b5f421dbd84c60911ff04..c4a0a29fbd0c2457c65e455f1d27ad6b5738a7c5 100644 (file)
@@ -1,6 +1,6 @@
 /* Duplicate an open file descriptor to a specified file descriptor.
 
-   Copyright (C) 1999, 2004-2007, 2009-2020 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2004-2007, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 #include <errno.h>
 #include <fcntl.h>
 
-#if HAVE_DUP2
+#undef dup2
 
-# undef dup2
-
-# if defined _WIN32 && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
 
 /* Get declarations of the native Windows API functions.  */
-#  define WIN32_LEAN_AND_MEAN
-#  include <windows.h>
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
 
-#  if HAVE_MSVC_INVALID_PARAMETER_HANDLER
-#   include "msvc-inval.h"
-#  endif
+# if HAVE_MSVC_INVALID_PARAMETER_HANDLER
+#  include "msvc-inval.h"
+# endif
 
 /* Get _get_osfhandle.  */
-#  if GNULIB_MSVC_NOTHROW
-#   include "msvc-nothrow.h"
-#  else
-#   include <io.h>
-#  endif
+# if GNULIB_MSVC_NOTHROW
+#  include "msvc-nothrow.h"
+# else
+#  include <io.h>
+# endif
 
-#  if HAVE_MSVC_INVALID_PARAMETER_HANDLER
+# if HAVE_MSVC_INVALID_PARAMETER_HANDLER
 static int
 dup2_nothrow (int fd, int desired_fd)
 {
@@ -54,7 +52,7 @@ dup2_nothrow (int fd, int desired_fd)
 
   TRY_MSVC_INVAL
     {
-      result = dup2 (fd, desired_fd);
+      result = _dup2 (fd, desired_fd);
     }
   CATCH_MSVC_INVAL
     {
@@ -65,9 +63,9 @@ dup2_nothrow (int fd, int desired_fd)
 
   return result;
 }
-#  else
-#   define dup2_nothrow dup2
-#  endif
+# else
+#  define dup2_nothrow _dup2
+# endif
 
 static int
 ms_windows_dup2 (int fd, int desired_fd)
@@ -103,11 +101,11 @@ ms_windows_dup2 (int fd, int desired_fd)
   return result;
 }
 
-#  define dup2 ms_windows_dup2
+# define dup2 ms_windows_dup2
 
-# elif defined __KLIBC__
+#elif defined __KLIBC__
 
-#  include <InnoTekLIBC/backend.h>
+# include <InnoTekLIBC/backend.h>
 
 static int
 klibc_dup2dirfd (int fd, int desired_fd)
@@ -155,81 +153,37 @@ klibc_dup2 (int fd, int desired_fd)
   return dupfd;
 }
 
-#  define dup2 klibc_dup2
-# endif
+# define dup2 klibc_dup2
+#endif
 
 int
 rpl_dup2 (int fd, int desired_fd)
 {
   int result;
 
-# ifdef F_GETFL
+#ifdef F_GETFL
   /* On Linux kernels 2.6.26-2.6.29, dup2 (fd, fd) returns -EBADF.
      On Cygwin 1.5.x, dup2 (1, 1) returns 0.
      On Cygwin 1.7.17, dup2 (1, -1) dumps core.
      On Cygwin 1.7.25, dup2 (1, 256) can dump core.
      On Haiku, dup2 (fd, fd) mistakenly clears FD_CLOEXEC.  */
-#  if HAVE_SETDTABLESIZE
+# if HAVE_SETDTABLESIZE
   setdtablesize (desired_fd + 1);
-#  endif
+# endif
   if (desired_fd < 0)
     fd = desired_fd;
   if (fd == desired_fd)
     return fcntl (fd, F_GETFL) == -1 ? -1 : fd;
-# endif
+#endif
 
   result = dup2 (fd, desired_fd);
 
   /* Correct an errno value on FreeBSD 6.1 and Cygwin 1.5.x.  */
   if (result == -1 && errno == EMFILE)
     errno = EBADF;
-# if REPLACE_FCHDIR
+#if REPLACE_FCHDIR
   if (fd != desired_fd && result != -1)
     result = _gl_register_dup (fd, result);
-# endif
-  return result;
-}
-
-#else /* !HAVE_DUP2 */
-
-/* On older platforms, dup2 did not exist.  */
-
-# ifndef F_DUPFD
-static int
-dupfd (int fd, int desired_fd)
-{
-  int duplicated_fd = dup (fd);
-  if (duplicated_fd < 0 || duplicated_fd == desired_fd)
-    return duplicated_fd;
-  else
-    {
-      int r = dupfd (fd, desired_fd);
-      int e = errno;
-      close (duplicated_fd);
-      errno = e;
-      return r;
-    }
-}
-# endif
-
-int
-dup2 (int fd, int desired_fd)
-{
-  int result = fcntl (fd, F_GETFL) < 0 ? -1 : fd;
-  if (result == -1 || fd == desired_fd)
-    return result;
-  close (desired_fd);
-# ifdef F_DUPFD
-  result = fcntl (fd, F_DUPFD, desired_fd);
-#  if REPLACE_FCHDIR
-  if (0 <= result)
-    result = _gl_register_dup (fd, result);
-#  endif
-# else
-  result = dupfd (fd, desired_fd);
-# endif
-  if (result == -1 && (errno == EMFILE || errno == EINVAL))
-    errno = EBADF;
+#endif
   return result;
 }
-#endif /* !HAVE_DUP2 */
diff --git a/gnulib/import/eloop-threshold.h b/gnulib/import/eloop-threshold.h
new file mode 100644 (file)
index 0000000..27d07a7
--- /dev/null
@@ -0,0 +1,83 @@
+/* Threshold at which to diagnose ELOOP.  Generic version.
+   Copyright (C) 2012-2021 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU General Public
+   License as published by the Free Software Foundation; either
+   version 3 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#ifndef _ELOOP_THRESHOLD_H
+#define _ELOOP_THRESHOLD_H      1
+
+#include <limits.h>
+#ifdef _LIBC
+# include <sys/param.h>
+# define _GL_ATTRIBUTE_CONST __attribute__ ((const))
+#else
+# include <unistd.h>
+# include "minmax.h"
+# define __sysconf sysconf
+# if (!defined SYMLOOP_MAX \
+      && ! (defined _SC_SYMLOOP_MAX && defined _POSIX_SYMLOOP_MAX))
+#  define SYMLOOP_MAX 8
+# endif
+#endif
+
+/* POSIX specifies SYMLOOP_MAX as the "Maximum number of symbolic
+   links that can be reliably traversed in the resolution of a
+   pathname in the absence of a loop."  This makes it a minimum that
+   we should certainly accept.  But it leaves open the possibility
+   that more might sometimes work--just not "reliably".
+
+   For example, Linux implements a complex policy whereby there is a
+   small limit on the number of direct symlink traversals (a symlink
+   to a symlink to a symlink), but larger limit on the total number of
+   symlink traversals overall.  Hence the SYMLOOP_MAX number should be
+   the small one, but the limit library functions enforce on users
+   should be the larger one.
+
+   So, we use the larger of the reported SYMLOOP_MAX (if any) and our
+   own constant MIN_ELOOP_THRESHOLD, below.  This constant should be
+   large enough that it never rules out a file name and directory tree
+   that the underlying system (i.e. calls to 'open' et al) would
+   resolve successfully.  It should be small enough that actual loops
+   are detected without a huge number of iterations.  */
+
+#ifndef MIN_ELOOP_THRESHOLD
+# define MIN_ELOOP_THRESHOLD    40
+#endif
+
+/* Return the maximum number of symlink traversals to permit
+   before diagnosing ELOOP.  */
+static inline unsigned int _GL_ATTRIBUTE_CONST
+__eloop_threshold (void)
+{
+#ifdef SYMLOOP_MAX
+  const int symloop_max = SYMLOOP_MAX;
+#else
+  /* The function is marked 'const' even though we use memory and
+     call a function, because sysconf is required to return the
+     same value in every call and so it must always be safe to
+     call __eloop_threshold exactly once and reuse the value.  */
+  static long int sysconf_symloop_max;
+  if (sysconf_symloop_max == 0)
+    sysconf_symloop_max = __sysconf (_SC_SYMLOOP_MAX);
+  const unsigned int symloop_max = (sysconf_symloop_max <= 0
+                                    ? _POSIX_SYMLOOP_MAX
+                                    : sysconf_symloop_max);
+#endif
+
+  return MAX (symloop_max, MIN_ELOOP_THRESHOLD);
+}
+
+#endif  /* eloop-threshold.h */
index c27e0c7ddee34c6c2ec8ac993e178cf85dfe06ee..c6ab4e88e15205b2cfa5d4b6aa9021723c61281b 100644 (file)
@@ -1,6 +1,6 @@
 /* A POSIX-like <errno.h>.
 
-   Copyright (C) 2008-2020 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 3657b51cdfeb8136df5b3e8e4330ed92d1b1fc8a..d17b5a667effe5c67654429650cd9ad48a7d9ef9 100644 (file)
@@ -1,5 +1,5 @@
 /* Error handler for noninteractive utilities
-   Copyright (C) 1990-1998, 2000-2007, 2009-2020 Free Software Foundation, Inc.
+   Copyright (C) 1990-1998, 2000-2007, 2009-2021 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    This program is free software: you can redistribute it and/or modify
@@ -40,7 +40,7 @@
 # include <wchar.h>
 # define mbsrtowcs __mbsrtowcs
 # define USE_UNLOCKED_IO 0
-# define _GL_ATTRIBUTE_FORMAT_PRINTF(a, b)
+# define _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD(a, b)
 # define _GL_ARG_NONNULL(a)
 #else
 # include "getprogname.h"
@@ -202,7 +202,7 @@ print_errno_message (int errnum)
 #endif
 }
 
-static void _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) _GL_ARG_NONNULL ((3))
+static void _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (3, 0) _GL_ARG_NONNULL ((3))
 error_tail (int status, int errnum, const char *message, va_list args)
 {
 #if _LIBC
index a351606f817cd810f8e709551e4b845fe494bae8..f65d0727c0f13f43b5dade9b94a350ef0a9108bb 100644 (file)
@@ -1,5 +1,5 @@
 /* Declaration for error-reporting function
-   Copyright (C) 1995-1997, 2003, 2006, 2008-2020 Free Software Foundation,
+   Copyright (C) 1995-1997, 2003, 2006, 2008-2021 Free Software Foundation,
    Inc.
    This file is part of the GNU C Library.
 
 #ifndef _ERROR_H
 #define _ERROR_H 1
 
-/* On mingw, the flavor of printf depends on whether the extensions module
- * is in use; the check for <stdio.h> determines the witness macro.  */
-#ifndef _GL_ATTRIBUTE_SPEC_PRINTF
-# if GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU
-#  define _GL_ATTRIBUTE_SPEC_PRINTF __gnu_printf__
-# else
-#  define _GL_ATTRIBUTE_SPEC_PRINTF __printf__
-# endif
-#endif
+/* Get _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, _GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM.  */
+#include <stdio.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -38,11 +31,21 @@ extern "C" {
    If STATUS is nonzero, terminate the program with 'exit (STATUS)'.  */
 
 extern void error (int __status, int __errnum, const char *__format, ...)
-     _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF, 3, 4));
+#if GNULIB_VFPRINTF_POSIX
+     _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, 3, 4))
+#else
+     _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM, 3, 4))
+#endif
+     ;
 
 extern void error_at_line (int __status, int __errnum, const char *__fname,
                            unsigned int __lineno, const char *__format, ...)
-     _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF, 5, 6));
+#if GNULIB_VFPRINTF_POSIX
+     _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, 5, 6))
+#else
+     _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM, 5, 6))
+#endif
+     ;
 
 /* If NULL, error will flush stdout, then print on stderr the program
    name, a colon and a space.  Otherwise, error will call this
index 189fa16f46a83c3d8afd8c507deb1e0697c2ace2..15ce2e6cf6750f431a9e1ffc7b382ec517a42635 100644 (file)
@@ -1,6 +1,6 @@
 /* Failure exit status
 
-   Copyright (C) 2002-2003, 2005-2007, 2009-2020 Free Software Foundation, Inc.
+   Copyright (C) 2002-2003, 2005-2007, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index a69a03bbd5b7a6507f115c3c05e5dd9d3148e080..571729c611d5f38f577e7349156f73f5ce6be76a 100644 (file)
@@ -1,6 +1,6 @@
 /* Failure exit status
 
-   Copyright (C) 2002, 2009-2020 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index d9b7f683a0887f281a43f1634548fd8a64ac975b..fae3a5fb33b47029c141c631c6f59b321aaab9ea 100755 (executable)
@@ -3,7 +3,7 @@
 
 # Update an FSF copyright year list to include the current year.
 
-# Copyright (C) 2009-2020 Free Software Foundation, Inc.
+# Copyright (C) 2009-2021 Free Software Foundation, Inc.
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
index 1fa9a7edc6b3662b45b8c5733811e21fc2d12b52..c6294cb9edab5b9f06d3e8dc1743a364033f5a9c 100644 (file)
@@ -1,5 +1,5 @@
 /* fchdir replacement.
-   Copyright (C) 2006-2020 Free Software Foundation, Inc.
+   Copyright (C) 2006-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 6b9927ec4e589ba60810698910898033a08d0e4a..9d6b10fa303100de67f047f908e000843b18e8c0 100644 (file)
@@ -1,6 +1,6 @@
 /* Provide file descriptor control.
 
-   Copyright (C) 2009-2020 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -70,14 +70,14 @@ dupfd (int oldfd, int newfd, int flags)
       return -1;
     }
   if (old_handle == INVALID_HANDLE_VALUE
-      || (mode = setmode (oldfd, O_BINARY)) == -1)
+      || (mode = _setmode (oldfd, O_BINARY)) == -1)
     {
       /* oldfd is not open, or is an unassigned standard file
          descriptor.  */
       errno = EBADF;
       return -1;
     }
-  setmode (oldfd, mode);
+  _setmode (oldfd, mode);
   flags |= mode;
 
   for (;;)
@@ -491,7 +491,9 @@ rpl_fcntl_DUPFD_CLOEXEC (int fd, int target)
 #if !HAVE_FCNTL
   result = dupfd (fd, target, O_CLOEXEC);
 #else /* HAVE_FCNTL */
-# if defined __HAIKU__
+# if defined __NetBSD__ || defined __HAIKU__
+  /* On NetBSD 9.0, the system fcntl (fd, F_DUPFD_CLOEXEC, target)
+     has only the same effect as fcntl (fd, F_DUPFD, target).  */
   /* On Haiku, the system fcntl (fd, F_DUPFD_CLOEXEC, target) sets
      the FD_CLOEXEC flag on fd, not on target.  Therefore avoid the
      system fcntl in this case.  */
index 0a21c957baf0850b6453a14dab7db93b3e8c9b6f..0b14467c54d0dc62b9c9dc5de1018f583d9e19a1 100644 (file)
@@ -1,6 +1,6 @@
 /* Like <fcntl.h>, but with non-working flags defined to 0.
 
-   Copyright (C) 2006-2020 Free Software Foundation, Inc.
+   Copyright (C) 2006-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 _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));
+# elif defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef creat
+#   define creat _creat
+#  endif
+_GL_CXXALIAS_MDA (creat, int, (const char *filename, mode_t mode));
 # else
 _GL_CXXALIAS_SYS (creat, int, (const char *filename, mode_t mode));
 # endif
@@ -106,6 +112,21 @@ _GL_CXXALIASWARN (creat);
 /* Assume creat is always declared.  */
 _GL_WARN_ON_USE (creat, "creat is not always POSIX compliant - "
                  "use gnulib module creat for portability");
+#elif @GNULIB_MDA_CREAT@
+/* On native Windows, map 'creat' to '_creat', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::creat always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef creat
+#   define creat _creat
+#  endif
+/* Need to cast, because in mingw the last argument is 'int mode'.  */
+_GL_CXXALIAS_MDA_CAST (creat, int, (const char *filename, mode_t mode));
+# else
+_GL_CXXALIAS_SYS (creat, int, (const char *filename, mode_t mode));
+# endif
+_GL_CXXALIASWARN (creat);
 #endif
 
 #if @GNULIB_FCNTL@
@@ -146,6 +167,12 @@ _GL_WARN_ON_USE (fcntl, "fcntl is not always POSIX compliant - "
 _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...)
                              _GL_ARG_NONNULL ((1)));
 _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...));
+# elif defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef open
+#   define open _open
+#  endif
+_GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...));
 # else
 _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
 # endif
@@ -159,6 +186,22 @@ _GL_CXXALIASWARN (open);
 /* Assume open is always declared.  */
 _GL_WARN_ON_USE (open, "open is not always POSIX compliant - "
                  "use gnulib module open for portability");
+#elif @GNULIB_MDA_OPEN@
+/* On native Windows, map 'open' to '_open', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::open always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef open
+#   define open _open
+#  endif
+_GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...));
+# else
+_GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
+# endif
+# if !defined __hpux
+_GL_CXXALIASWARN (open);
+# endif
 #endif
 
 #if @GNULIB_OPENAT@
index 8840f634880a52db28e951d604a93723391147e1..d8113eb63dfbf9ab8029c29d09fc0227c3e80235 100644 (file)
@@ -1,5 +1,5 @@
 /* Hook for making file descriptor functions close(), ioctl() extensible.
-   Copyright (C) 2009-2020 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2009.
 
    This program is free software: you can redistribute it and/or modify it
index ed1a15a230c54490d3ec4f0859d0b3b947d0c4f4..bf1f39449d834f46b2c7dd1d4ac69d8f71761055 100644 (file)
@@ -1,5 +1,5 @@
 /* Hook for making file descriptor functions close(), ioctl() extensible.
-   Copyright (C) 2009-2020 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published
index 8fdf8dbc16ac57365f33bda54b1d70fc2401c6dc..bfaef4de235fa60424f921d75e954173a1dd9da9 100644 (file)
@@ -1,7 +1,7 @@
 /* Adjust a file descriptor result so that it avoids clobbering
    STD{IN,OUT,ERR}_FILENO, with specific flags.
 
-   Copyright (C) 2005-2006, 2009-2020 Free Software Foundation, Inc.
+   Copyright (C) 2005-2006, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index e011c00308aad490736a5bf92385ce6614065e83..487b039f0d3068f68a68af39618b0e9fdee4390b 100644 (file)
@@ -1,6 +1,6 @@
 /* Return a safer copy of a file descriptor.
 
-   Copyright (C) 2005-2006, 2009-2020 Free Software Foundation, Inc.
+   Copyright (C) 2005-2006, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 883c0c43ec5143d3474ccd1880040fd169a24cd0..451b4e1321e9306046b45ce5df26b9e9369ac3ca 100644 (file)
@@ -1,5 +1,5 @@
 /* provide a replacement fdopendir function
-   Copyright (C) 2004-2020 Free Software Foundation, Inc.
+   Copyright (C) 2004-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 4598fb1d6381a3c5a078800b7a598d429dbbef07..541ffec0d537a6d455a0df0179dcb70bad7b83f6 100644 (file)
@@ -1,18 +1,20 @@
 /* Basic filename support macros.
-   Copyright (C) 2001-2004, 2007-2020 Free Software Foundation, Inc.
+   Copyright (C) 2001-2004, 2007-2021 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU General Public
+   License as published by the Free Software Foundation; either
+   version 3 of the License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
 
 /* From Paul Eggert and Jim Meyering.  */
 
index d97abfa373f27b0b61b17881e8acdbd84b2c8479..008a6407b50fdf4a831d0fbc41d1837dd32066df 100644 (file)
@@ -1,6 +1,6 @@
 /* Concatenate two arbitrary file names.
 
-   Copyright (C) 1996-2007, 2009-2020 Free Software Foundation, Inc.
+   Copyright (C) 1996-2007, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -25,7 +25,8 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "dirname.h"
+#include "basename-lgpl.h"
+#include "filename.h"
 
 #if ! HAVE_MEMPCPY && ! defined mempcpy
 # define mempcpy(D, S, N) ((void *) ((char *) memcpy (D, S, N) + (N)))
index 13387b40b5e108782db094bc0ea916b706cb43cc..15c5cf84723656e5d79c428b8aa3d219c72b3ee8 100644 (file)
@@ -1,6 +1,6 @@
 /* Concatenate two arbitrary file names.
 
-   Copyright (C) 1996-1997, 2003, 2005, 2007, 2009-2020 Free Software
+   Copyright (C) 1996-1997, 2003, 2005, 2007, 2009-2021 Free Software
    Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
index 0dc77c3c844b67e028ad3756e172ec30bcd3f015..9f6e1bf110589caaa8f1a6babb1605f88cbb56f4 100644 (file)
@@ -1,6 +1,6 @@
 /* Sizes of structs with flexible array members.
 
-   Copyright 2016-2020 Free Software Foundation, Inc.
+   Copyright 2016-2021 Free Software Foundation, Inc.
 
    This file is part of the GNU C Library.
 
index 1e19a7185a9c730e314cbbdcd7e295d9115b6223..97c0b0aa25d60c96549bcf348044ddfa379c703c 100644 (file)
@@ -1,5 +1,5 @@
 /* Supplemental information about the floating-point formats.
-   Copyright (C) 2007, 2009-2020 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2007.
 
    This program is free software; you can redistribute it and/or modify
index af20b0a0b8e4f8d913a73c7cabd2380e66d5923f..6ef47a440eb9965f8c8a9a63c9ca84d51d9eeeae 100644 (file)
@@ -1,5 +1,5 @@
 /* Auxiliary definitions for <float.h>.
-   Copyright (C) 2011-2020 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2011.
 
    This program is free software: you can redistribute it and/or modify
index 8e4d47dc0764e8cd2c49d7ba9206e3b990026fa8..d2ac0cd26f7d9e093b38fb53336b14a80701b518 100644 (file)
@@ -1,6 +1,6 @@
 /* A correct <float.h>.
 
-   Copyright (C) 2007-2020 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
      extern const long double LDBL_MAX;
 
    Unfortunately, this is not a constant expression.  */
+# if !GNULIB_defined_long_double_union
 union gl_long_double_union
   {
     struct { unsigned int lo; unsigned int hi; unsigned int exponent; } xd;
     long double ld;
   };
+#  define GNULIB_defined_long_double_union 1
+# endif
 extern const union gl_long_double_union gl_LDBL_MAX;
 # define LDBL_MAX (gl_LDBL_MAX.ld)
 /* Minimum e such that 10^e is in the range of normalized numbers.  */
@@ -146,11 +149,14 @@ extern const union gl_long_double_union gl_LDBL_MAX;
 
    Unfortunately, this is not a constant expression, and the latter expression
    does not work well when GCC is optimizing..  */
+# if !GNULIB_defined_long_double_union
 union gl_long_double_union
   {
     struct { double hi; double lo; } dd;
     long double ld;
   };
+#  define GNULIB_defined_long_double_union 1
+# endif
 extern const union gl_long_double_union gl_LDBL_MAX;
 # define LDBL_MAX (gl_LDBL_MAX.ld)
 #endif
index 3937ce37458a2c7d866d79478d72521893bb97f4..2db2a3b3d6bb0450cc9add85a8ee64bcf6512055 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -64,10 +64,10 @@ extern int fnmatch (const char *pattern, const char *string, int flags);
 #endif
 
 #ifdef _LIBC
-# if __GNUC__ < 7
-#  define FALLTHROUGH ((void) 0)
-# else
+# if (__GNUC__ >= 7) || (__clang_major__ >= 10)
 #  define FALLTHROUGH __attribute__ ((__fallthrough__))
+# else
+#  define FALLTHROUGH ((void) 0)
 # endif
 #else
 # include "attribute.h"
@@ -76,6 +76,12 @@ extern int fnmatch (const char *pattern, const char *string, int flags);
 #include <intprops.h>
 #include <flexmember.h>
 
+#ifdef _LIBC
+typedef ptrdiff_t idx_t;
+#else
+# include "idx.h"
+#endif
+
 /* We often have to test for FNM_FILE_NAME and FNM_PERIOD being both set.  */
 #define NO_LEADING_PERIOD(flags) \
   ((flags & (FNM_FILE_NAME | FNM_PERIOD)) == (FNM_FILE_NAME | FNM_PERIOD))
index 76ac72176b776c7361a246fb268c2054c8fe9fbd..4183d5eca469c8effefb4bde821b4e7b38ea60e2 100644 (file)
@@ -1,5 +1,5 @@
 /* Substitute for and wrapper around <fnmatch.h>.
-   Copyright (C) 1991-1993, 1996-1999, 2001-2003, 2005, 2007, 2009-2020 Free
+   Copyright (C) 1991-1993, 1996-1999, 2001-2003, 2005, 2007, 2009-2021 Free
    Software Foundation, Inc.
 
    This file is part of the GNU C Library.
index ebd6af36e280eccb037720294b0d2dfd3b0c338c..f3e572355ee2438329028480d884d37328331c51 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -549,7 +549,7 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
                                 /* Get the collation sequence value.  */
                                 is_seqval = true;
 # if WIDE_CHAR_VERSION
-                                cold = wextra[1 + wextra[idx]];
+                                cold = wextra[1 + wextra[0]];
 # else
                                 idx += 1 + extra[idx];
                                 /* Adjust for the alignment.  */
@@ -726,7 +726,7 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
                                     /* Get the collation sequence value.  */
                                     is_seqval = true;
 # if WIDE_CHAR_VERSION
-                                    cend = wextra[1 + wextra[idx]];
+                                    cend = wextra[1 + wextra[0]];
 # else
                                     idx += 1 + extra[idx];
                                     /* Adjust for the alignment.  */
@@ -978,12 +978,12 @@ EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end,
      bool no_leading_period, int flags, size_t alloca_used)
 {
   const CHAR *startp;
-  size_t level;
+  ptrdiff_t level;
   struct patternlist
   {
     struct patternlist *next;
     CHAR malloced;
-    CHAR str[FLEXIBLE_ARRAY_MEMBER];
+    CHAR str __flexarr;
   } *list = NULL;
   struct patternlist **lastp = &list;
   size_t pattern_len = STRLEN (pattern);
@@ -994,7 +994,7 @@ EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end,
 
   /* Parse the pattern.  Store the individual parts in the list.  */
   level = 0;
-  for (startp = p = pattern + 1; ; ++p)
+  for (startp = p = pattern + 1; level >= 0; ++p)
     if (*p == L_('\0'))
       {
         /* This is an invalid pattern.  */
@@ -1036,9 +1036,9 @@ EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end,
             struct patternlist *newp;                                         \
             size_t plen = (opt == L_('?') || opt == L_('@')                   \
                            ? pattern_len : (p - startp + 1UL));               \
-            ptrdiff_t slen = FLEXSIZEOF (struct patternlist, str, 0);         \
-            ptrdiff_t new_used = alloca_used + slen;                          \
-            ptrdiff_t plensize;                                               \
+            idx_t slen = FLEXSIZEOF (struct patternlist, str, 0);             \
+            idx_t new_used = alloca_used + slen;                              \
+            idx_t plensize;                                                   \
             if (INT_MULTIPLY_WRAPV (plen, sizeof (CHAR), &plensize)           \
                 || INT_ADD_WRAPV (new_used, plensize, &new_used))             \
               {                                                               \
@@ -1065,7 +1065,6 @@ EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end,
             *lastp = newp;                                                    \
             lastp = &newp->next
             NEW_PATTERN;
-            break;
           }
       }
     else if (*p == L_('|'))
index 1c6edf6b76416a3135e1cebcdc6d73d7deee5656..f6ed550ddcc0e9a92b2db5e932c65dc8f15e7c8c 100644 (file)
@@ -1,5 +1,5 @@
 /* Manipulating the FPU control word.  -*- coding: utf-8 -*-
-   Copyright (C) 2007-2020 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2007.
 
    This program is free software: you can redistribute it and/or modify
@@ -61,8 +61,8 @@
                                     'long double' safe operation precision
  */
 
-/* Inline assembler like this works only with GNU C.  */
-#if (defined __i386__ || defined __x86_64__) && defined __GNUC__
+/* Inline assembler like this works only with GNU C and clang.  */
+#if (defined __i386__ || defined __x86_64__) && (defined __GNUC__ || defined __clang__)
 
 typedef unsigned short fpucw_t; /* glibc calls this fpu_control_t */
 
diff --git a/gnulib/import/free.c b/gnulib/import/free.c
new file mode 100644 (file)
index 0000000..5c89787
--- /dev/null
@@ -0,0 +1,47 @@
+/* Make free() preserve errno.
+
+   Copyright (C) 2003, 2006, 2009-2021 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* written by Paul Eggert */
+
+#include <config.h>
+
+#include <stdlib.h>
+
+#include <errno.h>
+
+void
+rpl_free (void *p)
+#undef free
+{
+#if defined __GNUC__ && !defined __clang__
+  /* An invalid GCC optimization
+     <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98396>
+     would optimize away the assignments in the code below, when link-time
+     optimization (LTO) is enabled.  Make the code more complicated, so that
+     GCC does not grok how to optimize it.  */
+  int err[2];
+  err[0] = errno;
+  err[1] = errno;
+  errno = 0;
+  free (p);
+  errno = err[errno == 0];
+#else
+  int err = errno;
+  free (p);
+  errno = err;
+#endif
+}
index ad1dba75ca733d09e8a01c057da0a818555ec82e..288ca66fe7be201bc0df69941194f4ce4053a65f 100644 (file)
@@ -1,5 +1,5 @@
 /* Split a double into fraction and mantissa.
-   Copyright (C) 2007-2020 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 49484cbebe76d0f8d212844ce2c337c4ecd6233f..a5b1fd98e0e9682bbb06dfc36afdb109f87fedef 100644 (file)
@@ -1,5 +1,5 @@
 /* Split a 'long double' into fraction and mantissa.
-   Copyright (C) 2007, 2009-2020 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 235014a4c566006ea600579b33196fd7d3f30f46..05b9c86ef8ef9e7d3fa38449a211ca9229fae2bb 100644 (file)
@@ -1,5 +1,5 @@
 /* fstat() replacement.
-   Copyright (C) 2011-2020 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 9da12690d717e2b0de021626b81a7ca3f3643d39..640a3754309150d103347736c91f013fa9be1b17 100644 (file)
@@ -1,6 +1,6 @@
 /* Work around an fstatat bug on Solaris 9.
 
-   Copyright (C) 2006, 2009-2020 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index fca6bdefd347aa412ca96f9f46efef89a3e7cc23..e8c9e08cb33e309ed87c9f19571b267369153aa0 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2011-2020 Free Software Foundation, Inc.
+/* Copyright (C) 2011-2021 Free Software Foundation, Inc.
    This file is part of gnulib.
 
    This program is free software: you can redistribute it and/or modify
@@ -38,6 +38,10 @@ typedef int dummy;
    necessary.  */
 
 # undef getcwd
+# if defined _WIN32 && !defined __CYGWIN__
+#  define getcwd _getcwd
+# endif
+
 char *
 rpl_getcwd (char *buf, size_t size)
 {
index 1a42ef1bfa3300aec0b38afbf4392d8064c4593e..6b2ac73446dc0839ceace7e15b0bc178751fdf3d 100644 (file)
@@ -1,22 +1,29 @@
-/* Copyright (C) 1991-1999, 2004-2020 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU General Public
+   License as published by the Free Software Foundation; either
+   version 3 of the License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
 
 #if !_LIBC
 # include <config.h>
 # include <unistd.h>
+# include "pathmax.h"
+#else
+# define HAVE_OPENAT 1
+# define D_INO_IN_DIRENT 1
+# define HAVE_MSVC_INVALID_PARAMETER_HANDLER 0
+# define HAVE_MINIMALLY_WORKING_GETCWD 0
 #endif
 
 #include <errno.h>
@@ -65,8 +72,6 @@
 # define MIN(a, b) ((a) < (b) ? (a) : (b))
 #endif
 
-#include "pathmax.h"
-
 /* In this file, PATH_MAX only serves as a threshold for choosing among two
    algorithms.  */
 #ifndef PATH_MAX
 #endif
 
 #if !_LIBC
-# define __getcwd rpl_getcwd
-# define __lstat lstat
+# define GETCWD_RETURN_TYPE char *
+# define __close_nocancel_nostatus close
+# define __getcwd_generic rpl_getcwd
+# undef stat64
+# define stat64    stat
+# define __fstat64 fstat
+# define __fstatat64 fstatat
+# define __lstat64 lstat
 # define __closedir closedir
 # define __opendir opendir
-# define __readdir readdir
+# define __readdir64 readdir
+# define __fdopendir fdopendir
+# define __openat openat
+# define __rewinddir rewinddir
+# define __openat64 openat
+# define dirent64 dirent
+#else
+# include <not-cancel.h>
 #endif
 
 /* The results of opendir() in this file are not used with dirfd and fchdir,
 # undef closedir
 #endif
 \f
-#ifdef _MSC_VER
+#if defined _WIN32 && !defined __CYGWIN__
 # if HAVE_MSVC_INVALID_PARAMETER_HANDLER
 static char *
 getcwd_nothrow (char *buf, size_t size)
@@ -138,8 +156,8 @@ getcwd_nothrow (char *buf, size_t size)
    if BUF is NULL, an array is allocated with 'malloc'; the array is SIZE
    bytes long, unless SIZE == 0, in which case it is as big as necessary.  */
 
-char *
-__getcwd (char *buf, size_t size)
+GETCWD_RETURN_TYPE
+__getcwd_generic (char *buf, size_t size)
 {
   /* Lengths of big file name components and entire file names, and a
      deep level of file name nesting.  These numbers are not upper
@@ -167,7 +185,7 @@ __getcwd (char *buf, size_t size)
   ino_t rootino, thisino;
   char *dir;
   register char *dirp;
-  struct stat st;
+  struct stat64 st;
   size_t allocated = size;
   size_t used;
 
@@ -210,7 +228,6 @@ __getcwd (char *buf, size_t size)
     return NULL;
 # endif
 #endif
-
   if (size == 0)
     {
       if (buf != NULL)
@@ -234,19 +251,19 @@ __getcwd (char *buf, size_t size)
   dirp = dir + allocated;
   *--dirp = '\0';
 
-  if (__lstat (".", &st) < 0)
+  if (__lstat64 (".", &st) < 0)
     goto lose;
   thisdev = st.st_dev;
   thisino = st.st_ino;
 
-  if (__lstat ("/", &st) < 0)
+  if (__lstat64 ("/", &st) < 0)
     goto lose;
   rootdev = st.st_dev;
   rootino = st.st_ino;
 
   while (!(thisdev == rootdev && thisino == rootino))
     {
-      struct dirent *d;
+      struct dirent64 *d;
       dev_t dotdev;
       ino_t dotino;
       bool mount_point;
@@ -257,16 +274,16 @@ __getcwd (char *buf, size_t size)
 
       /* Look at the parent directory.  */
 #if HAVE_OPENAT_SUPPORT
-      fd = openat (fd, "..", O_RDONLY);
+      fd = __openat64 (fd, "..", O_RDONLY);
       if (fd < 0)
         goto lose;
       fd_needs_closing = true;
-      parent_status = fstat (fd, &st);
+      parent_status = __fstat64 (fd, &st);
 #else
       dotlist[dotlen++] = '.';
       dotlist[dotlen++] = '.';
       dotlist[dotlen] = '\0';
-      parent_status = __lstat (dotlist, &st);
+      parent_status = __lstat64 (dotlist, &st);
 #endif
       if (parent_status != 0)
         goto lose;
@@ -284,7 +301,7 @@ __getcwd (char *buf, size_t size)
 
       /* Search for the last directory.  */
 #if HAVE_OPENAT_SUPPORT
-      dirstream = fdopendir (fd);
+      dirstream = __fdopendir (fd);
       if (dirstream == NULL)
         goto lose;
       fd_needs_closing = false;
@@ -299,7 +316,7 @@ __getcwd (char *buf, size_t size)
           /* Clear errno to distinguish EOF from error if readdir returns
              NULL.  */
           __set_errno (0);
-          d = __readdir (dirstream);
+          d = __readdir64 (dirstream);
 
           /* When we've iterated through all directory entries without finding
              one with a matching d_ino, rewind the stream and consider each
@@ -311,8 +328,8 @@ __getcwd (char *buf, size_t size)
           if (d == NULL && errno == 0 && use_d_ino)
             {
               use_d_ino = false;
-              rewinddir (dirstream);
-              d = __readdir (dirstream);
+              __rewinddir (dirstream);
+              d = __readdir64 (dirstream);
             }
 
           if (d == NULL)
@@ -338,7 +355,7 @@ __getcwd (char *buf, size_t size)
           {
             int entry_status;
 #if HAVE_OPENAT_SUPPORT
-            entry_status = fstatat (fd, d->d_name, &st, AT_SYMLINK_NOFOLLOW);
+            entry_status = __fstatat64 (fd, d->d_name, &st, AT_SYMLINK_NOFOLLOW);
 #else
             /* Compute size needed for this file name, or for the file
                name ".." in the same directory, whichever is larger.
@@ -375,7 +392,7 @@ __getcwd (char *buf, size_t size)
               }
 
             memcpy (dotlist + dotlen, d->d_name, _D_ALLOC_NAMLEN (d));
-            entry_status = __lstat (dotlist, &st);
+            entry_status = __lstat64 (dotlist, &st);
 #endif
             /* We don't fail here if we cannot stat() a directory entry.
                This can happen when (network) file systems fail.  If this
@@ -461,7 +478,7 @@ __getcwd (char *buf, size_t size)
       __closedir (dirstream);
 #if HAVE_OPENAT_SUPPORT
     if (fd_needs_closing)
-      close (fd);
+       __close_nocancel_nostatus (fd);
 #else
     if (dotlist != dots)
       free (dotlist);
@@ -473,6 +490,7 @@ __getcwd (char *buf, size_t size)
   return NULL;
 }
 
-#ifdef weak_alias
+#if defined _LIBC && !defined GETCWD_RETURN_TYPE
+libc_hidden_def (__getcwd)
 weak_alias (__getcwd, getcwd)
 #endif
index 0fe70921f9d7779cd2a75e43c94b6d6a7beba982..56eaf5d32cf5ed2d56237621d486c2a8aa4aed6d 100644 (file)
@@ -1,5 +1,5 @@
 /* getdtablesize() function: Return maximum possible file descriptor value + 1.
-   Copyright (C) 2008-2020 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2008.
 
    This program is free software: you can redistribute it and/or modify
index a461112cf93cb54dec2d0fb722589b776ceb6d1b..f92632946739f711360229bb11f0c8f0db11b189 100644 (file)
@@ -1,6 +1,6 @@
 /* Provide a working getlogin_r for systems which lack it.
 
-   Copyright (C) 2005-2007, 2010-2020 Free Software Foundation, Inc.
+   Copyright (C) 2005-2007, 2010-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index b9667ff76daef32117af60a6a85d2173cb40ad1b..500619dd16c3d814b4b67a1a0c336e45eb233274 100644 (file)
@@ -1,5 +1,5 @@
 /* Program name management.
-   Copyright (C) 2016-2020 Free Software Foundation, Inc.
+   Copyright (C) 2016-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 # include <sys/procfs.h>
 #endif
 
-#include "dirname.h"
+#if defined __SCO_VERSION__ || defined __sysv5__
+# include <fcntl.h>
+# include <stdlib.h>
+# include <string.h>
+#endif
+
+#include "basename-lgpl.h"
 
 #ifndef HAVE_GETPROGNAME             /* not Mac OS X, FreeBSD, NetBSD, OpenBSD >= 5.4, Cygwin */
 char const *
@@ -245,6 +251,38 @@ getprogname (void)
         }
     }
   return NULL;
+# elif defined __SCO_VERSION__ || defined __sysv5__                /* SCO OpenServer6/UnixWare */
+  char buf[80];
+  int fd;
+  sprintf (buf, "/proc/%d/cmdline", getpid());
+  fd = open (buf, O_RDONLY);
+  if (0 <= fd)
+    {
+      size_t n = read (fd, buf, 79);
+      if (n > 0)
+        {
+          buf[n] = '\0'; /* Guarantee null-termination */
+          char *progname;
+          progname = strrchr (buf, '/');
+          if (progname)
+            {
+              progname = progname + 1; /* Skip the '/' */
+            }
+          else
+            {
+              progname = buf;
+            }
+          char *ret;
+          ret = malloc (strlen (progname) + 1);
+          if (ret)
+            {
+              strcpy (ret, progname);
+              return ret;
+            }
+        }
+      close (fd);
+    }
+  return "?";
 # else
 #  error "getprogname module not ported to this OS"
 # endif
index 676912b4b84c77dc1d529e5dcc1be0069a20cfa6..502f2cd9a1280e99da9081644d041bd95d591f7d 100644 (file)
@@ -1,5 +1,5 @@
 /* Program name management.
-   Copyright (C) 2016-2020 Free Software Foundation, Inc.
+   Copyright (C) 2016-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 030a78bb08d4ea09930449b2cb1c64c4752d281e..41212fb329dad57a912c40e549ccf713e035621c 100644 (file)
@@ -1,6 +1,6 @@
 /* Obtain a series of random bytes.
 
-   Copyright 2020 Free Software Foundation, Inc.
+   Copyright 2020-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -32,7 +32,7 @@
 # if HAVE_BCRYPT_H
 #  include <bcrypt.h>
 # else
-#  include <ntdef.h> /* NTSTATUS */
+#  define NTSTATUS LONG
 typedef void * BCRYPT_ALG_HANDLE;
 #  define BCRYPT_USE_SYSTEM_PREFERRED_RNG 0x00000002
 #  if HAVE_LIB_BCRYPT
index 0bd1e13348a794f68232af0fa69f0c6fc4096e80..3552157efd9179c9698607c5f7d8846384a0dd92 100644 (file)
@@ -1,5 +1,5 @@
 /* Convenience header for conditional use of GNU <libintl.h>.
-   Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2020 Free Software
+   Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2021 Free Software
    Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
index 057cebdb163769303923e2ddddaf35d714d4bf48..b1c93e1c3a39838244ca383bc633978f7a6e4d94 100644 (file)
@@ -1,6 +1,6 @@
 /* Provide gettimeofday for systems that don't have it or for which it's broken.
 
-   Copyright (C) 2001-2003, 2005-2007, 2009-2020 Free Software Foundation, Inc.
+   Copyright (C) 2001-2003, 2005-2007, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -29,8 +29,6 @@
 # include <windows.h>
 #endif
 
-#include "localtime-buffer.h"
-
 #ifdef WINDOWS_NATIVE
 
 /* Don't assume that UNICODE is not defined.  */
@@ -123,11 +121,6 @@ gettimeofday (struct timeval *restrict tv, void *restrict tz)
 #else
 
 # if HAVE_GETTIMEOFDAY
-#  if GETTIMEOFDAY_CLOBBERS_LOCALTIME
-  /* Save and restore the contents of the buffer used for localtime's
-     result around the call to gettimeofday.  */
-  struct tm save = *localtime_buffer_addr;
-#  endif
 
 #  if defined timeval /* 'struct timeval' overridden by gnulib?  */
 #   undef timeval
@@ -142,10 +135,6 @@ gettimeofday (struct timeval *restrict tv, void *restrict tz)
   int result = gettimeofday (tv, (struct timezone *) tz);
 #  endif
 
-#  if GETTIMEOFDAY_CLOBBERS_LOCALTIME
-  *localtime_buffer_addr = save;
-#  endif
-
   return result;
 
 # else
index 3cbe3b4b63871f1bd3dc7bd23c6c59959c4adcbe..97bf1ece357aef119c06c2f0cbd0dee99199ffe3 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
index f1b20d4869b0d73b07ca1aec0d5f64308969be03..1bfcafb7b36d0a4fdba289a03eb245e69a82b8dd 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
 # define readdir(str) __readdir64 (str)
 # define getpwnam_r(name, bufp, buf, len, res) \
     __getpwnam_r (name, bufp, buf, len, res)
-# ifndef __lstat64
-#  define __lstat64(fname, buf) __lxstat64 (_STAT_VER, fname, buf)
-# endif
-# ifndef __stat64
-#  define __stat64(fname, buf) __xstat64 (_STAT_VER, fname, buf)
-# endif
 # define struct_stat64          struct stat64
 # define FLEXIBLE_ARRAY_MEMBER
 # include <shlib-compat.h>
@@ -72,8 +66,8 @@
 # define __glob                 glob
 # define __getlogin_r(buf, len) getlogin_r (buf, len)
 # define __lstat64(fname, buf)  lstat (fname, buf)
-# ifdef __MINGW32__
-   /* Avoid GCC warning.  mingw has an unused __stat64 macro.  */
+# if defined _WIN32 && !defined __CYGWIN__
+   /* Avoid GCC or clang warning.  The original __stat64 macro is unused.  */
 #  undef __stat64
 # endif
 # define __stat64(fname, buf)   stat (fname, buf)
@@ -227,7 +221,7 @@ glob_lstat (glob_t *pglob, int flags, const char *fullname)
 static bool
 size_add_wrapv (size_t a, size_t b, size_t *r)
 {
-#if 5 <= __GNUC__ && !defined __ICC
+#if 7 <= __GNUC__ && !defined __ICC
   return __builtin_add_overflow (a, b, r);
 #else
   *r = a + b;
index c80abfb613e13352dd4cf843e17ef82849ef2e83..f46ddcfd93dbc5794df859badc88d0c30d8dc74d 100644 (file)
@@ -1,6 +1,6 @@
 /* glob.h -- Find a path matching a pattern.
 
-   Copyright (C) 2005-2007, 2009-2020 Free Software Foundation, Inc.
+   Copyright (C) 2005-2007, 2009-2021 Free Software Foundation, Inc.
 
    Written by Derek Price <derek@ximbiot.com> & Paul Eggert <eggert@CS.UCLA.EDU>
 
@@ -45,7 +45,9 @@
    'configure' might #define 'restrict' to those words, so pick a
    different name.  */
 #ifndef _Restrict_
-# if defined __restrict || 2 < __GNUC__ + (95 <= __GNUC_MINOR__)
+# if defined __restrict \
+     || 2 < __GNUC__ + (95 <= __GNUC_MINOR__) \
+     || __clang_major__ >= 3
 #  define _Restrict_ __restrict
 # elif 199901L <= __STDC_VERSION__ || defined restrict
 #  define _Restrict_ restrict
index 87a187d2c4e9c2e4bd13b8c4c6d05155a5c5513a..46df7315286c1075d21d0d47bcb90c48f0c7c516 100644 (file)
@@ -1,5 +1,5 @@
 /* Shared definition for glob and glob_pattern_p.
-   Copyright (C) 2017-2020 Free Software Foundation, Inc.
+   Copyright (C) 2017-2021 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
index 1408a24bcb850b27924e89ab97159fc18ee4a9be..e6a3bc7c5842ead418b9849428ca60bee2d4110a 100644 (file)
@@ -1,5 +1,5 @@
 /* Return nonzero if PATTERN contains any metacharacters.
-   Copyright (C) 2017-2020 Free Software Foundation, Inc.
+   Copyright (C) 2017-2021 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
index c833beff8d6ec85b4b1ad2154acaace579b53925..2dfdb70a18e0f88aec20f9c9cf0bf1cb3d9d1315 100644 (file)
@@ -1,5 +1,5 @@
 /* Frees the dynamically allocated storage from an earlier call to glob.
-   Copyright (C) 2017-2020 Free Software Foundation, Inc.
+   Copyright (C) 2017-2021 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
index 10af6f2e1f07d91fffdf0af0a306891a205b816f..83f75659b1199e88be12d6b461a1e5003fc6ce73 100644 (file)
@@ -1,5 +1,5 @@
 /* Locking in multithreaded situations.
-   Copyright (C) 2005-2020 Free Software Foundation, Inc.
+   Copyright (C) 2005-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 59485f260140c790d8c83925cf92e62263ef6097..fe43d6e38f17ba179764f3ae8c57be78762f4fe8 100644 (file)
@@ -1,5 +1,5 @@
 /* Locking in multithreaded situations.
-   Copyright (C) 2005-2020 Free Software Foundation, Inc.
+   Copyright (C) 2005-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 28bf3c6f76dc53ae5132457e7f61970ecef7fa75..373806ee27690daa52b0db6bbe491467d9cb9bc0 100644 (file)
@@ -1,5 +1,5 @@
 /* Multithreading primitives.
-   Copyright (C) 2005-2020 Free Software Foundation, Inc.
+   Copyright (C) 2005-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
 /* Use the POSIX threads library.  */
 
+# include <errno.h>
 # include <pthread.h>
 # include <stdlib.h>
 
 # if PTHREAD_IN_USE_DETECTION_HARD
 
+#  if defined __FreeBSD__ || defined __DragonFly__                 /* FreeBSD */
+
+/* Test using pthread_key_create.  */
+
+int
+glthread_in_use (void)
+{
+  static int tested;
+  static int result; /* 1: linked with -lpthread, 0: only with libc */
+
+  if (!tested)
+    {
+      pthread_key_t key;
+      int err = pthread_key_create (&key, NULL);
+
+      if (err == ENOSYS)
+        result = 0;
+      else
+        {
+          result = 1;
+          if (err == 0)
+            pthread_key_delete (key);
+        }
+      tested = 1;
+    }
+  return result;
+}
+
+#  else                                                     /* Solaris, HP-UX */
+
+/* Test using pthread_create.  */
+
 /* The function to be executed by a dummy thread.  */
 static void *
 dummy_thread_func (void *arg)
@@ -62,6 +95,8 @@ glthread_in_use (void)
   return result;
 }
 
+#  endif
+
 # endif
 
 #endif
index 730e9be6e7b0a24bff6516ec3e375edc26132818..ccb75eed74c0b891653756f4630da0bcd76c2331 100644 (file)
@@ -1,6 +1,6 @@
 /* hard-locale.c -- Determine whether a locale is hard.
 
-   Copyright (C) 1997-1999, 2002-2004, 2006-2007, 2009-2020 Free Software
+   Copyright (C) 1997-1999, 2002-2004, 2006-2007, 2009-2021 Free Software
    Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
index 1886eaae922697bf33d0051583a3afbc2b8ff6bd..af09e26f53de88c0b9b0226c454caa434dee60fa 100644 (file)
@@ -1,6 +1,6 @@
 /* Determine whether a locale is hard.
 
-   Copyright (C) 1999, 2003-2004, 2009-2020 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2003-2004, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/idx.h b/gnulib/import/idx.h
new file mode 100644 (file)
index 0000000..681c8c9
--- /dev/null
@@ -0,0 +1,114 @@
+/* A type for indices and sizes.
+   Copyright (C) 2020-2021 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU General Public
+   License as published by the Free Software Foundation; either
+   version 3 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#ifndef _IDX_H
+#define _IDX_H
+
+/* Get ptrdiff_t.  */
+#include <stddef.h>
+
+/* Get PTRDIFF_MAX.  */
+#include <stdint.h>
+
+/* The type 'idx_t' holds an (array) index or an (object) size.
+   Its implementation promotes to a signed integer type,
+   which can hold the values
+     0..2^63-1 (on 64-bit platforms) or
+     0..2^31-1 (on 32-bit platforms).
+
+   Why a signed integer type?
+
+     * Security: Signed types can be checked for overflow via
+       '-fsanitize=undefined', but unsigned types cannot.
+
+     * Comparisons without surprises: ISO C99 Â§ 6.3.1.8 specifies a few
+       surprising results for comparisons, such as
+
+           (int) -3 < (unsigned long) 7  =>  false
+           (int) -3 < (unsigned int) 7   =>  false
+       and on 32-bit machines:
+           (long) -3 < (unsigned int) 7  =>  false
+
+       This is surprising because the natural comparison order is by
+       value in the realm of infinite-precision signed integers (ℤ).
+
+       The best way to get rid of such surprises is to use signed types
+       for numerical integer values, and use unsigned types only for
+       bit masks and enums.
+
+   Why not use 'size_t' directly?
+
+     * Because 'size_t' is an unsigned type, and a signed type is better.
+       See above.
+
+   Why not use 'ptrdiff_t' directly?
+
+     * Maintainability: When reading and modifying code, it helps to know that
+       a certain variable cannot have negative values.  For example, when you
+       have a loop
+
+         int n = ...;
+         for (int i = 0; i < n; i++) ...
+
+       or
+
+         ptrdiff_t n = ...;
+         for (ptrdiff_t i = 0; i < n; i++) ...
+
+       you have to ask yourself "what if n < 0?".  Whereas in
+
+         idx_t n = ...;
+         for (idx_t i = 0; i < n; i++) ...
+
+       you know that this case cannot happen.
+
+       Similarly, when a programmer writes
+
+         idx_t = ptr2 - ptr1;
+
+       there is an implied assertion that ptr1 and ptr2 point into the same
+       object and that ptr1 <= ptr2.
+
+     * Being future-proof: In the future, range types (integers which are
+       constrained to a certain range of values) may be added to C compilers
+       or to the C standard.  Several programming languages (Ada, Haskell,
+       Common Lisp, Pascal) already have range types.  Such range types may
+       help producing good code and good warnings.  The type 'idx_t' could
+       then be typedef'ed to a range type that is signed after promotion.  */
+
+/* In the future, idx_t could be typedef'ed to a signed range type.
+   The clang "extended integer types", supported in Clang 11 or newer
+   <https://clang.llvm.org/docs/LanguageExtensions.html#extended-integer-types>,
+   are a special case of range types.  However, these types don't support binary
+   operators with plain integer types (e.g. expressions such as x > 1).
+   Therefore, they don't behave like signed types (and not like unsigned types
+   either).  So, we cannot use them here.  */
+
+/* Use the signed type 'ptrdiff_t'.  */
+/* Note: ISO C does not mandate that 'size_t' and 'ptrdiff_t' have the same
+   size, but it is so on all platforms we have seen since 1990.  */
+typedef ptrdiff_t idx_t;
+
+/* IDX_MAX is the maximum value of an idx_t.  */
+#define IDX_MAX PTRDIFF_MAX
+
+/* So far no need has been found for an IDX_WIDTH macro.
+   Perhaps there should be another macro IDX_VALUE_BITS that does not
+   count the sign bit and is therefore one less than PTRDIFF_WIDTH.  */
+
+#endif /* _IDX_H */
index b380da45f74ec1671195c60f6000bc6ec60c0cf7..9414db19e30a6aa4327c496839866e3b2c87beb4 100644 (file)
@@ -1,6 +1,6 @@
 /* inet_ntop.c -- convert IPv4 and IPv6 addresses from binary to text form
 
-   Copyright (C) 2005-2006, 2008-2020 Free Software Foundation, Inc.
+   Copyright (C) 2005-2006, 2008-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index dfbcaae73e371b6f93c36b0716d63fa0a06b7c12..2a420ac8319ad5a1c984668236b9c0ed81427201 100644 (file)
@@ -1,6 +1,6 @@
 /* intprops.h -- properties of integer types
 
-   Copyright (C) 2001-2020 Free Software Foundation, Inc.
+   Copyright (C) 2001-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published
@@ -48,7 +48,7 @@
 /* Minimum and maximum values for integer types and expressions.  */
 
 /* The width in bits of the integer type or expression T.
-   Do not evaluate T.
+   Do not evaluate T.  T must not be a bit-field expression.
    Padding bits are not supported; this is checked at compile-time below.  */
 #define TYPE_WIDTH(t) (sizeof (t) * CHAR_BIT)
 
@@ -70,7 +70,7 @@
    ? _GL_SIGNED_INT_MAXIMUM (e)                                         \
    : _GL_INT_NEGATE_CONVERT (e, 1))
 #define _GL_SIGNED_INT_MAXIMUM(e)                                       \
-  (((_GL_INT_CONVERT (e, 1) << (TYPE_WIDTH ((e) + 0) - 2)) - 1) * 2 + 1)
+  (((_GL_INT_CONVERT (e, 1) << (TYPE_WIDTH (+ (e)) - 2)) - 1) * 2 + 1)
 
 /* Work around OpenVMS incompatibility with C99.  */
 #if !defined LLONG_MAX && defined __INT64_MAX
@@ -86,6 +86,7 @@
 /* Does the __typeof__ keyword work?  This could be done by
    'configure', but for now it's easier to do it by hand.  */
 #if (2 <= __GNUC__ \
+     || (4 <= __clang_major__) \
      || (1210 <= __IBMC__ && defined __IBM__TYPEOF__) \
      || (0x5110 <= __SUNPRO_C && !__STDC__))
 # define _GL_HAVE___TYPEOF__ 1
@@ -94,8 +95,9 @@
 #endif
 
 /* Return 1 if the integer type or expression T might be signed.  Return 0
-   if it is definitely unsigned.  This macro does not evaluate its argument,
-   and expands to an integer constant expression.  */
+   if it is definitely unsigned.  T must not be a bit-field expression.
+   This macro does not evaluate its argument, and expands to an
+   integer constant expression.  */
 #if _GL_HAVE___TYPEOF__
 # define _GL_SIGNED_TYPE_OR_EXPR(t) TYPE_SIGNED (__typeof__ (t))
 #else
 #define INT_BITS_STRLEN_BOUND(b) (((b) * 146 + 484) / 485)
 
 /* Bound on length of the string representing an integer type or expression T.
+   T must not be a bit-field expression.
+
    Subtract 1 for the sign bit if T is signed, and then add 1 more for
    a minus sign if needed.
 
    + _GL_SIGNED_TYPE_OR_EXPR (t))
 
 /* Bound on buffer size needed to represent an integer type or expression T,
-   including the terminating null.  */
+   including the terminating null.  T must not be a bit-field expression.  */
 #define INT_BUFSIZE_BOUND(t) (INT_STRLEN_BOUND (t) + 1)
 
 
 
 /* True if __builtin_add_overflow (A, B, P) and __builtin_sub_overflow
    (A, B, P) work when P is non-null.  */
-#if 5 <= __GNUC__ && !defined __ICC
+/* __builtin_{add,sub}_overflow exists but is not reliable in GCC 5.x and 6.x,
+   see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98269>.  */
+#if 7 <= __GNUC__ && !defined __ICC
 # define _GL_HAS_BUILTIN_ADD_OVERFLOW 1
 #elif defined __has_builtin
 # define _GL_HAS_BUILTIN_ADD_OVERFLOW __has_builtin (__builtin_add_overflow)
 #endif
 
 /* True if __builtin_add_overflow_p (A, B, C) works, and similarly for
-   __builtin_mul_overflow_p and __builtin_mul_overflow_p.  */
-#define _GL_HAS_BUILTIN_OVERFLOW_P (7 <= __GNUC__)
+   __builtin_sub_overflow_p and __builtin_mul_overflow_p.  */
+#if defined __clang__ || defined __ICC
+/* Clang 11 lacks __builtin_mul_overflow_p, and even if it did it
+   would presumably run afoul of Clang bug 16404.  ICC 2021.1's
+   __builtin_add_overflow_p etc. are not treated as integral constant
+   expressions even when all arguments are.  */
+# define _GL_HAS_BUILTIN_OVERFLOW_P 0
+#elif defined __has_builtin
+# define _GL_HAS_BUILTIN_OVERFLOW_P __has_builtin (__builtin_mul_overflow_p)
+#else
+# define _GL_HAS_BUILTIN_OVERFLOW_P (7 <= __GNUC__)
+#endif
 
 /* The _GL*_OVERFLOW macros have the same restrictions as the
    *_RANGE_OVERFLOW macros, except that they do not assume that operands
    _GL_INT_OP_WRAPV (a, b, r, -, _GL_INT_SUBTRACT_RANGE_OVERFLOW)
 #endif
 #if _GL_HAS_BUILTIN_MUL_OVERFLOW
-# if (9 < __GNUC__ + (3 <= __GNUC_MINOR__) \
-      || (__GNUC__ == 8 && 4 <= __GNUC_MINOR__))
+# if ((9 < __GNUC__ + (3 <= __GNUC_MINOR__) \
+       || (__GNUC__ == 8 && 4 <= __GNUC_MINOR__)) \
+      && !defined __ICC)
 #  define INT_MULTIPLY_WRAPV(a, b, r) __builtin_mul_overflow (a, b, r)
 # else
    /* Work around GCC bug 91450.  */
    For now, assume all versions of GCC-like compilers generate bogus
    warnings for _Generic.  This matters only for compilers that
    lack relevant builtins.  */
-#if __GNUC__
+#if __GNUC__ || defined __clang__
 # define _GL__GENERIC_BOGUS 1
 #else
 # define _GL__GENERIC_BOGUS 0
       ? (EXPR_SIGNED (_GL_INT_CONVERT (tmax, b)) \
          ? (a) < (tmax) / (b) \
          : ((INT_NEGATE_OVERFLOW (b) \
-             ? _GL_INT_CONVERT (b, tmax) >> (TYPE_WIDTH (b) - 1) \
+             ? _GL_INT_CONVERT (b, tmax) >> (TYPE_WIDTH (+ (b)) - 1) \
              : (tmax) / -(b)) \
             <= -1 - (a))) \
       : INT_NEGATE_OVERFLOW (_GL_INT_CONVERT (b, tmin)) && (b) == -1 \
          : (tmin) / (a) < (b)) \
       : (tmax) / (b) < (a)))
 
+/* The following macros compute A + B, A - B, and A * B, respectively.
+   If no overflow occurs, they set *R to the result and return 1;
+   otherwise, they return 0 and may modify *R.
+
+   Example usage:
+
+     long int result;
+     if (INT_ADD_OK (a, b, &result))
+       printf ("result is %ld\n", result);
+     else
+       printf ("overflow\n");
+
+   A, B, and *R should be integers; they need not be the same type,
+   and they need not be all signed or all unsigned.
+
+   These macros work correctly on all known practical hosts, and do not rely
+   on undefined behavior due to signed arithmetic overflow.
+
+   These macros are not constant expressions.
+
+   These macros may evaluate their arguments zero or multiple times, so the
+   arguments should not have side effects.
+
+   These macros are tuned for B being a constant.  */
+
+#define INT_ADD_OK(a, b, r) ! INT_ADD_WRAPV (a, b, r)
+#define INT_SUBTRACT_OK(a, b, r) ! INT_SUBTRACT_WRAPV (a, b, r)
+#define INT_MULTIPLY_OK(a, b, r) ! INT_MULTIPLY_WRAPV (a, b, r)
+
 #endif /* _GL_INTPROPS_H */
index 9f04a6ced4a85f3b16f00e5181903f9e5361a77c..e9ee500e3e69de88e260bd7a4fc0048ed685ab8e 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006-2020 Free Software Foundation, Inc.
+/* Copyright (C) 2006-2021 Free Software Foundation, Inc.
    Written by Paul Eggert, Bruno Haible, Derek Price.
    This file is part of gnulib.
 
 # define _LONG_LONG_FORMAT_PREFIX "ll"
 #endif
 
-#if !defined PRId8 || @PRI_MACROS_BROKEN@
-# undef PRId8
+#if !defined PRId8
 # ifdef INT8_MAX
 #  define PRId8 "d"
 # endif
 #endif
-#if !defined PRIi8 || @PRI_MACROS_BROKEN@
-# undef PRIi8
+#if !defined PRIi8
 # ifdef INT8_MAX
 #  define PRIi8 "i"
 # endif
 #endif
-#if !defined PRIo8 || @PRI_MACROS_BROKEN@
-# undef PRIo8
+#if !defined PRIo8
 # ifdef UINT8_MAX
 #  define PRIo8 "o"
 # endif
 #endif
-#if !defined PRIu8 || @PRI_MACROS_BROKEN@
-# undef PRIu8
+#if !defined PRIu8
 # ifdef UINT8_MAX
 #  define PRIu8 "u"
 # endif
 #endif
-#if !defined PRIx8 || @PRI_MACROS_BROKEN@
-# undef PRIx8
+#if !defined PRIx8
 # ifdef UINT8_MAX
 #  define PRIx8 "x"
 # endif
 #endif
-#if !defined PRIX8 || @PRI_MACROS_BROKEN@
-# undef PRIX8
+#if !defined PRIX8
 # ifdef UINT8_MAX
 #  define PRIX8 "X"
 # endif
 #endif
-#if !defined PRId16 || @PRI_MACROS_BROKEN@
-# undef PRId16
+#if !defined PRId16
 # ifdef INT16_MAX
 #  define PRId16 "d"
 # endif
 #endif
-#if !defined PRIi16 || @PRI_MACROS_BROKEN@
-# undef PRIi16
+#if !defined PRIi16
 # ifdef INT16_MAX
 #  define PRIi16 "i"
 # endif
 #endif
-#if !defined PRIo16 || @PRI_MACROS_BROKEN@
-# undef PRIo16
+#if !defined PRIo16
 # ifdef UINT16_MAX
 #  define PRIo16 "o"
 # endif
 #endif
-#if !defined PRIu16 || @PRI_MACROS_BROKEN@
-# undef PRIu16
+#if !defined PRIu16
 # ifdef UINT16_MAX
 #  define PRIu16 "u"
 # endif
 #endif
-#if !defined PRIx16 || @PRI_MACROS_BROKEN@
-# undef PRIx16
+#if !defined PRIx16
 # ifdef UINT16_MAX
 #  define PRIx16 "x"
 # endif
 #endif
-#if !defined PRIX16 || @PRI_MACROS_BROKEN@
-# undef PRIX16
+#if !defined PRIX16
 # ifdef UINT16_MAX
 #  define PRIX16 "X"
 # endif
 #endif
-#if !defined PRId32 || @PRI_MACROS_BROKEN@
-# undef PRId32
+#if !defined PRId32
 # ifdef INT32_MAX
 #  define PRId32 "d"
 # endif
 #endif
-#if !defined PRIi32 || @PRI_MACROS_BROKEN@
-# undef PRIi32
+#if !defined PRIi32
 # ifdef INT32_MAX
 #  define PRIi32 "i"
 # endif
 #endif
-#if !defined PRIo32 || @PRI_MACROS_BROKEN@
-# undef PRIo32
+#if !defined PRIo32
 # ifdef UINT32_MAX
 #  define PRIo32 "o"
 # endif
 #endif
-#if !defined PRIu32 || @PRI_MACROS_BROKEN@
-# undef PRIu32
+#if !defined PRIu32
 # ifdef UINT32_MAX
 #  define PRIu32 "u"
 # endif
 #endif
-#if !defined PRIx32 || @PRI_MACROS_BROKEN@
-# undef PRIx32
+#if !defined PRIx32
 # ifdef UINT32_MAX
 #  define PRIx32 "x"
 # endif
 #endif
-#if !defined PRIX32 || @PRI_MACROS_BROKEN@
-# undef PRIX32
+#if !defined PRIX32
 # ifdef UINT32_MAX
 #  define PRIX32 "X"
 # endif
 # elif LONG_MAX >> 30 == 1
 #  define _PRI64_PREFIX _LONG_LONG_FORMAT_PREFIX
 # endif
-# if !defined PRId64 || @PRI_MACROS_BROKEN@
-#  undef PRId64
+# if !defined PRId64
 #  define PRId64 _PRI64_PREFIX "d"
 # endif
-# if !defined PRIi64 || @PRI_MACROS_BROKEN@
-#  undef PRIi64
+# if !defined PRIi64
 #  define PRIi64 _PRI64_PREFIX "i"
 # endif
 #endif
 # elif ULONG_MAX >> 31 == 1
 #  define _PRIu64_PREFIX _LONG_LONG_FORMAT_PREFIX
 # endif
-# if !defined PRIo64 || @PRI_MACROS_BROKEN@
-#  undef PRIo64
+# if !defined PRIo64
 #  define PRIo64 _PRIu64_PREFIX "o"
 # endif
-# if !defined PRIu64 || @PRI_MACROS_BROKEN@
-#  undef PRIu64
+# if !defined PRIu64
 #  define PRIu64 _PRIu64_PREFIX "u"
 # endif
-# if !defined PRIx64 || @PRI_MACROS_BROKEN@
-#  undef PRIx64
+# if !defined PRIx64
 #  define PRIx64 _PRIu64_PREFIX "x"
 # endif
-# if !defined PRIX64 || @PRI_MACROS_BROKEN@
-#  undef PRIX64
+# if !defined PRIX64
 #  define PRIX64 _PRIu64_PREFIX "X"
 # endif
 #endif
 
-#if !defined PRIdLEAST8 || @PRI_MACROS_BROKEN@
-# undef PRIdLEAST8
+#if !defined PRIdLEAST8
 # define PRIdLEAST8 "d"
 #endif
-#if !defined PRIiLEAST8 || @PRI_MACROS_BROKEN@
-# undef PRIiLEAST8
+#if !defined PRIiLEAST8
 # define PRIiLEAST8 "i"
 #endif
-#if !defined PRIoLEAST8 || @PRI_MACROS_BROKEN@
-# undef PRIoLEAST8
+#if !defined PRIoLEAST8
 # define PRIoLEAST8 "o"
 #endif
-#if !defined PRIuLEAST8 || @PRI_MACROS_BROKEN@
-# undef PRIuLEAST8
+#if !defined PRIuLEAST8
 # define PRIuLEAST8 "u"
 #endif
-#if !defined PRIxLEAST8 || @PRI_MACROS_BROKEN@
-# undef PRIxLEAST8
+#if !defined PRIxLEAST8
 # define PRIxLEAST8 "x"
 #endif
-#if !defined PRIXLEAST8 || @PRI_MACROS_BROKEN@
-# undef PRIXLEAST8
+#if !defined PRIXLEAST8
 # define PRIXLEAST8 "X"
 #endif
-#if !defined PRIdLEAST16 || @PRI_MACROS_BROKEN@
-# undef PRIdLEAST16
+#if !defined PRIdLEAST16
 # define PRIdLEAST16 "d"
 #endif
-#if !defined PRIiLEAST16 || @PRI_MACROS_BROKEN@
-# undef PRIiLEAST16
+#if !defined PRIiLEAST16
 # define PRIiLEAST16 "i"
 #endif
-#if !defined PRIoLEAST16 || @PRI_MACROS_BROKEN@
-# undef PRIoLEAST16
+#if !defined PRIoLEAST16
 # define PRIoLEAST16 "o"
 #endif
-#if !defined PRIuLEAST16 || @PRI_MACROS_BROKEN@
-# undef PRIuLEAST16
+#if !defined PRIuLEAST16
 # define PRIuLEAST16 "u"
 #endif
-#if !defined PRIxLEAST16 || @PRI_MACROS_BROKEN@
-# undef PRIxLEAST16
+#if !defined PRIxLEAST16
 # define PRIxLEAST16 "x"
 #endif
-#if !defined PRIXLEAST16 || @PRI_MACROS_BROKEN@
-# undef PRIXLEAST16
+#if !defined PRIXLEAST16
 # define PRIXLEAST16 "X"
 #endif
-#if !defined PRIdLEAST32 || @PRI_MACROS_BROKEN@
-# undef PRIdLEAST32
+#if !defined PRIdLEAST32
 # define PRIdLEAST32 "d"
 #endif
-#if !defined PRIiLEAST32 || @PRI_MACROS_BROKEN@
-# undef PRIiLEAST32
+#if !defined PRIiLEAST32
 # define PRIiLEAST32 "i"
 #endif
-#if !defined PRIoLEAST32 || @PRI_MACROS_BROKEN@
-# undef PRIoLEAST32
+#if !defined PRIoLEAST32
 # define PRIoLEAST32 "o"
 #endif
-#if !defined PRIuLEAST32 || @PRI_MACROS_BROKEN@
-# undef PRIuLEAST32
+#if !defined PRIuLEAST32
 # define PRIuLEAST32 "u"
 #endif
-#if !defined PRIxLEAST32 || @PRI_MACROS_BROKEN@
-# undef PRIxLEAST32
+#if !defined PRIxLEAST32
 # define PRIxLEAST32 "x"
 #endif
-#if !defined PRIXLEAST32 || @PRI_MACROS_BROKEN@
-# undef PRIXLEAST32
+#if !defined PRIXLEAST32
 # define PRIXLEAST32 "X"
 #endif
 #ifdef INT64_MAX
-# if !defined PRIdLEAST64 || @PRI_MACROS_BROKEN@
-#  undef PRIdLEAST64
+# if !defined PRIdLEAST64
 #  define PRIdLEAST64 PRId64
 # endif
-# if !defined PRIiLEAST64 || @PRI_MACROS_BROKEN@
-#  undef PRIiLEAST64
+# if !defined PRIiLEAST64
 #  define PRIiLEAST64 PRIi64
 # endif
 #endif
 #ifdef UINT64_MAX
-# if !defined PRIoLEAST64 || @PRI_MACROS_BROKEN@
-#  undef PRIoLEAST64
+# if !defined PRIoLEAST64
 #  define PRIoLEAST64 PRIo64
 # endif
-# if !defined PRIuLEAST64 || @PRI_MACROS_BROKEN@
-#  undef PRIuLEAST64
+# if !defined PRIuLEAST64
 #  define PRIuLEAST64 PRIu64
 # endif
-# if !defined PRIxLEAST64 || @PRI_MACROS_BROKEN@
-#  undef PRIxLEAST64
+# if !defined PRIxLEAST64
 #  define PRIxLEAST64 PRIx64
 # endif
-# if !defined PRIXLEAST64 || @PRI_MACROS_BROKEN@
-#  undef PRIXLEAST64
+# if !defined PRIXLEAST64
 #  define PRIXLEAST64 PRIX64
 # endif
 #endif
 
-#if !defined PRIdFAST8 || @PRI_MACROS_BROKEN@
-# undef PRIdFAST8
+#if !defined PRIdFAST8
 # if INT_FAST8_MAX > INT32_MAX
 #  define PRIdFAST8 PRId64
 # else
 #  define PRIdFAST8 "d"
 # endif
 #endif
-#if !defined PRIiFAST8 || @PRI_MACROS_BROKEN@
-# undef PRIiFAST8
+#if !defined PRIiFAST8
 # if INT_FAST8_MAX > INT32_MAX
 #  define PRIiFAST8 PRIi64
 # else
 #  define PRIiFAST8 "i"
 # endif
 #endif
-#if !defined PRIoFAST8 || @PRI_MACROS_BROKEN@
-# undef PRIoFAST8
+#if !defined PRIoFAST8
 # if UINT_FAST8_MAX > UINT32_MAX
 #  define PRIoFAST8 PRIo64
 # else
 #  define PRIoFAST8 "o"
 # endif
 #endif
-#if !defined PRIuFAST8 || @PRI_MACROS_BROKEN@
-# undef PRIuFAST8
+#if !defined PRIuFAST8
 # if UINT_FAST8_MAX > UINT32_MAX
 #  define PRIuFAST8 PRIu64
 # else
 #  define PRIuFAST8 "u"
 # endif
 #endif
-#if !defined PRIxFAST8 || @PRI_MACROS_BROKEN@
-# undef PRIxFAST8
+#if !defined PRIxFAST8
 # if UINT_FAST8_MAX > UINT32_MAX
 #  define PRIxFAST8 PRIx64
 # else
 #  define PRIxFAST8 "x"
 # endif
 #endif
-#if !defined PRIXFAST8 || @PRI_MACROS_BROKEN@
-# undef PRIXFAST8
+#if !defined PRIXFAST8
 # if UINT_FAST8_MAX > UINT32_MAX
 #  define PRIXFAST8 PRIX64
 # else
 #  define PRIXFAST8 "X"
 # endif
 #endif
-#if !defined PRIdFAST16 || @PRI_MACROS_BROKEN@
-# undef PRIdFAST16
+#if !defined PRIdFAST16
 # if INT_FAST16_MAX > INT32_MAX
 #  define PRIdFAST16 PRId64
 # else
 #  define PRIdFAST16 "d"
 # endif
 #endif
-#if !defined PRIiFAST16 || @PRI_MACROS_BROKEN@
-# undef PRIiFAST16
+#if !defined PRIiFAST16
 # if INT_FAST16_MAX > INT32_MAX
 #  define PRIiFAST16 PRIi64
 # else
 #  define PRIiFAST16 "i"
 # endif
 #endif
-#if !defined PRIoFAST16 || @PRI_MACROS_BROKEN@
-# undef PRIoFAST16
+#if !defined PRIoFAST16
 # if UINT_FAST16_MAX > UINT32_MAX
 #  define PRIoFAST16 PRIo64
 # else
 #  define PRIoFAST16 "o"
 # endif
 #endif
-#if !defined PRIuFAST16 || @PRI_MACROS_BROKEN@
-# undef PRIuFAST16
+#if !defined PRIuFAST16
 # if UINT_FAST16_MAX > UINT32_MAX
 #  define PRIuFAST16 PRIu64
 # else
 #  define PRIuFAST16 "u"
 # endif
 #endif
-#if !defined PRIxFAST16 || @PRI_MACROS_BROKEN@
-# undef PRIxFAST16
+#if !defined PRIxFAST16
 # if UINT_FAST16_MAX > UINT32_MAX
 #  define PRIxFAST16 PRIx64
 # else
 #  define PRIxFAST16 "x"
 # endif
 #endif
-#if !defined PRIXFAST16 || @PRI_MACROS_BROKEN@
-# undef PRIXFAST16
+#if !defined PRIXFAST16
 # if UINT_FAST16_MAX > UINT32_MAX
 #  define PRIXFAST16 PRIX64
 # else
 #  define PRIXFAST16 "X"
 # endif
 #endif
-#if !defined PRIdFAST32 || @PRI_MACROS_BROKEN@
-# undef PRIdFAST32
+#if !defined PRIdFAST32
 # if INT_FAST32_MAX > INT32_MAX
 #  define PRIdFAST32 PRId64
 # else
 #  define PRIdFAST32 "d"
 # endif
 #endif
-#if !defined PRIiFAST32 || @PRI_MACROS_BROKEN@
-# undef PRIiFAST32
+#if !defined PRIiFAST32
 # if INT_FAST32_MAX > INT32_MAX
 #  define PRIiFAST32 PRIi64
 # else
 #  define PRIiFAST32 "i"
 # endif
 #endif
-#if !defined PRIoFAST32 || @PRI_MACROS_BROKEN@
-# undef PRIoFAST32
+#if !defined PRIoFAST32
 # if UINT_FAST32_MAX > UINT32_MAX
 #  define PRIoFAST32 PRIo64
 # else
 #  define PRIoFAST32 "o"
 # endif
 #endif
-#if !defined PRIuFAST32 || @PRI_MACROS_BROKEN@
-# undef PRIuFAST32
+#if !defined PRIuFAST32
 # if UINT_FAST32_MAX > UINT32_MAX
 #  define PRIuFAST32 PRIu64
 # else
 #  define PRIuFAST32 "u"
 # endif
 #endif
-#if !defined PRIxFAST32 || @PRI_MACROS_BROKEN@
-# undef PRIxFAST32
+#if !defined PRIxFAST32
 # if UINT_FAST32_MAX > UINT32_MAX
 #  define PRIxFAST32 PRIx64
 # else
 #  define PRIxFAST32 "x"
 # endif
 #endif
-#if !defined PRIXFAST32 || @PRI_MACROS_BROKEN@
-# undef PRIXFAST32
+#if !defined PRIXFAST32
 # if UINT_FAST32_MAX > UINT32_MAX
 #  define PRIXFAST32 PRIX64
 # else
 # endif
 #endif
 #ifdef INT64_MAX
-# if !defined PRIdFAST64 || @PRI_MACROS_BROKEN@
-#  undef PRIdFAST64
+# if !defined PRIdFAST64
 #  define PRIdFAST64 PRId64
 # endif
-# if !defined PRIiFAST64 || @PRI_MACROS_BROKEN@
-#  undef PRIiFAST64
+# if !defined PRIiFAST64
 #  define PRIiFAST64 PRIi64
 # endif
 #endif
 #ifdef UINT64_MAX
-# if !defined PRIoFAST64 || @PRI_MACROS_BROKEN@
-#  undef PRIoFAST64
+# if !defined PRIoFAST64
 #  define PRIoFAST64 PRIo64
 # endif
-# if !defined PRIuFAST64 || @PRI_MACROS_BROKEN@
-#  undef PRIuFAST64
+# if !defined PRIuFAST64
 #  define PRIuFAST64 PRIu64
 # endif
-# if !defined PRIxFAST64 || @PRI_MACROS_BROKEN@
-#  undef PRIxFAST64
+# if !defined PRIxFAST64
 #  define PRIxFAST64 PRIx64
 # endif
-# if !defined PRIXFAST64 || @PRI_MACROS_BROKEN@
-#  undef PRIXFAST64
+# if !defined PRIXFAST64
 #  define PRIXFAST64 PRIX64
 # endif
 #endif
 
-#if !defined PRIdMAX || @PRI_MACROS_BROKEN@
-# undef PRIdMAX
+#if !defined PRIdMAX
 # if @INT32_MAX_LT_INTMAX_MAX@
 #  define PRIdMAX PRId64
 # else
 #  define PRIdMAX "ld"
 # endif
 #endif
-#if !defined PRIiMAX || @PRI_MACROS_BROKEN@
-# undef PRIiMAX
+#if !defined PRIiMAX
 # if @INT32_MAX_LT_INTMAX_MAX@
 #  define PRIiMAX PRIi64
 # else
 #  define PRIiMAX "li"
 # endif
 #endif
-#if !defined PRIoMAX || @PRI_MACROS_BROKEN@
-# undef PRIoMAX
+#if !defined PRIoMAX
 # if @UINT32_MAX_LT_UINTMAX_MAX@
 #  define PRIoMAX PRIo64
 # else
 #  define PRIoMAX "lo"
 # endif
 #endif
-#if !defined PRIuMAX || @PRI_MACROS_BROKEN@
-# undef PRIuMAX
+#if !defined PRIuMAX
 # if @UINT32_MAX_LT_UINTMAX_MAX@
 #  define PRIuMAX PRIu64
 # else
 #  define PRIuMAX "lu"
 # endif
 #endif
-#if !defined PRIxMAX || @PRI_MACROS_BROKEN@
-# undef PRIxMAX
+#if !defined PRIxMAX
 # if @UINT32_MAX_LT_UINTMAX_MAX@
 #  define PRIxMAX PRIx64
 # else
 #  define PRIxMAX "lx"
 # endif
 #endif
-#if !defined PRIXMAX || @PRI_MACROS_BROKEN@
-# undef PRIXMAX
+#if !defined PRIXMAX
 # if @UINT32_MAX_LT_UINTMAX_MAX@
 #  define PRIXMAX PRIX64
 # else
 # endif
 #endif
 
-#if !defined PRIdPTR || @PRI_MACROS_BROKEN@
-# undef PRIdPTR
+#if !defined PRIdPTR
 # ifdef INTPTR_MAX
 #  define PRIdPTR @PRIPTR_PREFIX@ "d"
 # endif
 #endif
-#if !defined PRIiPTR || @PRI_MACROS_BROKEN@
-# undef PRIiPTR
+#if !defined PRIiPTR
 # ifdef INTPTR_MAX
 #  define PRIiPTR @PRIPTR_PREFIX@ "i"
 # endif
 #endif
-#if !defined PRIoPTR || @PRI_MACROS_BROKEN@
-# undef PRIoPTR
+#if !defined PRIoPTR
 # ifdef UINTPTR_MAX
 #  define PRIoPTR @PRIPTR_PREFIX@ "o"
 # endif
 #endif
-#if !defined PRIuPTR || @PRI_MACROS_BROKEN@
-# undef PRIuPTR
+#if !defined PRIuPTR
 # ifdef UINTPTR_MAX
 #  define PRIuPTR @PRIPTR_PREFIX@ "u"
 # endif
 #endif
-#if !defined PRIxPTR || @PRI_MACROS_BROKEN@
-# undef PRIxPTR
+#if !defined PRIxPTR
 # ifdef UINTPTR_MAX
 #  define PRIxPTR @PRIPTR_PREFIX@ "x"
 # endif
 #endif
-#if !defined PRIXPTR || @PRI_MACROS_BROKEN@
-# undef PRIXPTR
+#if !defined PRIXPTR
 # ifdef UINTPTR_MAX
 #  define PRIXPTR @PRIPTR_PREFIX@ "X"
 # endif
 #endif
 
-#if !defined SCNd8 || @PRI_MACROS_BROKEN@
-# undef SCNd8
+#if !defined SCNd8
 # ifdef INT8_MAX
 #  define SCNd8 "hhd"
 # endif
 #endif
-#if !defined SCNi8 || @PRI_MACROS_BROKEN@
-# undef SCNi8
+#if !defined SCNi8
 # ifdef INT8_MAX
 #  define SCNi8 "hhi"
 # endif
 #endif
-#if !defined SCNo8 || @PRI_MACROS_BROKEN@
-# undef SCNo8
+#if !defined SCNo8
 # ifdef UINT8_MAX
 #  define SCNo8 "hho"
 # endif
 #endif
-#if !defined SCNu8 || @PRI_MACROS_BROKEN@
-# undef SCNu8
+#if !defined SCNu8
 # ifdef UINT8_MAX
 #  define SCNu8 "hhu"
 # endif
 #endif
-#if !defined SCNx8 || @PRI_MACROS_BROKEN@
-# undef SCNx8
+#if !defined SCNx8
 # ifdef UINT8_MAX
 #  define SCNx8 "hhx"
 # endif
 #endif
-#if !defined SCNd16 || @PRI_MACROS_BROKEN@
-# undef SCNd16
+#if !defined SCNd16
 # ifdef INT16_MAX
 #  define SCNd16 "hd"
 # endif
 #endif
-#if !defined SCNi16 || @PRI_MACROS_BROKEN@
-# undef SCNi16
+#if !defined SCNi16
 # ifdef INT16_MAX
 #  define SCNi16 "hi"
 # endif
 #endif
-#if !defined SCNo16 || @PRI_MACROS_BROKEN@
-# undef SCNo16
+#if !defined SCNo16
 # ifdef UINT16_MAX
 #  define SCNo16 "ho"
 # endif
 #endif
-#if !defined SCNu16 || @PRI_MACROS_BROKEN@
-# undef SCNu16
+#if !defined SCNu16
 # ifdef UINT16_MAX
 #  define SCNu16 "hu"
 # endif
 #endif
-#if !defined SCNx16 || @PRI_MACROS_BROKEN@
-# undef SCNx16
+#if !defined SCNx16
 # ifdef UINT16_MAX
 #  define SCNx16 "hx"
 # endif
 #endif
-#if !defined SCNd32 || @PRI_MACROS_BROKEN@
-# undef SCNd32
+#if !defined SCNd32
 # ifdef INT32_MAX
 #  define SCNd32 "d"
 # endif
 #endif
-#if !defined SCNi32 || @PRI_MACROS_BROKEN@
-# undef SCNi32
+#if !defined SCNi32
 # ifdef INT32_MAX
 #  define SCNi32 "i"
 # endif
 #endif
-#if !defined SCNo32 || @PRI_MACROS_BROKEN@
-# undef SCNo32
+#if !defined SCNo32
 # ifdef UINT32_MAX
 #  define SCNo32 "o"
 # endif
 #endif
-#if !defined SCNu32 || @PRI_MACROS_BROKEN@
-# undef SCNu32
+#if !defined SCNu32
 # ifdef UINT32_MAX
 #  define SCNu32 "u"
 # endif
 #endif
-#if !defined SCNx32 || @PRI_MACROS_BROKEN@
-# undef SCNx32
+#if !defined SCNx32
 # ifdef UINT32_MAX
 #  define SCNx32 "x"
 # endif
 # elif LONG_MAX >> 30 == 1
 #  define _SCN64_PREFIX _LONG_LONG_FORMAT_PREFIX
 # endif
-# if !defined SCNd64 || @PRI_MACROS_BROKEN@
-#  undef SCNd64
+# if !defined SCNd64
 #  define SCNd64 _SCN64_PREFIX "d"
 # endif
-# if !defined SCNi64 || @PRI_MACROS_BROKEN@
-#  undef SCNi64
+# if !defined SCNi64
 #  define SCNi64 _SCN64_PREFIX "i"
 # endif
 #endif
 # elif ULONG_MAX >> 31 == 1
 #  define _SCNu64_PREFIX _LONG_LONG_FORMAT_PREFIX
 # endif
-# if !defined SCNo64 || @PRI_MACROS_BROKEN@
-#  undef SCNo64
+# if !defined SCNo64
 #  define SCNo64 _SCNu64_PREFIX "o"
 # endif
-# if !defined SCNu64 || @PRI_MACROS_BROKEN@
-#  undef SCNu64
+# if !defined SCNu64
 #  define SCNu64 _SCNu64_PREFIX "u"
 # endif
-# if !defined SCNx64 || @PRI_MACROS_BROKEN@
-#  undef SCNx64
+# if !defined SCNx64
 #  define SCNx64 _SCNu64_PREFIX "x"
 # endif
 #endif
 
-#if !defined SCNdLEAST8 || @PRI_MACROS_BROKEN@
-# undef SCNdLEAST8
+#if !defined SCNdLEAST8
 # define SCNdLEAST8 "hhd"
 #endif
-#if !defined SCNiLEAST8 || @PRI_MACROS_BROKEN@
-# undef SCNiLEAST8
+#if !defined SCNiLEAST8
 # define SCNiLEAST8 "hhi"
 #endif
-#if !defined SCNoLEAST8 || @PRI_MACROS_BROKEN@
-# undef SCNoLEAST8
+#if !defined SCNoLEAST8
 # define SCNoLEAST8 "hho"
 #endif
-#if !defined SCNuLEAST8 || @PRI_MACROS_BROKEN@
-# undef SCNuLEAST8
+#if !defined SCNuLEAST8
 # define SCNuLEAST8 "hhu"
 #endif
-#if !defined SCNxLEAST8 || @PRI_MACROS_BROKEN@
-# undef SCNxLEAST8
+#if !defined SCNxLEAST8
 # define SCNxLEAST8 "hhx"
 #endif
-#if !defined SCNdLEAST16 || @PRI_MACROS_BROKEN@
-# undef SCNdLEAST16
+#if !defined SCNdLEAST16
 # define SCNdLEAST16 "hd"
 #endif
-#if !defined SCNiLEAST16 || @PRI_MACROS_BROKEN@
-# undef SCNiLEAST16
+#if !defined SCNiLEAST16
 # define SCNiLEAST16 "hi"
 #endif
-#if !defined SCNoLEAST16 || @PRI_MACROS_BROKEN@
-# undef SCNoLEAST16
+#if !defined SCNoLEAST16
 # define SCNoLEAST16 "ho"
 #endif
-#if !defined SCNuLEAST16 || @PRI_MACROS_BROKEN@
-# undef SCNuLEAST16
+#if !defined SCNuLEAST16
 # define SCNuLEAST16 "hu"
 #endif
-#if !defined SCNxLEAST16 || @PRI_MACROS_BROKEN@
-# undef SCNxLEAST16
+#if !defined SCNxLEAST16
 # define SCNxLEAST16 "hx"
 #endif
-#if !defined SCNdLEAST32 || @PRI_MACROS_BROKEN@
-# undef SCNdLEAST32
+#if !defined SCNdLEAST32
 # define SCNdLEAST32 "d"
 #endif
-#if !defined SCNiLEAST32 || @PRI_MACROS_BROKEN@
-# undef SCNiLEAST32
+#if !defined SCNiLEAST32
 # define SCNiLEAST32 "i"
 #endif
-#if !defined SCNoLEAST32 || @PRI_MACROS_BROKEN@
-# undef SCNoLEAST32
+#if !defined SCNoLEAST32
 # define SCNoLEAST32 "o"
 #endif
-#if !defined SCNuLEAST32 || @PRI_MACROS_BROKEN@
-# undef SCNuLEAST32
+#if !defined SCNuLEAST32
 # define SCNuLEAST32 "u"
 #endif
-#if !defined SCNxLEAST32 || @PRI_MACROS_BROKEN@
-# undef SCNxLEAST32
+#if !defined SCNxLEAST32
 # define SCNxLEAST32 "x"
 #endif
 #ifdef INT64_MAX
-# if !defined SCNdLEAST64 || @PRI_MACROS_BROKEN@
-#  undef SCNdLEAST64
+# if !defined SCNdLEAST64
 #  define SCNdLEAST64 SCNd64
 # endif
-# if !defined SCNiLEAST64 || @PRI_MACROS_BROKEN@
-#  undef SCNiLEAST64
+# if !defined SCNiLEAST64
 #  define SCNiLEAST64 SCNi64
 # endif
 #endif
 #ifdef UINT64_MAX
-# if !defined SCNoLEAST64 || @PRI_MACROS_BROKEN@
-#  undef SCNoLEAST64
+# if !defined SCNoLEAST64
 #  define SCNoLEAST64 SCNo64
 # endif
-# if !defined SCNuLEAST64 || @PRI_MACROS_BROKEN@
-#  undef SCNuLEAST64
+# if !defined SCNuLEAST64
 #  define SCNuLEAST64 SCNu64
 # endif
-# if !defined SCNxLEAST64 || @PRI_MACROS_BROKEN@
-#  undef SCNxLEAST64
+# if !defined SCNxLEAST64
 #  define SCNxLEAST64 SCNx64
 # endif
 #endif
 
-#if !defined SCNdFAST8 || @PRI_MACROS_BROKEN@
-# undef SCNdFAST8
+#if !defined SCNdFAST8
 # if INT_FAST8_MAX > INT32_MAX
 #  define SCNdFAST8 SCNd64
 # elif INT_FAST8_MAX == 0x7fff
 #  define SCNdFAST8 "d"
 # endif
 #endif
-#if !defined SCNiFAST8 || @PRI_MACROS_BROKEN@
-# undef SCNiFAST8
+#if !defined SCNiFAST8
 # if INT_FAST8_MAX > INT32_MAX
 #  define SCNiFAST8 SCNi64
 # elif INT_FAST8_MAX == 0x7fff
 #  define SCNiFAST8 "i"
 # endif
 #endif
-#if !defined SCNoFAST8 || @PRI_MACROS_BROKEN@
-# undef SCNoFAST8
+#if !defined SCNoFAST8
 # if UINT_FAST8_MAX > UINT32_MAX
 #  define SCNoFAST8 SCNo64
 # elif UINT_FAST8_MAX == 0xffff
 #  define SCNoFAST8 "o"
 # endif
 #endif
-#if !defined SCNuFAST8 || @PRI_MACROS_BROKEN@
-# undef SCNuFAST8
+#if !defined SCNuFAST8
 # if UINT_FAST8_MAX > UINT32_MAX
 #  define SCNuFAST8 SCNu64
 # elif UINT_FAST8_MAX == 0xffff
 #  define SCNuFAST8 "u"
 # endif
 #endif
-#if !defined SCNxFAST8 || @PRI_MACROS_BROKEN@
-# undef SCNxFAST8
+#if !defined SCNxFAST8
 # if UINT_FAST8_MAX > UINT32_MAX
 #  define SCNxFAST8 SCNx64
 # elif UINT_FAST8_MAX == 0xffff
 #  define SCNxFAST8 "x"
 # endif
 #endif
-#if !defined SCNdFAST16 || @PRI_MACROS_BROKEN@
-# undef SCNdFAST16
+#if !defined SCNdFAST16
 # if INT_FAST16_MAX > INT32_MAX
 #  define SCNdFAST16 SCNd64
 # elif INT_FAST16_MAX == 0x7fff
 #  define SCNdFAST16 "d"
 # endif
 #endif
-#if !defined SCNiFAST16 || @PRI_MACROS_BROKEN@
-# undef SCNiFAST16
+#if !defined SCNiFAST16
 # if INT_FAST16_MAX > INT32_MAX
 #  define SCNiFAST16 SCNi64
 # elif INT_FAST16_MAX == 0x7fff
 #  define SCNiFAST16 "i"
 # endif
 #endif
-#if !defined SCNoFAST16 || @PRI_MACROS_BROKEN@
-# undef SCNoFAST16
+#if !defined SCNoFAST16
 # if UINT_FAST16_MAX > UINT32_MAX
 #  define SCNoFAST16 SCNo64
 # elif UINT_FAST16_MAX == 0xffff
 #  define SCNoFAST16 "o"
 # endif
 #endif
-#if !defined SCNuFAST16 || @PRI_MACROS_BROKEN@
-# undef SCNuFAST16
+#if !defined SCNuFAST16
 # if UINT_FAST16_MAX > UINT32_MAX
 #  define SCNuFAST16 SCNu64
 # elif UINT_FAST16_MAX == 0xffff
 #  define SCNuFAST16 "u"
 # endif
 #endif
-#if !defined SCNxFAST16 || @PRI_MACROS_BROKEN@
-# undef SCNxFAST16
+#if !defined SCNxFAST16
 # if UINT_FAST16_MAX > UINT32_MAX
 #  define SCNxFAST16 SCNx64
 # elif UINT_FAST16_MAX == 0xffff
 #  define SCNxFAST16 "x"
 # endif
 #endif
-#if !defined SCNdFAST32 || @PRI_MACROS_BROKEN@
-# undef SCNdFAST32
+#if !defined SCNdFAST32
 # if INT_FAST32_MAX > INT32_MAX
 #  define SCNdFAST32 SCNd64
 # else
 #  define SCNdFAST32 "d"
 # endif
 #endif
-#if !defined SCNiFAST32 || @PRI_MACROS_BROKEN@
-# undef SCNiFAST32
+#if !defined SCNiFAST32
 # if INT_FAST32_MAX > INT32_MAX
 #  define SCNiFAST32 SCNi64
 # else
 #  define SCNiFAST32 "i"
 # endif
 #endif
-#if !defined SCNoFAST32 || @PRI_MACROS_BROKEN@
-# undef SCNoFAST32
+#if !defined SCNoFAST32
 # if UINT_FAST32_MAX > UINT32_MAX
 #  define SCNoFAST32 SCNo64
 # else
 #  define SCNoFAST32 "o"
 # endif
 #endif
-#if !defined SCNuFAST32 || @PRI_MACROS_BROKEN@
-# undef SCNuFAST32
+#if !defined SCNuFAST32
 # if UINT_FAST32_MAX > UINT32_MAX
 #  define SCNuFAST32 SCNu64
 # else
 #  define SCNuFAST32 "u"
 # endif
 #endif
-#if !defined SCNxFAST32 || @PRI_MACROS_BROKEN@
-# undef SCNxFAST32
+#if !defined SCNxFAST32
 # if UINT_FAST32_MAX > UINT32_MAX
 #  define SCNxFAST32 SCNx64
 # else
 # endif
 #endif
 #ifdef INT64_MAX
-# if !defined SCNdFAST64 || @PRI_MACROS_BROKEN@
-#  undef SCNdFAST64
+# if !defined SCNdFAST64
 #  define SCNdFAST64 SCNd64
 # endif
-# if !defined SCNiFAST64 || @PRI_MACROS_BROKEN@
-#  undef SCNiFAST64
+# if !defined SCNiFAST64
 #  define SCNiFAST64 SCNi64
 # endif
 #endif
 #ifdef UINT64_MAX
-# if !defined SCNoFAST64 || @PRI_MACROS_BROKEN@
-#  undef SCNoFAST64
+# if !defined SCNoFAST64
 #  define SCNoFAST64 SCNo64
 # endif
-# if !defined SCNuFAST64 || @PRI_MACROS_BROKEN@
-#  undef SCNuFAST64
+# if !defined SCNuFAST64
 #  define SCNuFAST64 SCNu64
 # endif
-# if !defined SCNxFAST64 || @PRI_MACROS_BROKEN@
-#  undef SCNxFAST64
+# if !defined SCNxFAST64
 #  define SCNxFAST64 SCNx64
 # endif
 #endif
 
-#if !defined SCNdMAX || @PRI_MACROS_BROKEN@
-# undef SCNdMAX
+#if !defined SCNdMAX
 # if @INT32_MAX_LT_INTMAX_MAX@
 #  define SCNdMAX SCNd64
 # else
 #  define SCNdMAX "ld"
 # endif
 #endif
-#if !defined SCNiMAX || @PRI_MACROS_BROKEN@
-# undef SCNiMAX
+#if !defined SCNiMAX
 # if @INT32_MAX_LT_INTMAX_MAX@
 #  define SCNiMAX SCNi64
 # else
 #  define SCNiMAX "li"
 # endif
 #endif
-#if !defined SCNoMAX || @PRI_MACROS_BROKEN@
-# undef SCNoMAX
+#if !defined SCNoMAX
 # if @UINT32_MAX_LT_UINTMAX_MAX@
 #  define SCNoMAX SCNo64
 # else
 #  define SCNoMAX "lo"
 # endif
 #endif
-#if !defined SCNuMAX || @PRI_MACROS_BROKEN@
-# undef SCNuMAX
+#if !defined SCNuMAX
 # if @UINT32_MAX_LT_UINTMAX_MAX@
 #  define SCNuMAX SCNu64
 # else
 #  define SCNuMAX "lu"
 # endif
 #endif
-#if !defined SCNxMAX || @PRI_MACROS_BROKEN@
-# undef SCNxMAX
+#if !defined SCNxMAX
 # if @UINT32_MAX_LT_UINTMAX_MAX@
 #  define SCNxMAX SCNx64
 # else
 # endif
 #endif
 
-#if !defined SCNdPTR || @PRI_MACROS_BROKEN@
-# undef SCNdPTR
+#if !defined SCNdPTR
 # ifdef INTPTR_MAX
 #  define SCNdPTR @PRIPTR_PREFIX@ "d"
 # endif
 #endif
-#if !defined SCNiPTR || @PRI_MACROS_BROKEN@
-# undef SCNiPTR
+#if !defined SCNiPTR
 # ifdef INTPTR_MAX
 #  define SCNiPTR @PRIPTR_PREFIX@ "i"
 # endif
 #endif
-#if !defined SCNoPTR || @PRI_MACROS_BROKEN@
-# undef SCNoPTR
+#if !defined SCNoPTR
 # ifdef UINTPTR_MAX
 #  define SCNoPTR @PRIPTR_PREFIX@ "o"
 # endif
 #endif
-#if !defined SCNuPTR || @PRI_MACROS_BROKEN@
-# undef SCNuPTR
+#if !defined SCNuPTR
 # ifdef UINTPTR_MAX
 #  define SCNuPTR @PRIPTR_PREFIX@ "u"
 # endif
 #endif
-#if !defined SCNxPTR || @PRI_MACROS_BROKEN@
-# undef SCNxPTR
+#if !defined SCNxPTR
 # ifdef UINTPTR_MAX
 #  define SCNxPTR @PRIPTR_PREFIX@ "x"
 # endif
index 48994045672fbeaeab7f8e91d1782aec8c041638..44a9a20e3f5433d912cf13d544f95dc447171655 100644 (file)
@@ -1,6 +1,6 @@
 /* Test whether a character is a blank.
 
-   Copyright (C) 2009-2020 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 814456d2562a7eda4131b5c0548bf02c1528e021..434e5df4972dfa4f6995f28c217e1ea3217566e6 100644 (file)
@@ -1,5 +1,5 @@
 /* Test for NaN that does not need libm.
-   Copyright (C) 2007-2020 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index cbabed4c10cab384be3ffffd5998929f56f10e59..c299130a3687b0a7acd5575196ad04a8dea0fb15 100644 (file)
@@ -1,5 +1,5 @@
 /* Test for NaN that does not need libm.
-   Copyright (C) 2007-2020 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -17,8 +17,8 @@
 #if HAVE_ISNAND_IN_LIBC
 /* Get declaration of isnan macro.  */
 # include <math.h>
-# if __GNUC__ >= 4
-   /* GCC 4.0 and newer provides three built-ins for isnan.  */
+# if (__GNUC__ >= 4) || (__clang_major__ >= 4)
+   /* GCC >= 4.0 and clang provide a type-generic built-in for isnan.  */
 #  undef isnand
 #  define isnand(x) __builtin_isnan ((double)(x))
 # else
index a672553c2d528c24b7b845ab4d441c58a60c5a68..3c7e8e8296b8d1e992aaf5ea863d6179ff7b4a97 100644 (file)
@@ -1,5 +1,5 @@
 /* Test for NaN that does not need libm.
-   Copyright (C) 2008-2020 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 103d31a7066c987d05d27c54052757e29bd331c2..f9f5efd7860ddcb5efbf626e58c3e43670f406b4 100644 (file)
@@ -1,5 +1,5 @@
 /* Test for NaN that does not need libm.
-   Copyright (C) 2007-2020 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 #if HAVE_ISNANL_IN_LIBC
 /* Get declaration of isnan macro or (older) isnanl function.  */
 # include <math.h>
-# ifndef __has_builtin
-#  define __has_builtin(name) 0
-# endif
-# if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanl))
-   /* GCC 4.0 and newer provides three built-ins for isnan.  */
+# if (__GNUC__ >= 4) || (__clang_major__ >= 4)
+   /* GCC >= 4.0 and clang provide a type-generic built-in for isnan.
+      GCC >= 4.0 also provides __builtin_isnanl, but clang doesn't.  */
 #  undef isnanl
-#  define isnanl(x) __builtin_isnanl ((long double)(x))
+#  define isnanl(x) __builtin_isnan ((long double)(x))
 # elif defined isnan
 #  undef isnanl
 #  define isnanl(x) isnan ((long double)(x))
index 4532853cd60975c7d0eca6d4a9288908a1cbdf08..5dc9cb767217ce3dd945ced53068ebf44987266d 100644 (file)
@@ -1,5 +1,5 @@
 /* Test for NaN that does not need libm.
-   Copyright (C) 2007, 2009-2020 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index d764003e4b8423bd184b180c0e41984c88a4ec44..9a6682d4851a17f9d52fa112913b11ef86d1eb87 100644 (file)
@@ -1,5 +1,5 @@
 /* Replacement for 'int' to 'long double' conversion routine.
-   Copyright (C) 2011-2020 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2011.
 
    This program is free software: you can redistribute it and/or modify
index 79057d4e3338621d35da645ff9f300a53258abc7..879f71ad0123d2262db5c1066ec77fe27dda8541 100644 (file)
@@ -1,5 +1,5 @@
 /* Dispatching based on the current locale's character encoding.
-   Copyright (C) 2018-2020 Free Software Foundation, Inc.
+   Copyright (C) 2018-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 95c2316bf3a6a0d2ed9fcec8529d8258044f3593..9c308fedaee3bb844bafcab7861ca7385f9e5724 100644 (file)
@@ -1,5 +1,5 @@
 /* Dispatching based on the current locale's character encoding.
-   Copyright (C) 2018-2020 Free Software Foundation, Inc.
+   Copyright (C) 2018-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 1300c3a2ac8391c4669bf6b4203c91f210c2382c..e3571ee4c9449fb3ebb2c73f4a78f14471274917 100644 (file)
@@ -1,6 +1,6 @@
 /* System definitions for code taken from the GNU C Library
 
-   Copyright 2017-2020 Free Software Foundation, Inc.
+   Copyright 2017-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public
 # endif
 #endif
 
-
-/* Prepare to include <cdefs.h>, which is our copy of glibc
-   <sys/cdefs.h>.  */
+#ifndef __glibc_likely
+/* <sys/cdefs.h> either does not exist, or predates glibc commit
+   2012-12-28T06:33:01Z!siddhesh@redhat.com
+   (91998e449e0ce758db55aecf2abc3ee510fcbc8f)
+   and so does not suffice for Gnulib.  Prepare to include <cdefs.h>,
+   which is Gnulib's copy of a more-recent glibc <sys/cdefs.h>.  */
 
 /* Define _FEATURES_H so that <cdefs.h> does not include <features.h>.  */
-#ifndef _FEATURES_H
-# define _FEATURES_H 1
-#endif
+# ifndef _FEATURES_H
+#  define _FEATURES_H 1
+# endif
 /* Define __WORDSIZE so that <cdefs.h> does not attempt to include
    nonexistent files.  Make it a syntax error, since Gnulib does not
    use __WORDSIZE now, and if Gnulib uses it later the syntax error
    will let us know that __WORDSIZE needs configuring.  */
-#ifndef __WORDSIZE
-# define __WORDSIZE %%%
-#endif
+# ifndef __WORDSIZE
+#  define __WORDSIZE %%%
+# endif
 /* Undef the macros unconditionally defined by our copy of glibc
    <sys/cdefs.h>, so that they do not clash with any system-defined
    versions.  */
-#undef _SYS_CDEFS_H
-#undef __ASMNAME
-#undef __ASMNAME2
-#undef __BEGIN_DECLS
-#undef __CONCAT
-#undef __END_DECLS
-#undef __HAVE_GENERIC_SELECTION
-#undef __LDBL_COMPAT
-#undef __LDBL_REDIR
-#undef __LDBL_REDIR1
-#undef __LDBL_REDIR1_DECL
-#undef __LDBL_REDIR1_NTH
-#undef __LDBL_REDIR_DECL
-#undef __LDBL_REDIR_NTH
-#undef __LEAF
-#undef __LEAF_ATTR
-#undef __NTH
-#undef __NTHNL
-#undef __P
-#undef __PMT
-#undef __REDIRECT
-#undef __REDIRECT_LDBL
-#undef __REDIRECT_NTH
-#undef __REDIRECT_NTHNL
-#undef __REDIRECT_NTH_LDBL
-#undef __STRING
-#undef __THROW
-#undef __THROWNL
-#undef __always_inline
-#undef __attribute__
-#undef __attribute_alloc_size__
-#undef __attribute_artificial__
-#undef __attribute_const__
-#undef __attribute_deprecated__
-#undef __attribute_deprecated_msg__
-#undef __attribute_format_arg__
-#undef __attribute_format_strfmon__
-#undef __attribute_malloc__
-#undef __attribute_noinline__
-#undef __attribute_nonstring__
-#undef __attribute_pure__
-#undef __attribute_used__
-#undef __attribute_warn_unused_result__
-#undef __bos
-#undef __bos0
-#undef __errordecl
-#undef __extension__
-#undef __extern_always_inline
-#undef __extern_inline
-#undef __flexarr
-#undef __fortify_function
-#undef __glibc_c99_flexarr_available
-#undef __glibc_clang_has_extension
-#undef __glibc_likely
-#undef __glibc_macro_warning
-#undef __glibc_macro_warning1
-#undef __glibc_unlikely
-#undef __inline
-#undef __ptr_t
-#undef __restrict
-#undef __restrict_arr
-#undef __va_arg_pack
-#undef __va_arg_pack_len
-#undef __warnattr
-#undef __warndecl
+# undef _SYS_CDEFS_H
+# undef __ASMNAME
+# undef __ASMNAME2
+# undef __BEGIN_DECLS
+# undef __CONCAT
+# undef __END_DECLS
+# undef __HAVE_GENERIC_SELECTION
+# undef __LDBL_COMPAT
+# undef __LDBL_REDIR
+# undef __LDBL_REDIR1
+# undef __LDBL_REDIR1_DECL
+# undef __LDBL_REDIR1_NTH
+# undef __LDBL_REDIR2_DECL
+# undef __LDBL_REDIR_DECL
+# undef __LDBL_REDIR_NTH
+# undef __LEAF
+# undef __LEAF_ATTR
+# undef __NTH
+# undef __NTHNL
+# undef __REDIRECT
+# undef __REDIRECT_LDBL
+# undef __REDIRECT_NTH
+# undef __REDIRECT_NTHNL
+# undef __REDIRECT_NTH_LDBL
+# undef __STRING
+# undef __THROW
+# undef __THROWNL
+# undef __attr_access
+# undef __attribute__
+# undef __attribute_alloc_size__
+# undef __attribute_artificial__
+# undef __attribute_const__
+# undef __attribute_deprecated__
+# undef __attribute_deprecated_msg__
+# undef __attribute_format_arg__
+# undef __attribute_format_strfmon__
+# undef __attribute_malloc__
+# undef __attribute_noinline__
+# undef __attribute_nonstring__
+# undef __attribute_pure__
+# undef __attribute_returns_twice__
+# undef __attribute_used__
+# undef __attribute_warn_unused_result__
+# undef __bos
+# undef __bos0
+# undef __errordecl
+# undef __extension__
+# undef __extern_always_inline
+# undef __extern_inline
+# undef __flexarr
+# undef __fortify_function
+# undef __glibc_c99_flexarr_available
+# undef __glibc_clang_has_attribute
+# undef __glibc_clang_has_builtin
+# undef __glibc_clang_has_extension
+# undef __glibc_macro_warning
+# undef __glibc_macro_warning1
+# undef __glibc_objsize
+# undef __glibc_objsize0
+# undef __glibc_unlikely
+# undef __inline
+# undef __ptr_t
+# undef __restrict
+# undef __restrict_arr
+# undef __va_arg_pack
+# undef __va_arg_pack_len
+# undef __warnattr
 
 /* Include our copy of glibc <sys/cdefs.h>.  */
-#include <cdefs.h>
+# include <cdefs.h>
 
 /* <cdefs.h> __inline is too pessimistic for non-GCC.  */
-#undef __inline
-#ifndef HAVE___INLINE
-# if 199901 <= __STDC_VERSION__ || defined inline
-#  define __inline inline
-# else
-#  define __inline
+# undef __inline
+# ifndef HAVE___INLINE
+#  if 199901 <= __STDC_VERSION__ || defined inline
+#   define __inline inline
+#  else
+#   define __inline
+#  endif
 # endif
-#endif
+
+#endif /* defined __glibc_likely */
 
 
 /* A substitute for glibc <libc-symbols.h>, good enough for Gnulib.  */
 #define attribute_hidden
-#define libc_hidden_proto(name, ...)
+#define libc_hidden_proto(name)
 #define libc_hidden_def(name)
 #define libc_hidden_weak(name)
 #define libc_hidden_ver(local, name)
index d25c523706093c28efcf9709ff4a89599aad1ba5..076ab9ef548ae1d37c2dfd26d8bd1ab37c5617e0 100644 (file)
@@ -1,6 +1,6 @@
 /* A GNU-like <limits.h>.
 
-   Copyright 2016-2020 Free Software Foundation, Inc.
+   Copyright 2016-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License
index 721c8a9d134f2bc1bc814dd03b7fce5ba7c65522..cba0e2b20787f1dd5fe776564dde85c45cec9b86 100644 (file)
@@ -1,6 +1,6 @@
 /* Determine a canonical name for the current locale's character encoding.
 
-   Copyright (C) 2000-2006, 2008-2020 Free Software Foundation, Inc.
+   Copyright (C) 2000-2006, 2008-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index aa623be07a128be67d15386b12e8e0d315480f13..6e6649402007edf4f73d9a03e96abcf338387c1c 100644 (file)
@@ -1,5 +1,5 @@
 /* Determine a canonical name for the current locale's character encoding.
-   Copyright (C) 2000-2003, 2009-2020 Free Software Foundation, Inc.
+   Copyright (C) 2000-2003, 2009-2021 Free Software Foundation, Inc.
    This file is part of the GNU CHARSET Library.
 
    This program is free software; you can redistribute it and/or modify
index 4e9b3f38a9880ad016e7910427939b269ba347c4..df8474798c29f518ff45e4e8f771f41d09c12147 100644 (file)
@@ -1,5 +1,5 @@
 /* A POSIX <locale.h>.
-   Copyright (C) 2007-2020 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/localtime-buffer.c b/gnulib/import/localtime-buffer.c
deleted file mode 100644 (file)
index 141849c..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-/* Provide access to the last buffer returned by localtime() or gmtime().
-
-   Copyright (C) 2001-2003, 2005-2007, 2009-2020 Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
-
-/* written by Jim Meyering */
-
-#include <config.h>
-
-/* Specification.  */
-#include "localtime-buffer.h"
-
-#if GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME
-
-static struct tm tm_zero_buffer;
-struct tm *localtime_buffer_addr = &tm_zero_buffer;
-
-/* This is a wrapper for localtime.
-
-   On the first call, record the address of the static buffer that
-   localtime uses for its result.  */
-
-struct tm *
-rpl_localtime (time_t const *timep)
-#undef localtime
-{
-  struct tm *tm = localtime (timep);
-
-  if (localtime_buffer_addr == &tm_zero_buffer)
-    localtime_buffer_addr = tm;
-
-  return tm;
-}
-
-/* Same as above, since gmtime and localtime use the same buffer.  */
-struct tm *
-rpl_gmtime (time_t const *timep)
-#undef gmtime
-{
-  struct tm *tm = gmtime (timep);
-
-  if (localtime_buffer_addr == &tm_zero_buffer)
-    localtime_buffer_addr = tm;
-
-  return tm;
-}
-
-#endif
diff --git a/gnulib/import/localtime-buffer.h b/gnulib/import/localtime-buffer.h
deleted file mode 100644 (file)
index 3801742..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Provide access to the last buffer returned by localtime() or gmtime().
-
-   Copyright (C) 2001-2003, 2005-2007, 2009-2020 Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
-
-/* written by Jim Meyering */
-
-#include <time.h>
-
-#if GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME
-
-/* The address of the last buffer returned by localtime() or gmtime().  */
-extern struct tm *localtime_buffer_addr;
-
-#endif
index f74392b731902b330660b97b2ca29d5ec622bef4..a584c6aa0691b2d552fc591326cd27e31bfc090f 100644 (file)
@@ -1,6 +1,6 @@
 /* Work around a bug of lstat on some systems
 
-   Copyright (C) 1997-2006, 2008-2020 Free Software Foundation, Inc.
+   Copyright (C) 1997-2006, 2008-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 06eff4f3863e621df1899509ead6cf4f2a5534d8..9ba1743e652553405982b861fbf6107ae7f021ce 100644 (file)
@@ -1,44 +1,12 @@
-# 00gnulib.m4 serial 7
-dnl Copyright (C) 2009-2020 Free Software Foundation, Inc.
+# 00gnulib.m4 serial 8
+dnl Copyright (C) 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
 dnl This file must be named something that sorts before all other
-dnl gnulib-provided .m4 files.  The first part is needed until such time
-dnl as we can assume Autoconf 2.64, with its improved AC_DEFUN_ONCE and
-dnl m4_divert semantics.  The second part is needed until the clang fix
-dnl has been included in Autoconf.
-
-# Until autoconf 2.63, handling of the diversion stack required m4_init
-# to be called first; but this does not happen with aclocal.  Wrapping
-# the entire execution in another layer of the diversion stack fixes this.
-# Worse, prior to autoconf 2.62, m4_wrap depended on the underlying m4
-# for whether it was FIFO or LIFO; in order to properly balance with
-# m4_init, we need to undo our push just before anything wrapped within
-# the m4_init body.  The way to ensure this is to wrap both sides of
-# m4_init with a one-shot macro that does the pop at the right time.
-m4_ifndef([_m4_divert_diversion],
-[m4_divert_push([KILL])
-m4_define([gl_divert_fixup], [m4_divert_pop()m4_define([$0])])
-m4_define([m4_init],
-  [gl_divert_fixup()]m4_defn([m4_init])[gl_divert_fixup()])])
-
-
-# AC_DEFUN_ONCE([NAME], VALUE)
-# ----------------------------
-# Define NAME to expand to VALUE on the first use (whether by direct
-# expansion, or by AC_REQUIRE), and to nothing on all subsequent uses.
-# Avoid bugs in AC_REQUIRE in Autoconf 2.63 and earlier.  This
-# definition is slower than the version in Autoconf 2.64, because it
-# can only use interfaces that existed since 2.59; but it achieves the
-# same effect.  Quoting is necessary to avoid confusing Automake.
-m4_version_prereq([2.63.263], [],
-[m4_define([AC][_DEFUN_ONCE],
-  [AC][_DEFUN([$1],
-    [AC_REQUIRE([_gl_DEFUN_ONCE([$1])],
-      [m4_indir([_gl_DEFUN_ONCE([$1])])])])]dnl
-[AC][_DEFUN([_gl_DEFUN_ONCE([$1])], [$2])])])
+dnl gnulib-provided .m4 files.  It is needed until the clang fix has
+dnl been included in Autoconf.
 
 # The following definitions arrange to use a compiler option
 # -Werror=implicit-function-declaration in AC_CHECK_DECL, when the
index 520c8c4b208ca3b8b1f159e50fa5adfac0090b2d..b28cc6abc511e79049c127f8eed21158c46bf101 100644 (file)
@@ -1,5 +1,5 @@
 # Test for __inline keyword
-dnl Copyright 2017-2020 Free Software Foundation, Inc.
+dnl Copyright 2017-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 39726ba57ba9d61ca859bafb460cfa619ae5a172..52d80d0428e52b2e700991400b8ca68a5e921114 100644 (file)
@@ -1,5 +1,5 @@
-# absolute-header.m4 serial 16
-dnl Copyright (C) 2006-2020 Free Software Foundation, Inc.
+# absolute-header.m4 serial 17
+dnl Copyright (C) 2006-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -22,23 +22,21 @@ dnl From Derek Price.
 AC_DEFUN([gl_ABSOLUTE_HEADER],
 [AC_REQUIRE([AC_CANONICAL_HOST])
 AC_LANG_PREPROC_REQUIRE()dnl
-dnl FIXME: gl_absolute_header and ac_header_exists must be used unquoted
-dnl until we can assume autoconf 2.64 or newer.
 m4_foreach_w([gl_HEADER_NAME], [$1],
   [AS_VAR_PUSHDEF([gl_absolute_header],
                   [gl_cv_absolute_]m4_defn([gl_HEADER_NAME]))dnl
   AC_CACHE_CHECK([absolute name of <]m4_defn([gl_HEADER_NAME])[>],
-    m4_defn([gl_absolute_header]),
+    [gl_absolute_header],
     [AS_VAR_PUSHDEF([ac_header_exists],
                     [ac_cv_header_]m4_defn([gl_HEADER_NAME]))dnl
     AC_CHECK_HEADERS_ONCE(m4_defn([gl_HEADER_NAME]))dnl
-    if test AS_VAR_GET(ac_header_exists) = yes; then
+    if test AS_VAR_GET([ac_header_exists]) = yes; then
       gl_ABSOLUTE_HEADER_ONE(m4_defn([gl_HEADER_NAME]))
     fi
     AS_VAR_POPDEF([ac_header_exists])dnl
     ])dnl
   AC_DEFINE_UNQUOTED(AS_TR_CPP([ABSOLUTE_]m4_defn([gl_HEADER_NAME])),
-                     ["AS_VAR_GET(gl_absolute_header)"],
+                     ["AS_VAR_GET([gl_absolute_header])"],
                      [Define this to an absolute name of <]m4_defn([gl_HEADER_NAME])[>.])
   AS_VAR_POPDEF([gl_absolute_header])dnl
 ])dnl
index 59225245b91b1714522fc3c85b6e6483b56129d6..ba2f679d8e0dea36b83f221c336fee8ef95956e3 100644 (file)
@@ -1,5 +1,5 @@
-# alloca.m4 serial 15
-dnl Copyright (C) 2002-2004, 2006-2007, 2009-2020 Free Software Foundation,
+# alloca.m4 serial 20
+dnl Copyright (C) 2002-2004, 2006-2007, 2009-2021 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -50,13 +50,13 @@ AC_DEFUN([gl_FUNC_ALLOCA],
 # STACK_DIRECTION is already handled by AC_FUNC_ALLOCA.
 AC_DEFUN([gl_PREREQ_ALLOCA], [:])
 
-# This works around a bug in autoconf <= 2.68.
-# See <https://lists.gnu.org/r/bug-gnulib/2011-06/msg00277.html>.
+m4_version_prereq([2.70], [], [
 
-m4_version_prereq([2.69], [] ,[
-
-# This is taken from the following Autoconf patch:
-# https://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=6cd9f12520b0d6f76d3230d7565feba1ecf29497
+# This works around a bug in autoconf <= 2.68 and has simplifications
+# from 2.70.  See:
+# https://lists.gnu.org/r/bug-gnulib/2011-06/msg00277.html
+# https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=6cd9f12520b0d6f76d3230d7565feba1ecf29497
+# https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=15edf7fd8094fd14a89d9891dd72a9624762597a
 
 # _AC_LIBOBJ_ALLOCA
 # -----------------
@@ -72,26 +72,6 @@ AC_LIBSOURCES(alloca.c)
 AC_SUBST([ALLOCA], [\${LIBOBJDIR}alloca.$ac_objext])dnl
 AC_DEFINE(C_ALLOCA, 1, [Define to 1 if using 'alloca.c'.])
 
-AC_CACHE_CHECK(whether 'alloca.c' needs Cray hooks, ac_cv_os_cray,
-[AC_EGREP_CPP(webecray,
-[#if defined CRAY && ! defined CRAY2
-webecray
-#else
-wenotbecray
-#endif
-], ac_cv_os_cray=yes, ac_cv_os_cray=no)])
-if test $ac_cv_os_cray = yes; then
-  for ac_func in _getb67 GETB67 getb67; do
-    AC_CHECK_FUNC($ac_func,
-                  [AC_DEFINE_UNQUOTED(CRAY_STACKSEG_END, $ac_func,
-                                      [Define to one of '_getb67', 'GETB67',
-                                       'getb67' for Cray-2 and Cray-YMP
-                                       systems. This function is required for
-                                       'alloca.c' support on those systems.])
-    break])
-  done
-fi
-
 AC_CACHE_CHECK([stack direction for C alloca],
                [ac_cv_c_stack_direction],
 [AC_RUN_IFELSE([AC_LANG_SOURCE(
@@ -122,7 +102,7 @@ AH_VERBATIM([STACK_DIRECTION],
         STACK_DIRECTION > 0 => grows toward higher addresses
         STACK_DIRECTION < 0 => grows toward lower addresses
         STACK_DIRECTION = 0 => direction of growth unknown */
-@%:@undef STACK_DIRECTION])dnl
+#undef STACK_DIRECTION])dnl
 AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction)
 ])# _AC_LIBOBJ_ALLOCA
 ])
index b39449494ae871b5dc8eae96f1bba12a7a18cc1e..c4e386d1f8f281cf864996ce92cf83127ff3b9f4 100644 (file)
@@ -1,5 +1,5 @@
 # arpa_inet_h.m4 serial 14
-dnl Copyright (C) 2006, 2008-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2008-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index c28ccb241644e55cd341a9fe0fe9a7e22e482a21..d2b2fe85aeea9dbdc296659ca8423cb75e2c4426 100644 (file)
@@ -1,5 +1,5 @@
-# btowc.m4 serial 11
-dnl Copyright (C) 2008-2020 Free Software Foundation, Inc.
+# btowc.m4 serial 12
+dnl Copyright (C) 2008-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -28,14 +28,6 @@ AC_DEFUN([gl_FUNC_BTOWC],
       [
         AC_RUN_IFELSE(
           [AC_LANG_SOURCE([[
-#include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
 #include <wchar.h>
 int main ()
 {
@@ -79,14 +71,7 @@ changequote([,])dnl
           AC_RUN_IFELSE(
             [AC_LANG_SOURCE([[
 #include <locale.h>
-#include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
 #include <stdio.h>
-#include <time.h>
 #include <wchar.h>
 int main ()
 {
index a6e889503dc00d51988bc1e799f3762e5a2e2512..c58411643ca7086f4ee054bf03b9c44564dc3ea3 100644 (file)
@@ -1,6 +1,6 @@
 dnl Check for __builtin_expect.
 
-dnl Copyright 2016-2020 Free Software Foundation, Inc.
+dnl Copyright 2016-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index bdc5c8f71a76aba1de010432c80026131667375f..475fa15d6bdf5a95412b89c987bf02680bd0308f 100644 (file)
@@ -1,6 +1,6 @@
-# canonicalize.m4 serial 31
+# canonicalize.m4 serial 35
 
-dnl Copyright (C) 2003-2007, 2009-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2003-2007, 2009-2021 Free Software Foundation, Inc.
 
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -11,7 +11,8 @@ dnl with or without modifications, as long as this notice is preserved.
 AC_DEFUN([gl_FUNC_CANONICALIZE_FILENAME_MODE],
 [
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
-  AC_CHECK_FUNCS_ONCE([canonicalize_file_name])
+  AC_REQUIRE([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
+  AC_CHECK_FUNCS_ONCE([canonicalize_file_name faccessat])
   AC_REQUIRE([gl_DOUBLE_SLASH_ROOT])
   AC_REQUIRE([gl_FUNC_REALPATH_WORKS])
   if test $ac_cv_func_canonicalize_file_name = no; then
@@ -56,7 +57,17 @@ AC_DEFUN([gl_CANONICALIZE_LGPL],
 AC_DEFUN([gl_CANONICALIZE_LGPL_SEPARATE],
 [
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
-  AC_CHECK_FUNCS_ONCE([canonicalize_file_name getcwd readlink])
+  AC_REQUIRE([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
+  AC_CHECK_FUNCS_ONCE([canonicalize_file_name faccessat])
+
+  dnl On native Windows, we use _getcwd(), regardless whether getcwd() is
+  dnl available through the linker option '-loldnames'.
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  case "$host_os" in
+    mingw*) ;;
+    *)      AC_CHECK_FUNCS([getcwd]) ;;
+  esac
+
   AC_REQUIRE([gl_DOUBLE_SLASH_ROOT])
   AC_REQUIRE([gl_FUNC_REALPATH_WORKS])
   AC_CHECK_HEADERS_ONCE([sys/param.h])
@@ -70,6 +81,7 @@ AC_DEFUN([gl_FUNC_REALPATH_WORKS],
   AC_CHECK_FUNCS_ONCE([realpath])
   AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
   AC_CACHE_CHECK([whether realpath works], [gl_cv_func_realpath_works], [
+    rm -rf conftest.a conftest.d
     touch conftest.a
     mkdir conftest.d
     AC_RUN_IFELSE([
index a528a5d6eb69f50b6baf248a51cf83d889c0c323..e5cd8dfa8d0c0290228fc2cabbc0795fa73a71de 100644 (file)
@@ -1,4 +1,4 @@
-#serial 16
+#serial 17
 
 # Use Gnulib's robust chdir function.
 # It can handle arbitrarily long directory names, which means
@@ -6,7 +6,7 @@
 # never fails with ENAMETOOLONG.
 # Arrange to compile chdir-long.c only on systems that define PATH_MAX.
 
-dnl Copyright (C) 2004-2007, 2009-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2004-2007, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -16,15 +16,15 @@ dnl with or without modifications, as long as this notice is preserved.
 AC_DEFUN([gl_FUNC_CHDIR_LONG],
 [
   AC_REQUIRE([gl_PATHMAX_SNIPPET_PREREQ])
-  AC_CACHE_CHECK([whether this system has an arbitrary file name length limit],
-    [gl_cv_have_arbitrary_file_name_length_limit],
+  AC_CACHE_CHECK([whether this system supports file names of any length],
+    [gl_cv_have_unlimited_file_name_length],
     [AC_EGREP_CPP([have_arbitrary_file_name_length_limit],
                   gl_PATHMAX_SNIPPET[
 #ifdef PATH_MAX
 have_arbitrary_file_name_length_limit
 #endif],
-    [gl_cv_have_arbitrary_file_name_length_limit=yes],
-    [gl_cv_have_arbitrary_file_name_length_limit=no])])
+    [gl_cv_have_unlimited_file_name_length=no],
+    [gl_cv_have_unlimited_file_name_length=yes])])
 ])
 
 AC_DEFUN([gl_PREREQ_CHDIR_LONG], [:])
diff --git a/gnulib/import/m4/clock_time.m4 b/gnulib/import/m4/clock_time.m4
new file mode 100644 (file)
index 0000000..c3b9e7e
--- /dev/null
@@ -0,0 +1,31 @@
+# clock_time.m4 serial 10
+dnl Copyright (C) 2002-2006, 2009-2021 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Check for clock_gettime and clock_settime, and set LIB_CLOCK_GETTIME.
+# For a program named, say foo, you should add a line like the following
+# in the corresponding Makefile.am file:
+# foo_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME)
+
+AC_DEFUN([gl_CLOCK_TIME],
+[
+  dnl Persuade glibc and Solaris <time.h> to declare these functions.
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+  # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
+  # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
+
+  # Save and restore LIBS so e.g., -lrt, isn't added to it.  Otherwise, *all*
+  # programs in the package would end up linked with that potentially-shared
+  # library, inducing unnecessary run-time overhead.
+  LIB_CLOCK_GETTIME=
+  AC_SUBST([LIB_CLOCK_GETTIME])
+  gl_saved_libs=$LIBS
+    AC_SEARCH_LIBS([clock_gettime], [rt posix4],
+                   [test "$ac_cv_search_clock_gettime" = "none required" ||
+                    LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime])
+    AC_CHECK_FUNCS([clock_gettime clock_settime])
+  LIBS=$gl_saved_libs
+])
index 378ec4cb0a38d2a2b5fa84b99b3abdd09fc8bdbf..77a504717a4d9597d92e9c91fa1d74893bf02e0e 100644 (file)
@@ -1,5 +1,5 @@
 # close.m4 serial 9
-dnl Copyright (C) 2008-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 66f6d4eb478d391f657ea5075da6ab43f3f4271a..fc55a215dd894424b179f7d58f03e1333efde9e1 100644 (file)
@@ -1,5 +1,5 @@
 # closedir.m4 serial 6
-dnl Copyright (C) 2011-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 9b019cfffef10b17c9a5b4bfcd716e89db5ffd28..629f4ee310e7043386586332ae4bb1b2ab10bcc0 100644 (file)
@@ -1,5 +1,5 @@
 # codeset.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2000-2002, 2006, 2008-2014, 2016, 2019-2020 Free Software
+dnl Copyright (C) 2000-2002, 2006, 2008-2014, 2016, 2019-2021 Free Software
 dnl Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
index 0b123d50199bf654475129c58cf362e6730fdf67..06efe611aeb9ab7be6e34e9d1a4a7b508c93faef 100644 (file)
@@ -1,5 +1,5 @@
 # ctype_h.m4 serial 6
-dnl Copyright (C) 2009-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 64ce9cec1f53c87f74f1af8733d554216314ebbb..e4dcfeb3575144c32a72c55725c4a7e7547ee17f 100644 (file)
@@ -5,7 +5,7 @@ dnl
 dnl Check whether struct dirent has a member named d_ino.
 dnl
 
-# Copyright (C) 1997, 1999-2001, 2003-2004, 2006-2007, 2009-2020 Free Software
+# Copyright (C) 1997, 1999-2001, 2003-2004, 2006-2007, 2009-2021 Free Software
 # Foundation, Inc.
 
 # This file is free software; the Free Software Foundation
index d40220a1b59b3d580dbb097d614c97af3709d353..534a59e3e5bd1c6ac4d626c2a28d155303376868 100644 (file)
@@ -5,7 +5,7 @@ dnl
 dnl Check whether struct dirent has a member named d_type.
 dnl
 
-# Copyright (C) 1997, 1999-2004, 2006, 2009-2020 Free Software Foundation, Inc.
+# Copyright (C) 1997, 1999-2004, 2006, 2009-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
index 8bef6a0ce618f106c10910438ba531e21e896d44..6d8614258554b003995e3e625a28cfd6625b24a5 100644 (file)
@@ -1,5 +1,5 @@
 # dirent_h.m4 serial 16
-dnl Copyright (C) 2008-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index d92445e6d805ea8fc44e4634790a17ece3b969fe..3c9ce5dc65f9a614f163ecd3258dbfbbb9429a0e 100644 (file)
@@ -2,7 +2,7 @@
 
 dnl Find out how to get the file descriptor associated with an open DIR*.
 
-# Copyright (C) 2001-2006, 2008-2020 Free Software Foundation, Inc.
+# Copyright (C) 2001-2006, 2008-2021 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/dirname.m4 b/gnulib/import/m4/dirname.m4
deleted file mode 100644 (file)
index 9995ff3..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#serial 10   -*- autoconf -*-
-dnl Copyright (C) 2002-2006, 2009-2020 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([gl_DIRNAME],
-[
-  AC_REQUIRE([gl_DIRNAME_LGPL])
-])
-
-AC_DEFUN([gl_DIRNAME_LGPL],
-[
-  dnl Prerequisites of lib/dirname.h.
-  AC_REQUIRE([gl_DOUBLE_SLASH_ROOT])
-
-  dnl No prerequisites of lib/basename-lgpl.c, lib/dirname-lgpl.c,
-  dnl lib/stripslash.c.
-])
index c463ac41acaef8946b32fa89a760520888aa86f4..c9bbcef6781bcbf4a46b4e9d43f2105d0e77ed91 100644 (file)
@@ -1,5 +1,5 @@
 # double-slash-root.m4 serial 4   -*- Autoconf -*-
-dnl Copyright (C) 2006, 2008-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2008-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 1bf02347aff54f5d20e27832573ad84828db8842..433a46605246d71739f1ae69e1a730e889744080 100644 (file)
@@ -1,5 +1,5 @@
-# dup.m4 serial 6
-dnl Copyright (C) 2011-2020 Free Software Foundation, Inc.
+# dup.m4 serial 7
+dnl Copyright (C) 2011-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -26,7 +26,8 @@ AC_DEFUN([gl_FUNC_DUP],
     [AC_RUN_IFELSE(
       [AC_LANG_PROGRAM([[#include <unistd.h>
                          #include <fcntl.h>
-                         #include <errno.h>]],
+                         #include <errno.h>
+                       ]GL_MDA_DEFINES],
          [[/* On OS/2 kLIBC, dup does not work on a directory fd.  */
            int fd = open (".", O_RDONLY);
            return fd < 0 ? 1 : dup (fd) < 0 ? 2 : 0;
index 21b1ecc26b8d6f3177015f8b42c567bbd154d46b..0753a32491ee6ba8cc4cc75d17e94dba859776d4 100644 (file)
@@ -1,5 +1,5 @@
-#serial 25
-dnl Copyright (C) 2002, 2005, 2007, 2009-2020 Free Software Foundation, Inc.
+#serial 27
+dnl Copyright (C) 2002, 2005, 2007, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -8,107 +8,95 @@ AC_DEFUN([gl_FUNC_DUP2],
 [
   AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
   AC_REQUIRE([AC_CANONICAL_HOST])
-  m4_ifdef([gl_FUNC_DUP2_OBSOLETE], [
-    AC_CHECK_FUNCS_ONCE([dup2])
-    if test $ac_cv_func_dup2 = no; then
-      HAVE_DUP2=0
-    fi
-  ], [
-    AC_DEFINE([HAVE_DUP2], [1], [Define to 1 if you have the 'dup2' function.])
-  ])
-  if test $HAVE_DUP2 = 1; then
-    AC_CACHE_CHECK([whether dup2 works], [gl_cv_func_dup2_works],
-      [AC_RUN_IFELSE([
-         AC_LANG_PROGRAM(
-           [[#include <errno.h>
-             #include <fcntl.h>
-             #include <limits.h>
-             #include <sys/resource.h>
-             #include <unistd.h>
-             #ifndef RLIM_SAVED_CUR
-             # define RLIM_SAVED_CUR RLIM_INFINITY
-             #endif
-             #ifndef RLIM_SAVED_MAX
-             # define RLIM_SAVED_MAX RLIM_INFINITY
-             #endif
-           ]],
-           [[int result = 0;
-             int bad_fd = INT_MAX;
-             struct rlimit rlim;
-             if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
-                 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
-                 && rlim.rlim_cur != RLIM_INFINITY
-                 && rlim.rlim_cur != RLIM_SAVED_MAX
-                 && rlim.rlim_cur != RLIM_SAVED_CUR)
-               bad_fd = rlim.rlim_cur;
-             #ifdef FD_CLOEXEC
-               if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
-                 result |= 1;
-             #endif
-             if (dup2 (1, 1) != 1)
-               result |= 2;
-             #ifdef FD_CLOEXEC
-               if (fcntl (1, F_GETFD) != FD_CLOEXEC)
-                 result |= 4;
-             #endif
-             close (0);
-             if (dup2 (0, 0) != -1)
-               result |= 8;
-             /* Many gnulib modules require POSIX conformance of EBADF.  */
-             if (dup2 (2, bad_fd) == -1 && errno != EBADF)
-               result |= 16;
-             /* Flush out some cygwin core dumps.  */
-             if (dup2 (2, -1) != -1 || errno != EBADF)
-               result |= 32;
-             dup2 (2, 255);
-             dup2 (2, 256);
-             /* On OS/2 kLIBC, dup2() does not work on a directory fd.  */
-             {
-               int fd = open (".", O_RDONLY);
-               if (fd == -1)
-                 result |= 64;
-               else if (dup2 (fd, fd + 1) == -1)
-                 result |= 128;
-
-               close (fd);
-             }
-             return result;]])
-        ],
-        [gl_cv_func_dup2_works=yes], [gl_cv_func_dup2_works=no],
-        [case "$host_os" in
-           mingw*) # on this platform, dup2 always returns 0 for success
-             gl_cv_func_dup2_works="guessing no" ;;
-           cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
-             gl_cv_func_dup2_works="guessing no" ;;
-           aix* | freebsd*)
-                   # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
-                   # not EBADF.
-             gl_cv_func_dup2_works="guessing no" ;;
-           haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
-             gl_cv_func_dup2_works="guessing no" ;;
-           *-android*) # implemented using dup3(), which fails if oldfd == newfd
-             gl_cv_func_dup2_works="guessing no" ;;
-           os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
-             gl_cv_func_dup2_works="guessing no" ;;
-           *) gl_cv_func_dup2_works="guessing yes" ;;
-         esac])
-      ])
-    case "$gl_cv_func_dup2_works" in
-      *yes) ;;
-      *)
-        REPLACE_DUP2=1
-        AC_CHECK_FUNCS([setdtablesize])
-        ;;
-    esac
-  fi
+  AC_CACHE_CHECK([whether dup2 works], [gl_cv_func_dup2_works],
+    [AC_RUN_IFELSE([
+       AC_LANG_PROGRAM(
+         [[#include <errno.h>
+           #include <fcntl.h>
+           #include <limits.h>
+           #include <sys/resource.h>
+           #include <unistd.h>
+           ]GL_MDA_DEFINES[
+           #ifndef RLIM_SAVED_CUR
+           # define RLIM_SAVED_CUR RLIM_INFINITY
+           #endif
+           #ifndef RLIM_SAVED_MAX
+           # define RLIM_SAVED_MAX RLIM_INFINITY
+           #endif
+         ]],
+         [[int result = 0;
+           int bad_fd = INT_MAX;
+           struct rlimit rlim;
+           if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
+               && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
+               && rlim.rlim_cur != RLIM_INFINITY
+               && rlim.rlim_cur != RLIM_SAVED_MAX
+               && rlim.rlim_cur != RLIM_SAVED_CUR)
+             bad_fd = rlim.rlim_cur;
+           #ifdef FD_CLOEXEC
+             if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
+               result |= 1;
+           #endif
+           if (dup2 (1, 1) != 1)
+             result |= 2;
+           #ifdef FD_CLOEXEC
+             if (fcntl (1, F_GETFD) != FD_CLOEXEC)
+               result |= 4;
+           #endif
+           close (0);
+           if (dup2 (0, 0) != -1)
+             result |= 8;
+           /* Many gnulib modules require POSIX conformance of EBADF.  */
+           if (dup2 (2, bad_fd) == -1 && errno != EBADF)
+             result |= 16;
+           /* Flush out some cygwin core dumps.  */
+           if (dup2 (2, -1) != -1 || errno != EBADF)
+             result |= 32;
+           dup2 (2, 255);
+           dup2 (2, 256);
+           /* On OS/2 kLIBC, dup2() does not work on a directory fd.  */
+           {
+             int fd = open (".", O_RDONLY);
+             if (fd == -1)
+               result |= 64;
+             else if (dup2 (fd, fd + 1) == -1)
+               result |= 128;
+             close (fd);
+           }
+           return result;]])
+      ],
+      [gl_cv_func_dup2_works=yes], [gl_cv_func_dup2_works=no],
+      [case "$host_os" in
+         mingw*) # on this platform, dup2 always returns 0 for success
+           gl_cv_func_dup2_works="guessing no" ;;
+         cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
+           gl_cv_func_dup2_works="guessing no" ;;
+         aix* | freebsd*)
+                 # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
+                 # not EBADF.
+           gl_cv_func_dup2_works="guessing no" ;;
+         haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
+           gl_cv_func_dup2_works="guessing no" ;;
+         *-android*) # implemented using dup3(), which fails if oldfd == newfd
+           gl_cv_func_dup2_works="guessing no" ;;
+         os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
+           gl_cv_func_dup2_works="guessing no" ;;
+         *) gl_cv_func_dup2_works="guessing yes" ;;
+       esac])
+    ])
+  case "$gl_cv_func_dup2_works" in
+    *yes) ;;
+    *)
+      REPLACE_DUP2=1
+      AC_CHECK_FUNCS([setdtablesize])
+      ;;
+  esac
   dnl Replace dup2() for supporting the gnulib-defined fchdir() function,
   dnl to keep fchdir's bookkeeping up-to-date.
   m4_ifdef([gl_FUNC_FCHDIR], [
     gl_TEST_FCHDIR
     if test $HAVE_FCHDIR = 0; then
-      if test $HAVE_DUP2 = 1; then
-        REPLACE_DUP2=1
-      fi
+      REPLACE_DUP2=1
     fi
   ])
 ])
index 236f373c564f61551ab5e517283d11577c89773d..002f0c86713faec6c39667b0997f9d482bf74738 100644 (file)
@@ -1,5 +1,5 @@
 # eealloc.m4 serial 3
-dnl Copyright (C) 2003, 2009-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index bab85f13404bb01036f97a6585307e053eea5b16..d971770860cf9c6ef250b0dad0fbf7602e5ee9df 100644 (file)
@@ -1,5 +1,5 @@
 # environ.m4 serial 7
-dnl Copyright (C) 2001-2004, 2006-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2004, 2006-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index dd4994f3d5d33ed098c206e324541a54f34d38ea..51dfe92938d77cc08ea155e96b4a4906d2b480f0 100644 (file)
@@ -1,5 +1,5 @@
 # errno_h.m4 serial 13
-dnl Copyright (C) 2004, 2006, 2008-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2004, 2006, 2008-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 60c229d5add534e773da03f128e16c8337acfb9c..77f67f78b02931babda4450716021180a941dc5b 100644 (file)
@@ -1,6 +1,6 @@
 #serial 14
 
-# Copyright (C) 1996-1998, 2001-2004, 2009-2020 Free Software Foundation, Inc.
+# Copyright (C) 1996-1998, 2001-2004, 2009-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
index cca8797822589952b610c89f85e2a0ad8b3d0905..fb136f477465435ba96be922a607ab0bde7f306a 100644 (file)
@@ -1,5 +1,5 @@
 # exponentd.m4 serial 3
-dnl Copyright (C) 2007-2008, 2010-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2008, 2010-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 0a35c119ee60901c0f1e2d2ffa335846cf305b7f..508fe9315a52cdfb0927fcf975ffdeff6949a74c 100644 (file)
@@ -1,5 +1,5 @@
 # exponentl.m4 serial 5
-dnl Copyright (C) 2007-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index d7c95effdace70fe8ed5fb8e607910b5ba85a5f0..5792a9557a8637ac9522a1882eb6777ff2bf5855 100644 (file)
@@ -1,14 +1,19 @@
-# serial 18  -*- Autoconf -*-
+# serial 22  -*- Autoconf -*-
 # Enable extensions on systems that normally disable them.
 
-# Copyright (C) 2003, 2006-2020 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006-2021 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+dnl Define to empty for the benefit of Autoconf 2.69 and earlier, so that
+dnl AC_USE_SYSTEM_EXTENSIONS (below) can be used unchanged from Autoconf 2.70+.
+m4_ifndef([AC_CHECK_INCLUDES_DEFAULT],
+  [AC_DEFUN([AC_CHECK_INCLUDES_DEFAULT], [])])
+
 # This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from git
 # Autoconf.  Perhaps we can remove this once we can assume Autoconf
-# 2.70 or later everywhere, but since Autoconf mutates rapidly
+# is recent-enough everywhere, but since Autoconf mutates rapidly
 # enough in this area it's likely we'll need to redefine
 # AC_USE_SYSTEM_EXTENSIONS for quite some time.
 
 #      its dependencies. This will ensure that the gl_USE_SYSTEM_EXTENSIONS
 #      invocation occurs in gl_EARLY, not in gl_INIT.
 
+m4_version_prereq([2.70.1], [], [
+
 # AC_USE_SYSTEM_EXTENSIONS
 # ------------------------
 # Enable extensions on systems that normally disable them,
 # typically due to standards-conformance issues.
-#
-# Remember that #undef in AH_VERBATIM gets replaced with #define by
-# AC_DEFINE.  The goal here is to define all known feature-enabling
-# macros, then, if reports of conflicts are made, disable macros that
-# cause problems on some platforms (such as __EXTENSIONS__).
+# We unconditionally define as many of the known feature-enabling
+# as possible, reserving conditional behavior for macros that are
+# known to cause problems on some platforms (such as __EXTENSIONS__).
 AC_DEFUN_ONCE([AC_USE_SYSTEM_EXTENSIONS],
-[AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
+[AC_BEFORE([$0], [AC_PREPROC_IFELSE])dnl
+AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
+AC_BEFORE([$0], [AC_LINK_IFELSE])dnl
 AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
-
-  AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=])
-  if test "$MINIX" = yes; then
-    AC_DEFINE([_POSIX_SOURCE], [1],
-      [Define to 1 if you need to in order for 'stat' and other
-       things to work.])
-    AC_DEFINE([_POSIX_1_SOURCE], [2],
-      [Define to 2 if the system does not provide POSIX.1 features
-       except with this defined.])
-    AC_DEFINE([_MINIX], [1],
-      [Define to 1 if on MINIX.])
-    AC_DEFINE([_NETBSD_SOURCE], [1],
-      [Define to 1 to make NetBSD features available.  MINIX 3 needs this.])
-  fi
-
+AC_BEFORE([$0], [AC_CHECK_INCLUDES_DEFAULT])dnl
+dnl #undef in AH_VERBATIM gets replaced with #define by AC_DEFINE.
 dnl Use a different key than __EXTENSIONS__, as that name broke existing
 dnl configure.ac when using autoheader 2.62.
-  AH_VERBATIM([USE_SYSTEM_EXTENSIONS],
+dnl The macros below are in alphabetical order ignoring leading _ or __
+dnl prefixes.
+AH_VERBATIM([USE_SYSTEM_EXTENSIONS],
 [/* Enable extensions on AIX 3, Interix.  */
 #ifndef _ALL_SOURCE
 # undef _ALL_SOURCE
@@ -64,19 +60,44 @@ dnl configure.ac when using autoheader 2.62.
 #ifndef _DARWIN_C_SOURCE
 # undef _DARWIN_C_SOURCE
 #endif
+/* Enable general extensions on Solaris.  */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
 /* Enable GNU extensions on systems that have them.  */
 #ifndef _GNU_SOURCE
 # undef _GNU_SOURCE
 #endif
-/* Enable NetBSD extensions on NetBSD.  */
+/* Enable X/Open compliant socket functions that do not require linking
+   with -lxnet on HP-UX 11.11.  */
+#ifndef _HPUX_ALT_XOPEN_SOCKET_API
+# undef _HPUX_ALT_XOPEN_SOCKET_API
+#endif
+/* Identify the host operating system as Minix.
+   This macro does not affect the system headers' behavior.
+   A future release of Autoconf may stop defining this macro.  */
+#ifndef _MINIX
+# undef _MINIX
+#endif
+/* Enable general extensions on NetBSD.
+   Enable NetBSD compatibility extensions on Minix.  */
 #ifndef _NETBSD_SOURCE
 # undef _NETBSD_SOURCE
 #endif
-/* Enable OpenBSD extensions on NetBSD.  */
+/* Enable OpenBSD compatibility extensions on NetBSD.
+   Oddly enough, this does nothing on OpenBSD.  */
 #ifndef _OPENBSD_SOURCE
 # undef _OPENBSD_SOURCE
 #endif
-/* Enable threading extensions on Solaris.  */
+/* Define to 1 if needed for POSIX-compatible behavior.  */
+#ifndef _POSIX_SOURCE
+# undef _POSIX_SOURCE
+#endif
+/* Define to 2 if needed for POSIX-compatible behavior.  */
+#ifndef _POSIX_1_SOURCE
+# undef _POSIX_1_SOURCE
+#endif
+/* Enable POSIX-compatible threading on Solaris.  */
 #ifndef _POSIX_PTHREAD_SEMANTICS
 # undef _POSIX_PTHREAD_SEMANTICS
 #endif
@@ -112,22 +133,19 @@ dnl configure.ac when using autoheader 2.62.
 #ifndef _TANDEM_SOURCE
 # undef _TANDEM_SOURCE
 #endif
-/* Enable X/Open extensions if necessary.  HP-UX 11.11 defines
-   mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of
-   whether compiling with -Ae or -D_HPUX_SOURCE=1.  */
+/* Enable X/Open extensions.  Define to 500 only if necessary
+   to make mbstate_t available.  */
 #ifndef _XOPEN_SOURCE
 # undef _XOPEN_SOURCE
 #endif
-/* Enable X/Open compliant socket functions that do not require linking
-   with -lxnet on HP-UX 11.11.  */
-#ifndef _HPUX_ALT_XOPEN_SOCKET_API
-# undef _HPUX_ALT_XOPEN_SOCKET_API
-#endif
-/* Enable general extensions on Solaris.  */
-#ifndef __EXTENSIONS__
-# undef __EXTENSIONS__
-#endif
-])
+])dnl
+
+  AC_REQUIRE([AC_CHECK_INCLUDES_DEFAULT])dnl
+  _AC_CHECK_HEADER_ONCE([wchar.h])
+  _AC_CHECK_HEADER_ONCE([minix/config.h])
+
+dnl Defining __EXTENSIONS__ may break the system headers on some systems.
+dnl (FIXME: Which ones?)
   AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
     [ac_cv_safe_to_define___extensions__],
     [AC_COMPILE_IFELSE(
@@ -136,11 +154,33 @@ dnl configure.ac when using autoheader 2.62.
           ]AC_INCLUDES_DEFAULT])],
        [ac_cv_safe_to_define___extensions__=yes],
        [ac_cv_safe_to_define___extensions__=no])])
-  test $ac_cv_safe_to_define___extensions__ = yes &&
-    AC_DEFINE([__EXTENSIONS__])
+
+dnl HP-UX 11.11 defines mbstate_t only if _XOPEN_SOURCE is defined to
+dnl 500, regardless of whether compiling with -Ae or -D_HPUX_SOURCE=1.
+dnl But defining _XOPEN_SOURCE may turn *off* extensions on platforms
+dnl not covered by turn-on-extensions macros (notably Dragonfly, Free,
+dnl and OpenBSD, which don't have any equivalent of _NETBSD_SOURCE) so
+dnl it should only be defined when necessary.
+  AC_CACHE_CHECK([whether _XOPEN_SOURCE should be defined],
+    [ac_cv_should_define__xopen_source],
+    [ac_cv_should_define__xopen_source=no
+    AS_IF([test $ac_cv_header_wchar_h = yes],
+      [AC_COMPILE_IFELSE(
+        [AC_LANG_PROGRAM([[
+          #include <wchar.h>
+          mbstate_t x;]])],
+        [],
+        [AC_COMPILE_IFELSE(
+          [AC_LANG_PROGRAM([[
+            #define _XOPEN_SOURCE 500
+            #include <wchar.h>
+            mbstate_t x;]])],
+          [ac_cv_should_define__xopen_source=yes])])])])
+
   AC_DEFINE([_ALL_SOURCE])
   AC_DEFINE([_DARWIN_C_SOURCE])
   AC_DEFINE([_GNU_SOURCE])
+  AC_DEFINE([_HPUX_ALT_XOPEN_SOCKET_API])
   AC_DEFINE([_NETBSD_SOURCE])
   AC_DEFINE([_OPENBSD_SOURCE])
   AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
@@ -152,24 +192,18 @@ dnl configure.ac when using autoheader 2.62.
   AC_DEFINE([__STDC_WANT_LIB_EXT2__])
   AC_DEFINE([__STDC_WANT_MATH_SPEC_FUNCS__])
   AC_DEFINE([_TANDEM_SOURCE])
-  AC_CACHE_CHECK([whether _XOPEN_SOURCE should be defined],
-    [ac_cv_should_define__xopen_source],
-    [ac_cv_should_define__xopen_source=no
-     AC_COMPILE_IFELSE(
-       [AC_LANG_PROGRAM([[
-          #include <wchar.h>
-          mbstate_t x;]])],
-       [],
-       [AC_COMPILE_IFELSE(
-          [AC_LANG_PROGRAM([[
-             #define _XOPEN_SOURCE 500
-             #include <wchar.h>
-             mbstate_t x;]])],
-          [ac_cv_should_define__xopen_source=yes])])])
-  test $ac_cv_should_define__xopen_source = yes &&
-    AC_DEFINE([_XOPEN_SOURCE], [500])
-  AC_DEFINE([_HPUX_ALT_XOPEN_SOCKET_API])
+  AS_IF([test $ac_cv_header_minix_config_h = yes],
+    [MINIX=yes
+    AC_DEFINE([_MINIX])
+    AC_DEFINE([_POSIX_SOURCE])
+    AC_DEFINE([_POSIX_1_SOURCE], [2])],
+    [MINIX=])
+  AS_IF([test $ac_cv_safe_to_define___extensions__ = yes],
+    [AC_DEFINE([__EXTENSIONS__])])
+  AS_IF([test $ac_cv_should_define__xopen_source = yes],
+    [AC_DEFINE([_XOPEN_SOURCE], [500])])
 ])# AC_USE_SYSTEM_EXTENSIONS
+])
 
 # gl_USE_SYSTEM_EXTENSIONS
 # ------------------------
@@ -177,13 +211,17 @@ dnl configure.ac when using autoheader 2.62.
 # typically due to standards-conformance issues.
 AC_DEFUN_ONCE([gl_USE_SYSTEM_EXTENSIONS],
 [
-  dnl Require this macro before AC_USE_SYSTEM_EXTENSIONS.
-  dnl gnulib does not need it. But if it gets required by third-party macros
-  dnl after AC_USE_SYSTEM_EXTENSIONS is required, autoconf 2.62..2.63 emit a
-  dnl warning: "AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS".
-  dnl Note: We can do this only for one of the macros AC_AIX, AC_GNU_SOURCE,
-  dnl AC_MINIX. If people still use AC_AIX or AC_MINIX, they are out of luck.
-  AC_REQUIRE([AC_GNU_SOURCE])
-
   AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+  dnl On OpenBSD 6.8 with GCC, the include files contain a couple of
+  dnl definitions that are only activated with an explicit -D_ISOC11_SOURCE.
+  dnl That's because this version of GCC (4.2.1) supports the option
+  dnl '-std=gnu99' but not the option '-std=gnu11'.
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  case "$host_os" in
+    openbsd*)
+      AC_DEFINE([_ISOC11_SOURCE], [1],
+        [Define to enable the declarations of ISO C 11 types and functions.])
+      ;;
+  esac
 ])
index 75c50087bd011418f36eca0ce0c648745cc07923..a2acf126c87cc2cd8d63762aba1c722dcf6d3ec5 100644 (file)
@@ -1,6 +1,6 @@
 dnl 'extern inline' a la ISO C99.
 
-dnl Copyright 2012-2020 Free Software Foundation, Inc.
+dnl Copyright 2012-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index dc2ba25183a664a22810dd9f5e724bdc5a4b3d7c..5d2fab7262153d4ff6f5501fa97c19746ac9ba89 100644 (file)
@@ -1,5 +1,5 @@
-# fchdir.m4 serial 25
-dnl Copyright (C) 2006-2020 Free Software Foundation, Inc.
+# fchdir.m4 serial 26
+dnl Copyright (C) 2006-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -26,21 +26,24 @@ AC_DEFUN([gl_FUNC_FCHDIR],
     dnl fstatat, since no platform has fstatat but lacks fchdir.
     AC_CACHE_CHECK([whether open can visit directories],
       [gl_cv_func_open_directory_works],
-      [AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <fcntl.h>
-]], [return open(".", O_RDONLY) < 0;])],
-        [gl_cv_func_open_directory_works=yes],
-        [gl_cv_func_open_directory_works=no],
-        [case "$host_os" in
-                            # Guess yes on Linux systems.
-           linux-* | linux) gl_cv_func_open_directory_works="guessing yes" ;;
-                            # Guess yes on glibc systems.
-           *-gnu* | gnu*)   gl_cv_func_open_directory_works="guessing yes" ;;
-                            # Guess no on native Windows.
-           mingw*)          gl_cv_func_open_directory_works="guessing no" ;;
-                            # If we don't know, obey --enable-cross-guesses.
-           *)               gl_cv_func_open_directory_works="$gl_cross_guess_normal" ;;
-         esac
-        ])])
+      [AC_RUN_IFELSE(
+         [AC_LANG_PROGRAM(
+            [[#include <fcntl.h>
+            ]GL_MDA_DEFINES],
+            [[return open(".", O_RDONLY) < 0;]])],
+         [gl_cv_func_open_directory_works=yes],
+         [gl_cv_func_open_directory_works=no],
+         [case "$host_os" in
+                             # Guess yes on Linux systems.
+            linux-* | linux) gl_cv_func_open_directory_works="guessing yes" ;;
+                             # Guess yes on glibc systems.
+            *-gnu* | gnu*)   gl_cv_func_open_directory_works="guessing yes" ;;
+                             # Guess no on native Windows.
+            mingw*)          gl_cv_func_open_directory_works="guessing no" ;;
+                             # If we don't know, obey --enable-cross-guesses.
+            *)               gl_cv_func_open_directory_works="$gl_cross_guess_normal" ;;
+          esac
+         ])])
     case "$gl_cv_func_open_directory_works" in
       *yes) ;;
       *)
index 747b865759e566cc81766871c5e3c114081a1313..7c459ad13a708707dc0186d42415a7ab9da4d848 100644 (file)
@@ -1,5 +1,5 @@
-# fcntl-o.m4 serial 6
-dnl Copyright (C) 2006, 2009-2020 Free Software Foundation, Inc.
+# fcntl-o.m4 serial 7
+dnl Copyright (C) 2006, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -32,6 +32,7 @@ AC_DEFUN([gl_FCNTL_O_FLAGS],
            # defined sleep(n) _sleep ((n) * 1000)
            #endif
            #include <fcntl.h>
+           ]GL_MDA_DEFINES[
            #ifndef O_NOATIME
             #define O_NOATIME 0
            #endif
index 562ae2395df12271a69ffd6032a9f6b5d8bd2b8f..f6264345c1bf5d07b9757420f09ceb1d5605407e 100644 (file)
@@ -1,5 +1,5 @@
-# fcntl.m4 serial 9
-dnl Copyright (C) 2009-2020 Free Software Foundation, Inc.
+# fcntl.m4 serial 11
+dnl Copyright (C) 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -34,6 +34,7 @@ AC_DEFUN([gl_FUNC_FCNTL],
               #include <limits.h>
               #include <sys/resource.h>
               #include <unistd.h>
+              ]GL_MDA_DEFINES[
               #ifndef RLIM_SAVED_CUR
               # define RLIM_SAVED_CUR RLIM_INFINITY
               #endif
@@ -80,15 +81,29 @@ AC_DEFUN([gl_FUNC_FCNTL],
           behavior does not match POSIX]) ;;
     esac
 
-    dnl Many systems lack F_DUPFD_CLOEXEC
+    dnl Many systems lack F_DUPFD_CLOEXEC.
+    dnl NetBSD 9.0 declares F_DUPFD_CLOEXEC but it works only like F_DUPFD.
     AC_CACHE_CHECK([whether fcntl understands F_DUPFD_CLOEXEC],
       [gl_cv_func_fcntl_f_dupfd_cloexec],
-      [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-#include <fcntl.h>
-#ifndef F_DUPFD_CLOEXEC
-choke me
-#endif
-         ]])],
+      [AC_RUN_IFELSE(
+         [AC_LANG_SOURCE(
+            [[#include <fcntl.h>
+              #include <unistd.h>
+              int main (int argc, char *argv[])
+              {
+                if (argc == 1)
+                  /* parent process */
+                  {
+                    if (fcntl (1, F_DUPFD_CLOEXEC, 10) < 0)
+                      return 1;
+                    return execl ("./conftest", "./conftest", "child", NULL);
+                  }
+                else
+                  /* child process */
+                  return (fcntl (10, F_GETFL) < 0 ? 0 : 42);
+              }
+            ]])
+         ],
          [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 #ifdef __linux__
 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
@@ -97,12 +112,22 @@ choke me
 #endif
            ]])],
            [gl_cv_func_fcntl_f_dupfd_cloexec=yes],
-           [gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"])],
-         [gl_cv_func_fcntl_f_dupfd_cloexec=no])])
-    if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
-      gl_REPLACE_FCNTL
-      dnl No witness macro needed for this bug.
-    fi
+           [gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"])
+         ],
+         [gl_cv_func_fcntl_f_dupfd_cloexec=no],
+         [case "$host_os" in
+                     # Guess no on NetBSD.
+            netbsd*) gl_cv_func_fcntl_f_dupfd_cloexec="guessing no" ;;
+            *)       gl_cv_func_fcntl_f_dupfd_cloexec="$gl_cross_guess_normal" ;;
+          esac
+         ])
+      ])
+    case "$gl_cv_func_fcntl_f_dupfd_cloexec" in
+      *yes) ;;
+      *)    gl_REPLACE_FCNTL
+            dnl No witness macro needed for this bug.
+            ;;
+    esac
   fi
   dnl Replace fcntl() for supporting the gnulib-defined fchdir() function,
   dnl to keep fchdir's bookkeeping up-to-date.
index 6b253937fd1c24525dc31897f05c49d8e38b069f..e63a82f10a2e113f9fe35dd24a023dca6953bec0 100644 (file)
@@ -1,6 +1,6 @@
-# serial 16
+# serial 17
 # Configure fcntl.h.
-dnl Copyright (C) 2006-2007, 2009-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2007, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -42,6 +42,9 @@ AC_DEFUN([gl_FCNTL_H_DEFAULTS],
   GNULIB_NONBLOCKING=0;  AC_SUBST([GNULIB_NONBLOCKING])
   GNULIB_OPEN=0;         AC_SUBST([GNULIB_OPEN])
   GNULIB_OPENAT=0;       AC_SUBST([GNULIB_OPENAT])
+  dnl Support Microsoft deprecated alias function names by default.
+  GNULIB_MDA_CREAT=1;    AC_SUBST([GNULIB_MDA_CREAT])
+  GNULIB_MDA_OPEN=1;     AC_SUBST([GNULIB_MDA_OPEN])
   dnl Assume proper GNU behavior unless another module says otherwise.
   HAVE_FCNTL=1;          AC_SUBST([HAVE_FCNTL])
   HAVE_OPENAT=1;         AC_SUBST([HAVE_OPENAT])
index d9cc1a0017311c87c610927c709cbdf779ef6d68..d42838087b58a747a0811e605c259186ae9b5d16 100644 (file)
@@ -1,7 +1,7 @@
-# serial 12
+# serial 14
 # See if we need to provide fdopendir.
 
-dnl Copyright (C) 2009-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -25,10 +25,12 @@ AC_DEFUN([gl_FUNC_FDOPENDIR],
   else
     AC_CACHE_CHECK([whether fdopendir works],
       [gl_cv_func_fdopendir_works],
-      [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+      [AC_RUN_IFELSE(
+         [AC_LANG_PROGRAM([[
 #include <dirent.h>
 #include <fcntl.h>
 #include <unistd.h>
+]GL_MDA_DEFINES[
 #if !HAVE_DECL_FDOPENDIR
 extern
 # ifdef __cplusplus
@@ -36,12 +38,14 @@ extern
 # endif
 DIR *fdopendir (int);
 #endif
-]], [int result = 0;
-     int fd = open ("conftest.c", O_RDONLY);
-     if (fd < 0) result |= 1;
-     if (fdopendir (fd)) result |= 2;
-     if (close (fd)) result |= 4;
-     return result;])],
+]],
+            [[int result = 0;
+              int fd = open ("conftest.c", O_RDONLY);
+              if (fd < 0) result |= 1;
+              if (fdopendir (fd)) result |= 2;
+              if (close (fd)) result |= 4;
+              return result;
+            ]])],
          [gl_cv_func_fdopendir_works=yes],
          [gl_cv_func_fdopendir_works=no],
          [case "$host_os" in
index 7eff5b96cf1a1ead7132fffb61f0955ab13ef3d0..e6eac127d2edaffe286c90ef48a86b23462b6b35 100644 (file)
@@ -1,5 +1,5 @@
 # filenamecat.m4 serial 11
-dnl Copyright (C) 2002-2006, 2009-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 90f3dddc6601556051cd39bab10d0988b36b454a..49b1c752daecb07ed6cc0df7815cd58558e63115 100644 (file)
@@ -1,7 +1,7 @@
 # serial 5
 # Check for flexible array member support.
 
-# Copyright (C) 2006, 2009-2020 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2009-2021 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
index 3ef0bb7b90e462f83a5adf41d3b9b21845d38f1c..ba38a28901bbc656ea3015929d9410d3cad9d412 100644 (file)
@@ -1,5 +1,5 @@
 # float_h.m4 serial 12
-dnl Copyright (C) 2007, 2009-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 2f8e4a8f1b24755e9fb504b50a48a96cd7855dfa..81589ca4ccc22ad3f39ed0c293c748b1684dddc7 100644 (file)
@@ -1,6 +1,6 @@
 # Check for fnmatch - serial 15.  -*- coding: utf-8 -*-
 
-# Copyright (C) 2000-2007, 2009-2020 Free Software Foundation, Inc.
+# Copyright (C) 2000-2007, 2009-2021 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
index a21ec2c5e7374227a7e7ef58f46dd0ab4fa135bd..7840b4a44397b9eef045e34bdbee53ba0438ac70 100644 (file)
@@ -1,5 +1,5 @@
 # fnmatch_h.m4 serial 4
-dnl Copyright (C) 2009-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index d5c9aefa8132345d683608bd2d5081ed150589a6..3f16957fbd211d6417283b888ceaca62220c65dd 100644 (file)
@@ -1,5 +1,5 @@
 # fpieee.m4 serial 2  -*- coding: utf-8 -*-
-dnl Copyright (C) 2007, 2009-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/free.m4 b/gnulib/import/m4/free.m4
new file mode 100644 (file)
index 0000000..d671376
--- /dev/null
@@ -0,0 +1,49 @@
+# free.m4 serial 5
+# Copyright (C) 2003-2005, 2009-2021 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Written by Paul Eggert and Bruno Haible.
+
+AC_DEFUN([gl_FUNC_FREE],
+[
+  AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+
+  dnl In the next release of POSIX, free must preserve errno.
+  dnl https://www.austingroupbugs.net/view.php?id=385
+  dnl https://sourceware.org/bugzilla/show_bug.cgi?id=17924
+  dnl So far, we know of three platforms that do this:
+  dnl * glibc >= 2.33, thanks to the fix for this bug:
+  dnl   <https://sourceware.org/bugzilla/show_bug.cgi?id=17924>
+  dnl * OpenBSD >= 4.5, thanks to this commit:
+  dnl   <https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libc/stdlib/malloc.c.diff?r1=1.100&r2=1.101&f=h>
+  dnl * Solaris, because its malloc() implementation is based on brk(),
+  dnl   not mmap(); hence its free() implementation makes no system calls.
+  dnl For other platforms, you can only be sure if they state it in their
+  dnl documentation, or by code inspection of the free() implementation in libc.
+  AC_CACHE_CHECK([whether free is known to preserve errno],
+    [gl_cv_func_free_preserves_errno],
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <stdlib.h>
+          ]],
+          [[#if 2 < __GLIBC__ + (33 <= __GLIBC_MINOR__)
+            #elif defined __OpenBSD__
+            #elif defined __sun
+            #else
+              #error "'free' is not known to preserve errno"
+            #endif
+          ]])],
+       [gl_cv_func_free_preserves_errno=yes],
+       [gl_cv_func_free_preserves_errno=no])
+    ])
+
+  case $gl_cv_func_free_preserves_errno in
+   *yes) ;;
+   *) REPLACE_FREE=1 ;;
+  esac
+])
+
+# Prerequisites of lib/free.c.
+AC_DEFUN([gl_PREREQ_FREE], [:])
index 5d977d4e368f4af79344a2107c3172c996166013..04248b04fc39ad4276632af126185cc23e5dc549 100644 (file)
@@ -1,5 +1,5 @@
 # frexp.m4 serial 16
-dnl Copyright (C) 2007-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index e79fa5cbd927c2a253e20faa34b96ece4002f108..32f1eac99c3261697afb23aa45b766eb59683fbd 100644 (file)
@@ -1,5 +1,5 @@
-# frexpl.m4 serial 21
-dnl Copyright (C) 2007-2020 Free Software Foundation, Inc.
+# frexpl.m4 serial 22
+dnl Copyright (C) 2007-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -150,6 +150,7 @@ extern
 "C"
 #endif
 long double frexpl (long double, int *);
+long double zero = 0.0L;
 int main()
 {
   int result = 0;
@@ -207,7 +208,8 @@ int main()
       }
   }
   /* Test on infinite numbers.  */
-  x = 1.0L / 0.0L;
+  /* The Microsoft MSVC 14 compiler chokes on the expression 1.0 / 0.0.  */
+  x = 1.0L / zero;
   {
     int exp;
     long double y = frexpl (x, &exp);
index 53c089619372b0ef97498bc0b94a502f89acce69..3b5b238fa6fc295bc1464689d095d849ead27442 100644 (file)
@@ -1,5 +1,5 @@
-# fstat.m4 serial 6
-dnl Copyright (C) 2011-2020 Free Software Foundation, Inc.
+# fstat.m4 serial 7
+dnl Copyright (C) 2011-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -35,5 +35,6 @@ AC_DEFUN([gl_FUNC_FSTAT],
 # Prerequisites of lib/fstat.c and lib/stat-w32.c.
 AC_DEFUN([gl_PREREQ_FSTAT], [
   AC_REQUIRE([gl_HEADER_SYS_STAT_H])
+  AC_REQUIRE([gl_PREREQ_STAT_W32])
   :
 ])
index 19583ed1e40e49ab00d29f77d7fcba3db6bcce19..d730e46d3035adbe5f4949dc27fca7971975e583 100644 (file)
@@ -1,5 +1,5 @@
 # fstatat.m4 serial 4
-dnl Copyright (C) 2004-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2004-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 2715f0afd070d7cac38cde9d72d1fc62d1b9426c..89d068996b4d1771d80d3fb201d6629e0b8006b6 100644 (file)
@@ -1,16 +1,16 @@
-# serial 11
+# serial 15
 # Determine whether getcwd aborts when the length of the working directory
 # name is unusually large.  Any length between 4k and 16k trigger the bug
 # when using glibc-2.4.90-9 or older.
 
-# Copyright (C) 2006, 2009-2020 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2009-2021 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
 # From Jim Meyering
 
-# gl_FUNC_GETCWD_ABORT_BUG([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
+# gl_FUNC_GETCWD_ABORT_BUG([ACTION-IF-BUGGY[, ACTION-IF-WORKS]])
 AC_DEFUN([gl_FUNC_GETCWD_ABORT_BUG],
 [
   AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
@@ -24,8 +24,8 @@ AC_DEFUN([gl_FUNC_GETCWD_ABORT_BUG],
       [Define to 1 if the system has the 'getpagesize' function.])
   fi
 
-  AC_CACHE_CHECK([whether getcwd aborts when 4k < cwd_length < 16k],
-    [gl_cv_func_getcwd_abort_bug],
+  AC_CACHE_CHECK([whether getcwd succeeds when 4k < cwd_length < 16k],
+    [gl_cv_func_getcwd_succeeds_beyond_4k],
     [# Remove any remnants of a previous test.
      rm -rf confdir-14B---
      # Arrange for deletion of the temporary directory this test creates.
@@ -45,9 +45,7 @@ AC_DEFUN([gl_FUNC_GETCWD_ABORT_BUG],
 #include <sys/stat.h>
 
 ]gl_PATHMAX_SNIPPET[
-
-/* Don't get link errors because mkdir is redefined to rpl_mkdir.  */
-#undef mkdir
+]GL_MDA_DEFINES[
 
 #ifndef S_IRWXU
 # define S_IRWXU 0700
@@ -128,30 +126,30 @@ main ()
   return fail;
 }
           ]])],
-       [gl_cv_func_getcwd_abort_bug=no],
+       [gl_cv_func_getcwd_succeeds_beyond_4k=yes],
        [dnl An abort will provoke an exit code of something like 134 (128 + 6).
-        dnl An exit code of 4 can also occur (in OpenBSD 4.9, NetBSD 5.1 for
+        dnl An exit code of 4 can also occur (in OpenBSD 6.7, NetBSD 5.1 for
         dnl example): getcwd (NULL, 0) fails rather than returning a string
         dnl longer than PATH_MAX.  This may be POSIX compliant (in some
         dnl interpretations of POSIX).  But gnulib's getcwd module wants to
         dnl provide a non-NULL value in this case.
         ret=$?
         if test $ret -ge 128 || test $ret = 4; then
-          gl_cv_func_getcwd_abort_bug=yes
+          gl_cv_func_getcwd_succeeds_beyond_4k=no
         else
-          gl_cv_func_getcwd_abort_bug=no
+          gl_cv_func_getcwd_succeeds_beyond_4k=yes
         fi
        ],
        [case "$host_os" in
-                   # Guess no on musl systems.
-          *-musl*) gl_cv_func_getcwd_abort_bug="guessing no" ;;
-                   # Guess yes otherwise, even on glibc systems.
-          *)       gl_cv_func_getcwd_abort_bug="guessing yes"
+                   # Guess yes on musl systems.
+          *-musl*) gl_cv_func_getcwd_succeeds_beyond_4k="guessing yes" ;;
+                   # Guess no otherwise, even on glibc systems.
+          *)       gl_cv_func_getcwd_succeeds_beyond_4k="guessing no"
         esac
        ])
     ])
-  case "$gl_cv_func_getcwd_abort_bug" in
-    *yes)
+  case "$gl_cv_func_getcwd_succeeds_beyond_4k" in
+    *no)
       $1
       ;;
     *)
index 1ff3f25176e46c2ced7405f2882f446a2d6ce156..4238ae7c06c1c7f5fdd1a061d6ebcb086539e282 100644 (file)
@@ -1,4 +1,4 @@
-# serial 23
+# serial 25
 # Check for several getcwd bugs with long file names.
 # If so, arrange to compile the wrapper function.
 
@@ -6,7 +6,7 @@
 # I've heard that this is due to a Linux kernel bug, and that it has
 # been fixed between 2.4.21-pre3 and 2.4.21-pre4.
 
-# Copyright (C) 2003-2007, 2009-2020 Free Software Foundation, Inc.
+# Copyright (C) 2003-2007, 2009-2021 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -55,8 +55,7 @@ AC_DEFUN([gl_FUNC_GETCWD_PATH_MAX],
 /* Use the getcwd function, not any macro.  */
 #undef getcwd
 
-/* Don't get link errors because mkdir is redefined to rpl_mkdir.  */
-#undef mkdir
+]GL_MDA_DEFINES[
 
 #ifndef S_IRWXU
 # define S_IRWXU 0700
index ba68c5fb0af87d89b3192b29ab6dfe153b5b8d94..6ec7a94e2151503d24c4d6b76e86c3a6b4a96ba8 100644 (file)
@@ -1,12 +1,12 @@
 # getcwd.m4 - check for working getcwd that is compatible with glibc
 
-# Copyright (C) 2001, 2003-2007, 2009-2020 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003-2007, 2009-2021 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
 # Written by Paul Eggert.
-# serial 18
+# serial 19
 
 AC_DEFUN([gl_FUNC_GETCWD_NULL],
   [
@@ -21,12 +21,13 @@ AC_DEFUN([gl_FUNC_GETCWD_NULL],
 #        else /* on Windows with MSVC */
 #         include <direct.h>
 #        endif
+         ]GL_MDA_DEFINES[
 #        ifndef getcwd
          char *getcwd ();
 #        endif
 ]], [[
 #if defined _WIN32 && ! defined __CYGWIN__
-/* mingw cwd does not start with '/', but getcwd does allocate.
+/* mingw cwd does not start with '/', but _getcwd does allocate.
    However, mingw fails to honor non-zero size.  */
 #else
            if (chdir ("/") != 0)
@@ -66,7 +67,8 @@ AC_DEFUN([gl_FUNC_GETCWD_SIGNATURE],
     [gl_cv_func_getcwd_posix_signature],
     [AC_COMPILE_IFELSE(
       [AC_LANG_PROGRAM(
-         [[#include <unistd.h>]],
+         [[#include <unistd.h>
+         ]GL_MDA_DEFINES],
          [[extern
            #ifdef __cplusplus
            "C"
index ab2e3feb37ba4357de2d40e5d3b306e61917b3ec..8fbc941898fad1bb2b26156fae6729e14ac9cec7 100644 (file)
@@ -1,5 +1,5 @@
-# getdtablesize.m4 serial 7
-dnl Copyright (C) 2008-2020 Free Software Foundation, Inc.
+# getdtablesize.m4 serial 8
+dnl Copyright (C) 2008-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -29,13 +29,16 @@ AC_DEFUN([gl_FUNC_GETDTABLESIZE],
            dnl correctly require setrlimit before getdtablesize() can report
            dnl a larger value.
            AC_RUN_IFELSE([
-             AC_LANG_PROGRAM([[#include <unistd.h>]],
-               [int size = getdtablesize();
-                if (dup2 (0, getdtablesize()) != -1)
-                  return 1;
-                if (size != getdtablesize())
-                  return 2;
-               ])],
+             AC_LANG_PROGRAM(
+               [[#include <unistd.h>]
+                GL_MDA_DEFINES
+               ],
+               [[int size = getdtablesize();
+                 if (dup2 (0, getdtablesize()) != -1)
+                   return 1;
+                 if (size != getdtablesize())
+                   return 2;
+               ]])],
              [gl_cv_func_getdtablesize_works=yes],
              [gl_cv_func_getdtablesize_works=no],
              [case "$host_os" in
index a0678d00bbf419040ea93b92b0d555c339245911..c5b7f1aaea6f2705674cebd4efb56b44175ed613 100644 (file)
@@ -1,5 +1,5 @@
 # getlogin.m4 serial 5
-dnl Copyright (C) 2010-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2010-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 3ec76925e285c76cf306f609927818f1473a053d..3e8a2f0b21827cb31d94331fde41756c48f225da 100644 (file)
@@ -1,6 +1,6 @@
-#serial 12
+#serial 13
 
-# Copyright (C) 2005-2007, 2009-2020 Free Software Foundation, Inc.
+# Copyright (C) 2005-2007, 2009-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -30,7 +30,7 @@ AC_DEFUN([gl_FUNC_GETLOGIN_R],
     HAVE_GETLOGIN_R=0
   else
     HAVE_GETLOGIN_R=1
-    dnl On Mac OS X 10.12 and OSF/1 5.1, getlogin_r returns a truncated result
+    dnl On Mac OS X 10.13 and OSF/1 5.1, getlogin_r returns a truncated result
     dnl if the buffer is not large enough.
     AC_REQUIRE([AC_CANONICAL_HOST])
     AC_CACHE_CHECK([whether getlogin_r works with small buffers],
index 8f0f0468811250b687f0494a1fcea0d7125c782b..7e618019171f2d9a8d4c9fb7cdaf413a2263624a 100644 (file)
@@ -1,5 +1,5 @@
 # getpagesize.m4 serial 10
-dnl Copyright (C) 2002, 2004-2005, 2007, 2009-2020 Free Software Foundation,
+dnl Copyright (C) 2002, 2004-2005, 2007, 2009-2021 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
index 6baefc91c6242e31c1f337368385e70083dda61a..65917d6a53a1b5df639ef7191974a54a33d0c43c 100644 (file)
@@ -1,6 +1,6 @@
 # getprogname.m4 - check for getprogname or replacements for it
 
-# Copyright (C) 2016-2020 Free Software Foundation, Inc.
+# Copyright (C) 2016-2021 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
index 2a0034bf76c0c94eb549b6fdeadf569e248cf299..5f174dc7eb39df53faacc37a8ee6d3ca452db9ee 100644 (file)
@@ -1,5 +1,5 @@
-# getrandom.m4 serial 6
-dnl Copyright 2020 Free Software Foundation, Inc.
+# getrandom.m4 serial 8
+dnl Copyright 2020-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -18,7 +18,8 @@ AC_DEFUN([gl_FUNC_GETRANDOM],
       [gl_cv_func_getrandom_ok],
       [AC_COMPILE_IFELSE(
          [AC_LANG_PROGRAM(
-            [[/* Additional includes are needed before <sys/random.h> on Mac OS X.  */
+            [[/* Additional includes are needed before <sys/random.h> on uClibc
+                 and Mac OS X.  */
               #include <sys/types.h>
               #include <stdlib.h>
               #include <sys/random.h>
@@ -36,7 +37,9 @@ AC_DEFUN([gl_FUNC_GETRANDOM],
 
   case "$host_os" in
     mingw*)
-      AC_CHECK_HEADERS([bcrypt.h])
+      AC_CHECK_HEADERS([bcrypt.h], [], [],
+        [[#include <windows.h>
+        ]])
       AC_CACHE_CHECK([whether the bcrypt library is guaranteed to be present],
         [gl_cv_lib_assume_bcrypt],
         [AC_COMPILE_IFELSE(
index c72b3eacc63f353783e1f058f8246a11ab73c130..3c200815740b94865e9781306685ab2a5f87efda 100644 (file)
@@ -1,6 +1,6 @@
-# serial 27
+# serial 28
 
-# Copyright (C) 2001-2003, 2005, 2007, 2009-2020 Free Software Foundation, Inc.
+# Copyright (C) 2001-2003, 2005, 2007, 2009-2021 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -19,7 +19,6 @@ AC_DEFUN([gl_FUNC_GETTIMEOFDAY],
   if test $ac_cv_func_gettimeofday != yes; then
     HAVE_GETTIMEOFDAY=0
   else
-    gl_FUNC_GETTIMEOFDAY_CLOBBER
     AC_CACHE_CHECK([for gettimeofday with POSIX signature],
       [gl_cv_func_gettimeofday_posix_signature],
       [AC_COMPILE_IFELSE(
@@ -66,63 +65,5 @@ int gettimeofday (struct timeval *restrict, struct timezone *restrict);
      declaration of the second argument to gettimeofday.])
 ])
 
-
-dnl See if gettimeofday clobbers the static buffer that localtime uses
-dnl for its return value.  The gettimeofday function from Mac OS X 10.0.4
-dnl (i.e., Darwin 1.3.7) has this problem.
-dnl
-dnl If it does, then arrange to use gettimeofday and localtime only via
-dnl the wrapper functions that work around the problem.
-
-AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER],
-[
- AC_REQUIRE([gl_HEADER_SYS_TIME_H])
- AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
- AC_REQUIRE([gl_LOCALTIME_BUFFER_DEFAULTS])
-
- AC_CACHE_CHECK([whether gettimeofday clobbers localtime buffer],
-  [gl_cv_func_gettimeofday_clobber],
-  [AC_RUN_IFELSE(
-     [AC_LANG_PROGRAM(
-        [[#include <string.h>
-          #include <sys/time.h>
-          #include <time.h>
-          #include <stdlib.h>
-        ]],
-        [[
-          time_t t = 0;
-          struct tm *lt;
-          struct tm saved_lt;
-          struct timeval tv;
-          lt = localtime (&t);
-          saved_lt = *lt;
-          gettimeofday (&tv, NULL);
-          return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
-        ]])],
-     [gl_cv_func_gettimeofday_clobber=no],
-     [gl_cv_func_gettimeofday_clobber=yes],
-     [# When cross-compiling:
-      case "$host_os" in
-                       # Guess all is fine on glibc systems.
-        *-gnu* | gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
-                       # Guess all is fine on musl systems.
-        *-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, obey --enable-cross-guesses.
-        *)             gl_cv_func_gettimeofday_clobber="$gl_cross_guess_inverted" ;;
-      esac
-     ])])
-
- case "$gl_cv_func_gettimeofday_clobber" in
-   *yes)
-     REPLACE_GETTIMEOFDAY=1
-     AC_DEFINE([GETTIMEOFDAY_CLOBBERS_LOCALTIME], [1],
-       [Define if gettimeofday clobbers the localtime buffer.])
-     gl_LOCALTIME_BUFFER_NEEDED
-     ;;
- esac
-])
-
 # Prerequisites of lib/gettimeofday.c.
 AC_DEFUN([gl_PREREQ_GETTIMEOFDAY], [:])
index d4cd03fc1848a6dfa30f4c72c4aaf1f79d800f37..232136ef3722120961174818c9da0d11c6f3c985 100644 (file)
@@ -1,5 +1,5 @@
 # glob.m4 serial 24
-dnl Copyright (C) 2005-2007, 2009-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2007, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 7ecc0fdcfb29c77058c59baa9b09268c68b7f8aa..ef4c9cc24693a03209a5aba6ba355cfc20f3c432 100644 (file)
@@ -1,5 +1,5 @@
 # glob_h.m4 serial 5
-dnl Copyright (C) 2018-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2018-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index db95504cc6adb22563069828e8fbdb6e61dfa414..40873824b2b5b4a12a8df5ed38768c6af2966ef0 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2020 Free Software Foundation, Inc.
+# Copyright (C) 2002-2021 Free Software Foundation, Inc.
 #
 # 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
index f4ba5e3a00d02ce1ebcc2f68e3c73da569511e10..535359b2cf6b202f41125cedb2420a75472308ae 100644 (file)
@@ -1,5 +1,5 @@
-# gnulib-common.m4 serial 50
-dnl Copyright (C) 2007-2020 Free Software Foundation, Inc.
+# gnulib-common.m4 serial 63
+dnl Copyright (C) 2007-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -45,7 +45,7 @@ AC_DEFUN([gl_COMMON_BODY], [
                 ? 6000000 <= __apple_build_version__ \
                 : 3 < __clang_major__ + (5 <= __clang_minor__))))
    /* _Noreturn works as-is.  */
-# elif _GL_GNUC_PREREQ (2, 8) || 0x5110 <= __SUNPRO_C
+# elif _GL_GNUC_PREREQ (2, 8) || defined __clang__ || 0x5110 <= __SUNPRO_C
 #  define _Noreturn __attribute__ ((__noreturn__))
 # elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0)
 #  define _Noreturn __declspec (noreturn)
@@ -76,6 +76,7 @@ AC_DEFUN([gl_COMMON_BODY], [
 # define _GL_ATTR_cold _GL_GNUC_PREREQ (4, 3)
 # define _GL_ATTR_const _GL_GNUC_PREREQ (2, 95)
 # define _GL_ATTR_deprecated _GL_GNUC_PREREQ (3, 1)
+# define _GL_ATTR_diagnose_if 0
 # define _GL_ATTR_error _GL_GNUC_PREREQ (4, 3)
 # define _GL_ATTR_externally_visible _GL_GNUC_PREREQ (4, 1)
 # define _GL_ATTR_fallthrough _GL_GNUC_PREREQ (7, 0)
@@ -120,9 +121,14 @@ AC_DEFUN([gl_COMMON_BODY], [
 #endif
 
 /* Avoid __attribute__ ((cold)) on MinGW; see thread starting at
-   <https://lists.gnu.org/r/emacs-devel/2019-04/msg01152.html>. */
+   <https://lists.gnu.org/r/emacs-devel/2019-04/msg01152.html>.
+   Also, Oracle Studio 12.6 requires 'cold' not '__cold__'.  */
 #if _GL_HAS_ATTRIBUTE (cold) && !defined __MINGW32__
-# define _GL_ATTRIBUTE_COLD __attribute__ ((__cold__))
+# ifndef __SUNPRO_C
+#  define _GL_ATTRIBUTE_COLD __attribute__ ((__cold__))
+# else
+#  define _GL_ATTRIBUTE_COLD __attribute__ ((cold))
+# endif
 #else
 # define _GL_ATTRIBUTE_COLD
 #endif
@@ -144,6 +150,9 @@ AC_DEFUN([gl_COMMON_BODY], [
 #if _GL_HAS_ATTRIBUTE (error)
 # define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__error__ (msg)))
 # define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__warning__ (msg)))
+#elif _GL_HAS_ATTRIBUTE (diagnose_if)
+# define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__diagnose_if__ (1, msg, "error")))
+# define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__diagnose_if__ (1, msg, "warning")))
 #else
 # define _GL_ATTRIBUTE_ERROR(msg)
 # define _GL_ATTRIBUTE_WARNING(msg)
@@ -176,7 +185,8 @@ AC_DEFUN([gl_COMMON_BODY], [
 # define _GL_ATTRIBUTE_LEAF
 #endif
 
-#if _GL_HAS_ATTRIBUTE (may_alias)
+/* Oracle Studio 12.6 mishandles may_alias despite __has_attribute OK.  */
+#if _GL_HAS_ATTRIBUTE (may_alias) && !defined __SUNPRO_C
 # define _GL_ATTRIBUTE_MAY_ALIAS __attribute__ ((__may_alias__))
 #else
 # define _GL_ATTRIBUTE_MAY_ALIAS
@@ -292,6 +302,22 @@ AC_DEFUN([gl_COMMON_BODY], [
        that may clobber errno, it needs to save and restore the value of
        errno.  */
 #define _GL_ASYNC_SAFE
+])
+  AH_VERBATIM([micro_optimizations],
+[/* _GL_CMP (n1, n2) performs a three-valued comparison on n1 vs. n2, where
+   n1 and n2 are expressions without side effects, that evaluate to real
+   numbers (excluding NaN).
+   It returns
+     1  if n1 > n2
+     0  if n1 == n2
+     -1 if n1 < n2
+   The naïve code   (n1 > n2 ? 1 : n1 < n2 ? -1 : 0)  produces a conditional
+   jump with nearly all GCC versions up to GCC 10.
+   This variant     (n1 < n2 ? -1 : n1 > n2)  produces a conditional with many
+   GCC versions up to GCC 9.
+   The better code  (n1 > n2) - (n1 < n2)  from Hacker's Delight Â§ 2-9
+   avoids conditional jumps in all GCC versions >= 3.4.  */
+#define _GL_CMP(n1, n2) (((n1) > (n2)) - ((n1) < (n2)))
 ])
   dnl Hint which direction to take regarding cross-compilation guesses:
   dnl When a user installs a program on a platform they are not intimately
@@ -454,34 +480,20 @@ AC_DEFUN([gl_FEATURES_H],
   AC_SUBST([HAVE_FEATURES_H])
 ])
 
-# AS_VAR_IF(VAR, VALUE, [IF-MATCH], [IF-NOT-MATCH])
-# ----------------------------------------------------
-# Backport of autoconf-2.63b's macro.
-# Remove this macro when we can assume autoconf >= 2.64.
-m4_ifndef([AS_VAR_IF],
-[m4_define([AS_VAR_IF],
-[AS_IF([test x"AS_VAR_GET([$1])" = x""$2], [$3], [$4])])])
-
 # gl_PROG_CC_C99
 # Modifies the value of the shell variable CC in an attempt to make $CC
 # understand ISO C99 source code.
-# This is like AC_PROG_CC_C99, except that
-# - AC_PROG_CC_C99 does not mix well with AC_PROG_CC_STDC
-#   <https://lists.gnu.org/r/bug-gnulib/2011-09/msg00367.html>,
-#   but many more packages use AC_PROG_CC_STDC than AC_PROG_CC_C99
-#   <https://lists.gnu.org/r/bug-gnulib/2011-09/msg00441.html>.
-# Remaining problems:
-# - When AC_PROG_CC_STDC is invoked twice, it adds the C99 enabling options
-#   to CC twice
-#   <https://lists.gnu.org/r/bug-gnulib/2011-09/msg00431.html>.
-# - AC_PROG_CC_STDC is likely to change now that C11 is an ISO standard.
 AC_DEFUN([gl_PROG_CC_C99],
 [
-  dnl Change that version number to the minimum Autoconf version that supports
-  dnl mixing AC_PROG_CC_C99 calls with AC_PROG_CC_STDC calls.
-  m4_version_prereq([9.0],
-    [AC_REQUIRE([AC_PROG_CC_C99])],
-    [AC_REQUIRE([AC_PROG_CC_STDC])])
+  dnl Just use AC_PROG_CC_C99.
+  dnl When AC_PROG_CC_C99 and AC_PROG_CC_STDC are used together, the substituted
+  dnl value of CC will contain the C99 enabling options twice. But this is only
+  dnl a cosmetic problem.
+  dnl With Autoconf >= 2.70, use AC_PROG_CC since it implies AC_PROG_CC_C99;
+  dnl this avoids a "warning: The macro `AC_PROG_CC_C99' is obsolete."
+  m4_version_prereq([2.70],
+    [AC_REQUIRE([AC_PROG_CC])],
+    [AC_REQUIRE([AC_PROG_CC_C99])])
 ])
 
 # gl_PROG_AR_RANLIB
@@ -555,16 +567,16 @@ Amsterdam
 ])
 
 # AC_C_RESTRICT
-# This definition is copied from post-2.69 Autoconf and overrides the
-# AC_C_RESTRICT macro from autoconf 2.60..2.69.  It can be removed
-# once autoconf >= 2.70 can be assumed.  It's painful to check version
-# numbers, and in practice this macro is more up-to-date than Autoconf
-# is, so override Autoconf unconditionally.
+# This definition is copied from post-2.70 Autoconf and overrides the
+# AC_C_RESTRICT macro from autoconf 2.60..2.70.
+m4_version_prereq([2.70.1], [], [
 AC_DEFUN([AC_C_RESTRICT],
 [AC_CACHE_CHECK([for C/C++ restrict keyword], [ac_cv_c_restrict],
   [ac_cv_c_restrict=no
-   # The order here caters to the fact that C++ does not require restrict.
-   for ac_kw in __restrict __restrict__ _Restrict restrict; do
+   # Put '__restrict__' first, to avoid problems with glibc and non-GCC; see:
+   # https://lists.gnu.org/archive/html/bug-autoconf/2016-02/msg00006.html
+   # Put 'restrict' last, because C++ lacks it.
+   for ac_kw in __restrict__ __restrict _Restrict restrict; do
      AC_COMPILE_IFELSE(
       [AC_LANG_PROGRAM(
          [[typedef int *int_ptr;
@@ -584,7 +596,7 @@ AC_DEFUN([AC_C_RESTRICT],
  AH_VERBATIM([restrict],
 [/* Define to the equivalent of the C99 'restrict' keyword, or to
    nothing if this is not supported.  Do not define if restrict is
-   supported directly.  */
+   supported only directly.  */
 #undef restrict
 /* Work around a bug in older versions of Sun C++, which did not
    #define __restrict__ or support _Restrict or __restrict__
@@ -602,6 +614,7 @@ AC_DEFUN([AC_C_RESTRICT],
    *)  AC_DEFINE_UNQUOTED([restrict], [$ac_cv_c_restrict]) ;;
  esac
 ])# AC_C_RESTRICT
+])
 
 # gl_BIGENDIAN
 # is like AC_C_BIGENDIAN, except that it can be AC_REQUIREd.
@@ -612,6 +625,22 @@ AC_DEFUN([gl_BIGENDIAN],
   AC_C_BIGENDIAN
 ])
 
+# A temporary file descriptor.
+# Must be less than 10, because dash 0.5.8 does not support redirections
+# with multi-digit file descriptors.
+m4_define([GL_TMP_FD], 9)
+
+# gl_SILENT(command)
+# executes command, but without the normal configure output.
+# This is useful when you want to invoke AC_CACHE_CHECK (or AC_CHECK_FUNC etc.)
+# inside another AC_CACHE_CHECK.
+AC_DEFUN([gl_SILENT],
+[
+  exec GL_TMP_FD>&AS_MESSAGE_FD AS_MESSAGE_FD>/dev/null
+  $1
+  exec AS_MESSAGE_FD>&GL_TMP_FD GL_TMP_FD>&-
+])
+
 # gl_CACHE_VAL_SILENT(cache-id, command-to-set-it)
 # is like AC_CACHE_VAL(cache-id, command-to-set-it), except that it does not
 # output a spurious "(cached)" mark in the midst of other configure output.
@@ -619,12 +648,77 @@ AC_DEFUN([gl_BIGENDIAN],
 # by an AC_MSG_CHECKING/AC_MSG_RESULT pair.
 AC_DEFUN([gl_CACHE_VAL_SILENT],
 [
-  saved_as_echo_n="$as_echo_n"
-  as_echo_n=':'
-  AC_CACHE_VAL([$1], [$2])
-  as_echo_n="$saved_as_echo_n"
+  gl_SILENT([
+    AC_CACHE_VAL([$1], [$2])
+  ])
 ])
 
-# AS_VAR_COPY was added in autoconf 2.63b
-m4_define_default([AS_VAR_COPY],
-[AS_LITERAL_IF([$1[]$2], [$1=$$2], [eval $1=\$$2])])
+dnl Expands to some code for use in .c programs that, on native Windows, defines
+dnl the Microsoft deprecated alias function names to the underscore-prefixed
+dnl actual function names. With this macro, these function names are available
+dnl without linking with '-loldnames' and without generating warnings.
+dnl Usage: Use it after all system header files are included.
+dnl          #include <...>
+dnl          #include <...>
+dnl          ]GL_MDA_DEFINES[
+dnl          ...
+AC_DEFUN([GL_MDA_DEFINES],[
+AC_REQUIRE([_GL_MDA_DEFINES])
+[$gl_mda_defines]
+])
+AC_DEFUN([_GL_MDA_DEFINES],
+[gl_mda_defines='
+#if defined _WIN32 && !defined __CYGWIN__
+#define access    _access
+#define chdir     _chdir
+#define chmod     _chmod
+#define close     _close
+#define creat     _creat
+#define dup       _dup
+#define dup2      _dup2
+#define ecvt      _ecvt
+#define execl     _execl
+#define execle    _execle
+#define execlp    _execlp
+#define execv     _execv
+#define execve    _execve
+#define execvp    _execvp
+#define execvpe   _execvpe
+#define fcloseall _fcloseall
+#define fcvt      _fcvt
+#define fdopen    _fdopen
+#define fileno    _fileno
+#define gcvt      _gcvt
+#define getcwd    _getcwd
+#define getpid    _getpid
+#define getw      _getw
+#define isatty    _isatty
+#define j0        _j0
+#define j1        _j1
+#define jn        _jn
+#define lfind     _lfind
+#define lsearch   _lsearch
+#define lseek     _lseek
+#define memccpy   _memccpy
+#define mkdir     _mkdir
+#define mktemp    _mktemp
+#define open      _open
+#define putenv    _putenv
+#define putw      _putw
+#define read      _read
+#define rmdir     _rmdir
+#define strdup    _strdup
+#define swab      _swab
+#define tempnam   _tempnam
+#define tzset     _tzset
+#define umask     _umask
+#define unlink    _unlink
+#define utime     _utime
+#define wcsdup    _wcsdup
+#define write     _write
+#define y0        _y0
+#define y1        _y1
+#define yn        _yn
+#endif
+'
+])
index 8c2c28ec932f609edc5ff02f8fcae4e05312587a..682bfc86e7888acd61aa9e6ddf3d42fc516f4876 100644 (file)
@@ -1,5 +1,5 @@
 # DO NOT EDIT! GENERATED AUTOMATICALLY!
-# Copyright (C) 2002-2020 Free Software Foundation, Inc.
+# Copyright (C) 2002-2021 Free Software Foundation, Inc.
 #
 # 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
@@ -50,12 +50,14 @@ AC_DEFUN([gl_EARLY],
   # Code from module assure:
   # Code from module at-internal:
   # Code from module attribute:
+  # Code from module basename-lgpl:
   # Code from module btowc:
   # Code from module builtin-expect:
   # Code from module c99:
   # Code from module canonicalize-lgpl:
   # Code from module chdir:
   # Code from module chdir-long:
+  # Code from module clock-time:
   # Code from module cloexec:
   # Code from module close:
   # Code from module closedir:
@@ -69,6 +71,7 @@ AC_DEFUN([gl_EARLY],
   # Code from module double-slash-root:
   # Code from module dup:
   # Code from module dup2:
+  # Code from module eloop-threshold:
   # Code from module environ:
   # Code from module errno:
   # Code from module error:
@@ -91,6 +94,7 @@ AC_DEFUN([gl_EARLY],
   # Code from module fpieee:
   AC_REQUIRE([gl_FP_IEEE])
   # Code from module fpucw:
+  # Code from module free-posix:
   # Code from module frexp:
   # Code from module frexpl:
   # Code from module fstat:
@@ -106,6 +110,7 @@ AC_DEFUN([gl_EARLY],
   # Code from module glob:
   # Code from module glob-h:
   # Code from module hard-locale:
+  # Code from module idx:
   # Code from module include_next:
   # Code from module inet_ntop:
   # Code from module intprops:
@@ -120,7 +125,6 @@ AC_DEFUN([gl_EARLY],
   # Code from module limits-h:
   # Code from module localcharset:
   # Code from module locale:
-  # Code from module localtime-buffer:
   # Code from module lock:
   # Code from module lstat:
   # Code from module malloc-posix:
@@ -150,6 +154,7 @@ AC_DEFUN([gl_EARLY],
   # Code from module openat-h:
   # Code from module opendir:
   # Code from module pathmax:
+  # Code from module pipe-posix:
   # Code from module rawmemchr:
   # Code from module readdir:
   # Code from module readlink:
@@ -253,10 +258,11 @@ AC_DEFUN([gl_INIT],
   gl_STDLIB_MODULE_INDICATOR([realpath])
   gl_UNISTD_MODULE_INDICATOR([chdir])
   gl_FUNC_CHDIR_LONG
-  if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then
+  if test $gl_cv_have_unlimited_file_name_length = no; then
     AC_LIBOBJ([chdir-long])
     gl_PREREQ_CHDIR_LONG
   fi
+  gl_CLOCK_TIME
   gl_MODULE_INDICATOR_FOR_TESTS([cloexec])
   gl_FUNC_CLOSE
   if test $REPLACE_CLOSE = 1; then
@@ -279,7 +285,6 @@ AC_DEFUN([gl_INIT],
     gl_PREREQ_DIRFD
   fi
   gl_DIRENT_MODULE_INDICATOR([dirfd])
-  gl_DIRNAME_LGPL
   gl_DOUBLE_SLASH_ROOT
   gl_FUNC_DUP
   if test $REPLACE_DUP = 1; then
@@ -288,7 +293,7 @@ AC_DEFUN([gl_INIT],
   fi
   gl_UNISTD_MODULE_INDICATOR([dup])
   gl_FUNC_DUP2
-  if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
+  if test $REPLACE_DUP2 = 1; then
     AC_LIBOBJ([dup2])
     gl_PREREQ_DUP2
   fi
@@ -342,6 +347,12 @@ AC_DEFUN([gl_INIT],
   fi
   gl_MODULE_INDICATOR([fnmatch-gnu])
   gl_FNMATCH_H
+  gl_FUNC_FREE
+  if test $REPLACE_FREE = 1; then
+    AC_LIBOBJ([free])
+    gl_PREREQ_FREE
+  fi
+  gl_STDLIB_MODULE_INDICATOR([free-posix])
   AC_REQUIRE([gl_FUNC_FREXP])
   if test $gl_func_frexp != yes; then
     AC_LIBOBJ([frexp])
@@ -454,8 +465,6 @@ AC_DEFUN([gl_INIT],
   LOCALCHARSET_TESTS_ENVIRONMENT=
   AC_SUBST([LOCALCHARSET_TESTS_ENVIRONMENT])
   gl_LOCALE_H
-  AC_REQUIRE([gl_LOCALTIME_BUFFER_DEFAULTS])
-  AC_LIBOBJ([localtime-buffer])
   gl_LOCK
   gl_MODULE_INDICATOR([lock])
   gl_FUNC_LSTAT
@@ -502,7 +511,7 @@ AC_DEFUN([gl_INIT],
   fi
   gl_STDLIB_MODULE_INDICATOR([mbtowc])
   gl_FUNC_MEMCHR
-  if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
+  if test $REPLACE_MEMCHR = 1; then
     AC_LIBOBJ([memchr])
     gl_PREREQ_MEMCHR
   fi
@@ -533,6 +542,7 @@ AC_DEFUN([gl_INIT],
   if test $REPLACE_MKDIR = 1; then
     AC_LIBOBJ([mkdir])
   fi
+  gl_SYS_STAT_MODULE_INDICATOR([mkdir])
   gl_FUNC_MKDTEMP
   if test $HAVE_MKDTEMP = 0; then
     AC_LIBOBJ([mkdtemp])
@@ -577,6 +587,11 @@ AC_DEFUN([gl_INIT],
   fi
   gl_DIRENT_MODULE_INDICATOR([opendir])
   gl_PATHMAX
+  gl_FUNC_PIPE
+  if test $HAVE_PIPE = 0; then
+    AC_LIBOBJ([pipe])
+  fi
+  gl_UNISTD_MODULE_INDICATOR([pipe])
   gl_FUNC_RAWMEMCHR
   if test $HAVE_RAWMEMCHR = 0; then
     AC_LIBOBJ([rawmemchr])
@@ -655,7 +670,7 @@ AC_DEFUN([gl_INIT],
   fi
   gl_STRING_MODULE_INDICATOR([strchrnul])
   gl_FUNC_STRDUP_POSIX
-  if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
+  if test $REPLACE_STRDUP = 1; then
     AC_LIBOBJ([strdup])
     gl_PREREQ_STRDUP
   fi
@@ -715,6 +730,7 @@ AC_DEFUN([gl_INIT],
   gl_HEADER_SYS_UIO
   AC_PROG_MKDIR_P
   gl_FUNC_GEN_TEMPNAME
+  gl_MODULE_INDICATOR([tempname])
   AC_REQUIRE([gl_THREADLIB])
   gl_HEADER_TIME_H
   gl_TIME_R
@@ -917,6 +933,7 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/at-func.c
   lib/attribute.h
   lib/basename-lgpl.c
+  lib/basename-lgpl.h
   lib/btowc.c
   lib/c++defs.h
   lib/canonicalize-lgpl.c
@@ -939,6 +956,7 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/dup-safer.c
   lib/dup.c
   lib/dup2.c
+  lib/eloop-threshold.h
   lib/errno.in.h
   lib/error.c
   lib/error.h
@@ -963,6 +981,7 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/fnmatch.in.h
   lib/fnmatch_loop.c
   lib/fpucw.h
+  lib/free.c
   lib/frexp.c
   lib/frexpl.c
   lib/fstat.c
@@ -987,6 +1006,7 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/glthread/threadlib.c
   lib/hard-locale.c
   lib/hard-locale.h
+  lib/idx.h
   lib/inet_ntop.c
   lib/intprops.h
   lib/inttypes.in.h
@@ -1004,11 +1024,10 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/localcharset.c
   lib/localcharset.h
   lib/locale.in.h
-  lib/localtime-buffer.c
-  lib/localtime-buffer.h
   lib/lstat.c
   lib/malloc.c
   lib/malloc/scratch_buffer.h
+  lib/malloc/scratch_buffer_dupfree.c
   lib/malloc/scratch_buffer_grow.c
   lib/malloc/scratch_buffer_grow_preserve.c
   lib/malloc/scratch_buffer_set_array_size.c
@@ -1050,6 +1069,7 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/opendir.c
   lib/pathmax.h
   lib/pipe-safer.c
+  lib/pipe.c
   lib/rawmemchr.c
   lib/rawmemchr.valgrind
   lib/readdir.c
@@ -1137,6 +1157,7 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/builtin-expect.m4
   m4/canonicalize.m4
   m4/chdir-long.m4
+  m4/clock_time.m4
   m4/close.m4
   m4/closedir.m4
   m4/codeset.m4
@@ -1145,7 +1166,6 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/d-type.m4
   m4/dirent_h.m4
   m4/dirfd.m4
-  m4/dirname.m4
   m4/double-slash-root.m4
   m4/dup.m4
   m4/dup2.m4
@@ -1168,6 +1188,7 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/fnmatch.m4
   m4/fnmatch_h.m4
   m4/fpieee.m4
+  m4/free.m4
   m4/frexp.m4
   m4/frexpl.m4
   m4/fstat.m4
@@ -1187,7 +1208,6 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/gnulib-common.m4
   m4/include_next.m4
   m4/inet_ntop.m4
-  m4/inttypes-pri.m4
   m4/inttypes.m4
   m4/isblank.m4
   m4/isnand.m4
@@ -1199,7 +1219,6 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/locale-ja.m4
   m4/locale-zh.m4
   m4/locale_h.m4
-  m4/localtime-buffer.m4
   m4/lock.m4
   m4/lstat.m4
   m4/malloc.m4
@@ -1232,6 +1251,8 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/openat.m4
   m4/opendir.m4
   m4/pathmax.m4
+  m4/pid_t.m4
+  m4/pipe.m4
   m4/pthread_rwlock_rdlock.m4
   m4/rawmemchr.m4
   m4/readdir.m4
index 9e1744f784e650b322f5602d40764ae1559cc594..3d56d83f128db32594b2b4ed00f01e4b6a6f786e 100644 (file)
@@ -1,5 +1,5 @@
 # gnulib-tool.m4 serial 2
-dnl Copyright (C) 2004-2005, 2009-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2004-2005, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 9009e293b5397a8dd7c4b8ebfc4b49cc7bae60b8..bdd542bc64d7810dbc8ec29688c355c1d6c7176d 100644 (file)
@@ -1,5 +1,5 @@
-# include_next.m4 serial 24
-dnl Copyright (C) 2006-2020 Free Software Foundation, Inc.
+# include_next.m4 serial 26
+dnl Copyright (C) 2006-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -106,19 +106,21 @@ dnl We intentionally avoid using AC_LANG_SOURCE here.
   AC_SUBST([INCLUDE_NEXT])
   AC_SUBST([INCLUDE_NEXT_AS_FIRST_DIRECTIVE])
   AC_SUBST([PRAGMA_SYSTEM_HEADER])
-  AC_CACHE_CHECK([whether system header files limit the line length],
-    [gl_cv_pragma_columns],
-    [dnl HP NonStop systems, which define __TANDEM, have this misfeature.
-     AC_EGREP_CPP([choke me],
+
+  dnl HP NonStop systems, which define __TANDEM, limit the line length
+  dnl after including some system header files.
+  AC_CACHE_CHECK([whether source code line length is unlimited],
+    [gl_cv_source_line_length_unlimited],
+    [AC_EGREP_CPP([choke me],
        [
 #ifdef __TANDEM
 choke me
 #endif
        ],
-       [gl_cv_pragma_columns=yes],
-       [gl_cv_pragma_columns=no])
+       [gl_cv_source_line_length_unlimited=no],
+       [gl_cv_source_line_length_unlimited=yes])
     ])
-  if test $gl_cv_pragma_columns = yes; then
+  if test $gl_cv_source_line_length_unlimited = no; then
     PRAGMA_COLUMNS="#pragma COLUMNS 10000"
   else
     PRAGMA_COLUMNS=
@@ -176,42 +178,40 @@ AC_DEFUN([gl_NEXT_HEADERS_INTERNAL],
     [AC_CHECK_HEADERS_ONCE([$1])
     ])
 
-dnl FIXME: gl_next_header and gl_header_exists must be used unquoted
-dnl until we can assume autoconf 2.64 or newer.
   m4_foreach_w([gl_HEADER_NAME], [$1],
     [AS_VAR_PUSHDEF([gl_next_header],
                     [gl_cv_next_]m4_defn([gl_HEADER_NAME]))
      if test $gl_cv_have_include_next = yes; then
-       AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>'])
+       AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>'])
      else
        AC_CACHE_CHECK(
          [absolute name of <]m4_defn([gl_HEADER_NAME])[>],
-         m4_defn([gl_next_header]),
+         [gl_next_header],
          [m4_if([$2], [check],
             [AS_VAR_PUSHDEF([gl_header_exists],
                             [ac_cv_header_]m4_defn([gl_HEADER_NAME]))
-             if test AS_VAR_GET(gl_header_exists) = yes; then
+             if test AS_VAR_GET([gl_header_exists]) = yes; then
              AS_VAR_POPDEF([gl_header_exists])
             ])
            gl_ABSOLUTE_HEADER_ONE(gl_HEADER_NAME)
            AS_VAR_COPY([gl_header], [gl_cv_absolute_]AS_TR_SH(gl_HEADER_NAME))
-           AS_VAR_SET(gl_next_header, ['"'$gl_header'"'])
+           AS_VAR_SET([gl_next_header], ['"'$gl_header'"'])
           m4_if([$2], [check],
             [else
-               AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>'])
+               AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>'])
              fi
             ])
          ])
      fi
      AC_SUBST(
        AS_TR_CPP([NEXT_]m4_defn([gl_HEADER_NAME])),
-       [AS_VAR_GET(gl_next_header)])
+       [AS_VAR_GET([gl_next_header])])
      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
        gl_next_as_first_directive='<'gl_HEADER_NAME'>'
      else
        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=AS_VAR_GET(gl_next_header)
+       gl_next_as_first_directive=AS_VAR_GET([gl_next_header])
      fi
      AC_SUBST(
        AS_TR_CPP([NEXT_AS_FIRST_DIRECTIVE_]m4_defn([gl_HEADER_NAME])),
index 39a6a9b1db9814a338e62f210ed82eda559a49d8..171f53ee73f67f5ff0cebb9e6295419184203c37 100644 (file)
@@ -1,5 +1,5 @@
 # inet_ntop.m4 serial 21
-dnl Copyright (C) 2005-2006, 2008-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2006, 2008-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/inttypes-pri.m4 b/gnulib/import/m4/inttypes-pri.m4
deleted file mode 100644 (file)
index ac40a05..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-# inttypes-pri.m4 serial 7 (gettext-0.18.2)
-dnl Copyright (C) 1997-2002, 2006, 2008-2020 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-AC_PREREQ([2.53])
-
-# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
-# macros to non-string values.  This is the case on AIX 4.3.3.
-
-AC_DEFUN([gt_INTTYPES_PRI],
-[
-  AC_CHECK_HEADERS([inttypes.h])
-  if test $ac_cv_header_inttypes_h = yes; then
-    AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
-      [gt_cv_inttypes_pri_broken],
-      [
-        AC_COMPILE_IFELSE(
-          [AC_LANG_PROGRAM(
-             [[
-#include <inttypes.h>
-#ifdef PRId32
-char *p = PRId32;
-#endif
-             ]],
-             [[]])],
-          [gt_cv_inttypes_pri_broken=no],
-          [gt_cv_inttypes_pri_broken=yes])
-      ])
-  fi
-  if test "$gt_cv_inttypes_pri_broken" = yes; then
-    AC_DEFINE_UNQUOTED([PRI_MACROS_BROKEN], [1],
-      [Define if <inttypes.h> exists and defines unusable PRI* macros.])
-    PRI_MACROS_BROKEN=1
-  else
-    PRI_MACROS_BROKEN=0
-  fi
-  AC_SUBST([PRI_MACROS_BROKEN])
-])
index 224d0cdd8e244919c8b34b82f7917af5ffc4c68d..f56e94a8881dcab3028ec0fc606676a04d1f8315 100644 (file)
@@ -1,5 +1,5 @@
-# inttypes.m4 serial 29
-dnl Copyright (C) 2006-2020 Free Software Foundation, Inc.
+# inttypes.m4 serial 32
+dnl Copyright (C) 2006-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -35,12 +35,19 @@ AC_DEFUN_ONCE([gl_INTTYPES_INCOMPLETE],
 # Ensure that the PRI* and SCN* macros are defined appropriately.
 AC_DEFUN([gl_INTTYPES_PRI_SCN],
 [
-  AC_REQUIRE([gt_INTTYPES_PRI])
-
   PRIPTR_PREFIX=
   if test -n "$STDINT_H"; then
-    dnl Using the gnulib <stdint.h>. It always defines intptr_t to 'long'.
-    PRIPTR_PREFIX='"l"'
+    dnl Using the gnulib <stdint.h>. It defines intptr_t to 'long' or
+    dnl 'long long', depending on _WIN64.
+    AC_COMPILE_IFELSE(
+      [AC_LANG_PROGRAM([[
+         #ifdef _WIN64
+         LLP64
+         #endif
+         ]])
+      ],
+      [PRIPTR_PREFIX='"l"'],
+      [PRIPTR_PREFIX='"ll"'])
   else
     dnl Using the system's <stdint.h>.
     for glpfx in '' l ll I64; do
@@ -152,7 +159,6 @@ AC_DEFUN([gl_INTTYPES_H_DEFAULTS],
   REPLACE_STRTOUMAX=0;   AC_SUBST([REPLACE_STRTOUMAX])
   INT32_MAX_LT_INTMAX_MAX=1;  AC_SUBST([INT32_MAX_LT_INTMAX_MAX])
   INT64_MAX_EQ_LONG_MAX='defined _LP64';  AC_SUBST([INT64_MAX_EQ_LONG_MAX])
-  PRI_MACROS_BROKEN=0;   AC_SUBST([PRI_MACROS_BROKEN])
   PRIPTR_PREFIX=__PRIPTR_PREFIX;  AC_SUBST([PRIPTR_PREFIX])
   UINT32_MAX_LT_UINTMAX_MAX=1;  AC_SUBST([UINT32_MAX_LT_UINTMAX_MAX])
   UINT64_MAX_EQ_ULONG_MAX='defined _LP64';  AC_SUBST([UINT64_MAX_EQ_ULONG_MAX])
index 5e1b78315f0039be7d6f93d4b47f59a80eb596bd..e77e1a87302a38671798d047ea2163d12f543253 100644 (file)
@@ -1,5 +1,5 @@
 # isblank.m4 serial 3
-dnl Copyright (C) 2009-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index c74795ecd0b7c72f497be11cdcee7310ed97afab..fc79f0b0c2612e8dc9f718dba75688c13ac053b0 100644 (file)
@@ -1,5 +1,5 @@
-# isnand.m4 serial 11
-dnl Copyright (C) 2007-2020 Free Software Foundation, Inc.
+# isnand.m4 serial 12
+dnl Copyright (C) 2007-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -58,7 +58,7 @@ AC_DEFUN([gl_HAVE_ISNAND_IN_LIBM],
       AC_LINK_IFELSE(
         [AC_LANG_PROGRAM(
            [[#include <math.h>
-             #if __GNUC__ >= 4
+             #if (__GNUC__ >= 4) || (__clang_major__ >= 4)
              # undef isnand
              # define isnand(x) __builtin_isnan ((double)(x))
              #elif defined isnan
@@ -81,7 +81,7 @@ AC_DEFUN([gl_HAVE_ISNAND_NO_LIBM],
       AC_LINK_IFELSE(
         [AC_LANG_PROGRAM(
            [[#include <math.h>
-             #if __GNUC__ >= 4
+             #if (__GNUC__ >= 4) || (__clang_major__ >= 4)
              # undef isnand
              # define isnand(x) __builtin_isnan ((double)(x))
              #else
index 75d5462975017df7943e0bc18551ed40e3943557..1ef16f5e350fe668ecfc4f81761bf436f7f2e3f8 100644 (file)
@@ -1,5 +1,5 @@
-# isnanl.m4 serial 21
-dnl Copyright (C) 2007-2020 Free Software Foundation, Inc.
+# isnanl.m4 serial 22
+dnl Copyright (C) 2007-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -68,12 +68,9 @@ AC_DEFUN([gl_HAVE_ISNANL_NO_LIBM],
       AC_LINK_IFELSE(
         [AC_LANG_PROGRAM(
            [[#include <math.h>
-             #ifndef __has_builtin
-             # define __has_builtin(name) 0
-             #endif
-             #if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanl))
+             #if (__GNUC__ >= 4) || (__clang_major__ >= 4)
              # undef isnanl
-             # define isnanl(x) __builtin_isnanl ((long double)(x))
+             # define isnanl(x) __builtin_isnan ((long double)(x))
              #elif defined isnan
              # undef isnanl
              # define isnanl(x) isnan ((long double)(x))
@@ -96,12 +93,9 @@ AC_DEFUN([gl_HAVE_ISNANL_IN_LIBM],
       AC_LINK_IFELSE(
         [AC_LANG_PROGRAM(
            [[#include <math.h>
-             #ifndef __has_builtin
-             # define __has_builtin(name) 0
-             #endif
-             #if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanl))
+             #if (__GNUC__ >= 4) || (__clang_major__ >= 4)
              # undef isnanl
-             # define isnanl(x) __builtin_isnanl ((long double)(x))
+             # define isnanl(x) __builtin_isnan ((long double)(x))
              #elif defined isnan
              # undef isnanl
              # define isnanl(x) isnan ((long double)(x))
@@ -129,12 +123,9 @@ AC_DEFUN([gl_FUNC_ISNANL_WORKS],
 #include <float.h>
 #include <limits.h>
 #include <math.h>
-#ifndef __has_builtin
-# define __has_builtin(name) 0
-#endif
-#if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanl))
+#if (__GNUC__ >= 4) || (__clang_major__ >= 4)
 # undef isnanl
-# define isnanl(x) __builtin_isnanl ((long double)(x))
+# define isnanl(x) __builtin_isnan ((long double)(x))
 #elif defined isnan
 # undef isnanl
 # define isnanl(x) isnan ((long double)(x))
index 8017ca70eb440e239458dc14b17bbfc9a8362128..cadb16dc972c608139e94b08c0983eb62be43915 100644 (file)
@@ -1,7 +1,7 @@
 # Enable large files on systems where this is not the default.
 # Enable support for files on Linux file systems with 64-bit inode numbers.
 
-# Copyright 1992-1996, 1998-2020 Free Software Foundation, Inc.
+# Copyright 1992-1996, 1998-2021 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -25,17 +25,17 @@ AC_DEFUN([gl_SET_LARGEFILE_SOURCE],
 # The following implementation works around a problem in autoconf <= 2.69;
 # AC_SYS_LARGEFILE does not configure for large inodes on Mac OS X 10.5,
 # or configures them incorrectly in some cases.
-m4_version_prereq([2.70], [] ,[
+m4_version_prereq([2.70], [][
 
 # _AC_SYS_LARGEFILE_TEST_INCLUDES
 # -------------------------------
 m4_define([_AC_SYS_LARGEFILE_TEST_INCLUDES],
-[@%:@include <sys/types.h>
+[#include <sys/types.h>
  /* Check that off_t can represent 2**63 - 1 correctly.
     We can't simply define LARGE_OFF_T to be 9223372036854775807,
     since some C++ compilers masquerading as C compilers
     incorrectly reject 9223372036854775807.  */
-@%:@define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
   int off_t_is_large[[(LARGE_OFF_T % 2147483629 == 721
                        && LARGE_OFF_T % 2147483647 == 1)
                       ? 1 : -1]];[]dnl
@@ -54,7 +54,7 @@ m4_define([_AC_SYS_LARGEFILE_MACRO_VALUE],
     [AC_LANG_PROGRAM([$5], [$6])],
     [$3=no; break])
   m4_ifval([$6], [AC_LINK_IFELSE], [AC_COMPILE_IFELSE])(
-    [AC_LANG_PROGRAM([@%:@define $1 $2
+    [AC_LANG_PROGRAM([#define $1 $2
 $5], [$6])],
     [$3=$2; break])
   $3=unknown
index 0b4f092a4325c7be0ff8538cef1072ae5039345b..70dbb7dcfa0e29093686e9554fb7f74f1d4a428c 100644 (file)
@@ -1,6 +1,6 @@
 dnl Check whether limits.h has needed features.
 
-dnl Copyright 2016-2020 Free Software Foundation, Inc.
+dnl Copyright 2016-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 9d21c4f90624c4f7e5a6840e0cd838d67bdd2c3a..04389fcbd61b79ed4adbfdd74a32d9839e15d6b0 100644 (file)
@@ -1,5 +1,5 @@
 # localcharset.m4 serial 8
-dnl Copyright (C) 2002, 2004, 2006, 2009-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2004, 2006, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 5abe0522028e6cba2da63557183eb0d2f583327a..b61df7ec90a2775adbf035f51610eeec3eb8a6a8 100644 (file)
@@ -1,5 +1,5 @@
-# locale-fr.m4 serial 19
-dnl Copyright (C) 2003, 2005-2020 Free Software Foundation, Inc.
+# locale-fr.m4 serial 20
+dnl Copyright (C) 2003, 2005-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -12,8 +12,7 @@ AC_DEFUN([gt_LOCALE_FR],
   AC_REQUIRE([AC_CANONICAL_HOST])
   AC_REQUIRE([AM_LANGINFO_CODESET])
   AC_CACHE_CHECK([for a traditional french locale], [gt_cv_locale_fr], [
-    AC_LANG_CONFTEST([AC_LANG_SOURCE([
-changequote(,)dnl
+    AC_LANG_CONFTEST([AC_LANG_SOURCE([[
 #include <locale.h>
 #include <time.h>
 #if HAVE_LANGINFO_CODESET
@@ -78,8 +77,7 @@ int main () {
   return 0;
 #endif
 }
-changequote([,])dnl
-      ])])
+      ]])])
     if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
       case "$host_os" in
         # Handle native Windows specially, because there setlocale() interprets
@@ -143,8 +141,7 @@ AC_DEFUN([gt_LOCALE_FR_UTF8],
 [
   AC_REQUIRE([AM_LANGINFO_CODESET])
   AC_CACHE_CHECK([for a french Unicode locale], [gt_cv_locale_fr_utf8], [
-    AC_LANG_CONFTEST([AC_LANG_SOURCE([
-changequote(,)dnl
+    AC_LANG_CONFTEST([AC_LANG_SOURCE([[
 #include <locale.h>
 #include <time.h>
 #if HAVE_LANGINFO_CODESET
@@ -206,8 +203,7 @@ int main () {
 #endif
   return 0;
 }
-changequote([,])dnl
-      ])])
+      ]])])
     if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
       case "$host_os" in
         # Handle native Windows specially, because there setlocale() interprets
index 0982ab1ba08adbd4517909ba3588d15c2caba92b..cd94288cc4774c6e26c32e1fd49c6105a16392c5 100644 (file)
@@ -1,5 +1,5 @@
-# locale-ja.m4 serial 14
-dnl Copyright (C) 2003, 2005-2020 Free Software Foundation, Inc.
+# locale-ja.m4 serial 15
+dnl Copyright (C) 2003, 2005-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -12,8 +12,7 @@ AC_DEFUN([gt_LOCALE_JA],
   AC_REQUIRE([AC_CANONICAL_HOST])
   AC_REQUIRE([AM_LANGINFO_CODESET])
   AC_CACHE_CHECK([for a traditional japanese locale], [gt_cv_locale_ja], [
-    AC_LANG_CONFTEST([AC_LANG_SOURCE([
-changequote(,)dnl
+    AC_LANG_CONFTEST([AC_LANG_SOURCE([[
 #include <locale.h>
 #include <time.h>
 #if HAVE_LANGINFO_CODESET
@@ -82,8 +81,7 @@ int main ()
   return 0;
 #endif
 }
-changequote([,])dnl
-      ])])
+      ]])])
     if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
       case "$host_os" in
         # Handle native Windows specially, because there setlocale() interprets
index cde51403a7aa7202fe0b5073d1bdd730c30e659c..1228be82850e40e3f1ca919422750c22d4f59f31 100644 (file)
@@ -1,5 +1,5 @@
-# locale-zh.m4 serial 14
-dnl Copyright (C) 2003, 2005-2020 Free Software Foundation, Inc.
+# locale-zh.m4 serial 15
+dnl Copyright (C) 2003, 2005-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -12,8 +12,7 @@ AC_DEFUN([gt_LOCALE_ZH_CN],
   AC_REQUIRE([AC_CANONICAL_HOST])
   AC_REQUIRE([AM_LANGINFO_CODESET])
   AC_CACHE_CHECK([for a transitional chinese locale], [gt_cv_locale_zh_CN], [
-    AC_LANG_CONFTEST([AC_LANG_SOURCE([
-changequote(,)dnl
+    AC_LANG_CONFTEST([AC_LANG_SOURCE([[
 #include <locale.h>
 #include <stdlib.h>
 #include <time.h>
@@ -83,8 +82,7 @@ int main ()
   return 0;
 #endif
 }
-changequote([,])dnl
-      ])])
+      ]])])
     if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
       case "$host_os" in
         # Handle native Windows specially, because there setlocale() interprets
index 32494cf225f5398e40f10be15cc0f77902c692f1..a95379a86eee0962e0b9b0094b93d03b9b83a65e 100644 (file)
@@ -1,5 +1,5 @@
 # locale_h.m4 serial 24
-dnl Copyright (C) 2007, 2009-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/localtime-buffer.m4 b/gnulib/import/m4/localtime-buffer.m4
deleted file mode 100644 (file)
index 09df3c9..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-# localtime-buffer.m4 serial 1
-dnl Copyright (C) 2017-2020 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([gl_LOCALTIME_BUFFER_DEFAULTS],
-[
-  NEED_LOCALTIME_BUFFER=0
-])
-
-dnl Macro invoked from other modules, to signal that the compilation of
-dnl module 'localtime-buffer' is needed.
-AC_DEFUN([gl_LOCALTIME_BUFFER_NEEDED],
-[
-  AC_REQUIRE([gl_LOCALTIME_BUFFER_DEFAULTS])
-  AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS])
-  NEED_LOCALTIME_BUFFER=1
-  REPLACE_GMTIME=1
-  REPLACE_LOCALTIME=1
-])
index 1c39591d5e3102e055469c45e26351dd469d682f..d68c12d0422b4afe707843a41bc8c7902ac54078 100644 (file)
@@ -1,5 +1,5 @@
 # lock.m4 serial 14
-dnl Copyright (C) 2005-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 3c2b214b85743a7d505414128c1b3df1e6e72eee..62e9db29a733626e3caf353a98ad1611e39ef17d 100644 (file)
@@ -1,6 +1,6 @@
 # serial 33
 
-# Copyright (C) 1997-2001, 2003-2020 Free Software Foundation, Inc.
+# Copyright (C) 1997-2001, 2003-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
index c1f8ea32f2c762b72c97185ff7acefc650959bb2..514d19a90fa6f4e8d91316ae90ddd1038b1c80f7 100644 (file)
@@ -1,5 +1,5 @@
-# malloc.m4 serial 20
-dnl Copyright (C) 2007, 2009-2020 Free Software Foundation, Inc.
+# malloc.m4 serial 21
+dnl Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -8,18 +8,12 @@ dnl with or without modifications, as long as this notice is preserved.
 # https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=04be2b7a29d65d9a08e64e8e56e594c91749598c
 AC_DEFUN([_AC_FUNC_MALLOC_IF],
 [
-  AC_REQUIRE([AC_HEADER_STDC])dnl
   AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles
-  AC_CHECK_HEADERS([stdlib.h])
   AC_CACHE_CHECK([for GNU libc compatible malloc],
     [ac_cv_func_malloc_0_nonnull],
     [AC_RUN_IFELSE(
        [AC_LANG_PROGRAM(
-          [[#if defined STDC_HEADERS || defined HAVE_STDLIB_H
-            # include <stdlib.h>
-            #else
-            char *malloc ();
-            #endif
+          [[#include <stdlib.h>
           ]],
           [[char *p = malloc (0);
             int result = !p;
index 930199da14ac72dc1faf1cb7ba19a2def4d459ef..06ed2c6b71178fcef9981fade207932c6969ba5c 100644 (file)
@@ -1,5 +1,5 @@
 # malloca.m4 serial 2
-dnl Copyright (C) 2003-2004, 2006-2007, 2009-2020 Free Software Foundation,
+dnl Copyright (C) 2003-2004, 2006-2007, 2009-2021 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
index 1d0169f7c870e08b66e3aa7bf02476445f9aefb4..a9ba5e655f68e30562081ca37b87d6544ea7f428 100644 (file)
@@ -1,5 +1,5 @@
-# math_h.m4 serial 119
-dnl Copyright (C) 2007-2020 Free Software Foundation, Inc.
+# math_h.m4 serial 122
+dnl Copyright (C) 2007-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -10,7 +10,7 @@ AC_DEFUN([gl_MATH_H],
   gl_CHECK_NEXT_HEADERS([math.h])
 
   AC_CACHE_CHECK([whether NAN macro works], [gl_cv_header_math_nan_works],
-    [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <math.h>]],
+    [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <math.h>]],
       [[/* Solaris 10 has a broken definition of NAN.  Other platforms
         fail to provide NAN, or provide it only in C99 mode; this
         test only needs to fail when NAN is provided but wrong.  */
@@ -25,7 +25,7 @@ AC_DEFUN([gl_MATH_H],
     REPLACE_NAN=1
   fi
   AC_CACHE_CHECK([whether HUGE_VAL works], [gl_cv_header_math_huge_val_works],
-    [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <math.h>]],
+    [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <math.h>]],
       [[/* Solaris 10 has a broken definition of HUGE_VAL.  */
          double d = HUGE_VAL;
          return d == 0;]])],
@@ -159,182 +159,189 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
   GNULIB_TRUNC=0;      AC_SUBST([GNULIB_TRUNC])
   GNULIB_TRUNCF=0;     AC_SUBST([GNULIB_TRUNCF])
   GNULIB_TRUNCL=0;     AC_SUBST([GNULIB_TRUNCL])
+  dnl Support Microsoft deprecated alias function names by default.
+  GNULIB_MDA_J0=1;     AC_SUBST([GNULIB_MDA_J0])
+  GNULIB_MDA_J1=1;     AC_SUBST([GNULIB_MDA_J1])
+  GNULIB_MDA_JN=1;     AC_SUBST([GNULIB_MDA_JN])
+  GNULIB_MDA_Y0=1;     AC_SUBST([GNULIB_MDA_Y0])
+  GNULIB_MDA_Y1=1;     AC_SUBST([GNULIB_MDA_Y1])
+  GNULIB_MDA_YN=1;     AC_SUBST([GNULIB_MDA_YN])
   dnl Assume proper GNU behavior unless another module says otherwise.
-  HAVE_ACOSF=1;                AC_SUBST([HAVE_ACOSF])
-  HAVE_ACOSL=1;                AC_SUBST([HAVE_ACOSL])
-  HAVE_ASINF=1;                AC_SUBST([HAVE_ASINF])
-  HAVE_ASINL=1;                AC_SUBST([HAVE_ASINL])
-  HAVE_ATANF=1;                AC_SUBST([HAVE_ATANF])
-  HAVE_ATANL=1;                AC_SUBST([HAVE_ATANL])
-  HAVE_ATAN2F=1;               AC_SUBST([HAVE_ATAN2F])
-  HAVE_CBRT=1;                 AC_SUBST([HAVE_CBRT])
-  HAVE_CBRTF=1;                AC_SUBST([HAVE_CBRTF])
-  HAVE_CBRTL=1;                AC_SUBST([HAVE_CBRTL])
-  HAVE_COPYSIGN=1;             AC_SUBST([HAVE_COPYSIGN])
-  HAVE_COPYSIGNL=1;            AC_SUBST([HAVE_COPYSIGNL])
-  HAVE_COSF=1;                 AC_SUBST([HAVE_COSF])
-  HAVE_COSL=1;                 AC_SUBST([HAVE_COSL])
-  HAVE_COSHF=1;                AC_SUBST([HAVE_COSHF])
-  HAVE_EXPF=1;                 AC_SUBST([HAVE_EXPF])
-  HAVE_EXPL=1;                 AC_SUBST([HAVE_EXPL])
-  HAVE_EXPM1=1;                AC_SUBST([HAVE_EXPM1])
-  HAVE_EXPM1F=1;               AC_SUBST([HAVE_EXPM1F])
-  HAVE_FABSF=1;                AC_SUBST([HAVE_FABSF])
-  HAVE_FABSL=1;                AC_SUBST([HAVE_FABSL])
-  HAVE_FMA=1;                  AC_SUBST([HAVE_FMA])
-  HAVE_FMAF=1;                 AC_SUBST([HAVE_FMAF])
-  HAVE_FMAL=1;                 AC_SUBST([HAVE_FMAL])
-  HAVE_FMODF=1;                AC_SUBST([HAVE_FMODF])
-  HAVE_FMODL=1;                AC_SUBST([HAVE_FMODL])
-  HAVE_FREXPF=1;               AC_SUBST([HAVE_FREXPF])
-  HAVE_HYPOTF=1;               AC_SUBST([HAVE_HYPOTF])
-  HAVE_HYPOTL=1;               AC_SUBST([HAVE_HYPOTL])
-  HAVE_ILOGB=1;                AC_SUBST([HAVE_ILOGB])
-  HAVE_ILOGBF=1;               AC_SUBST([HAVE_ILOGBF])
-  HAVE_ILOGBL=1;               AC_SUBST([HAVE_ILOGBL])
-  HAVE_ISNANF=1;               AC_SUBST([HAVE_ISNANF])
-  HAVE_ISNAND=1;               AC_SUBST([HAVE_ISNAND])
-  HAVE_ISNANL=1;               AC_SUBST([HAVE_ISNANL])
-  HAVE_LDEXPF=1;               AC_SUBST([HAVE_LDEXPF])
-  HAVE_LOGF=1;                 AC_SUBST([HAVE_LOGF])
-  HAVE_LOGL=1;                 AC_SUBST([HAVE_LOGL])
-  HAVE_LOG10F=1;               AC_SUBST([HAVE_LOG10F])
-  HAVE_LOG10L=1;               AC_SUBST([HAVE_LOG10L])
-  HAVE_LOG1P=1;                AC_SUBST([HAVE_LOG1P])
-  HAVE_LOG1PF=1;               AC_SUBST([HAVE_LOG1PF])
-  HAVE_LOG1PL=1;               AC_SUBST([HAVE_LOG1PL])
-  HAVE_LOGBF=1;                AC_SUBST([HAVE_LOGBF])
-  HAVE_LOGBL=1;                AC_SUBST([HAVE_LOGBL])
-  HAVE_MODFF=1;                AC_SUBST([HAVE_MODFF])
-  HAVE_MODFL=1;                AC_SUBST([HAVE_MODFL])
-  HAVE_POWF=1;                 AC_SUBST([HAVE_POWF])
-  HAVE_REMAINDER=1;            AC_SUBST([HAVE_REMAINDER])
-  HAVE_REMAINDERF=1;           AC_SUBST([HAVE_REMAINDERF])
-  HAVE_RINT=1;                 AC_SUBST([HAVE_RINT])
-  HAVE_RINTL=1;                AC_SUBST([HAVE_RINTL])
-  HAVE_SINF=1;                 AC_SUBST([HAVE_SINF])
-  HAVE_SINL=1;                 AC_SUBST([HAVE_SINL])
-  HAVE_SINHF=1;                AC_SUBST([HAVE_SINHF])
-  HAVE_SQRTF=1;                AC_SUBST([HAVE_SQRTF])
-  HAVE_SQRTL=1;                AC_SUBST([HAVE_SQRTL])
-  HAVE_TANF=1;                 AC_SUBST([HAVE_TANF])
-  HAVE_TANL=1;                 AC_SUBST([HAVE_TANL])
-  HAVE_TANHF=1;                AC_SUBST([HAVE_TANHF])
-  HAVE_DECL_ACOSL=1;           AC_SUBST([HAVE_DECL_ACOSL])
-  HAVE_DECL_ASINL=1;           AC_SUBST([HAVE_DECL_ASINL])
-  HAVE_DECL_ATANL=1;           AC_SUBST([HAVE_DECL_ATANL])
-  HAVE_DECL_CBRTF=1;           AC_SUBST([HAVE_DECL_CBRTF])
-  HAVE_DECL_CBRTL=1;           AC_SUBST([HAVE_DECL_CBRTL])
-  HAVE_DECL_CEILF=1;           AC_SUBST([HAVE_DECL_CEILF])
-  HAVE_DECL_CEILL=1;           AC_SUBST([HAVE_DECL_CEILL])
-  HAVE_DECL_COPYSIGNF=1;       AC_SUBST([HAVE_DECL_COPYSIGNF])
-  HAVE_DECL_COSL=1;            AC_SUBST([HAVE_DECL_COSL])
-  HAVE_DECL_EXPL=1;            AC_SUBST([HAVE_DECL_EXPL])
-  HAVE_DECL_EXP2=1;            AC_SUBST([HAVE_DECL_EXP2])
-  HAVE_DECL_EXP2F=1;           AC_SUBST([HAVE_DECL_EXP2F])
-  HAVE_DECL_EXP2L=1;           AC_SUBST([HAVE_DECL_EXP2L])
-  HAVE_DECL_EXPM1L=1;          AC_SUBST([HAVE_DECL_EXPM1L])
-  HAVE_DECL_FLOORF=1;          AC_SUBST([HAVE_DECL_FLOORF])
-  HAVE_DECL_FLOORL=1;          AC_SUBST([HAVE_DECL_FLOORL])
-  HAVE_DECL_FREXPL=1;          AC_SUBST([HAVE_DECL_FREXPL])
-  HAVE_DECL_LDEXPL=1;          AC_SUBST([HAVE_DECL_LDEXPL])
-  HAVE_DECL_LOGL=1;            AC_SUBST([HAVE_DECL_LOGL])
-  HAVE_DECL_LOG10L=1;          AC_SUBST([HAVE_DECL_LOG10L])
-  HAVE_DECL_LOG2=1;            AC_SUBST([HAVE_DECL_LOG2])
-  HAVE_DECL_LOG2F=1;           AC_SUBST([HAVE_DECL_LOG2F])
-  HAVE_DECL_LOG2L=1;           AC_SUBST([HAVE_DECL_LOG2L])
-  HAVE_DECL_LOGB=1;            AC_SUBST([HAVE_DECL_LOGB])
-  HAVE_DECL_REMAINDER=1;       AC_SUBST([HAVE_DECL_REMAINDER])
-  HAVE_DECL_REMAINDERL=1;      AC_SUBST([HAVE_DECL_REMAINDERL])
-  HAVE_DECL_RINTF=1;           AC_SUBST([HAVE_DECL_RINTF])
-  HAVE_DECL_ROUND=1;           AC_SUBST([HAVE_DECL_ROUND])
-  HAVE_DECL_ROUNDF=1;          AC_SUBST([HAVE_DECL_ROUNDF])
-  HAVE_DECL_ROUNDL=1;          AC_SUBST([HAVE_DECL_ROUNDL])
-  HAVE_DECL_SINL=1;            AC_SUBST([HAVE_DECL_SINL])
-  HAVE_DECL_SQRTL=1;           AC_SUBST([HAVE_DECL_SQRTL])
-  HAVE_DECL_TANL=1;            AC_SUBST([HAVE_DECL_TANL])
-  HAVE_DECL_TRUNC=1;           AC_SUBST([HAVE_DECL_TRUNC])
-  HAVE_DECL_TRUNCF=1;          AC_SUBST([HAVE_DECL_TRUNCF])
-  HAVE_DECL_TRUNCL=1;          AC_SUBST([HAVE_DECL_TRUNCL])
-  REPLACE_ACOSF=0;             AC_SUBST([REPLACE_ACOSF])
-  REPLACE_ASINF=0;             AC_SUBST([REPLACE_ASINF])
-  REPLACE_ATANF=0;             AC_SUBST([REPLACE_ATANF])
-  REPLACE_ATAN2F=0;            AC_SUBST([REPLACE_ATAN2F])
-  REPLACE_CBRTF=0;             AC_SUBST([REPLACE_CBRTF])
-  REPLACE_CBRTL=0;             AC_SUBST([REPLACE_CBRTL])
-  REPLACE_CEIL=0;              AC_SUBST([REPLACE_CEIL])
-  REPLACE_CEILF=0;             AC_SUBST([REPLACE_CEILF])
-  REPLACE_CEILL=0;             AC_SUBST([REPLACE_CEILL])
-  REPLACE_COSF=0;              AC_SUBST([REPLACE_COSF])
-  REPLACE_COSHF=0;             AC_SUBST([REPLACE_COSHF])
-  REPLACE_EXPF=0;              AC_SUBST([REPLACE_EXPF])
-  REPLACE_EXPL=0;              AC_SUBST([REPLACE_EXPL])
-  REPLACE_EXPM1=0;             AC_SUBST([REPLACE_EXPM1])
-  REPLACE_EXPM1F=0;            AC_SUBST([REPLACE_EXPM1F])
-  REPLACE_EXPM1L=0;            AC_SUBST([REPLACE_EXPM1L])
-  REPLACE_EXP2=0;              AC_SUBST([REPLACE_EXP2])
-  REPLACE_EXP2L=0;             AC_SUBST([REPLACE_EXP2L])
-  REPLACE_FABSL=0;             AC_SUBST([REPLACE_FABSL])
-  REPLACE_FLOOR=0;             AC_SUBST([REPLACE_FLOOR])
-  REPLACE_FLOORF=0;            AC_SUBST([REPLACE_FLOORF])
-  REPLACE_FLOORL=0;            AC_SUBST([REPLACE_FLOORL])
-  REPLACE_FMA=0;               AC_SUBST([REPLACE_FMA])
-  REPLACE_FMAF=0;              AC_SUBST([REPLACE_FMAF])
-  REPLACE_FMAL=0;              AC_SUBST([REPLACE_FMAL])
-  REPLACE_FMOD=0;              AC_SUBST([REPLACE_FMOD])
-  REPLACE_FMODF=0;             AC_SUBST([REPLACE_FMODF])
-  REPLACE_FMODL=0;             AC_SUBST([REPLACE_FMODL])
-  REPLACE_FREXPF=0;            AC_SUBST([REPLACE_FREXPF])
-  REPLACE_FREXP=0;             AC_SUBST([REPLACE_FREXP])
-  REPLACE_FREXPL=0;            AC_SUBST([REPLACE_FREXPL])
-  REPLACE_HUGE_VAL=0;          AC_SUBST([REPLACE_HUGE_VAL])
-  REPLACE_HYPOT=0;             AC_SUBST([REPLACE_HYPOT])
-  REPLACE_HYPOTF=0;            AC_SUBST([REPLACE_HYPOTF])
-  REPLACE_HYPOTL=0;            AC_SUBST([REPLACE_HYPOTL])
-  REPLACE_ILOGB=0;             AC_SUBST([REPLACE_ILOGB])
-  REPLACE_ILOGBF=0;            AC_SUBST([REPLACE_ILOGBF])
-  REPLACE_ILOGBL=0;            AC_SUBST([REPLACE_ILOGBL])
-  REPLACE_ISFINITE=0;          AC_SUBST([REPLACE_ISFINITE])
-  REPLACE_ISINF=0;             AC_SUBST([REPLACE_ISINF])
-  REPLACE_ISNAN=0;             AC_SUBST([REPLACE_ISNAN])
-  REPLACE_LDEXPL=0;            AC_SUBST([REPLACE_LDEXPL])
-  REPLACE_LOG=0;               AC_SUBST([REPLACE_LOG])
-  REPLACE_LOGF=0;              AC_SUBST([REPLACE_LOGF])
-  REPLACE_LOGL=0;              AC_SUBST([REPLACE_LOGL])
-  REPLACE_LOG10=0;             AC_SUBST([REPLACE_LOG10])
-  REPLACE_LOG10F=0;            AC_SUBST([REPLACE_LOG10F])
-  REPLACE_LOG10L=0;            AC_SUBST([REPLACE_LOG10L])
-  REPLACE_LOG1P=0;             AC_SUBST([REPLACE_LOG1P])
-  REPLACE_LOG1PF=0;            AC_SUBST([REPLACE_LOG1PF])
-  REPLACE_LOG1PL=0;            AC_SUBST([REPLACE_LOG1PL])
-  REPLACE_LOG2=0;              AC_SUBST([REPLACE_LOG2])
-  REPLACE_LOG2F=0;             AC_SUBST([REPLACE_LOG2F])
-  REPLACE_LOG2L=0;             AC_SUBST([REPLACE_LOG2L])
-  REPLACE_LOGB=0;              AC_SUBST([REPLACE_LOGB])
-  REPLACE_LOGBF=0;             AC_SUBST([REPLACE_LOGBF])
-  REPLACE_LOGBL=0;             AC_SUBST([REPLACE_LOGBL])
-  REPLACE_MODF=0;              AC_SUBST([REPLACE_MODF])
-  REPLACE_MODFF=0;             AC_SUBST([REPLACE_MODFF])
-  REPLACE_MODFL=0;             AC_SUBST([REPLACE_MODFL])
-  REPLACE_NAN=0;               AC_SUBST([REPLACE_NAN])
-  REPLACE_REMAINDER=0;         AC_SUBST([REPLACE_REMAINDER])
-  REPLACE_REMAINDERF=0;        AC_SUBST([REPLACE_REMAINDERF])
-  REPLACE_REMAINDERL=0;        AC_SUBST([REPLACE_REMAINDERL])
-  REPLACE_RINTL=0;             AC_SUBST([REPLACE_RINTL])
-  REPLACE_ROUND=0;             AC_SUBST([REPLACE_ROUND])
-  REPLACE_ROUNDF=0;            AC_SUBST([REPLACE_ROUNDF])
-  REPLACE_ROUNDL=0;            AC_SUBST([REPLACE_ROUNDL])
-  REPLACE_SIGNBIT=0;           AC_SUBST([REPLACE_SIGNBIT])
-  REPLACE_SIGNBIT_USING_GCC=0; AC_SUBST([REPLACE_SIGNBIT_USING_GCC])
-  REPLACE_SINF=0;              AC_SUBST([REPLACE_SINF])
-  REPLACE_SINHF=0;             AC_SUBST([REPLACE_SINHF])
-  REPLACE_SQRTF=0;             AC_SUBST([REPLACE_SQRTF])
-  REPLACE_SQRTL=0;             AC_SUBST([REPLACE_SQRTL])
-  REPLACE_TANF=0;              AC_SUBST([REPLACE_TANF])
-  REPLACE_TANHF=0;             AC_SUBST([REPLACE_TANHF])
-  REPLACE_TRUNC=0;             AC_SUBST([REPLACE_TRUNC])
-  REPLACE_TRUNCF=0;            AC_SUBST([REPLACE_TRUNCF])
-  REPLACE_TRUNCL=0;            AC_SUBST([REPLACE_TRUNCL])
+  HAVE_ACOSF=1;                     AC_SUBST([HAVE_ACOSF])
+  HAVE_ACOSL=1;                     AC_SUBST([HAVE_ACOSL])
+  HAVE_ASINF=1;                     AC_SUBST([HAVE_ASINF])
+  HAVE_ASINL=1;                     AC_SUBST([HAVE_ASINL])
+  HAVE_ATANF=1;                     AC_SUBST([HAVE_ATANF])
+  HAVE_ATANL=1;                     AC_SUBST([HAVE_ATANL])
+  HAVE_ATAN2F=1;                    AC_SUBST([HAVE_ATAN2F])
+  HAVE_CBRT=1;                      AC_SUBST([HAVE_CBRT])
+  HAVE_CBRTF=1;                     AC_SUBST([HAVE_CBRTF])
+  HAVE_CBRTL=1;                     AC_SUBST([HAVE_CBRTL])
+  HAVE_COPYSIGN=1;                  AC_SUBST([HAVE_COPYSIGN])
+  HAVE_COPYSIGNL=1;                 AC_SUBST([HAVE_COPYSIGNL])
+  HAVE_COSF=1;                      AC_SUBST([HAVE_COSF])
+  HAVE_COSL=1;                      AC_SUBST([HAVE_COSL])
+  HAVE_COSHF=1;                     AC_SUBST([HAVE_COSHF])
+  HAVE_EXPF=1;                      AC_SUBST([HAVE_EXPF])
+  HAVE_EXPL=1;                      AC_SUBST([HAVE_EXPL])
+  HAVE_EXPM1=1;                     AC_SUBST([HAVE_EXPM1])
+  HAVE_EXPM1F=1;                    AC_SUBST([HAVE_EXPM1F])
+  HAVE_FABSF=1;                     AC_SUBST([HAVE_FABSF])
+  HAVE_FABSL=1;                     AC_SUBST([HAVE_FABSL])
+  HAVE_FMA=1;                       AC_SUBST([HAVE_FMA])
+  HAVE_FMAF=1;                      AC_SUBST([HAVE_FMAF])
+  HAVE_FMAL=1;                      AC_SUBST([HAVE_FMAL])
+  HAVE_FMODF=1;                     AC_SUBST([HAVE_FMODF])
+  HAVE_FMODL=1;                     AC_SUBST([HAVE_FMODL])
+  HAVE_FREXPF=1;                    AC_SUBST([HAVE_FREXPF])
+  HAVE_HYPOTF=1;                    AC_SUBST([HAVE_HYPOTF])
+  HAVE_HYPOTL=1;                    AC_SUBST([HAVE_HYPOTL])
+  HAVE_ILOGB=1;                     AC_SUBST([HAVE_ILOGB])
+  HAVE_ILOGBF=1;                    AC_SUBST([HAVE_ILOGBF])
+  HAVE_ILOGBL=1;                    AC_SUBST([HAVE_ILOGBL])
+  HAVE_ISNANF=1;                    AC_SUBST([HAVE_ISNANF])
+  HAVE_ISNAND=1;                    AC_SUBST([HAVE_ISNAND])
+  HAVE_ISNANL=1;                    AC_SUBST([HAVE_ISNANL])
+  HAVE_LDEXPF=1;                    AC_SUBST([HAVE_LDEXPF])
+  HAVE_LOGF=1;                      AC_SUBST([HAVE_LOGF])
+  HAVE_LOGL=1;                      AC_SUBST([HAVE_LOGL])
+  HAVE_LOG10F=1;                    AC_SUBST([HAVE_LOG10F])
+  HAVE_LOG10L=1;                    AC_SUBST([HAVE_LOG10L])
+  HAVE_LOG1P=1;                     AC_SUBST([HAVE_LOG1P])
+  HAVE_LOG1PF=1;                    AC_SUBST([HAVE_LOG1PF])
+  HAVE_LOG1PL=1;                    AC_SUBST([HAVE_LOG1PL])
+  HAVE_LOGBF=1;                     AC_SUBST([HAVE_LOGBF])
+  HAVE_LOGBL=1;                     AC_SUBST([HAVE_LOGBL])
+  HAVE_MODFF=1;                     AC_SUBST([HAVE_MODFF])
+  HAVE_MODFL=1;                     AC_SUBST([HAVE_MODFL])
+  HAVE_POWF=1;                      AC_SUBST([HAVE_POWF])
+  HAVE_REMAINDER=1;                 AC_SUBST([HAVE_REMAINDER])
+  HAVE_REMAINDERF=1;                AC_SUBST([HAVE_REMAINDERF])
+  HAVE_RINT=1;                      AC_SUBST([HAVE_RINT])
+  HAVE_RINTL=1;                     AC_SUBST([HAVE_RINTL])
+  HAVE_SINF=1;                      AC_SUBST([HAVE_SINF])
+  HAVE_SINL=1;                      AC_SUBST([HAVE_SINL])
+  HAVE_SINHF=1;                     AC_SUBST([HAVE_SINHF])
+  HAVE_SQRTF=1;                     AC_SUBST([HAVE_SQRTF])
+  HAVE_SQRTL=1;                     AC_SUBST([HAVE_SQRTL])
+  HAVE_TANF=1;                      AC_SUBST([HAVE_TANF])
+  HAVE_TANL=1;                      AC_SUBST([HAVE_TANL])
+  HAVE_TANHF=1;                     AC_SUBST([HAVE_TANHF])
+  HAVE_DECL_ACOSL=1;                AC_SUBST([HAVE_DECL_ACOSL])
+  HAVE_DECL_ASINL=1;                AC_SUBST([HAVE_DECL_ASINL])
+  HAVE_DECL_ATANL=1;                AC_SUBST([HAVE_DECL_ATANL])
+  HAVE_DECL_CBRTF=1;                AC_SUBST([HAVE_DECL_CBRTF])
+  HAVE_DECL_CBRTL=1;                AC_SUBST([HAVE_DECL_CBRTL])
+  HAVE_DECL_CEILF=1;                AC_SUBST([HAVE_DECL_CEILF])
+  HAVE_DECL_CEILL=1;                AC_SUBST([HAVE_DECL_CEILL])
+  HAVE_DECL_COPYSIGNF=1;            AC_SUBST([HAVE_DECL_COPYSIGNF])
+  HAVE_DECL_COSL=1;                 AC_SUBST([HAVE_DECL_COSL])
+  HAVE_DECL_EXPL=1;                 AC_SUBST([HAVE_DECL_EXPL])
+  HAVE_DECL_EXP2=1;                 AC_SUBST([HAVE_DECL_EXP2])
+  HAVE_DECL_EXP2F=1;                AC_SUBST([HAVE_DECL_EXP2F])
+  HAVE_DECL_EXP2L=1;                AC_SUBST([HAVE_DECL_EXP2L])
+  HAVE_DECL_EXPM1L=1;               AC_SUBST([HAVE_DECL_EXPM1L])
+  HAVE_DECL_FLOORF=1;               AC_SUBST([HAVE_DECL_FLOORF])
+  HAVE_DECL_FLOORL=1;               AC_SUBST([HAVE_DECL_FLOORL])
+  HAVE_DECL_FREXPL=1;               AC_SUBST([HAVE_DECL_FREXPL])
+  HAVE_DECL_LDEXPL=1;               AC_SUBST([HAVE_DECL_LDEXPL])
+  HAVE_DECL_LOGL=1;                 AC_SUBST([HAVE_DECL_LOGL])
+  HAVE_DECL_LOG10L=1;               AC_SUBST([HAVE_DECL_LOG10L])
+  HAVE_DECL_LOG2=1;                 AC_SUBST([HAVE_DECL_LOG2])
+  HAVE_DECL_LOG2F=1;                AC_SUBST([HAVE_DECL_LOG2F])
+  HAVE_DECL_LOG2L=1;                AC_SUBST([HAVE_DECL_LOG2L])
+  HAVE_DECL_LOGB=1;                 AC_SUBST([HAVE_DECL_LOGB])
+  HAVE_DECL_REMAINDER=1;            AC_SUBST([HAVE_DECL_REMAINDER])
+  HAVE_DECL_REMAINDERL=1;           AC_SUBST([HAVE_DECL_REMAINDERL])
+  HAVE_DECL_RINTF=1;                AC_SUBST([HAVE_DECL_RINTF])
+  HAVE_DECL_ROUND=1;                AC_SUBST([HAVE_DECL_ROUND])
+  HAVE_DECL_ROUNDF=1;               AC_SUBST([HAVE_DECL_ROUNDF])
+  HAVE_DECL_ROUNDL=1;               AC_SUBST([HAVE_DECL_ROUNDL])
+  HAVE_DECL_SINL=1;                 AC_SUBST([HAVE_DECL_SINL])
+  HAVE_DECL_SQRTL=1;                AC_SUBST([HAVE_DECL_SQRTL])
+  HAVE_DECL_TANL=1;                 AC_SUBST([HAVE_DECL_TANL])
+  HAVE_DECL_TRUNC=1;                AC_SUBST([HAVE_DECL_TRUNC])
+  HAVE_DECL_TRUNCF=1;               AC_SUBST([HAVE_DECL_TRUNCF])
+  HAVE_DECL_TRUNCL=1;               AC_SUBST([HAVE_DECL_TRUNCL])
+  REPLACE_ACOSF=0;                  AC_SUBST([REPLACE_ACOSF])
+  REPLACE_ASINF=0;                  AC_SUBST([REPLACE_ASINF])
+  REPLACE_ATANF=0;                  AC_SUBST([REPLACE_ATANF])
+  REPLACE_ATAN2F=0;                 AC_SUBST([REPLACE_ATAN2F])
+  REPLACE_CBRTF=0;                  AC_SUBST([REPLACE_CBRTF])
+  REPLACE_CBRTL=0;                  AC_SUBST([REPLACE_CBRTL])
+  REPLACE_CEIL=0;                   AC_SUBST([REPLACE_CEIL])
+  REPLACE_CEILF=0;                  AC_SUBST([REPLACE_CEILF])
+  REPLACE_CEILL=0;                  AC_SUBST([REPLACE_CEILL])
+  REPLACE_COSF=0;                   AC_SUBST([REPLACE_COSF])
+  REPLACE_COSHF=0;                  AC_SUBST([REPLACE_COSHF])
+  REPLACE_EXPF=0;                   AC_SUBST([REPLACE_EXPF])
+  REPLACE_EXPL=0;                   AC_SUBST([REPLACE_EXPL])
+  REPLACE_EXPM1=0;                  AC_SUBST([REPLACE_EXPM1])
+  REPLACE_EXPM1F=0;                 AC_SUBST([REPLACE_EXPM1F])
+  REPLACE_EXPM1L=0;                 AC_SUBST([REPLACE_EXPM1L])
+  REPLACE_EXP2=0;                   AC_SUBST([REPLACE_EXP2])
+  REPLACE_EXP2L=0;                  AC_SUBST([REPLACE_EXP2L])
+  REPLACE_FABSL=0;                  AC_SUBST([REPLACE_FABSL])
+  REPLACE_FLOOR=0;                  AC_SUBST([REPLACE_FLOOR])
+  REPLACE_FLOORF=0;                 AC_SUBST([REPLACE_FLOORF])
+  REPLACE_FLOORL=0;                 AC_SUBST([REPLACE_FLOORL])
+  REPLACE_FMA=0;                    AC_SUBST([REPLACE_FMA])
+  REPLACE_FMAF=0;                   AC_SUBST([REPLACE_FMAF])
+  REPLACE_FMAL=0;                   AC_SUBST([REPLACE_FMAL])
+  REPLACE_FMOD=0;                   AC_SUBST([REPLACE_FMOD])
+  REPLACE_FMODF=0;                  AC_SUBST([REPLACE_FMODF])
+  REPLACE_FMODL=0;                  AC_SUBST([REPLACE_FMODL])
+  REPLACE_FREXPF=0;                 AC_SUBST([REPLACE_FREXPF])
+  REPLACE_FREXP=0;                  AC_SUBST([REPLACE_FREXP])
+  REPLACE_FREXPL=0;                 AC_SUBST([REPLACE_FREXPL])
+  REPLACE_HUGE_VAL=0;               AC_SUBST([REPLACE_HUGE_VAL])
+  REPLACE_HYPOT=0;                  AC_SUBST([REPLACE_HYPOT])
+  REPLACE_HYPOTF=0;                 AC_SUBST([REPLACE_HYPOTF])
+  REPLACE_HYPOTL=0;                 AC_SUBST([REPLACE_HYPOTL])
+  REPLACE_ILOGB=0;                  AC_SUBST([REPLACE_ILOGB])
+  REPLACE_ILOGBF=0;                 AC_SUBST([REPLACE_ILOGBF])
+  REPLACE_ILOGBL=0;                 AC_SUBST([REPLACE_ILOGBL])
+  REPLACE_ISFINITE=0;               AC_SUBST([REPLACE_ISFINITE])
+  REPLACE_ISINF=0;                  AC_SUBST([REPLACE_ISINF])
+  REPLACE_ISNAN=0;                  AC_SUBST([REPLACE_ISNAN])
+  REPLACE_LDEXPL=0;                 AC_SUBST([REPLACE_LDEXPL])
+  REPLACE_LOG=0;                    AC_SUBST([REPLACE_LOG])
+  REPLACE_LOGF=0;                   AC_SUBST([REPLACE_LOGF])
+  REPLACE_LOGL=0;                   AC_SUBST([REPLACE_LOGL])
+  REPLACE_LOG10=0;                  AC_SUBST([REPLACE_LOG10])
+  REPLACE_LOG10F=0;                 AC_SUBST([REPLACE_LOG10F])
+  REPLACE_LOG10L=0;                 AC_SUBST([REPLACE_LOG10L])
+  REPLACE_LOG1P=0;                  AC_SUBST([REPLACE_LOG1P])
+  REPLACE_LOG1PF=0;                 AC_SUBST([REPLACE_LOG1PF])
+  REPLACE_LOG1PL=0;                 AC_SUBST([REPLACE_LOG1PL])
+  REPLACE_LOG2=0;                   AC_SUBST([REPLACE_LOG2])
+  REPLACE_LOG2F=0;                  AC_SUBST([REPLACE_LOG2F])
+  REPLACE_LOG2L=0;                  AC_SUBST([REPLACE_LOG2L])
+  REPLACE_LOGB=0;                   AC_SUBST([REPLACE_LOGB])
+  REPLACE_LOGBF=0;                  AC_SUBST([REPLACE_LOGBF])
+  REPLACE_LOGBL=0;                  AC_SUBST([REPLACE_LOGBL])
+  REPLACE_MODF=0;                   AC_SUBST([REPLACE_MODF])
+  REPLACE_MODFF=0;                  AC_SUBST([REPLACE_MODFF])
+  REPLACE_MODFL=0;                  AC_SUBST([REPLACE_MODFL])
+  REPLACE_NAN=0;                    AC_SUBST([REPLACE_NAN])
+  REPLACE_REMAINDER=0;              AC_SUBST([REPLACE_REMAINDER])
+  REPLACE_REMAINDERF=0;             AC_SUBST([REPLACE_REMAINDERF])
+  REPLACE_REMAINDERL=0;             AC_SUBST([REPLACE_REMAINDERL])
+  REPLACE_RINTL=0;                  AC_SUBST([REPLACE_RINTL])
+  REPLACE_ROUND=0;                  AC_SUBST([REPLACE_ROUND])
+  REPLACE_ROUNDF=0;                 AC_SUBST([REPLACE_ROUNDF])
+  REPLACE_ROUNDL=0;                 AC_SUBST([REPLACE_ROUNDL])
+  REPLACE_SIGNBIT=0;                AC_SUBST([REPLACE_SIGNBIT])
+  REPLACE_SIGNBIT_USING_BUILTINS=0; AC_SUBST([REPLACE_SIGNBIT_USING_BUILTINS])
+  REPLACE_SINF=0;                   AC_SUBST([REPLACE_SINF])
+  REPLACE_SINHF=0;                  AC_SUBST([REPLACE_SINHF])
+  REPLACE_SQRTF=0;                  AC_SUBST([REPLACE_SQRTF])
+  REPLACE_SQRTL=0;                  AC_SUBST([REPLACE_SQRTL])
+  REPLACE_TANF=0;                   AC_SUBST([REPLACE_TANF])
+  REPLACE_TANHF=0;                  AC_SUBST([REPLACE_TANHF])
+  REPLACE_TRUNC=0;                  AC_SUBST([REPLACE_TRUNC])
+  REPLACE_TRUNCF=0;                 AC_SUBST([REPLACE_TRUNCF])
+  REPLACE_TRUNCL=0;                 AC_SUBST([REPLACE_TRUNCL])
 ])
 
 # gl_LONG_DOUBLE_VS_DOUBLE
index 755f8c905079327b056c659dde80866436a9003a..1d4e73d726436ad7b0370b47e28a162b7008ee17 100644 (file)
@@ -1,5 +1,5 @@
-# mbrtowc.m4 serial 37  -*- coding: utf-8 -*-
-dnl Copyright (C) 2001-2002, 2004-2005, 2008-2020 Free Software Foundation,
+# mbrtowc.m4 serial 38  -*- coding: utf-8 -*-
+dnl Copyright (C) 2001-2002, 2004-2005, 2008-2021 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -18,15 +18,8 @@ AC_DEFUN([gl_FUNC_MBRTOWC],
   if test $ac_cv_func_mbrtowc = no; then
     HAVE_MBRTOWC=0
     AC_CHECK_DECLS([mbrtowc],,, [[
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-]])
+      #include <wchar.h>
+    ]])
     if test $ac_cv_have_decl_mbrtowc = yes; then
       dnl On Minix 3.1.8, the system's <wchar.h> declares mbrtowc() although
       dnl it does not have the function. Avoid a collision with gnulib's
@@ -181,13 +174,6 @@ changequote([,])dnl
           [AC_LANG_SOURCE([[
 #include <locale.h>
 #include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
 #include <wchar.h>
 int main ()
 {
@@ -213,13 +199,6 @@ int main ()
             [AC_LANG_SOURCE([[
 #include <locale.h>
 #include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
 #include <wchar.h>
 int main ()
 {
@@ -271,13 +250,6 @@ changequote([,])dnl
 #include <locale.h>
 #include <stdlib.h>
 #include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
 #include <wchar.h>
 int main ()
 {
@@ -331,13 +303,6 @@ changequote([,])dnl
 #include <locale.h>
 #include <stdlib.h>
 #include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
 #include <wchar.h>
 int main ()
 {
@@ -400,13 +365,6 @@ changequote([,])dnl
           [AC_LANG_SOURCE([[
 #include <locale.h>
 #include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
 #include <wchar.h>
 int main ()
 {
@@ -462,13 +420,6 @@ changequote([,])dnl
           [AC_LANG_SOURCE([[
 #include <locale.h>
 #include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
 #include <wchar.h>
 int main ()
 {
@@ -590,13 +541,6 @@ changequote([,])dnl
           [AC_LANG_SOURCE([[
 #include <locale.h>
 #include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
 #include <wchar.h>
 int main ()
 {
@@ -644,13 +588,6 @@ changequote([,])dnl
            [AC_LANG_SOURCE([[
 #include <locale.h>
 #include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
 #include <wchar.h>
 int main ()
 {
@@ -708,13 +645,6 @@ int main ()
              [AC_LANG_SOURCE([[
 #include <locale.h>
 #include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
 #include <wchar.h>
 int main ()
 {
@@ -845,14 +775,7 @@ AC_DEFUN([AC_FUNC_MBRTOWC],
     [gl_cv_func_mbrtowc],
     [AC_LINK_IFELSE(
        [AC_LANG_PROGRAM(
-            [[/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
-                 included before <wchar.h>.
-                 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
-                 must be included before <wchar.h>.  */
-              #include <stddef.h>
-              #include <stdio.h>
-              #include <time.h>
-              #include <wchar.h>]],
+            [[#include <wchar.h>]],
             [[wchar_t wc;
               char const s[] = "";
               size_t n = 1;
index 8c26b6b97164a38613cdee888764097c1c9b3207..dc6e10d7f156ad47f1cb70801c52927fd689044e 100644 (file)
@@ -1,5 +1,5 @@
-# mbsinit.m4 serial 8
-dnl Copyright (C) 2008, 2010-2020 Free Software Foundation, Inc.
+# mbsinit.m4 serial 9
+dnl Copyright (C) 2008, 2010-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -16,15 +16,8 @@ AC_DEFUN([gl_FUNC_MBSINIT],
   if test $ac_cv_func_mbsinit = no; then
     HAVE_MBSINIT=0
     AC_CHECK_DECLS([mbsinit],,, [[
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-]])
+      #include <wchar.h>
+    ]])
     if test $ac_cv_have_decl_mbsinit = yes; then
       dnl On Minix 3.1.8, the system's <wchar.h> declares mbsinit() although
       dnl it does not have the function. Avoid a collision with gnulib's
index e0bc229de5b0cae1b63bd25d865fb2ac780c5fe7..cf8e962c65410c802f92936ab4e8f72ee3db0501 100644 (file)
@@ -1,5 +1,5 @@
-# mbsrtowcs.m4 serial 13
-dnl Copyright (C) 2008-2020 Free Software Foundation, Inc.
+# mbsrtowcs.m4 serial 14
+dnl Copyright (C) 2008-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -15,15 +15,8 @@ AC_DEFUN([gl_FUNC_MBSRTOWCS],
   if test $ac_cv_func_mbsrtowcs = no; then
     HAVE_MBSRTOWCS=0
     AC_CHECK_DECLS([mbsrtowcs],,, [[
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-]])
+      #include <wchar.h>
+    ]])
     if test $ac_cv_have_decl_mbsrtowcs = yes; then
       dnl On Minix 3.1.8, the system's <wchar.h> declares mbsrtowcs() although
       dnl it does not have the function. Avoid a collision with gnulib's
@@ -72,13 +65,6 @@ changequote([,])dnl
           [AC_LANG_SOURCE([[
 #include <locale.h>
 #include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
 #include <wchar.h>
 int main ()
 {
index 057ce12ebe64b6c57627208f8cc4497bd0d6ce51..e7fe3580dbc0ba1e2d6207b536d209dd00dd746f 100644 (file)
@@ -1,5 +1,5 @@
-# mbstate_t.m4 serial 13
-dnl Copyright (C) 2000-2002, 2008-2020 Free Software Foundation, Inc.
+# mbstate_t.m4 serial 14
+dnl Copyright (C) 2000-2002, 2008-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -20,14 +20,7 @@ AC_DEFUN([AC_TYPE_MBSTATE_T],
      [AC_COMPILE_IFELSE(
         [AC_LANG_PROGRAM(
            [AC_INCLUDES_DEFAULT[
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>]],
+             #include <wchar.h>]],
            [[mbstate_t x; return sizeof x;]])],
         [ac_cv_type_mbstate_t=yes],
         [ac_cv_type_mbstate_t=no])])
index befcffab28e76bcbb3709d940152f9d06edb95c3..7fc74c945f3c74d945808b7e93c57f2994ce9031 100644 (file)
@@ -1,5 +1,5 @@
 # mbtowc.m4 serial 3
-dnl Copyright (C) 2011-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 91eec88e09f9f62705871d72ad320a2483e06c3c..64470ded532bbd8448c8f958813d1e5ecaba8871 100644 (file)
@@ -1,5 +1,5 @@
-# memchr.m4 serial 15
-dnl Copyright (C) 2002-2004, 2009-2020 Free Software Foundation, Inc.
+# memchr.m4 serial 17
+dnl Copyright (C) 2002-2004, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -14,26 +14,17 @@ AC_DEFUN_ONCE([gl_FUNC_MEMCHR],
   AC_CHECK_FUNCS_ONCE([mprotect])
 
   AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
-  m4_ifdef([gl_FUNC_MEMCHR_OBSOLETE], [
-    dnl These days, we assume memchr is present.  But if support for old
-    dnl platforms is desired:
-    AC_CHECK_FUNCS_ONCE([memchr])
-    if test $ac_cv_func_memchr = no; then
-      HAVE_MEMCHR=0
-    fi
-  ])
-  if test $HAVE_MEMCHR = 1; then
-    # Detect platform-specific bugs in some versions of glibc:
-    # memchr should not dereference anything with length 0
-    #   https://bugzilla.redhat.com/show_bug.cgi?id=499689
-    # memchr should not dereference overestimated length after a match
-    #   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
-    #   https://sourceware.org/bugzilla/show_bug.cgi?id=10162
-    # memchr should cast the second argument to 'unsigned char'.
-    #   This bug exists in Android 4.3.
-    # Assume that memchr works on platforms that lack mprotect.
-    AC_CACHE_CHECK([whether memchr works], [gl_cv_func_memchr_works],
-      [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+  # Detect platform-specific bugs in some versions of glibc:
+  # memchr should not dereference anything with length 0
+  #   https://bugzilla.redhat.com/show_bug.cgi?id=499689
+  # memchr should not dereference overestimated length after a match
+  #   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
+  #   https://sourceware.org/bugzilla/show_bug.cgi?id=10162
+  # memchr should cast the second argument to 'unsigned char'.
+  #   This bug exists in Android 4.3.
+  # Assume that memchr works on platforms that lack mprotect.
+  AC_CACHE_CHECK([whether memchr works], [gl_cv_func_memchr_works],
+    [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
 #include <string.h>
 #if HAVE_SYS_MMAN_H
 # include <fcntl.h>
@@ -68,6 +59,7 @@ AC_DEFUN_ONCE([gl_FUNC_MEMCHR],
 #endif
   if (fence)
     {
+      /* Test against bugs on glibc systems.  */
       if (memchr (fence, 0, 0))
         result |= 1;
       strcpy (fence - 9, "12345678");
@@ -75,6 +67,9 @@ AC_DEFUN_ONCE([gl_FUNC_MEMCHR],
         result |= 2;
       if (memchr (fence - 1, 0, 3) != fence - 1)
         result |= 4;
+      /* Test against bug on AIX 7.2.  */
+      if (memchr (fence - 4, '6', 16) != fence - 4)
+        result |= 8;
     }
   /* Test against bug on Android 4.3.  */
   {
@@ -83,27 +78,26 @@ AC_DEFUN_ONCE([gl_FUNC_MEMCHR],
     input[1] = 'b';
     input[2] = 'c';
     if (memchr (input, 0x789abc00 | 'b', 3) != input + 1)
-      result |= 8;
+      result |= 16;
   }
   return result;
 ]])],
-         [gl_cv_func_memchr_works=yes],
-         [gl_cv_func_memchr_works=no],
-         [case "$host_os" in
-                             # Guess no on Android.
-            linux*-android*) gl_cv_func_memchr_works="guessing no" ;;
-                             # Guess yes on native Windows.
-            mingw*)          gl_cv_func_memchr_works="guessing yes" ;;
-                             # If we don't know, obey --enable-cross-guesses.
-            *)               gl_cv_func_memchr_works="$gl_cross_guess_normal" ;;
-          esac
-         ])
-      ])
-    case "$gl_cv_func_memchr_works" in
-      *yes) ;;
-      *) REPLACE_MEMCHR=1 ;;
-    esac
-  fi
+       [gl_cv_func_memchr_works=yes],
+       [gl_cv_func_memchr_works=no],
+       [case "$host_os" in
+                           # Guess no on Android.
+          linux*-android*) gl_cv_func_memchr_works="guessing no" ;;
+                           # Guess yes on native Windows.
+          mingw*)          gl_cv_func_memchr_works="guessing yes" ;;
+                           # If we don't know, obey --enable-cross-guesses.
+          *)               gl_cv_func_memchr_works="$gl_cross_guess_normal" ;;
+        esac
+       ])
+    ])
+  case "$gl_cv_func_memchr_works" in
+    *yes) ;;
+    *) REPLACE_MEMCHR=1 ;;
+  esac
 ])
 
 # Prerequisites of lib/memchr.c.
index 35a5bb19d1a7206be2706d4a50d5249ac383a36e..e2a785f48d45d8232d0a1dd3790a5724a38be5a7 100644 (file)
@@ -1,5 +1,5 @@
 # memmem.m4 serial 27
-dnl Copyright (C) 2002-2004, 2007-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2004, 2007-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 899f12a880a157d953743fbbf65362c95bf6bbbb..c5ee2af8ccd6af00f41fb14b0d831f00790d20ff 100644 (file)
@@ -1,5 +1,5 @@
 # mempcpy.m4 serial 11
-dnl Copyright (C) 2003-2004, 2006-2007, 2009-2020 Free Software Foundation,
+dnl Copyright (C) 2003-2004, 2006-2007, 2009-2021 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
index 95990ed6b7609ad5c2952fe1217c7bd3eac2ee34..d0c05896e54db548344f5c5643ddc339aac00595 100644 (file)
@@ -1,5 +1,5 @@
 # memrchr.m4 serial 10
-dnl Copyright (C) 2002-2003, 2005-2007, 2009-2020 Free Software Foundation,
+dnl Copyright (C) 2002-2003, 2005-2007, 2009-2021 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
index e5b28b0b8b416d14f823662989c23cdac9d6d6ae..e21a6879a09f6f874cf93e2978e7ab458fdead9b 100644 (file)
@@ -1,5 +1,5 @@
 # minmax.m4 serial 4
-dnl Copyright (C) 2005, 2009-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 99212d914bb658a4bafcf05e536fcbcc72a7f6fe..031fd291b55c5163be83e956b2bf1c6a6122e032 100644 (file)
@@ -1,6 +1,6 @@
-# serial 16
+# serial 17
 
-# Copyright (C) 2001, 2003-2004, 2006, 2008-2020 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003-2004, 2006, 2008-2021 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -16,33 +16,34 @@ AC_DEFUN([gl_FUNC_MKDIR],
   AC_CACHE_CHECK([whether mkdir handles trailing slash],
     [gl_cv_func_mkdir_trailing_slash_works],
     [rm -rf conftest.dir
-      AC_RUN_IFELSE([AC_LANG_PROGRAM([[
-#       include <sys/types.h>
-#       include <sys/stat.h>
-]], [return mkdir ("conftest.dir/", 0700);])],
-      [gl_cv_func_mkdir_trailing_slash_works=yes],
-      [gl_cv_func_mkdir_trailing_slash_works=no],
-      [case "$host_os" in
-                          # Guess yes on Linux systems.
-         linux-* | linux) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
-                          # Guess yes on glibc systems.
-         *-gnu* | gnu*)   gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
-                          # Guess yes on MSVC, no on mingw.
-         mingw*)          AC_EGREP_CPP([Known], [
+     AC_RUN_IFELSE(
+       [AC_LANG_PROGRAM([[
+          #include <sys/types.h>
+          #include <sys/stat.h>
+          ]GL_MDA_DEFINES],
+          [[return mkdir ("conftest.dir/", 0700);]])],
+       [gl_cv_func_mkdir_trailing_slash_works=yes],
+       [gl_cv_func_mkdir_trailing_slash_works=no],
+       [case "$host_os" in
+                           # Guess yes on Linux systems.
+          linux-* | linux) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
+                           # Guess yes on glibc systems.
+          *-gnu* | gnu*)   gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
+                           # Guess yes on MSVC, no on mingw.
+          mingw*)          AC_EGREP_CPP([Known], [
 #ifdef _MSC_VER
  Known
 #endif
-                            ],
-                            [gl_cv_func_mkdir_trailing_slash_works="guessing yes"],
-                            [gl_cv_func_mkdir_trailing_slash_works="guessing no"])
-                          ;;
-                          # If we don't know, obey --enable-cross-guesses.
-         *)               gl_cv_func_mkdir_trailing_slash_works="$gl_cross_guess_normal" ;;
-       esac
-      ])
-    rm -rf conftest.dir
-    ]
-  )
+                             ],
+                             [gl_cv_func_mkdir_trailing_slash_works="guessing yes"],
+                             [gl_cv_func_mkdir_trailing_slash_works="guessing no"])
+                           ;;
+                           # If we don't know, obey --enable-cross-guesses.
+          *)               gl_cv_func_mkdir_trailing_slash_works="$gl_cross_guess_normal" ;;
+        esac
+       ])
+     rm -rf conftest.dir
+    ])
   case "$gl_cv_func_mkdir_trailing_slash_works" in
     *yes) ;;
     *)
@@ -53,24 +54,26 @@ AC_DEFUN([gl_FUNC_MKDIR],
   AC_CACHE_CHECK([whether mkdir handles trailing dot],
     [gl_cv_func_mkdir_trailing_dot_works],
     [rm -rf conftest.dir
-      AC_RUN_IFELSE([AC_LANG_PROGRAM([[
-#       include <sys/types.h>
-#       include <sys/stat.h>
-]], [return !mkdir ("conftest.dir/./", 0700);])],
-      [gl_cv_func_mkdir_trailing_dot_works=yes],
-      [gl_cv_func_mkdir_trailing_dot_works=no],
-      [case "$host_os" in
-                        # Guess yes on glibc systems.
-         *-gnu* | gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
-                        # Guess yes on musl systems.
-         *-musl*)       gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
-                        # Guess no on native Windows.
-         mingw*)        gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
-                        # If we don't know, obey --enable-cross-guesses.
-         *)             gl_cv_func_mkdir_trailing_dot_works="$gl_cross_guess_normal" ;;
-       esac
-      ])
-    rm -rf conftest.dir
+     AC_RUN_IFELSE(
+       [AC_LANG_PROGRAM([[
+          #include <sys/types.h>
+          #include <sys/stat.h>
+          ]GL_MDA_DEFINES],
+          [[return !mkdir ("conftest.dir/./", 0700);]])],
+       [gl_cv_func_mkdir_trailing_dot_works=yes],
+       [gl_cv_func_mkdir_trailing_dot_works=no],
+       [case "$host_os" in
+                         # Guess yes on glibc systems.
+          *-gnu* | gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
+                         # Guess yes on musl systems.
+          *-musl*)       gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
+                         # Guess no on native Windows.
+          mingw*)        gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
+                         # If we don't know, obey --enable-cross-guesses.
+          *)             gl_cv_func_mkdir_trailing_dot_works="$gl_cross_guess_normal" ;;
+        esac
+       ])
+     rm -rf conftest.dir
     ]
   )
   case "$gl_cv_func_mkdir_trailing_dot_works" in
index da7b2ac195e6ea9bf6fdac90173fb5fe05a63b33..9f4816c6ed5ea82616ae4db2cbd32233da0c7cf0 100644 (file)
@@ -1,5 +1,5 @@
 # mkdtemp.m4 serial 8
-dnl Copyright (C) 2001-2003, 2006-2007, 2009-2020 Free Software Foundation,
+dnl Copyright (C) 2001-2003, 2006-2007, 2009-2021 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
index 3e5b5555582fdf3154a395cd9d88ad858b30458c..46534d48ef54a1abc74818c89a95f2ea379e4a49 100644 (file)
@@ -1,5 +1,5 @@
 # mkostemp.m4 serial 2
-dnl Copyright (C) 2009-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index d5c69df8e4f5d8d42360bead02604c6cb9d763a7..5a9f968575f061bf71ac6aaba4c6d3bd5f2e0211 100644 (file)
@@ -1,5 +1,5 @@
-# mmap-anon.m4 serial 10
-dnl Copyright (C) 2005, 2007, 2009-2020 Free Software Foundation, Inc.
+# mmap-anon.m4 serial 11
+dnl Copyright (C) 2005, 2007, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -9,7 +9,7 @@ dnl with or without modifications, as long as this notice is preserved.
 # - On Linux, AIX, OSF/1, Solaris, Cygwin, Interix, Haiku, both MAP_ANONYMOUS
 #   and MAP_ANON exist and have the same value.
 # - On HP-UX, only MAP_ANONYMOUS exists.
-# - On Mac OS X, FreeBSD, NetBSD, OpenBSD, only MAP_ANON exists.
+# - On Mac OS X, FreeBSD, NetBSD, OpenBSD, Minix, only MAP_ANON exists.
 # - On IRIX, neither exists, and a file descriptor opened to /dev/zero must be
 #   used.
 
index f1909517c2d3f3b074b1a60458d5b45d3aecd17b..3bd4b89fee22cdd7fa186e09623e5cd9eebeca9a 100644 (file)
@@ -1,5 +1,5 @@
 # mode_t.m4 serial 2
-dnl Copyright (C) 2009-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index dcf398d032d056a9262389411a52c038015e61b0..3ba5b4e98812467bc5a83b03bead1d0124624b72 100644 (file)
@@ -1,5 +1,5 @@
 # msvc-inval.m4 serial 1
-dnl Copyright (C) 2011-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 13198d8599c539acc8e59251226a551c1f123c0e..aae25ce7cc7bea154fd728e7f115296efa03e261 100644 (file)
@@ -1,5 +1,5 @@
 # msvc-nothrow.m4 serial 1
-dnl Copyright (C) 2011-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 3c2034c5e00d74fce2bcdaab18a530d94b679deb..f1678d9f6ee7275e1eb9aa7283bd5a8523448674 100644 (file)
@@ -1,5 +1,5 @@
-# multiarch.m4 serial 7
-dnl Copyright (C) 2008-2020 Free Software Foundation, Inc.
+# multiarch.m4 serial 9
+dnl Copyright (C) 2008-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -21,37 +21,40 @@ dnl with or without modifications, as long as this notice is preserved.
 AC_DEFUN_ONCE([gl_MULTIARCH],
 [
   dnl Code similar to autoconf-2.63 AC_C_BIGENDIAN.
-  gl_cv_c_multiarch=no
-  AC_COMPILE_IFELSE(
-    [AC_LANG_SOURCE(
-      [[#ifndef __APPLE_CC__
-         not a universal capable compiler
-        #endif
-        typedef int dummy;
-      ]])],
-    [
-     dnl Check for potential -arch flags.  It is not universal unless
-     dnl there are at least two -arch flags with different values.
-     arch=
-     prev=
-     for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
-       if test -n "$prev"; then
-         case $word in
-           i?86 | x86_64 | ppc | ppc64)
-             if test -z "$arch" || test "$arch" = "$word"; then
-               arch="$word"
-             else
-               gl_cv_c_multiarch=yes
-             fi
-             ;;
-         esac
-         prev=
-       else
-         if test "x$word" = "x-arch"; then
-           prev=arch
-         fi
-       fi
-     done
+  AC_CACHE_CHECK([whether the compiler produces multi-arch binaries],
+    [gl_cv_c_multiarch],
+    [gl_cv_c_multiarch=no
+     AC_COMPILE_IFELSE(
+       [AC_LANG_SOURCE(
+         [[#ifndef __APPLE_CC__
+            not a universal capable compiler
+           #endif
+           typedef int dummy;
+         ]])],
+       [
+        dnl Check for potential -arch flags.  It is not universal unless
+        dnl there are at least two -arch flags with different values.
+        arch=
+        prev=
+        for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
+          if test -n "$prev"; then
+            case $word in
+              i?86 | x86_64 | ppc | ppc64 | arm | arm64)
+                if test -z "$arch" || test "$arch" = "$word"; then
+                  arch="$word"
+                else
+                  gl_cv_c_multiarch=yes
+                fi
+                ;;
+            esac
+            prev=
+          else
+            if test "x$word" = "x-arch"; then
+              prev=arch
+            fi
+          fi
+        done
+       ])
     ])
   if test $gl_cv_c_multiarch = yes; then
     APPLE_UNIVERSAL_BUILD=1
index df9f383479b5fe2c8ca784872711fc59bb01f93f..c555596434900dace3fdcfcb01986038967174a5 100644 (file)
@@ -1,5 +1,5 @@
 # netinet_in_h.m4 serial 5
-dnl Copyright (C) 2006-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 637a0ea45bea68df9382df0c3a857589437321d0..27412cd2e8c53965b41d5571e42e5cef3fdc27b2 100644 (file)
@@ -1,5 +1,5 @@
 # nocrash.m4 serial 5
-dnl Copyright (C) 2005, 2009-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 6e19af881eda6911e32e755a7e7182dca1e76a0a..bdec43c804ef6cd9039ea18edb2b62b5efa70efb 100644 (file)
@@ -1,5 +1,5 @@
 # off_t.m4 serial 1
-dnl Copyright (C) 2012-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2012-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 11652d5f81cdff10598215ac852350008e4a5883..542a90f42a7cc4a2af22e3eb7030737c623bb5d9 100644 (file)
@@ -1,6 +1,6 @@
 # Test whether O_CLOEXEC is defined.
 
-dnl Copyright 2017-2020 Free Software Foundation, Inc.
+dnl Copyright 2017-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 1e57c96960e59f4418f0f6c8894f549325ad6780..e619039e8730b98ded17e99236ddb8aab912667e 100644 (file)
@@ -1,5 +1,5 @@
-# open-slash.m4 serial 1
-dnl Copyright (C) 2007-2020 Free Software Foundation, Inc.
+# open-slash.m4 serial 2
+dnl Copyright (C) 2007-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -25,6 +25,7 @@ AC_DEFUN([gl_OPEN_TRAILING_SLASH_BUG],
 #if HAVE_UNISTD_H
 # include <unistd.h>
 #endif
+]GL_MDA_DEFINES[
 int main ()
 {
   int result = 0;
index 552eedf8c5360fb361f042a73a2c72456647a525..c63438650df6d8a7385b467f98a7d571d8cbfd04 100644 (file)
@@ -1,5 +1,5 @@
 # open.m4 serial 15
-dnl Copyright (C) 2007-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index cf9f717336c17c123f2112e54325a3762db2a8ec..eba0f515acdffef4e04b5ed5fb41819cd9d3b059 100644 (file)
@@ -1,7 +1,7 @@
 # serial 46
 # See if we need to use our replacement for Solaris' openat et al functions.
 
-dnl Copyright (C) 2004-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2004-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index fd3c1ec4e96450a9e9040a4388708ba2b38a74f9..517edae30ed8b1f9e46bbb3ed4b9d594509418e7 100644 (file)
@@ -1,5 +1,5 @@
 # opendir.m4 serial 5
-dnl Copyright (C) 2011-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index bb4fdeba750f85876818824f0c749930276be09a..e67c656659b37fc319be115bb5e9d10cf11b69d7 100644 (file)
@@ -1,5 +1,5 @@
 # pathmax.m4 serial 11
-dnl Copyright (C) 2002-2003, 2005-2006, 2009-2020 Free Software Foundation,
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2021 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gnulib/import/m4/pid_t.m4 b/gnulib/import/m4/pid_t.m4
new file mode 100644 (file)
index 0000000..b7650a1
--- /dev/null
@@ -0,0 +1,38 @@
+# pid_t.m4 serial 4
+dnl Copyright (C) 2020-2021 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# The following implementation works around a problem in autoconf <= 2.69.
+m4_version_prereq([2.70], [], [
+
+dnl Define pid_t if the headers don't define it.
+AC_DEFUN([AC_TYPE_PID_T],
+[
+  AC_CHECK_TYPE([pid_t],
+    [],
+    [dnl On 64-bit native Windows, define it to the equivalent of 'intptr_t'
+     dnl (= 'long long' = '__int64'), because that is the return type
+     dnl of the _spawnv* functions
+     dnl <https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/spawnvp-wspawnvp>
+     dnl and the argument type of the _cwait function
+     dnl <https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/cwait>.
+     dnl Otherwise (on 32-bit Windows and on old Unix platforms), define it
+     dnl to 'int'.
+     AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM([[
+          #if defined _WIN64 && !defined __CYGWIN__
+          LLP64
+          #endif
+          ]])
+       ],
+       [gl_pid_type='int'],
+       [gl_pid_type='__int64'])
+     AC_DEFINE_UNQUOTED([pid_t], [$gl_pid_type],
+       [Define as a signed integer type capable of holding a process identifier.])
+    ],
+    [AC_INCLUDES_DEFAULT])
+])
+
+])# m4_version_prereq 2.70
diff --git a/gnulib/import/m4/pipe.m4 b/gnulib/import/m4/pipe.m4
new file mode 100644 (file)
index 0000000..89d666d
--- /dev/null
@@ -0,0 +1,15 @@
+# pipe.m4 serial 2
+dnl Copyright (C) 2010-2021 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_PIPE],
+[
+  AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+
+  AC_CHECK_FUNCS_ONCE([pipe])
+  if test $ac_cv_func_pipe != yes; then
+    HAVE_PIPE=0
+  fi
+])
index 049af50fdea0b32677af879770d58f07607940ca..a5fbead6255cbbfa9c1be646904aee8f2ee2e3db 100644 (file)
@@ -1,5 +1,5 @@
 # pthread_rwlock_rdlock.m4 serial 4
-dnl Copyright (C) 2017-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2017-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index c5bf04189c679da57e37d3cb27e16660ead9faf4..f92846543cc769f17ee094353c30f6413a4d8a65 100644 (file)
@@ -1,5 +1,5 @@
 # rawmemchr.m4 serial 2
-dnl Copyright (C) 2003, 2007-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2007-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index ca4e7419e46b9325a9bdc3964838cfcfe08daa41..94dc99c82ab321b1f17f05df86beabde8437592f 100644 (file)
@@ -1,5 +1,5 @@
 # readdir.m4 serial 1
-dnl Copyright (C) 2011-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 9aa9e46da8c53f146708b4227a6c99b0c9936676..352788c65d0078338bddba3a01a1ea3b1ee053fb 100644 (file)
@@ -1,5 +1,5 @@
-# readlink.m4 serial 15
-dnl Copyright (C) 2003, 2007, 2009-2020 Free Software Foundation, Inc.
+# readlink.m4 serial 16
+dnl Copyright (C) 2003, 2007, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -23,7 +23,7 @@ AC_DEFUN([gl_FUNC_READLINK],
     dnl Solaris 9 ignores trailing slash.
     dnl FreeBSD 7.2 dereferences only one level of links with trailing slash.
     AC_CACHE_CHECK([whether readlink handles trailing slash correctly],
-      [gl_cv_func_readlink_works],
+      [gl_cv_func_readlink_trailing_slash],
       [# We have readlink, so assume ln -s works.
        ln -s conftest.no-such conftest.link
        ln -s conftest.link conftest.lnk2
@@ -32,18 +32,22 @@ AC_DEFUN([gl_FUNC_READLINK],
            [[#include <unistd.h>
 ]], [[char buf[20];
       return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;]])],
-         [gl_cv_func_readlink_works=yes], [gl_cv_func_readlink_works=no],
+         [gl_cv_func_readlink_trailing_slash=yes],
+         [gl_cv_func_readlink_trailing_slash=no],
          [case "$host_os" in
-                             # Guess yes on Linux systems.
-            linux-* | linux) gl_cv_func_readlink_works="guessing yes" ;;
-                             # Guess yes on glibc systems.
-            *-gnu* | gnu*)   gl_cv_func_readlink_works="guessing yes" ;;
-                             # If we don't know, obey --enable-cross-guesses.
-            *)               gl_cv_func_readlink_works="$gl_cross_guess_normal" ;;
+            # Guess yes on Linux or glibc systems.
+            linux-* | linux | *-gnu* | gnu*)
+              gl_cv_func_readlink_trailing_slash="guessing yes" ;;
+            # Guess no on AIX or HP-UX.
+            aix* | hpux*)
+              gl_cv_func_readlink_trailing_slash="guessing no" ;;
+            # If we don't know, obey --enable-cross-guesses.
+            *)
+              gl_cv_func_readlink_trailing_slash="$gl_cross_guess_normal" ;;
           esac
          ])
       rm -f conftest.link conftest.lnk2])
-    case "$gl_cv_func_readlink_works" in
+    case "$gl_cv_func_readlink_trailing_slash" in
       *yes)
         if test "$gl_cv_decl_readlink_works" != yes; then
           REPLACE_READLINK=1
@@ -55,6 +59,43 @@ AC_DEFUN([gl_FUNC_READLINK],
         REPLACE_READLINK=1
         ;;
     esac
+
+    AC_CACHE_CHECK([whether readlink truncates results correctly],
+      [gl_cv_func_readlink_truncate],
+      [# We have readlink, so assume ln -s works.
+       ln -s ab conftest.link
+       AC_RUN_IFELSE(
+         [AC_LANG_PROGRAM(
+           [[#include <unistd.h>
+]], [[char c;
+      return readlink ("conftest.link", &c, 1) != 1;]])],
+         [gl_cv_func_readlink_truncate=yes],
+         [gl_cv_func_readlink_truncate=no],
+         [case "$host_os" in
+            # Guess yes on Linux or glibc systems.
+            linux-* | linux | *-gnu* | gnu*)
+              gl_cv_func_readlink_truncate="guessing yes" ;;
+            # Guess no on AIX or HP-UX.
+            aix* | hpux*)
+              gl_cv_func_readlink_truncate="guessing no" ;;
+            # If we don't know, obey --enable-cross-guesses.
+            *)
+              gl_cv_func_readlink_truncate="$gl_cross_guess_normal" ;;
+          esac
+         ])
+      rm -f conftest.link conftest.lnk2])
+    case $gl_cv_func_readlink_truncate in
+      *yes)
+        if test "$gl_cv_decl_readlink_works" != yes; then
+          REPLACE_READLINK=1
+        fi
+        ;;
+      *)
+        AC_DEFINE([READLINK_TRUNCATE_BUG], [1], [Define to 1 if readlink
+          sets errno instead of truncating a too-long link.])
+        REPLACE_READLINK=1
+        ;;
+    esac
   fi
 ])
 
index 85b8f874f0f22419e722c0d2d7170003a265c5fd..6f4461d017caffb47f0498e839e3b5e56dba9ece 100644 (file)
@@ -1,5 +1,5 @@
-# realloc.m4 serial 18
-dnl Copyright (C) 2007, 2009-2020 Free Software Foundation, Inc.
+# realloc.m4 serial 19
+dnl Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -8,18 +8,12 @@ dnl with or without modifications, as long as this notice is preserved.
 # https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=04be2b7a29d65d9a08e64e8e56e594c91749598c
 AC_DEFUN([_AC_FUNC_REALLOC_IF],
 [
-  AC_REQUIRE([AC_HEADER_STDC])dnl
   AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles
-  AC_CHECK_HEADERS([stdlib.h])
   AC_CACHE_CHECK([for GNU libc compatible realloc],
     [ac_cv_func_realloc_0_nonnull],
     [AC_RUN_IFELSE(
        [AC_LANG_PROGRAM(
-          [[#if defined STDC_HEADERS || defined HAVE_STDLIB_H
-            # include <stdlib.h>
-            #else
-            char *realloc ();
-            #endif
+          [[#include <stdlib.h>
           ]],
           [[char *p = realloc (0, 0);
             int result = !p;
index a1bd705728d124ee479732ca60d76d6f954b48b9..8a95b8aee974a8dbf750dbe911580a787a6e5e96 100644 (file)
@@ -1,6 +1,6 @@
-# serial 32
+# serial 33
 
-# Copyright (C) 2001, 2003, 2005-2006, 2009-2020 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005-2006, 2009-2021 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -150,7 +150,7 @@ AC_DEFUN([gl_FUNC_RENAME],
 #               include <stdio.h>
 #               include <stdlib.h>
 #               include <unistd.h>
-                ]],
+                ]GL_MDA_DEFINES],
                 [[int result = 0;
                   if (rename ("conftest.f", "conftest.f1"))
                     result |= 1;
index 51f476b2255462eeaf7e80926e69559b53a57d85..ed25456bedd5cf9f4609c14d2039d542f4301ac9 100644 (file)
@@ -1,5 +1,5 @@
 # rewinddir.m4 serial 1
-dnl Copyright (C) 2011-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index ad1b192098682a2bfa4bfd6c6766ef09e9ad51fe..82b9cccf2ebf0e3eb8273354f494996db3147ba8 100644 (file)
@@ -1,5 +1,5 @@
-# rmdir.m4 serial 17
-dnl Copyright (C) 2002, 2005, 2009-2020 Free Software Foundation, Inc.
+# rmdir.m4 serial 18
+dnl Copyright (C) 2002, 2005, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -22,15 +22,16 @@ AC_DEFUN([gl_FUNC_RMDIR],
            #else /* on Windows with MSVC */
            # include <direct.h>
            #endif
-]], [[int result = 0;
-      if (!rmdir ("conftest.file/"))
-        result |= 1;
-      else if (errno != ENOTDIR)
-        result |= 2;
-      if (!rmdir ("conftest.dir/./"))
-        result |= 4;
-      return result;
-    ]])],
+         ]GL_MDA_DEFINES],
+         [[int result = 0;
+           if (!rmdir ("conftest.file/"))
+             result |= 1;
+           else if (errno != ENOTDIR)
+             result |= 2;
+           if (!rmdir ("conftest.dir/./"))
+             result |= 4;
+           return result;
+         ]])],
        [gl_cv_func_rmdir_works=yes], [gl_cv_func_rmdir_works=no],
        [case "$host_os" in
                            # Guess yes on Linux systems.
index a401b1f5fe3d37cbc5afc84d05cb967d6f8fbad6..74cfe96f43597a3d4c9705c9e95f0e5ccbfb9e59 100644 (file)
@@ -1,5 +1,5 @@
 # serial 10
-dnl Copyright (C) 2002-2006, 2009-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index ef03673dce57483bd2361efbc0dead7723ea2faa..f79a2785095d46f423c6e113a6c8844dd6b97f64 100644 (file)
@@ -1,5 +1,5 @@
-# setenv.m4 serial 29
-dnl Copyright (C) 2001-2004, 2006-2020 Free Software Foundation, Inc.
+# setenv.m4 serial 30
+dnl Copyright (C) 2001-2004, 2006-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -106,35 +106,39 @@ int unsetenv (const char *name);
     dnl OpenBSD 4.7 unsetenv("") does not fail.
     AC_CACHE_CHECK([whether unsetenv obeys POSIX],
       [gl_cv_func_unsetenv_works],
-      [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
-       #include <stdlib.h>
-       #include <errno.h>
-       extern char **environ;
-      ]], [[
-       char entry1[] = "a=1";
-       char entry2[] = "b=2";
-       char *env[] = { entry1, entry2, NULL };
-       if (putenv ((char *) "a=1")) return 1;
-       if (putenv (entry2)) return 2;
-       entry2[0] = 'a';
-       unsetenv ("a");
-       if (getenv ("a")) return 3;
-       if (!unsetenv ("") || errno != EINVAL) return 4;
-       entry2[0] = 'b';
-       environ = env;
-       if (!getenv ("a")) return 5;
-       entry2[0] = 'a';
-       unsetenv ("a");
-       if (getenv ("a")) return 6;
-      ]])],
-      [gl_cv_func_unsetenv_works=yes], [gl_cv_func_unsetenv_works=no],
-      [case "$host_os" in
-                 # Guess yes on glibc systems.
-         *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
-                 # If we don't know, obey --enable-cross-guesses.
-         *)      gl_cv_func_unsetenv_works="$gl_cross_guess_normal" ;;
-       esac
-      ])])
+      [AC_RUN_IFELSE(
+         [AC_LANG_PROGRAM([[
+            #include <stdlib.h>
+            #include <errno.h>
+            extern char **environ;
+           ]GL_MDA_DEFINES],
+           [[
+            char entry1[] = "a=1";
+            char entry2[] = "b=2";
+            char *env[] = { entry1, entry2, NULL };
+            if (putenv ((char *) "a=1")) return 1;
+            if (putenv (entry2)) return 2;
+            entry2[0] = 'a';
+            unsetenv ("a");
+            if (getenv ("a")) return 3;
+            if (!unsetenv ("") || errno != EINVAL) return 4;
+            entry2[0] = 'b';
+            environ = env;
+            if (!getenv ("a")) return 5;
+            entry2[0] = 'a';
+            unsetenv ("a");
+            if (getenv ("a")) return 6;
+           ]])],
+         [gl_cv_func_unsetenv_works=yes],
+         [gl_cv_func_unsetenv_works=no],
+         [case "$host_os" in
+                    # Guess yes on glibc systems.
+            *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
+                    # If we don't know, obey --enable-cross-guesses.
+            *)      gl_cv_func_unsetenv_works="$gl_cross_guess_normal" ;;
+          esac
+         ])
+      ])
     case "$gl_cv_func_unsetenv_works" in
       *yes) ;;
       *)
index c1ee1f799ee2c9c7a33d5edc77b19ea63a06f7d1..c486ca8405513bad3647fd7e77e1f9f71e976ad5 100644 (file)
@@ -1,5 +1,5 @@
-# setlocale_null.m4 serial 2
-dnl Copyright (C) 2019-2020 Free Software Foundation, Inc.
+# setlocale_null.m4 serial 4
+dnl Copyright (C) 2019-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index b2629809f18cc737e7d5c960de6090ade94b78c8..ff9f0251fd9b16b64292734bb9b858d5ad2ef7cc 100644 (file)
@@ -1,5 +1,5 @@
 # signal_h.m4 serial 19
-dnl Copyright (C) 2007-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 251960b0ac0c89f9bb500cccb23c73d3ba9accc0..eca1d1b94620e0f18f6f04fce22b897db17067dc 100644 (file)
@@ -1,5 +1,5 @@
 # socklen.m4 serial 11
-dnl Copyright (C) 2005-2007, 2009-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2007, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 495a35567e36750b0f748e5779b7d263c6f4dd13..edae5d85c94b6132f4abcb1cca1ca30c17be37f9 100644 (file)
@@ -1,5 +1,5 @@
 # sockpfaf.m4 serial 9
-dnl Copyright (C) 2004, 2006, 2009-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2004, 2006, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 6c0a588873cb2ca39200cfb1e9e063f5b428608d..f0ed509fcc597b66527747e8dbf1ffcb91bddc6f 100644 (file)
@@ -1,5 +1,5 @@
 # ssize_t.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2001-2003, 2006, 2010-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2003, 2006, 2010-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 0ac3f7272e398d546e9b6de704895d73ccfcf51a..df1c2a7453aab04c31446f3eacdb6ed241101ad8 100644 (file)
@@ -1,6 +1,6 @@
 # Checks for stat-related time functions.
 
-# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2020 Free Software
+# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2021 Free Software
 # Foundation, Inc.
 
 # This file is free software; the Free Software Foundation
index 8ef355f9407a017c57142299ab5c780365516aa6..08cdbea629a990573919eb8d157d6c814e1a97ac 100644 (file)
@@ -1,6 +1,6 @@
-# serial 16
+# serial 17
 
-# Copyright (C) 2009-2020 Free Software Foundation, Inc.
+# Copyright (C) 2009-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -70,5 +70,16 @@ AC_DEFUN([gl_FUNC_STAT],
 # Prerequisites of lib/stat.c and lib/stat-w32.c.
 AC_DEFUN([gl_PREREQ_STAT], [
   AC_REQUIRE([gl_HEADER_SYS_STAT_H])
+  AC_REQUIRE([gl_PREREQ_STAT_W32])
   :
 ])
+
+# Prerequisites of lib/stat-w32.c.
+AC_DEFUN([gl_PREREQ_STAT_W32], [
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  case "$host_os" in
+    mingw*)
+      AC_CHECK_HEADERS([sdkddkver.h])
+      ;;
+  esac
+])
index c1ec624b3b399132f8e8768b51454503c9484811..7b1a042af1bcbdf67860e1b348bfef14090044ee 100644 (file)
@@ -6,8 +6,10 @@
 # This implementation will be obsolete once we can assume Autoconf 2.70
 # or later is installed everywhere a Gnulib program might be developed.
 
+m4_version_prereq([2.70], [], [
 
-# Copyright (C) 2001-2020 Free Software Foundation, Inc.
+
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -70,7 +72,7 @@ _AS_ECHO_LOG([checking for _AC_LANG compiler version])
 set X $ac_compile
 ac_compiler=$[2]
 for ac_option in --version -v -V -qversion -version; do
-  m4_ifdef([_AC_DO_LIMIT],[_AC_DO_LIMIT],[_AC_DO])([$ac_compiler $ac_option >&AS_MESSAGE_LOG_FD])
+  _AC_DO_LIMIT([$ac_compiler $ac_option >&AS_MESSAGE_LOG_FD])
 done
 
 m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl
@@ -135,7 +137,7 @@ _AS_ECHO_LOG([checking for _AC_LANG compiler version])
 set X $ac_compile
 ac_compiler=$[2]
 for ac_option in --version -v -V -qversion; do
-  m4_ifdef([_AC_DO_LIMIT],[_AC_DO_LIMIT],[_AC_DO])([$ac_compiler $ac_option >&AS_MESSAGE_LOG_FD])
+  _AC_DO_LIMIT([$ac_compiler $ac_option >&AS_MESSAGE_LOG_FD])
 done
 
 m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl
@@ -822,3 +824,6 @@ dnl Tru64   N/A (no support)
 dnl with extended modes being tried first.
 [[-std=gnu++11 -std=c++11 -std=gnu++0x -std=c++0x -qlanglvl=extended0x -AA]], [$1], [$2])[]dnl
 ])# _AC_PROG_CXX_CXX11
+
+
+])# m4_version_prereq
index dcf778e6456fac1057baee53fb78e9984a754c15..8dcb634d55b9ea4521fc8169faf71245b20c162f 100644 (file)
@@ -1,6 +1,6 @@
 # Check for stdalign.h that conforms to C11.
 
-dnl Copyright 2011-2020 Free Software Foundation, Inc.
+dnl Copyright 2011-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 6bb087ebdf4aff9315ef2332385863a5c9b9e27b..3169779d43c9b5dd6c7648140a71e7ec1f03ccd6 100644 (file)
@@ -1,6 +1,6 @@
 # Check for stdbool.h that conforms to C99.
 
-dnl Copyright (C) 2002-2006, 2009-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 6bcfadb74ef402b7078d32b5d37f8e8d60204338..cd666c4a58c65d5552fb9ee1704b49796f09b045 100644 (file)
@@ -1,14 +1,19 @@
-dnl A placeholder for <stddef.h>, for platforms that have issues.
-# stddef_h.m4 serial 6
-dnl Copyright (C) 2009-2020 Free Software Foundation, Inc.
+# stddef_h.m4 serial 9
+dnl Copyright (C) 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
+dnl A placeholder for <stddef.h>, for platforms that have issues.
+
 AC_DEFUN([gl_STDDEF_H],
 [
   AC_REQUIRE([gl_STDDEF_H_DEFAULTS])
   AC_REQUIRE([gt_TYPE_WCHAR_T])
+
+  dnl Persuade OpenBSD <stddef.h> to declare max_align_t.
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
   STDDEF_H=
 
   dnl Test whether the type max_align_t exists and whether its alignment
@@ -19,10 +24,17 @@ AC_DEFUN([gl_STDDEF_H],
        [AC_LANG_PROGRAM(
           [[#include <stddef.h>
             unsigned int s = sizeof (max_align_t);
-            #if defined __GNUC__ || defined __IBM__ALIGNOF__
+            #if defined __GNUC__ || defined __clang__ || defined __IBM__ALIGNOF__
             int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
             int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
             #endif
+            typedef struct { char a; max_align_t b; } max_helper;
+            typedef struct { char a; long b; } long_helper;
+            typedef struct { char a; double b; } double_helper;
+            typedef struct { char a; long double b; } long_double_helper;
+            int check3[2 * (offsetof (long_helper, b) <= offsetof (max_helper, b)) - 1];
+            int check4[2 * (offsetof (double_helper, b) <= offsetof (max_helper, b)) - 1];
+            int check5[2 * (offsetof (long_double_helper, b) <= offsetof (max_helper, b)) - 1];
           ]])],
        [gl_cv_type_max_align_t=yes],
        [gl_cv_type_max_align_t=no])
index 29ad826d8ea9290691719c432059f48ebafa0ef6..a785b44ed172637bd9c49709a3282b1524098947 100644 (file)
@@ -1,5 +1,5 @@
-# stdint.m4 serial 54
-dnl Copyright (C) 2001-2020 Free Software Foundation, Inc.
+# stdint.m4 serial 58
+dnl Copyright (C) 2001-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -34,7 +34,7 @@ AC_DEFUN_ONCE([gl_STDINT_H],
   AC_SUBST([HAVE_WCHAR_H])
 
   dnl Check for <inttypes.h>.
-  dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_inttypes_h.
+  AC_CHECK_HEADERS_ONCE([inttypes.h])
   if test $ac_cv_header_inttypes_h = yes; then
     HAVE_INTTYPES_H=1
   else
@@ -43,7 +43,7 @@ AC_DEFUN_ONCE([gl_STDINT_H],
   AC_SUBST([HAVE_INTTYPES_H])
 
   dnl Check for <sys/types.h>.
-  dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_sys_types_h.
+  AC_CHECK_HEADERS_ONCE([sys/types.h])
   if test $ac_cv_header_sys_types_h = yes; then
     HAVE_SYS_TYPES_H=1
   else
@@ -152,7 +152,7 @@ uintmax_t j = UINTMAX_MAX;
 /* Check that SIZE_MAX has the correct type, if possible.  */
 #if 201112 <= __STDC_VERSION__
 int k = _Generic (SIZE_MAX, size_t: 0);
-#elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
+#elif (2 <= __GNUC__ || 4 <= __clang_major__ || defined __IBM__TYPEOF__ \
        || (0x5110 <= __SUNPRO_C && !__STDC__))
 extern size_t k;
 extern __typeof__ (SIZE_MAX) k;
@@ -302,9 +302,10 @@ static const char *macro_values[] =
       HAVE_C99_STDINT_H=1
       dnl Now see whether the system <stdint.h> works without
       dnl __STDC_CONSTANT_MACROS/__STDC_LIMIT_MACROS defined.
-      AC_CACHE_CHECK([whether stdint.h predates C++11],
-        [gl_cv_header_stdint_predates_cxx11_h],
-        [gl_cv_header_stdint_predates_cxx11_h=yes
+      dnl If not, there would be problems when stdint.h is included from C++.
+      AC_CACHE_CHECK([whether stdint.h works without ISO C predefines],
+        [gl_cv_header_stdint_without_STDC_macros],
+        [gl_cv_header_stdint_without_STDC_macros=no
          AC_COMPILE_IFELSE([
            AC_LANG_PROGRAM([[
 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
@@ -315,13 +316,14 @@ gl_STDINT_INCLUDES
 intmax_t im = INTMAX_MAX;
 int32_t i32 = INT32_C (0x7fffffff);
            ]])],
-           [gl_cv_header_stdint_predates_cxx11_h=no])])
+           [gl_cv_header_stdint_without_STDC_macros=yes])
+        ])
 
-      if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then
+      if test $gl_cv_header_stdint_without_STDC_macros = no; then
         AC_DEFINE([__STDC_CONSTANT_MACROS], [1],
-                  [Define to 1 if the system <stdint.h> predates C++11.])
+          [Define to 1 if the system <stdint.h> predates C++11.])
         AC_DEFINE([__STDC_LIMIT_MACROS], [1],
-                  [Define to 1 if the system <stdint.h> predates C++11.])
+          [Define to 1 if the system <stdint.h> predates C++11.])
       fi
       AC_CACHE_CHECK([whether stdint.h has UINTMAX_WIDTH etc.],
         [gl_cv_header_stdint_width],
@@ -491,13 +493,9 @@ AC_DEFUN([gl_INTEGER_TYPE_SUFFIX],
 dnl gl_STDINT_INCLUDES
 AC_DEFUN([gl_STDINT_INCLUDES],
 [[
-  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-     included before <wchar.h>.  */
   #include <stddef.h>
   #include <signal.h>
   #if HAVE_WCHAR_H
-  # include <stdio.h>
-  # include <time.h>
   # include <wchar.h>
   #endif
 ]])
index 5f968bc26a5e71c7450f0e7a578577b63764dd22..4c3f24accaa7c0be54296d1fd7fb459e4c1ec9bd 100644 (file)
@@ -1,5 +1,5 @@
-# stdio_h.m4 serial 50
-dnl Copyright (C) 2007-2020 Free Software Foundation, Inc.
+# stdio_h.m4 serial 52
+dnl Copyright (C) 2007-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -109,6 +109,11 @@ AC_DEFUN([gl_STDIO_H],
     renameat snprintf tmpfile vdprintf vsnprintf])
 
   AC_REQUIRE([AC_C_RESTRICT])
+
+  AC_CHECK_DECLS_ONCE([fcloseall])
+  if test $ac_cv_have_decl_fcloseall = no; then
+    HAVE_DECL_FCLOSEALL=0
+  fi
 ])
 
 AC_DEFUN([gl_STDIO_MODULE_INDICATOR],
@@ -175,7 +180,15 @@ AC_DEFUN([gl_STDIO_H_DEFAULTS],
   GNULIB_VPRINTF_POSIX=0;        AC_SUBST([GNULIB_VPRINTF_POSIX])
   GNULIB_VSNPRINTF=0;            AC_SUBST([GNULIB_VSNPRINTF])
   GNULIB_VSPRINTF_POSIX=0;       AC_SUBST([GNULIB_VSPRINTF_POSIX])
+  dnl Support Microsoft deprecated alias function names by default.
+  GNULIB_MDA_FCLOSEALL=1;        AC_SUBST([GNULIB_MDA_FCLOSEALL])
+  GNULIB_MDA_FDOPEN=1;           AC_SUBST([GNULIB_MDA_FDOPEN])
+  GNULIB_MDA_FILENO=1;           AC_SUBST([GNULIB_MDA_FILENO])
+  GNULIB_MDA_GETW=1;             AC_SUBST([GNULIB_MDA_GETW])
+  GNULIB_MDA_PUTW=1;             AC_SUBST([GNULIB_MDA_PUTW])
+  GNULIB_MDA_TEMPNAM=1;          AC_SUBST([GNULIB_MDA_TEMPNAM])
   dnl Assume proper GNU behavior unless another module says otherwise.
+  HAVE_DECL_FCLOSEALL=1;         AC_SUBST([HAVE_DECL_FCLOSEALL])
   HAVE_DECL_FPURGE=1;            AC_SUBST([HAVE_DECL_FPURGE])
   HAVE_DECL_FSEEKO=1;            AC_SUBST([HAVE_DECL_FSEEKO])
   HAVE_DECL_FTELLO=1;            AC_SUBST([HAVE_DECL_FTELLO])
index 743066a6336f9c3632813ea8cabe9f42a099ddcc..5a02972e05dbea9cc2e655515b96a4fa2076d824 100644 (file)
@@ -1,5 +1,5 @@
-# stdlib_h.m4 serial 49
-dnl Copyright (C) 2007-2020 Free Software Foundation, Inc.
+# stdlib_h.m4 serial 55
+dnl Copyright (C) 2007-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -22,13 +22,28 @@ AC_DEFUN([gl_STDLIB_H],
 #if HAVE_RANDOM_H
 # include <random.h>
 #endif
-    ]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt
+    ]], [_Exit aligned_alloc atoll canonicalize_file_name free
+    getloadavg getsubopt grantpt
     initstate initstate_r mbtowc mkdtemp mkostemp mkostemps mkstemp mkstemps
-    posix_openpt ptsname ptsname_r qsort_r random random_r reallocarray
-    realpath rpmatch secure_getenv setenv setstate setstate_r srandom
-    srandom_r strtod strtold strtoll strtoull unlockpt unsetenv])
+    posix_memalign posix_openpt ptsname ptsname_r qsort_r
+    random random_r reallocarray realpath rpmatch secure_getenv setenv
+    setstate setstate_r srandom srandom_r
+    strtod strtold strtoll strtoull unlockpt unsetenv])
 
   AC_REQUIRE([AC_C_RESTRICT])
+
+  AC_CHECK_DECLS_ONCE([ecvt])
+  if test $ac_cv_have_decl_ecvt = no; then
+    HAVE_DECL_ECVT=0
+  fi
+  AC_CHECK_DECLS_ONCE([fcvt])
+  if test $ac_cv_have_decl_fcvt = no; then
+    HAVE_DECL_FCVT=0
+  fi
+  AC_CHECK_DECLS_ONCE([gcvt])
+  if test $ac_cv_have_decl_gcvt = no; then
+    HAVE_DECL_GCVT=0
+  fi
 ])
 
 AC_DEFUN([gl_STDLIB_MODULE_INDICATOR],
@@ -43,9 +58,11 @@ AC_DEFUN([gl_STDLIB_MODULE_INDICATOR],
 AC_DEFUN([gl_STDLIB_H_DEFAULTS],
 [
   GNULIB__EXIT=0;         AC_SUBST([GNULIB__EXIT])
+  GNULIB_ALIGNED_ALLOC=0; AC_SUBST([GNULIB_ALIGNED_ALLOC])
   GNULIB_ATOLL=0;         AC_SUBST([GNULIB_ATOLL])
   GNULIB_CALLOC_POSIX=0;  AC_SUBST([GNULIB_CALLOC_POSIX])
   GNULIB_CANONICALIZE_FILE_NAME=0;  AC_SUBST([GNULIB_CANONICALIZE_FILE_NAME])
+  GNULIB_FREE_POSIX=0;    AC_SUBST([GNULIB_FREE_POSIX])
   GNULIB_GETLOADAVG=0;    AC_SUBST([GNULIB_GETLOADAVG])
   GNULIB_GETSUBOPT=0;     AC_SUBST([GNULIB_GETSUBOPT])
   GNULIB_GRANTPT=0;       AC_SUBST([GNULIB_GRANTPT])
@@ -56,6 +73,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
   GNULIB_MKOSTEMPS=0;     AC_SUBST([GNULIB_MKOSTEMPS])
   GNULIB_MKSTEMP=0;       AC_SUBST([GNULIB_MKSTEMP])
   GNULIB_MKSTEMPS=0;      AC_SUBST([GNULIB_MKSTEMPS])
+  GNULIB_POSIX_MEMALIGN=0;AC_SUBST([GNULIB_POSIX_MEMALIGN])
   GNULIB_POSIX_OPENPT=0;  AC_SUBST([GNULIB_POSIX_OPENPT])
   GNULIB_PTSNAME=0;       AC_SUBST([GNULIB_PTSNAME])
   GNULIB_PTSNAME_R=0;     AC_SUBST([GNULIB_PTSNAME_R])
@@ -77,10 +95,20 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
   GNULIB_UNLOCKPT=0;      AC_SUBST([GNULIB_UNLOCKPT])
   GNULIB_UNSETENV=0;      AC_SUBST([GNULIB_UNSETENV])
   GNULIB_WCTOMB=0;        AC_SUBST([GNULIB_WCTOMB])
+  dnl Support Microsoft deprecated alias function names by default.
+  GNULIB_MDA_ECVT=1;      AC_SUBST([GNULIB_MDA_ECVT])
+  GNULIB_MDA_FCVT=1;      AC_SUBST([GNULIB_MDA_FCVT])
+  GNULIB_MDA_GCVT=1;      AC_SUBST([GNULIB_MDA_GCVT])
+  GNULIB_MDA_MKTEMP=1;    AC_SUBST([GNULIB_MDA_MKTEMP])
+  GNULIB_MDA_PUTENV=1;    AC_SUBST([GNULIB_MDA_PUTENV])
   dnl Assume proper GNU behavior unless another module says otherwise.
   HAVE__EXIT=1;              AC_SUBST([HAVE__EXIT])
+  HAVE_ALIGNED_ALLOC=1;      AC_SUBST([HAVE_ALIGNED_ALLOC])
   HAVE_ATOLL=1;              AC_SUBST([HAVE_ATOLL])
   HAVE_CANONICALIZE_FILE_NAME=1;  AC_SUBST([HAVE_CANONICALIZE_FILE_NAME])
+  HAVE_DECL_ECVT=1;          AC_SUBST([HAVE_DECL_ECVT])
+  HAVE_DECL_FCVT=1;          AC_SUBST([HAVE_DECL_FCVT])
+  HAVE_DECL_GCVT=1;          AC_SUBST([HAVE_DECL_GCVT])
   HAVE_DECL_GETLOADAVG=1;    AC_SUBST([HAVE_DECL_GETLOADAVG])
   HAVE_GETSUBOPT=1;          AC_SUBST([HAVE_GETSUBOPT])
   HAVE_GRANTPT=1;            AC_SUBST([HAVE_GRANTPT])
@@ -92,6 +120,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
   HAVE_MKOSTEMPS=1;          AC_SUBST([HAVE_MKOSTEMPS])
   HAVE_MKSTEMP=1;            AC_SUBST([HAVE_MKSTEMP])
   HAVE_MKSTEMPS=1;           AC_SUBST([HAVE_MKSTEMPS])
+  HAVE_POSIX_MEMALIGN=1;     AC_SUBST([HAVE_POSIX_MEMALIGN])
   HAVE_POSIX_OPENPT=1;       AC_SUBST([HAVE_POSIX_OPENPT])
   HAVE_PTSNAME=1;            AC_SUBST([HAVE_PTSNAME])
   HAVE_PTSNAME_R=1;          AC_SUBST([HAVE_PTSNAME_R])
@@ -115,12 +144,15 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
   HAVE_SYS_LOADAVG_H=0;      AC_SUBST([HAVE_SYS_LOADAVG_H])
   HAVE_UNLOCKPT=1;           AC_SUBST([HAVE_UNLOCKPT])
   HAVE_DECL_UNSETENV=1;      AC_SUBST([HAVE_DECL_UNSETENV])
+  REPLACE_ALIGNED_ALLOC=0;   AC_SUBST([REPLACE_ALIGNED_ALLOC])
   REPLACE_CALLOC=0;          AC_SUBST([REPLACE_CALLOC])
   REPLACE_CANONICALIZE_FILE_NAME=0;  AC_SUBST([REPLACE_CANONICALIZE_FILE_NAME])
+  REPLACE_FREE=0;            AC_SUBST([REPLACE_FREE])
   REPLACE_INITSTATE=0;       AC_SUBST([REPLACE_INITSTATE])
   REPLACE_MALLOC=0;          AC_SUBST([REPLACE_MALLOC])
   REPLACE_MBTOWC=0;          AC_SUBST([REPLACE_MBTOWC])
   REPLACE_MKSTEMP=0;         AC_SUBST([REPLACE_MKSTEMP])
+  REPLACE_POSIX_MEMALIGN=0;  AC_SUBST([REPLACE_POSIX_MEMALIGN])
   REPLACE_PTSNAME=0;         AC_SUBST([REPLACE_PTSNAME])
   REPLACE_PTSNAME_R=0;       AC_SUBST([REPLACE_PTSNAME_R])
   REPLACE_PUTENV=0;          AC_SUBST([REPLACE_PUTENV])
index a18f0935a517f4d08b624b3447af585bd7cf8a0f..76c9a04966381c1c39298d87b3f5e41c492e4638 100644 (file)
@@ -1,5 +1,5 @@
 # strchrnul.m4 serial 9
-dnl Copyright (C) 2003, 2007, 2009-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2007, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 2d1fcc416a8f7f0e35058ba5abc875153f9c1a77..f6f421d940adb0546548222c5fa27f04a79fa4ca 100644 (file)
@@ -1,6 +1,6 @@
-# strdup.m4 serial 13
+# strdup.m4 serial 14
 
-dnl Copyright (C) 2002-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2021 Free Software Foundation, Inc.
 
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,7 +9,6 @@ dnl with or without modifications, as long as this notice is preserved.
 AC_DEFUN([gl_FUNC_STRDUP],
 [
   AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
-  AC_CHECK_FUNCS_ONCE([strdup])
   AC_CHECK_DECLS_ONCE([strdup])
   if test $ac_cv_have_decl_strdup = no; then
     HAVE_DECL_STRDUP=0
@@ -20,11 +19,8 @@ AC_DEFUN([gl_FUNC_STRDUP_POSIX],
 [
   AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
   AC_REQUIRE([gl_CHECK_MALLOC_POSIX])
-  AC_CHECK_FUNCS_ONCE([strdup])
-  if test $ac_cv_func_strdup = yes; then
-    if test $gl_cv_func_malloc_posix != yes; then
-      REPLACE_STRDUP=1
-    fi
+  if test $gl_cv_func_malloc_posix != yes; then
+    REPLACE_STRDUP=1
   fi
   AC_CHECK_DECLS_ONCE([strdup])
   if test $ac_cv_have_decl_strdup = no; then
index fd84ce87116d3c0c405367b833d7b642cbf8fad4..48c56aec6a1369f9376a330bb730b40d0ebf7422 100644 (file)
@@ -1,5 +1,5 @@
 # strerror.m4 serial 21
-dnl Copyright (C) 2002, 2007-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2007-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index d431f2360bae1100a17099d45d6dc2178376a4c3..b0b2ed053478a3734c3bb839b5edbb51d2860697 100644 (file)
@@ -1,5 +1,5 @@
 # strerror_r.m4 serial 20
-dnl Copyright (C) 2002, 2007-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2007-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index cc51337f0d1f3bed689e819227969d390f76d505..a4cc5b4378337b4d7a04fa0ac3926ac9e4444c9b 100644 (file)
@@ -1,11 +1,11 @@
 # Configure a GNU-like replacement for <string.h>.
 
-# Copyright (C) 2007-2020 Free Software Foundation, Inc.
+# Copyright (C) 2007-2021 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 23
+# serial 29
 
 # Written by Paul Eggert.
 
@@ -28,7 +28,7 @@ AC_DEFUN([gl_HEADER_STRING_H_BODY],
     ]],
     [ffsl ffsll memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul
      strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r
-     strerror_r strsignal strverscmp])
+     strerror_r strerrorname_np sigabbrev_np sigdescr_np strsignal strverscmp])
 
   AC_REQUIRE([AC_C_RESTRICT])
 ])
@@ -44,50 +44,55 @@ AC_DEFUN([gl_STRING_MODULE_INDICATOR],
 
 AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
 [
-  GNULIB_EXPLICIT_BZERO=0; AC_SUBST([GNULIB_EXPLICIT_BZERO])
-  GNULIB_FFSL=0;        AC_SUBST([GNULIB_FFSL])
-  GNULIB_FFSLL=0;       AC_SUBST([GNULIB_FFSLL])
-  GNULIB_MEMCHR=0;      AC_SUBST([GNULIB_MEMCHR])
-  GNULIB_MEMMEM=0;      AC_SUBST([GNULIB_MEMMEM])
-  GNULIB_MEMPCPY=0;     AC_SUBST([GNULIB_MEMPCPY])
-  GNULIB_MEMRCHR=0;     AC_SUBST([GNULIB_MEMRCHR])
-  GNULIB_RAWMEMCHR=0;   AC_SUBST([GNULIB_RAWMEMCHR])
-  GNULIB_STPCPY=0;      AC_SUBST([GNULIB_STPCPY])
-  GNULIB_STPNCPY=0;     AC_SUBST([GNULIB_STPNCPY])
-  GNULIB_STRCHRNUL=0;   AC_SUBST([GNULIB_STRCHRNUL])
-  GNULIB_STRDUP=0;      AC_SUBST([GNULIB_STRDUP])
-  GNULIB_STRNCAT=0;     AC_SUBST([GNULIB_STRNCAT])
-  GNULIB_STRNDUP=0;     AC_SUBST([GNULIB_STRNDUP])
-  GNULIB_STRNLEN=0;     AC_SUBST([GNULIB_STRNLEN])
-  GNULIB_STRPBRK=0;     AC_SUBST([GNULIB_STRPBRK])
-  GNULIB_STRSEP=0;      AC_SUBST([GNULIB_STRSEP])
-  GNULIB_STRSTR=0;      AC_SUBST([GNULIB_STRSTR])
-  GNULIB_STRCASESTR=0;  AC_SUBST([GNULIB_STRCASESTR])
-  GNULIB_STRTOK_R=0;    AC_SUBST([GNULIB_STRTOK_R])
-  GNULIB_MBSLEN=0;      AC_SUBST([GNULIB_MBSLEN])
-  GNULIB_MBSNLEN=0;     AC_SUBST([GNULIB_MBSNLEN])
-  GNULIB_MBSCHR=0;      AC_SUBST([GNULIB_MBSCHR])
-  GNULIB_MBSRCHR=0;     AC_SUBST([GNULIB_MBSRCHR])
-  GNULIB_MBSSTR=0;      AC_SUBST([GNULIB_MBSSTR])
-  GNULIB_MBSCASECMP=0;  AC_SUBST([GNULIB_MBSCASECMP])
-  GNULIB_MBSNCASECMP=0; AC_SUBST([GNULIB_MBSNCASECMP])
-  GNULIB_MBSPCASECMP=0; AC_SUBST([GNULIB_MBSPCASECMP])
-  GNULIB_MBSCASESTR=0;  AC_SUBST([GNULIB_MBSCASESTR])
-  GNULIB_MBSCSPN=0;     AC_SUBST([GNULIB_MBSCSPN])
-  GNULIB_MBSPBRK=0;     AC_SUBST([GNULIB_MBSPBRK])
-  GNULIB_MBSSPN=0;      AC_SUBST([GNULIB_MBSSPN])
-  GNULIB_MBSSEP=0;      AC_SUBST([GNULIB_MBSSEP])
-  GNULIB_MBSTOK_R=0;    AC_SUBST([GNULIB_MBSTOK_R])
-  GNULIB_STRERROR=0;    AC_SUBST([GNULIB_STRERROR])
-  GNULIB_STRERROR_R=0;  AC_SUBST([GNULIB_STRERROR_R])
-  GNULIB_STRSIGNAL=0;   AC_SUBST([GNULIB_STRSIGNAL])
-  GNULIB_STRVERSCMP=0;  AC_SUBST([GNULIB_STRVERSCMP])
-  HAVE_MBSLEN=0;        AC_SUBST([HAVE_MBSLEN])
+  GNULIB_EXPLICIT_BZERO=0;   AC_SUBST([GNULIB_EXPLICIT_BZERO])
+  GNULIB_FFSL=0;             AC_SUBST([GNULIB_FFSL])
+  GNULIB_FFSLL=0;            AC_SUBST([GNULIB_FFSLL])
+  GNULIB_MEMCHR=0;           AC_SUBST([GNULIB_MEMCHR])
+  GNULIB_MEMMEM=0;           AC_SUBST([GNULIB_MEMMEM])
+  GNULIB_MEMPCPY=0;          AC_SUBST([GNULIB_MEMPCPY])
+  GNULIB_MEMRCHR=0;          AC_SUBST([GNULIB_MEMRCHR])
+  GNULIB_RAWMEMCHR=0;        AC_SUBST([GNULIB_RAWMEMCHR])
+  GNULIB_STPCPY=0;           AC_SUBST([GNULIB_STPCPY])
+  GNULIB_STPNCPY=0;          AC_SUBST([GNULIB_STPNCPY])
+  GNULIB_STRCHRNUL=0;        AC_SUBST([GNULIB_STRCHRNUL])
+  GNULIB_STRDUP=0;           AC_SUBST([GNULIB_STRDUP])
+  GNULIB_STRNCAT=0;          AC_SUBST([GNULIB_STRNCAT])
+  GNULIB_STRNDUP=0;          AC_SUBST([GNULIB_STRNDUP])
+  GNULIB_STRNLEN=0;          AC_SUBST([GNULIB_STRNLEN])
+  GNULIB_STRPBRK=0;          AC_SUBST([GNULIB_STRPBRK])
+  GNULIB_STRSEP=0;           AC_SUBST([GNULIB_STRSEP])
+  GNULIB_STRSTR=0;           AC_SUBST([GNULIB_STRSTR])
+  GNULIB_STRCASESTR=0;       AC_SUBST([GNULIB_STRCASESTR])
+  GNULIB_STRTOK_R=0;         AC_SUBST([GNULIB_STRTOK_R])
+  GNULIB_MBSLEN=0;           AC_SUBST([GNULIB_MBSLEN])
+  GNULIB_MBSNLEN=0;          AC_SUBST([GNULIB_MBSNLEN])
+  GNULIB_MBSCHR=0;           AC_SUBST([GNULIB_MBSCHR])
+  GNULIB_MBSRCHR=0;          AC_SUBST([GNULIB_MBSRCHR])
+  GNULIB_MBSSTR=0;           AC_SUBST([GNULIB_MBSSTR])
+  GNULIB_MBSCASECMP=0;       AC_SUBST([GNULIB_MBSCASECMP])
+  GNULIB_MBSNCASECMP=0;      AC_SUBST([GNULIB_MBSNCASECMP])
+  GNULIB_MBSPCASECMP=0;      AC_SUBST([GNULIB_MBSPCASECMP])
+  GNULIB_MBSCASESTR=0;       AC_SUBST([GNULIB_MBSCASESTR])
+  GNULIB_MBSCSPN=0;          AC_SUBST([GNULIB_MBSCSPN])
+  GNULIB_MBSPBRK=0;          AC_SUBST([GNULIB_MBSPBRK])
+  GNULIB_MBSSPN=0;           AC_SUBST([GNULIB_MBSSPN])
+  GNULIB_MBSSEP=0;           AC_SUBST([GNULIB_MBSSEP])
+  GNULIB_MBSTOK_R=0;         AC_SUBST([GNULIB_MBSTOK_R])
+  GNULIB_STRERROR=0;         AC_SUBST([GNULIB_STRERROR])
+  GNULIB_STRERROR_R=0;       AC_SUBST([GNULIB_STRERROR_R])
+  GNULIB_STRERRORNAME_NP=0;  AC_SUBST([GNULIB_STRERRORNAME_NP])
+  GNULIB_SIGABBREV_NP=0;     AC_SUBST([GNULIB_SIGABBREV_NP])
+  GNULIB_SIGDESCR_NP=0;      AC_SUBST([GNULIB_SIGDESCR_NP])
+  GNULIB_STRSIGNAL=0;        AC_SUBST([GNULIB_STRSIGNAL])
+  GNULIB_STRVERSCMP=0;       AC_SUBST([GNULIB_STRVERSCMP])
+  HAVE_MBSLEN=0;             AC_SUBST([HAVE_MBSLEN])
+  dnl Support Microsoft deprecated alias function names by default.
+  GNULIB_MDA_MEMCCPY=1;      AC_SUBST([GNULIB_MDA_MEMCCPY])
+  GNULIB_MDA_STRDUP=1;       AC_SUBST([GNULIB_MDA_STRDUP])
   dnl Assume proper GNU behavior unless another module says otherwise.
   HAVE_EXPLICIT_BZERO=1;        AC_SUBST([HAVE_EXPLICIT_BZERO])
   HAVE_FFSL=1;                  AC_SUBST([HAVE_FFSL])
   HAVE_FFSLL=1;                 AC_SUBST([HAVE_FFSLL])
-  HAVE_MEMCHR=1;                AC_SUBST([HAVE_MEMCHR])
   HAVE_DECL_MEMMEM=1;           AC_SUBST([HAVE_DECL_MEMMEM])
   HAVE_MEMPCPY=1;               AC_SUBST([HAVE_MEMPCPY])
   HAVE_DECL_MEMRCHR=1;          AC_SUBST([HAVE_DECL_MEMRCHR])
@@ -103,8 +108,12 @@ AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
   HAVE_STRCASESTR=1;            AC_SUBST([HAVE_STRCASESTR])
   HAVE_DECL_STRTOK_R=1;         AC_SUBST([HAVE_DECL_STRTOK_R])
   HAVE_DECL_STRERROR_R=1;       AC_SUBST([HAVE_DECL_STRERROR_R])
+  HAVE_STRERRORNAME_NP=1;       AC_SUBST([HAVE_STRERRORNAME_NP])
+  HAVE_SIGABBREV_NP=1;          AC_SUBST([HAVE_SIGABBREV_NP])
+  HAVE_SIGDESCR_NP=1;           AC_SUBST([HAVE_SIGDESCR_NP])
   HAVE_DECL_STRSIGNAL=1;        AC_SUBST([HAVE_DECL_STRSIGNAL])
   HAVE_STRVERSCMP=1;            AC_SUBST([HAVE_STRVERSCMP])
+  REPLACE_FFSLL=0;              AC_SUBST([REPLACE_FFSLL])
   REPLACE_MEMCHR=0;             AC_SUBST([REPLACE_MEMCHR])
   REPLACE_MEMMEM=0;             AC_SUBST([REPLACE_MEMMEM])
   REPLACE_STPNCPY=0;            AC_SUBST([REPLACE_STPNCPY])
@@ -118,6 +127,7 @@ AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
   REPLACE_STRTOK_R=0;           AC_SUBST([REPLACE_STRTOK_R])
   REPLACE_STRERROR=0;           AC_SUBST([REPLACE_STRERROR])
   REPLACE_STRERROR_R=0;         AC_SUBST([REPLACE_STRERROR_R])
+  REPLACE_STRERRORNAME_NP=0;    AC_SUBST([REPLACE_STRERRORNAME_NP])
   REPLACE_STRSIGNAL=0;          AC_SUBST([REPLACE_STRSIGNAL])
   UNDEFINE_STRTOK_R=0;          AC_SUBST([UNDEFINE_STRTOK_R])
 ])
index 71b8e1baffe349f20950508a0d076756318432e1..bb9a680fdc484251a72b5d0cb9351d73d0b93de5 100644 (file)
@@ -1,5 +1,5 @@
 # strnlen.m4 serial 13
-dnl Copyright (C) 2002-2003, 2005-2007, 2009-2020 Free Software Foundation,
+dnl Copyright (C) 2002-2003, 2005-2007, 2009-2021 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
index a2ec337f1713910128bf9973152ca9e434136b0a..1226b056efc1534a39f4a0356b176f4d99a44979 100644 (file)
@@ -1,5 +1,5 @@
-# strstr.m4 serial 21
-dnl Copyright (C) 2008-2020 Free Software Foundation, Inc.
+# strstr.m4 serial 22
+dnl Copyright (C) 2008-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -9,7 +9,7 @@ AC_DEFUN([gl_FUNC_STRSTR_SIMPLE],
 [
   AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
   AC_REQUIRE([gl_FUNC_MEMCHR])
-  if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
+  if test $REPLACE_MEMCHR = 1; then
     REPLACE_STRSTR=1
   else
     dnl Detect https://sourceware.org/bugzilla/show_bug.cgi?id=12092
index 2da132cb1fa7502488305341755fa4dfc1ad60bc..b8e2f6821ff6a8489a49c370bd2df2f986b7adb2 100644 (file)
@@ -1,5 +1,5 @@
 # strtok_r.m4 serial 15
-dnl Copyright (C) 2002-2004, 2006-2007, 2009-2020 Free Software Foundation,
+dnl Copyright (C) 2002-2004, 2006-2007, 2009-2021 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
index a964b157841a6cdb804c07f1cb7cae01ddfc84bd..45e0469ba058476df533d4e00949d1bb77630323 100644 (file)
@@ -1,5 +1,5 @@
-# sys_random_h.m4 serial 4
-dnl Copyright (C) 2020 Free Software Foundation, Inc.
+# sys_random_h.m4 serial 5
+dnl Copyright (C) 2020-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -25,7 +25,8 @@ AC_DEFUN([gl_HEADER_SYS_RANDOM],
   dnl corresponding gnulib module is not in use.
   gl_WARN_ON_USE_PREPARE([[
 #if HAVE_SYS_RANDOM_H
-/* Additional includes are needed before <sys/random.h> on Mac OS X.  */
+/* Additional includes are needed before <sys/random.h> on uClibc
+   and Mac OS X.  */
 # include <sys/types.h>
 # include <stdlib.h>
 # include <sys/random.h>
index bf902f081080a905ed3b540ffe29447452c2100f..503cb9668b7b97d297826676fdecee315891d115 100644 (file)
@@ -1,5 +1,5 @@
 # sys_socket_h.m4 serial 25
-dnl Copyright (C) 2005-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 3efba5a7b98632322343871b91e3bfddbe71a6ae..23cbdd28eb2f740fe514f477e670c66d0cb5e354 100644 (file)
@@ -1,5 +1,5 @@
-# sys_stat_h.m4 serial 33   -*- Autoconf -*-
-dnl Copyright (C) 2006-2020 Free Software Foundation, Inc.
+# sys_stat_h.m4 serial 38   -*- Autoconf -*-
+dnl Copyright (C) 2006-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -46,8 +46,8 @@ AC_DEFUN([gl_HEADER_SYS_STAT_H],
   dnl Check for declarations of anything we want to poison if the
   dnl corresponding gnulib module is not in use.
   gl_WARN_ON_USE_PREPARE([[#include <sys/stat.h>
-    ]], [fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat
-    mknod mknodat stat utimensat])
+    ]], [fchmodat fstat fstatat futimens getumask lchmod lstat
+    mkdirat mkfifo mkfifoat mknod mknodat stat utimensat])
 
   AC_REQUIRE([AC_C_RESTRICT])
 ])
@@ -68,8 +68,10 @@ AC_DEFUN([gl_SYS_STAT_H_DEFAULTS],
   GNULIB_FSTAT=0;       AC_SUBST([GNULIB_FSTAT])
   GNULIB_FSTATAT=0;     AC_SUBST([GNULIB_FSTATAT])
   GNULIB_FUTIMENS=0;    AC_SUBST([GNULIB_FUTIMENS])
+  GNULIB_GETUMASK=0;    AC_SUBST([GNULIB_GETUMASK])
   GNULIB_LCHMOD=0;      AC_SUBST([GNULIB_LCHMOD])
   GNULIB_LSTAT=0;       AC_SUBST([GNULIB_LSTAT])
+  GNULIB_MKDIR=0;       AC_SUBST([GNULIB_MKDIR])
   GNULIB_MKDIRAT=0;     AC_SUBST([GNULIB_MKDIRAT])
   GNULIB_MKFIFO=0;      AC_SUBST([GNULIB_MKFIFO])
   GNULIB_MKFIFOAT=0;    AC_SUBST([GNULIB_MKFIFOAT])
@@ -78,10 +80,15 @@ AC_DEFUN([gl_SYS_STAT_H_DEFAULTS],
   GNULIB_STAT=0;        AC_SUBST([GNULIB_STAT])
   GNULIB_UTIMENSAT=0;   AC_SUBST([GNULIB_UTIMENSAT])
   GNULIB_OVERRIDES_STRUCT_STAT=0; AC_SUBST([GNULIB_OVERRIDES_STRUCT_STAT])
+  dnl Support Microsoft deprecated alias function names by default.
+  GNULIB_MDA_CHMOD=1;   AC_SUBST([GNULIB_MDA_CHMOD])
+  GNULIB_MDA_MKDIR=1;   AC_SUBST([GNULIB_MDA_MKDIR])
+  GNULIB_MDA_UMASK=1;   AC_SUBST([GNULIB_MDA_UMASK])
   dnl Assume proper GNU behavior unless another module says otherwise.
   HAVE_FCHMODAT=1;      AC_SUBST([HAVE_FCHMODAT])
   HAVE_FSTATAT=1;       AC_SUBST([HAVE_FSTATAT])
   HAVE_FUTIMENS=1;      AC_SUBST([HAVE_FUTIMENS])
+  HAVE_GETUMASK=1;      AC_SUBST([HAVE_GETUMASK])
   HAVE_LCHMOD=1;        AC_SUBST([HAVE_LCHMOD])
   HAVE_LSTAT=1;         AC_SUBST([HAVE_LSTAT])
   HAVE_MKDIRAT=1;       AC_SUBST([HAVE_MKDIRAT])
@@ -97,7 +104,9 @@ AC_DEFUN([gl_SYS_STAT_H_DEFAULTS],
   REPLACE_LSTAT=0;      AC_SUBST([REPLACE_LSTAT])
   REPLACE_MKDIR=0;      AC_SUBST([REPLACE_MKDIR])
   REPLACE_MKFIFO=0;     AC_SUBST([REPLACE_MKFIFO])
+  REPLACE_MKFIFOAT=0;   AC_SUBST([REPLACE_MKFIFOAT])
   REPLACE_MKNOD=0;      AC_SUBST([REPLACE_MKNOD])
+  REPLACE_MKNODAT=0;    AC_SUBST([REPLACE_MKNODAT])
   REPLACE_STAT=0;       AC_SUBST([REPLACE_STAT])
   REPLACE_UTIMENSAT=0;  AC_SUBST([REPLACE_UTIMENSAT])
 ])
index 8fc8599242dcb86d1f4d6d21a07e1db72af3ca67..64f133d513360ec351f1ea0dd3e73e5a62a9e083 100644 (file)
@@ -1,7 +1,7 @@
 # Configure a replacement for <sys/time.h>.
 # serial 9
 
-# Copyright (C) 2007, 2009-2020 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
index be918dc0d8ba46744aa64c4ae2fefcf25e2d680b..2172c836d95956876211679a5eb62ff1b3e1bbf5 100644 (file)
@@ -1,5 +1,5 @@
-# sys_types_h.m4 serial 9
-dnl Copyright (C) 2011-2020 Free Software Foundation, Inc.
+# sys_types_h.m4 serial 11
+dnl Copyright (C) 2011-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -36,25 +36,23 @@ AC_DEFUN([gl_SYS_TYPES_H_DEFAULTS],
 
 # This works around a buggy version in autoconf <= 2.69.
 # See <https://lists.gnu.org/r/autoconf/2016-08/msg00014.html>
+# The 2.70 version isn't quoted properly, so override it too.
 
-m4_version_prereq([2.70], [], [
-
-# This is taken from the following Autoconf patch:
-# https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=e17a30e987d7ee695fb4294a82d987ec3dc9b974
+m4_version_prereq([2.70.1], [], [
 
 m4_undefine([AC_HEADER_MAJOR])
 AC_DEFUN([AC_HEADER_MAJOR],
 [AC_CHECK_HEADERS_ONCE([sys/types.h])
 AC_CHECK_HEADER([sys/mkdev.h],
-  [AC_DEFINE([MAJOR_IN_MKDEV], [1],
-    [Define to 1 if `major', `minor', and `makedev' are declared in
-     <mkdev.h>.])])
+                [AC_DEFINE([MAJOR_IN_MKDEV], [1],
+                           [Define to 1 if `major', `minor', and `makedev' are
+                            declared in <mkdev.h>.])])
 if test $ac_cv_header_sys_mkdev_h = no; then
   AC_CHECK_HEADER([sys/sysmacros.h],
-    [AC_DEFINE([MAJOR_IN_SYSMACROS], [1],
-      [Define to 1 if `major', `minor', and `makedev' are declared in
-       <sysmacros.h>.])])
+                  [AC_DEFINE([MAJOR_IN_SYSMACROS], [1],
+                             [Define to 1 if `major', `minor', and `makedev'
+                              are declared in <sysmacros.h>.])])
 fi
-])
+])# AC_HEADER_MAJOR
 
 ])
index a255dea98f3af305b0d786ee0679abad25e3e1b0..503de4d1fd33e5ab7b7a60f1ecaf3f242869614f 100644 (file)
@@ -1,5 +1,5 @@
 # sys_uio_h.m4 serial 1
-dnl Copyright (C) 2011-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index da439f07b58e756a27836e25709d790641440343..14c796d3eb3fb89a50a7781dd5e2f44e7743593c 100644 (file)
@@ -1,6 +1,6 @@
 #serial 5
 
-# Copyright (C) 2006-2007, 2009-2020 Free Software Foundation, Inc.
+# Copyright (C) 2006-2007, 2009-2021 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
index 94441f680f5f39ef510d959e14bc66d0237cc678..20b383a88e89062cfc163672eeb727083ea6bc5a 100644 (file)
@@ -1,5 +1,5 @@
-# threadlib.m4 serial 27
-dnl Copyright (C) 2005-2020 Free Software Foundation, Inc.
+# threadlib.m4 serial 29
+dnl Copyright (C) 2005-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -398,8 +398,8 @@ AC_DEFUN([gl_THREADLIB_EARLY_BODY],
     [m4_divert_text([DEFAULTS], [gl_use_threads_default=])])
   m4_divert_text([DEFAULTS], [gl_use_winpthreads_default=])
   AC_ARG_ENABLE([threads],
-AC_HELP_STRING([--enable-threads={isoc|posix|isoc+posix|windows}], [specify multithreading API])m4_ifdef([gl_THREADLIB_DEFAULT_NO], [], [
-AC_HELP_STRING([--disable-threads], [build without multithread safety])]),
+AS_HELP_STRING([--enable-threads={isoc|posix|isoc+posix|windows}], [specify multithreading API])m4_ifdef([gl_THREADLIB_DEFAULT_NO], [], [
+AS_HELP_STRING([--disable-threads], [build without multithread safety])]),
     [gl_use_threads=$enableval],
     [if test -n "$gl_use_threads_default"; then
        gl_use_threads="$gl_use_threads_default"
@@ -486,6 +486,17 @@ AC_DEFUN([gl_THREADLIB_BODY],
               AC_DEFINE([USE_POSIX_THREADS_WEAK], [1],
                 [Define if references to the POSIX multithreading library should be made weak.])
               LIBTHREAD= LTLIBTHREAD=
+            else
+              case "$host_os" in
+                freebsd* | dragonfly*)
+                  if test "x$LIBTHREAD" != "x$LIBMULTITHREAD"; then
+                    dnl If weak symbols can't tell whether pthread_create(), pthread_key_create()
+                    dnl etc. will succeed, we need a runtime test.
+                    AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], [1],
+                      [Define if the pthread_in_use() detection is hard.])
+                  fi
+                  ;;
+              esac
             fi
           fi
         fi
index d0f89327c4b904212331fc65ea877809b74c5a10..b6a1aa3bc0f07e6ec9b5de21ec0c0fdbcb5902be 100644 (file)
@@ -1,8 +1,8 @@
 # Configure a more-standard replacement for <time.h>.
 
-# Copyright (C) 2000-2001, 2003-2007, 2009-2020 Free Software Foundation, Inc.
+# Copyright (C) 2000-2001, 2003-2007, 2009-2021 Free Software Foundation, Inc.
 
-# serial 12
+# serial 15
 
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -25,6 +25,22 @@ AC_DEFUN([gl_HEADER_TIME_H_BODY],
   AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC])
 
   AC_REQUIRE([AC_C_RESTRICT])
+
+  AC_CACHE_CHECK([for TIME_UTC in <time.h>],
+    [gl_cv_time_h_has_TIME_UTC],
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <time.h>
+          ]],
+          [[static int x = TIME_UTC; x++;]])],
+       [gl_cv_time_h_has_TIME_UTC=yes],
+       [gl_cv_time_h_has_TIME_UTC=no])])
+  if test $gl_cv_time_h_has_TIME_UTC = yes; then
+    TIME_H_DEFINES_TIME_UTC=1
+  else
+    TIME_H_DEFINES_TIME_UTC=0
+  fi
+  AC_SUBST([TIME_H_DEFINES_TIME_UTC])
 ])
 
 dnl Check whether 'struct timespec' is declared
@@ -113,15 +129,18 @@ AC_DEFUN([gl_HEADER_TIME_H_DEFAULTS],
   GNULIB_STRFTIME=0;                     AC_SUBST([GNULIB_STRFTIME])
   GNULIB_STRPTIME=0;                     AC_SUBST([GNULIB_STRPTIME])
   GNULIB_TIMEGM=0;                       AC_SUBST([GNULIB_TIMEGM])
+  GNULIB_TIMESPEC_GET=0;                 AC_SUBST([GNULIB_TIMESPEC_GET])
   GNULIB_TIME_R=0;                       AC_SUBST([GNULIB_TIME_R])
   GNULIB_TIME_RZ=0;                      AC_SUBST([GNULIB_TIME_RZ])
   GNULIB_TZSET=0;                        AC_SUBST([GNULIB_TZSET])
+  dnl Support Microsoft deprecated alias function names by default.
+  GNULIB_MDA_TZSET=1;                    AC_SUBST([GNULIB_MDA_TZSET])
   dnl Assume proper GNU behavior unless another module says otherwise.
   HAVE_DECL_LOCALTIME_R=1;               AC_SUBST([HAVE_DECL_LOCALTIME_R])
   HAVE_NANOSLEEP=1;                      AC_SUBST([HAVE_NANOSLEEP])
   HAVE_STRPTIME=1;                       AC_SUBST([HAVE_STRPTIME])
   HAVE_TIMEGM=1;                         AC_SUBST([HAVE_TIMEGM])
-  HAVE_TZSET=1;                          AC_SUBST([HAVE_TZSET])
+  HAVE_TIMESPEC_GET=1;                   AC_SUBST([HAVE_TIMESPEC_GET])
   dnl Even GNU libc does not have timezone_t yet.
   HAVE_TIMEZONE_T=0;                     AC_SUBST([HAVE_TIMEZONE_T])
   dnl If another module says to replace or to not replace, do that.
index 0e86d4496c5839229878aadd084a1dc8e85214c0..713e93ac263868969848bcaadb360c9f0a6f6f21 100644 (file)
@@ -1,6 +1,6 @@
 dnl Reentrant time functions: localtime_r, gmtime_r.
 
-dnl Copyright (C) 2003, 2006-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2006-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 65dfdf209447777b264171d8a72d2db950b10fb3..c205446fae70b6679211c1a85df47d02d5eba27f 100644 (file)
@@ -1,5 +1,5 @@
 #serial 9
-dnl Copyright (C) 2002, 2005-2006, 2009-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2005-2006, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index dfa38f85d60151e19884a45455afd68ff51f2e1e..0f26fb908d356f45b590ac2c18426a42f868227a 100644 (file)
@@ -1,5 +1,5 @@
-# unistd_h.m4 serial 80
-dnl Copyright (C) 2006-2020 Free Software Foundation, Inc.
+# unistd_h.m4 serial 85
+dnl Copyright (C) 2006-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -41,7 +41,9 @@ AC_DEFUN([gl_UNISTD_H],
 #  include <io.h>
 # endif
 #endif
-    ]], [access chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir
+    ]], [access chdir chown copy_file_range dup dup2 dup3 environ euidaccess
+    execl execle execlp execv execve execvp execvpe
+    faccessat fchdir
     fchownat fdatasync fsync ftruncate getcwd getdomainname getdtablesize
     getentropy getgroups gethostname getlogin getlogin_r getpagesize getpass
     getusershell setusershell endusershell
@@ -50,6 +52,11 @@ AC_DEFUN([gl_UNISTD_H],
     truncate ttyname_r unlink unlinkat usleep])
 
   AC_REQUIRE([AC_C_RESTRICT])
+
+  AC_CHECK_DECLS_ONCE([execvpe])
+  if test $ac_cv_have_decl_execvpe = no; then
+    HAVE_DECL_EXECVPE=0
+  fi
 ])
 
 AC_DEFUN([gl_UNISTD_MODULE_INDICATOR],
@@ -73,6 +80,13 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
   GNULIB_DUP3=0;                 AC_SUBST([GNULIB_DUP3])
   GNULIB_ENVIRON=0;              AC_SUBST([GNULIB_ENVIRON])
   GNULIB_EUIDACCESS=0;           AC_SUBST([GNULIB_EUIDACCESS])
+  GNULIB_EXECL=0;                AC_SUBST([GNULIB_EXECL])
+  GNULIB_EXECLE=0;               AC_SUBST([GNULIB_EXECLE])
+  GNULIB_EXECLP=0;               AC_SUBST([GNULIB_EXECLP])
+  GNULIB_EXECV=0;                AC_SUBST([GNULIB_EXECV])
+  GNULIB_EXECVE=0;               AC_SUBST([GNULIB_EXECVE])
+  GNULIB_EXECVP=0;               AC_SUBST([GNULIB_EXECVP])
+  GNULIB_EXECVPE=0;              AC_SUBST([GNULIB_EXECVPE])
   GNULIB_FACCESSAT=0;            AC_SUBST([GNULIB_FACCESSAT])
   GNULIB_FCHDIR=0;               AC_SUBST([GNULIB_FCHDIR])
   GNULIB_FCHOWNAT=0;             AC_SUBST([GNULIB_FCHOWNAT])
@@ -117,12 +131,34 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
   GNULIB_UNLINKAT=0;             AC_SUBST([GNULIB_UNLINKAT])
   GNULIB_USLEEP=0;               AC_SUBST([GNULIB_USLEEP])
   GNULIB_WRITE=0;                AC_SUBST([GNULIB_WRITE])
+  dnl Support Microsoft deprecated alias function names by default.
+  GNULIB_MDA_ACCESS=1;           AC_SUBST([GNULIB_MDA_ACCESS])
+  GNULIB_MDA_CHDIR=1;            AC_SUBST([GNULIB_MDA_CHDIR])
+  GNULIB_MDA_CLOSE=1;            AC_SUBST([GNULIB_MDA_CLOSE])
+  GNULIB_MDA_DUP=1;              AC_SUBST([GNULIB_MDA_DUP])
+  GNULIB_MDA_DUP2=1;             AC_SUBST([GNULIB_MDA_DUP2])
+  GNULIB_MDA_EXECL=1;            AC_SUBST([GNULIB_MDA_EXECL])
+  GNULIB_MDA_EXECLE=1;           AC_SUBST([GNULIB_MDA_EXECLE])
+  GNULIB_MDA_EXECLP=1;           AC_SUBST([GNULIB_MDA_EXECLP])
+  GNULIB_MDA_EXECV=1;            AC_SUBST([GNULIB_MDA_EXECV])
+  GNULIB_MDA_EXECVE=1;           AC_SUBST([GNULIB_MDA_EXECVE])
+  GNULIB_MDA_EXECVP=1;           AC_SUBST([GNULIB_MDA_EXECVP])
+  GNULIB_MDA_EXECVPE=1;          AC_SUBST([GNULIB_MDA_EXECVPE])
+  GNULIB_MDA_GETCWD=1;           AC_SUBST([GNULIB_MDA_GETCWD])
+  GNULIB_MDA_GETPID=1;           AC_SUBST([GNULIB_MDA_GETPID])
+  GNULIB_MDA_ISATTY=1;           AC_SUBST([GNULIB_MDA_ISATTY])
+  GNULIB_MDA_LSEEK=1;            AC_SUBST([GNULIB_MDA_LSEEK])
+  GNULIB_MDA_READ=1;             AC_SUBST([GNULIB_MDA_READ])
+  GNULIB_MDA_RMDIR=1;            AC_SUBST([GNULIB_MDA_RMDIR])
+  GNULIB_MDA_SWAB=1;             AC_SUBST([GNULIB_MDA_SWAB])
+  GNULIB_MDA_UNLINK=1;           AC_SUBST([GNULIB_MDA_UNLINK])
+  GNULIB_MDA_WRITE=1;            AC_SUBST([GNULIB_MDA_WRITE])
   dnl Assume proper GNU behavior unless another module says otherwise.
   HAVE_CHOWN=1;           AC_SUBST([HAVE_CHOWN])
   HAVE_COPY_FILE_RANGE=1; AC_SUBST([HAVE_COPY_FILE_RANGE])
-  HAVE_DUP2=1;            AC_SUBST([HAVE_DUP2])
   HAVE_DUP3=1;            AC_SUBST([HAVE_DUP3])
   HAVE_EUIDACCESS=1;      AC_SUBST([HAVE_EUIDACCESS])
+  HAVE_EXECVPE=1;         AC_SUBST([HAVE_EXECVPE])
   HAVE_FACCESSAT=1;       AC_SUBST([HAVE_FACCESSAT])
   HAVE_FCHDIR=1;          AC_SUBST([HAVE_FCHDIR])
   HAVE_FCHOWNAT=1;        AC_SUBST([HAVE_FCHOWNAT])
@@ -153,6 +189,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
   HAVE_UNLINKAT=1;        AC_SUBST([HAVE_UNLINKAT])
   HAVE_USLEEP=1;          AC_SUBST([HAVE_USLEEP])
   HAVE_DECL_ENVIRON=1;    AC_SUBST([HAVE_DECL_ENVIRON])
+  HAVE_DECL_EXECVPE=1;    AC_SUBST([HAVE_DECL_EXECVPE])
   HAVE_DECL_FCHDIR=1;     AC_SUBST([HAVE_DECL_FCHDIR])
   HAVE_DECL_FDATASYNC=1;  AC_SUBST([HAVE_DECL_FDATASYNC])
   HAVE_DECL_GETDOMAINNAME=1; AC_SUBST([HAVE_DECL_GETDOMAINNAME])
@@ -170,6 +207,13 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
   REPLACE_CLOSE=0;        AC_SUBST([REPLACE_CLOSE])
   REPLACE_DUP=0;          AC_SUBST([REPLACE_DUP])
   REPLACE_DUP2=0;         AC_SUBST([REPLACE_DUP2])
+  REPLACE_EXECL=0;        AC_SUBST([REPLACE_EXECL])
+  REPLACE_EXECLE=0;       AC_SUBST([REPLACE_EXECLE])
+  REPLACE_EXECLP=0;       AC_SUBST([REPLACE_EXECLP])
+  REPLACE_EXECV=0;        AC_SUBST([REPLACE_EXECV])
+  REPLACE_EXECVE=0;       AC_SUBST([REPLACE_EXECVE])
+  REPLACE_EXECVP=0;       AC_SUBST([REPLACE_EXECVP])
+  REPLACE_EXECVPE=0;      AC_SUBST([REPLACE_EXECVPE])
   REPLACE_FACCESSAT=0;    AC_SUBST([REPLACE_FACCESSAT])
   REPLACE_FCHOWNAT=0;     AC_SUBST([REPLACE_FCHOWNAT])
   REPLACE_FTRUNCATE=0;    AC_SUBST([REPLACE_FTRUNCATE])
index 9f493babb9acd2f055f9a011fe9f81436b86b0a7..6e4b461507b1fcc6c51907ed45d8278fa412efec 100644 (file)
@@ -1,5 +1,5 @@
 # visibility.m4 serial 6
-dnl Copyright (C) 2005, 2008, 2010-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2008, 2010-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 5c8ee45092d7606117420a40b464633cc75ee672..04edfe85d4997bfa7cae88033ae3e54fffc00f58 100644 (file)
@@ -1,5 +1,5 @@
-# warn-on-use.m4 serial 6
-dnl Copyright (C) 2010-2020 Free Software Foundation, Inc.
+# warn-on-use.m4 serial 9
+dnl Copyright (C) 2010-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -30,17 +30,15 @@ AC_DEFUN([gl_WARN_ON_USE_PREPARE],
        [AH_TEMPLATE([HAVE_RAW_DECL_]AS_TR_CPP(m4_defn([gl_decl])),
          [Define to 1 if ]m4_defn([gl_decl])[ is declared even after
           undefining macros.])])dnl
-dnl FIXME: gl_Symbol must be used unquoted until we can assume
-dnl autoconf 2.64 or newer.
      for gl_func in m4_flatten([$2]); do
        AS_VAR_PUSHDEF([gl_Symbol], [gl_cv_have_raw_decl_$gl_func])dnl
        AC_CACHE_CHECK([whether $gl_func is declared without a macro],
-         gl_Symbol,
+         [gl_Symbol],
          [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$1],
-[@%:@undef $gl_func
-  (void) $gl_func;])],
-           [AS_VAR_SET(gl_Symbol, [yes])], [AS_VAR_SET(gl_Symbol, [no])])])
-       AS_VAR_IF(gl_Symbol, [yes],
+[[#undef $gl_func
+  (void) $gl_func;]])],
+           [AS_VAR_SET([gl_Symbol], [yes])], [AS_VAR_SET([gl_Symbol], [no])])])
+       AS_VAR_IF([gl_Symbol], [yes],
          [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_RAW_DECL_$gl_func]), [1])
           dnl shortcut - if the raw declaration exists, then set a cache
           dnl variable to allow skipping any later AC_CHECK_DECL efforts
index 6c4e8a6c4aff3930693ea2e432192967aa8e1d2f..59c55fcda0284af6b430e831e82a922b091910d7 100644 (file)
@@ -1,13 +1,13 @@
 dnl A placeholder for ISO C99 <wchar.h>, for platforms that have issues.
 
-dnl Copyright (C) 2007-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
 dnl Written by Eric Blake.
 
-# wchar_h.m4 serial 46
+# wchar_h.m4 serial 50
 
 AC_DEFUN([gl_WCHAR_H],
 [
@@ -40,16 +40,7 @@ AC_DEFUN([gl_WCHAR_H],
   dnl Check for declarations of anything we want to poison if the
   dnl corresponding gnulib module is not in use.
   gl_WARN_ON_USE_PREPARE([[
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#if !(defined __GLIBC__ && !defined __UCLIBC__)
-# include <stddef.h>
-# include <stdio.h>
-# include <time.h>
-#endif
-#include <wchar.h>
+      #include <wchar.h>
     ]],
     [btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb
      wcsrtombs wcsnrtombs wcwidth
@@ -60,6 +51,13 @@ AC_DEFUN([gl_WCHAR_H],
     ])
 
   AC_REQUIRE([AC_C_RESTRICT])
+
+  AC_CHECK_DECLS([wcsdup], [], [], [[
+      #include <wchar.h>
+    ]])
+  if test $ac_cv_have_decl_wcsdup = no; then
+    HAVE_DECL_WCSDUP=0
+  fi
 ])
 
 dnl Check whether <wchar.h> is usable at all.
@@ -70,56 +68,49 @@ AC_DEFUN([gl_WCHAR_H_INLINE_OK],
   dnl and <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42440>. In summary,
   dnl glibc version 2.5 or older, together with gcc version 4.3 or newer and
   dnl the option -std=c99 or -std=gnu99, leads to a broken <wchar.h>.
+  AC_REQUIRE([AC_CANONICAL_HOST])
   AC_CACHE_CHECK([whether <wchar.h> uses 'inline' correctly],
     [gl_cv_header_wchar_h_correct_inline],
     [gl_cv_header_wchar_h_correct_inline=yes
-     AC_LANG_CONFTEST([
-       AC_LANG_SOURCE([[#define wcstod renamed_wcstod
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-extern int zero (void);
-int main () { return zero(); }
-]])])
-     dnl Do not rename the object file from conftest.$ac_objext to
-     dnl conftest1.$ac_objext, as this will cause the link to fail on
-     dnl z/OS when using the XPLINK object format (due to duplicate
-     dnl CSECT names). Instead, temporarily redefine $ac_compile so
-     dnl that the object file has the latter name from the start.
-     save_ac_compile="$ac_compile"
-     ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
-     if echo '#include "conftest.c"' >conftest1.c &&
-        AC_TRY_EVAL([ac_compile]); then
-       AC_LANG_CONFTEST([
-         AC_LANG_SOURCE([[#define wcstod renamed_wcstod
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-int zero (void) { return 0; }
-]])])
-       dnl See note above about renaming object files.
-       ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
-       if echo '#include "conftest.c"' >conftest2.c &&
-          AC_TRY_EVAL([ac_compile]); then
-         if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&AS_MESSAGE_LOG_FD 2>&1; then
-           :
-         else
-           gl_cv_header_wchar_h_correct_inline=no
+     case "$host_os" in
+       *-gnu* | gnu*)
+         AC_LANG_CONFTEST([
+           AC_LANG_SOURCE([[
+             #define wcstod renamed_wcstod
+             #include <wchar.h>
+             extern int zero (void);
+             int main () { return zero(); }
+           ]])])
+         dnl Do not rename the object file from conftest.$ac_objext to
+         dnl conftest1.$ac_objext, as this will cause the link to fail on
+         dnl z/OS when using the XPLINK object format (due to duplicate
+         dnl CSECT names). Instead, temporarily redefine $ac_compile so
+         dnl that the object file has the latter name from the start.
+         save_ac_compile="$ac_compile"
+         ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
+         if echo '#include "conftest.c"' >conftest1.c \
+            && AC_TRY_EVAL([ac_compile]); then
+           AC_LANG_CONFTEST([
+             AC_LANG_SOURCE([[
+               #define wcstod renamed_wcstod
+               #include <wchar.h>
+               int zero (void) { return 0; }
+             ]])])
+           dnl See note above about renaming object files.
+           ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
+           if echo '#include "conftest.c"' >conftest2.c \
+              && AC_TRY_EVAL([ac_compile]); then
+             if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&AS_MESSAGE_LOG_FD 2>&1; then
+               :
+             else
+               gl_cv_header_wchar_h_correct_inline=no
+             fi
+           fi
          fi
-       fi
-     fi
-     ac_compile="$save_ac_compile"
-     rm -f conftest[12].c conftest[12].$ac_objext conftest$ac_exeext
+         ac_compile="$save_ac_compile"
+         rm -f conftest[12].c conftest[12].$ac_objext conftest$ac_exeext
+         ;;
+     esac
     ])
   if test $gl_cv_header_wchar_h_correct_inline = no; then
     AC_MSG_ERROR([<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
@@ -186,6 +177,8 @@ AC_DEFUN([gl_WCHAR_H_DEFAULTS],
   GNULIB_WCSTOK=0;      AC_SUBST([GNULIB_WCSTOK])
   GNULIB_WCSWIDTH=0;    AC_SUBST([GNULIB_WCSWIDTH])
   GNULIB_WCSFTIME=0;    AC_SUBST([GNULIB_WCSFTIME])
+  dnl Support Microsoft deprecated alias function names by default.
+  GNULIB_MDA_WCSDUP=1;  AC_SUBST([GNULIB_MDA_WCSDUP])
   dnl Assume proper GNU behavior unless another module says otherwise.
   HAVE_BTOWC=1;         AC_SUBST([HAVE_BTOWC])
   HAVE_MBSINIT=1;       AC_SUBST([HAVE_MBSINIT])
@@ -227,6 +220,7 @@ AC_DEFUN([gl_WCHAR_H_DEFAULTS],
   HAVE_WCSWIDTH=1;      AC_SUBST([HAVE_WCSWIDTH])
   HAVE_WCSFTIME=1;      AC_SUBST([HAVE_WCSFTIME])
   HAVE_DECL_WCTOB=1;    AC_SUBST([HAVE_DECL_WCTOB])
+  HAVE_DECL_WCSDUP=1;   AC_SUBST([HAVE_DECL_WCSDUP])
   HAVE_DECL_WCWIDTH=1;  AC_SUBST([HAVE_DECL_WCWIDTH])
   REPLACE_MBSTATE_T=0;  AC_SUBST([REPLACE_MBSTATE_T])
   REPLACE_BTOWC=0;      AC_SUBST([REPLACE_BTOWC])
index e48d4649322d82f9ddbc165775bc7606dd8a3d8d..34db10e5cc0112ff2b97d6c113894a0e42c21f1a 100644 (file)
@@ -1,5 +1,5 @@
 # wchar_t.m4 serial 4 (gettext-0.18.2)
-dnl Copyright (C) 2002-2003, 2008-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2008-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 5c844b60a97cda052b4a3e19250622f63867d589..1ab0bc985af3019e5cef484e70bbcd359d030a77 100644 (file)
@@ -1,8 +1,8 @@
-# wctype_h.m4 serial 24
+# wctype_h.m4 serial 26
 
 dnl A placeholder for ISO C99 <wctype.h>, for platforms that lack it.
 
-dnl Copyright (C) 2006-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -41,13 +41,6 @@ AC_DEFUN([gl_WCTYPE_H],
         [
           AC_RUN_IFELSE(
             [AC_LANG_SOURCE([[
-               /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
-                  included before <wchar.h>.
-                  BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
-                  must be included before <wchar.h>.  */
-               #include <stddef.h>
-               #include <stdio.h>
-               #include <time.h>
                #include <wchar.h>
                #include <wctype.h>
                int main () { return iswprint ('x') == 0; }
@@ -57,7 +50,7 @@ AC_DEFUN([gl_WCTYPE_H],
              AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>
                           #if __GNU_LIBRARY__ == 1
                           Linux libc5 i18n is broken.
-                          #endif]], [])],
+                          #endif]], [[]])],
               [gl_cv_func_iswcntrl_works="guessing yes"],
               [gl_cv_func_iswcntrl_works="guessing no"])
             ])
@@ -92,14 +85,7 @@ AC_DEFUN([gl_WCTYPE_H],
       REPLACE_TOWLOWER=0
     else
       AC_CHECK_DECLS([towlower],,,
-        [[/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
-             included before <wchar.h>.
-             BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
-             must be included before <wchar.h>.  */
-          #include <stddef.h>
-          #include <stdio.h>
-          #include <time.h>
-          #include <wchar.h>
+        [[#include <wchar.h>
           #if HAVE_WCTYPE_H
           # include <wctype.h>
           #endif
@@ -128,14 +114,7 @@ AC_DEFUN([gl_WCTYPE_H],
   AC_CACHE_CHECK([for wctype_t], [gl_cv_type_wctype_t],
     [AC_COMPILE_IFELSE(
        [AC_LANG_PROGRAM(
-          [[/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
-               included before <wchar.h>.
-               BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
-               must be included before <wchar.h>.  */
-            #include <stddef.h>
-            #include <stdio.h>
-            #include <time.h>
-            #include <wchar.h>
+          [[#include <wchar.h>
             #if HAVE_WCTYPE_H
             # include <wctype.h>
             #endif
@@ -154,14 +133,7 @@ AC_DEFUN([gl_WCTYPE_H],
   AC_CACHE_CHECK([for wctrans_t], [gl_cv_type_wctrans_t],
     [AC_COMPILE_IFELSE(
        [AC_LANG_PROGRAM(
-          [[/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
-               included before <wchar.h>.
-               BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
-               must be included before <wchar.h>.  */
-            #include <stddef.h>
-            #include <stdio.h>
-            #include <time.h>
-            #include <wchar.h>
+          [[#include <wchar.h>
             #include <wctype.h>
             wctrans_t a;
           ]],
@@ -176,14 +148,7 @@ AC_DEFUN([gl_WCTYPE_H],
   dnl Check for declarations of anything we want to poison if the
   dnl corresponding gnulib module is not in use.
   gl_WARN_ON_USE_PREPARE([[
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
 #if !(defined __GLIBC__ && !defined __UCLIBC__)
-# include <stddef.h>
-# include <stdio.h>
-# include <time.h>
 # include <wchar.h>
 #endif
 #include <wctype.h>
index 5e6c1780a2316641f44774058bbff6b6fea81f26..2fc7467f4228d6a654d1b02ef0e2703a4c88b6f0 100644 (file)
@@ -1,5 +1,5 @@
-# wint_t.m4 serial 8
-dnl Copyright (C) 2003, 2007-2020 Free Software Foundation, Inc.
+# wint_t.m4 serial 10
+dnl Copyright (C) 2003, 2007-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -14,15 +14,7 @@ AC_DEFUN([gt_TYPE_WINT_T],
   AC_CACHE_CHECK([for wint_t], [gt_cv_c_wint_t],
     [AC_COMPILE_IFELSE(
        [AC_LANG_PROGRAM(
-          [[
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
-   before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
+          [[#include <wchar.h>
             wint_t foo = (wchar_t)'\0';]],
           [[]])],
        [gt_cv_c_wint_t=yes],
@@ -32,25 +24,16 @@ AC_DEFUN([gt_TYPE_WINT_T],
 
     dnl Determine whether gnulib's <wchar.h> or <wctype.h> would, if present,
     dnl override 'wint_t'.
-    AC_CACHE_CHECK([whether wint_t is too small],
-      [gl_cv_type_wint_t_too_small],
+    AC_CACHE_CHECK([whether wint_t is large enough],
+      [gl_cv_type_wint_t_large_enough],
       [AC_COMPILE_IFELSE(
-         [AC_LANG_PROGRAM([[
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#if !(defined __GLIBC__ && !defined __UCLIBC__)
-# include <stddef.h>
-# include <stdio.h>
-# include <time.h>
-#endif
-#include <wchar.h>
-            int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
+         [AC_LANG_PROGRAM(
+            [[#include <wchar.h>
+              int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
             ]])],
-         [gl_cv_type_wint_t_too_small=no],
-         [gl_cv_type_wint_t_too_small=yes])])
-    if test $gl_cv_type_wint_t_too_small = yes; then
+         [gl_cv_type_wint_t_large_enough=yes],
+         [gl_cv_type_wint_t_large_enough=no])])
+    if test $gl_cv_type_wint_t_large_enough = no; then
       GNULIB_OVERRIDES_WINT_T=1
     else
       GNULIB_OVERRIDES_WINT_T=0
index 62bd89ca54d92426c6dcb4e9d098368d98d0b3a0..a5b4eb7b260c6edf86614771a5efbea2453e2c47 100644 (file)
@@ -1,5 +1,5 @@
-# wmemchr.m4 serial 4
-dnl Copyright (C) 2011-2020 Free Software Foundation, Inc.
+# wmemchr.m4 serial 5
+dnl Copyright (C) 2011-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -11,16 +11,9 @@ AC_DEFUN([gl_FUNC_WMEMCHR],
   dnl provide this function as an inline function definition.
   AC_CACHE_CHECK([for wmemchr], [gl_cv_func_wmemchr],
     [AC_LINK_IFELSE(
-       [AC_LANG_PROGRAM([[
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
-   before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-]],
+       [AC_LANG_PROGRAM(
+          [[#include <wchar.h>
+          ]],
           [[return ! wmemchr ((const wchar_t *) 0, (wchar_t) ' ', 0);]])
        ],
        [gl_cv_func_wmemchr=yes],
index 1795fc835bb531ed29aea18c723b325d6aa80ffa..9d774ae77cc0d85f69e556a49c09dd23ec88d0b4 100644 (file)
@@ -1,5 +1,5 @@
 # wmempcpy.m4 serial 1
-dnl Copyright (C) 2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2020-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 98fa68f51a6bf7326206726f1174fd39695d864c..b9533847cb7542eaf1765799d7351d1090c64fab 100644 (file)
@@ -1,5 +1,5 @@
 # zzgnulib.m4 serial 1
-dnl Copyright (C) 2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2020-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 7232f1e38afb31f1c92f5b96c38c5e1c8bd1330f..b59e64b817e2f74e1ce029f6327defd0453565cc 100644 (file)
@@ -1,6 +1,6 @@
 /* malloc() function that is glibc compatible.
 
-   Copyright (C) 1997-1998, 2006-2007, 2009-2020 Free Software Foundation, Inc.
+   Copyright (C) 1997-1998, 2006-2007, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index b40478637c844415bc3da6dcc3449baa25fe38e8..26e306212d127858183039528319c90bb8e1af6a 100644 (file)
@@ -1,5 +1,5 @@
 /* Variable-sized buffer with on-stack default allocation.
-   Copyright (C) 2015-2020 Free Software Foundation, Inc.
+   Copyright (C) 2015-2021 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -132,4 +132,20 @@ scratch_buffer_set_array_size (struct scratch_buffer *buffer,
                         (buffer, nelem, size));
 }
 
+/* Return a copy of *BUFFER's first SIZE bytes as a heap-allocated block,
+   deallocating *BUFFER if it was heap-allocated.  SIZE must be at
+   most *BUFFER's size.  Return NULL (setting errno) on memory
+   exhaustion.  */
+void *__libc_scratch_buffer_dupfree (struct scratch_buffer *buffer,
+                                     size_t size);
+libc_hidden_proto (__libc_scratch_buffer_dupfree)
+
+/* Alias for __libc_scratch_dupfree.  */
+static __always_inline void *
+scratch_buffer_dupfree (struct scratch_buffer *buffer, size_t size)
+{
+  void *r = __libc_scratch_buffer_dupfree (buffer, size);
+  return __glibc_likely (r != NULL) ? r : NULL;
+}
+
 #endif /* _SCRATCH_BUFFER_H */
diff --git a/gnulib/import/malloc/scratch_buffer_dupfree.c b/gnulib/import/malloc/scratch_buffer_dupfree.c
new file mode 100644 (file)
index 0000000..775bff5
--- /dev/null
@@ -0,0 +1,41 @@
+/* Variable-sized buffer with on-stack default allocation.
+   Copyright (C) 2020-2021 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU General Public
+   License as published by the Free Software Foundation; either
+   version 3 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#ifndef _LIBC
+# include <libc-config.h>
+#endif
+
+#include <scratch_buffer.h>
+#include <string.h>
+
+void *
+__libc_scratch_buffer_dupfree (struct scratch_buffer *buffer, size_t size)
+{
+  void *data = buffer->data;
+  if (data == buffer->__space.__c)
+    {
+      void *copy = malloc (size);
+      return copy != NULL ? memcpy (copy, data, size) : NULL;
+    }
+  else
+    {
+      void *copy = realloc (data, size);
+      return copy != NULL ? copy : data;
+    }
+}
+libc_hidden_def (__libc_scratch_buffer_dupfree)
index 41befe3d65fbf0d5ef7391700657b2d032bb9335..e7606d81cd7d27f176f831e375b90f1b7bf9b4c7 100644 (file)
@@ -1,5 +1,5 @@
 /* Variable-sized buffer with on-stack default allocation.
-   Copyright (C) 2015-2020 Free Software Foundation, Inc.
+   Copyright (C) 2015-2021 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
index aef232938d5c11f3cccb4ae4c38e3bef3bfa6321..59f8c710001fef422da4499cc2c27d3d2ef0e692 100644 (file)
@@ -1,5 +1,5 @@
 /* Variable-sized buffer with on-stack default allocation.
-   Copyright (C) 2015-2020 Free Software Foundation, Inc.
+   Copyright (C) 2015-2021 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
index 5f5e4c24f5a9bd88e60e186c03b8abf07a60bfef..e2b9f31211abb51d9048b0907139ac2125db2c8d 100644 (file)
@@ -1,5 +1,5 @@
 /* Variable-sized buffer with on-stack default allocation.
-   Copyright (C) 2015-2020 Free Software Foundation, Inc.
+   Copyright (C) 2015-2021 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
index 975b166daeda41cc5ceea3944a866fa26f5e8d6c..7131cb7ff24d8b0c186b066790d277a53ae81b71 100644 (file)
@@ -1,5 +1,5 @@
 /* Safe automatic memory allocation.
-   Copyright (C) 2003, 2006-2007, 2009-2020 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2006-2007, 2009-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2003, 2018.
 
    This program is free software; you can redistribute it and/or modify
index cfcd4de4ad81a0b3c1e1152f4a160c4425480c9a..a04e54593faaa39495c7c218bada06f17e36dd25 100644 (file)
@@ -1,5 +1,5 @@
 /* Safe automatic memory allocation.
-   Copyright (C) 2003-2007, 2009-2020 Free Software Foundation, Inc.
+   Copyright (C) 2003-2007, 2009-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2003.
 
    This program is free software; you can redistribute it and/or modify
@@ -89,7 +89,7 @@ extern void freea (void *p);
 /* ------------------- Auxiliary, non-public definitions ------------------- */
 
 /* Determine the alignment of a type at compile time.  */
-#if defined __GNUC__ || defined __IBM__ALIGNOF__
+#if defined __GNUC__ || defined __clang__ || defined __IBM__ALIGNOF__
 # define sa_alignof __alignof__
 #elif defined __cplusplus
   template <class type> struct sa_alignof_helper { char __slot1; type __slot2; };
index 30465f8b2efd85c721185f691d79b3e3718bf7e7..6208a015eadd10219691054ef7b105933411387c 100644 (file)
@@ -1,6 +1,6 @@
 /* A GNU-like <math.h>.
 
-   Copyright (C) 2002-2003, 2007-2020 Free Software Foundation, Inc.
+   Copyright (C) 2002-2003, 2007-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 #endif
 @PRAGMA_COLUMNS@
 
+#if defined _GL_INCLUDING_MATH_H
+/* Special invocation convention:
+   - On FreeBSD 12.2 we have a sequence of nested includes
+     <math.h> -> <stdlib.h> -> <sys/wait.h> -> <sys/types.h> -> <sys/select.h>
+       -> <signal.h> -> <pthread.h> -> <stdlib.h> -> <math.h>
+     In this situation, the functions are not yet declared, therefore we cannot
+     provide the C++ aliases.  */
+
+#@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_MATH_H@
+
+#else
+/* Normal invocation convention.  */
+
 /* The include_next requires a split double-inclusion guard.  */
+#define _GL_INCLUDING_MATH_H
 #@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_MATH_H@
+#undef _GL_INCLUDING_MATH_H
 
 #ifndef _@GUARD_PREFIX@_MATH_H
 #define _@GUARD_PREFIX@_MATH_H
@@ -127,12 +142,6 @@ static void (*_gl_math_fix_itold) (long double *, int) = _Qp_itoq;
 #endif
 
 
-/* For clang: Use __has_builtin to determine whether a builtin is available.  */
-#ifndef __has_builtin
-# define __has_builtin(name) 0
-#endif
-
-
 /* POSIX allows platforms that don't support NAN.  But all major
    machines in the past 15 years have supported something close to
    IEEE NaN, so we define this unconditionally.  We also must define
@@ -261,7 +270,9 @@ _GL_WARN_ON_USE (acosf, "acosf is unportable - "
 _GL_FUNCDECL_SYS (acosl, long double, (long double x));
 # endif
 _GL_CXXALIAS_SYS (acosl, long double, (long double x));
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (acosl);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef acosl
 # if HAVE_RAW_DECL_ACOSL
@@ -301,7 +312,9 @@ _GL_WARN_ON_USE (asinf, "asinf is unportable - "
 _GL_FUNCDECL_SYS (asinl, long double, (long double x));
 # endif
 _GL_CXXALIAS_SYS (asinl, long double, (long double x));
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (asinl);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef asinl
 # if HAVE_RAW_DECL_ASINL
@@ -341,7 +354,9 @@ _GL_WARN_ON_USE (atanf, "atanf is unportable - "
 _GL_FUNCDECL_SYS (atanl, long double, (long double x));
 # endif
 _GL_CXXALIAS_SYS (atanl, long double, (long double x));
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (atanl);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef atanl
 # if HAVE_RAW_DECL_ATANL
@@ -405,7 +420,7 @@ _GL_FUNCDECL_SYS (cbrt, double, (double x));
 # endif
 _GL_CXXALIAS_SYS (cbrt, double, (double x));
 # if __GLIBC__ >= 2
-_GL_CXXALIASWARN (cbrt);
+_GL_CXXALIASWARN1 (cbrt, double, (double x));
 # endif
 #elif defined GNULIB_POSIXCHECK
 # undef cbrt
@@ -475,7 +490,7 @@ _GL_CXXALIAS_RPL (ceil, double, (double x));
 _GL_CXXALIAS_SYS (ceil, double, (double x));
 # endif
 # if __GLIBC__ >= 2
-_GL_CXXALIASWARN (ceil);
+_GL_CXXALIASWARN1 (ceil, double, (double x));
 # endif
 #endif
 
@@ -494,7 +509,9 @@ _GL_FUNCDECL_SYS (ceill, long double, (long double x));
 #  endif
 _GL_CXXALIAS_SYS (ceill, long double, (long double x));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (ceill);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef ceill
 # if HAVE_RAW_DECL_CEILL
@@ -525,7 +542,7 @@ _GL_FUNCDECL_SYS (copysign, double, (double x, double y));
 # endif
 _GL_CXXALIAS_SYS (copysign, double, (double x, double y));
 # if __GLIBC__ >= 2
-_GL_CXXALIASWARN (copysign);
+_GL_CXXALIASWARN1 (copysign, double, (double x, double y));
 # endif
 #elif defined GNULIB_POSIXCHECK
 # undef copysign
@@ -580,7 +597,9 @@ _GL_WARN_ON_USE (cosf, "cosf is unportable - "
 _GL_FUNCDECL_SYS (cosl, long double, (long double x));
 # endif
 _GL_CXXALIAS_SYS (cosl, long double, (long double x));
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (cosl);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef cosl
 # if HAVE_RAW_DECL_COSL
@@ -654,7 +673,9 @@ _GL_FUNCDECL_SYS (expl, long double, (long double x));
 #  endif
 _GL_CXXALIAS_SYS (expl, long double, (long double x));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (expl);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef expl
 # if HAVE_RAW_DECL_EXPL
@@ -693,7 +714,7 @@ _GL_FUNCDECL_SYS (exp2, double, (double x));
 _GL_CXXALIAS_SYS (exp2, double, (double x));
 # endif
 # if __GLIBC__ >= 2
-_GL_CXXALIASWARN (exp2);
+_GL_CXXALIASWARN1 (exp2, double, (double x));
 # endif
 #elif defined GNULIB_POSIXCHECK
 # undef exp2
@@ -766,7 +787,7 @@ _GL_FUNCDECL_SYS (expm1, double, (double x));
 _GL_CXXALIAS_SYS (expm1, double, (double x));
 # endif
 # if __GLIBC__ >= 2
-_GL_CXXALIASWARN (expm1);
+_GL_CXXALIASWARN1 (expm1, double, (double x));
 # endif
 #elif defined GNULIB_POSIXCHECK
 # undef expm1
@@ -809,7 +830,9 @@ _GL_WARN_ON_USE (expm1l, "expm1l is unportable - "
 _GL_FUNCDECL_SYS (fabsf, float, (float x));
 # endif
 _GL_CXXALIAS_SYS (fabsf, float, (float x));
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (fabsf);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef fabsf
 # if HAVE_RAW_DECL_FABSF
@@ -833,7 +856,9 @@ _GL_FUNCDECL_SYS (fabsl, long double, (long double x));
 #  endif
 _GL_CXXALIAS_SYS (fabsl, long double, (long double x));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (fabsl);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef fabsl
 # if HAVE_RAW_DECL_FABSL
@@ -879,7 +904,7 @@ _GL_CXXALIAS_RPL (floor, double, (double x));
 _GL_CXXALIAS_SYS (floor, double, (double x));
 # endif
 # if __GLIBC__ >= 2
-_GL_CXXALIASWARN (floor);
+_GL_CXXALIASWARN1 (floor, double, (double x));
 # endif
 #endif
 
@@ -898,7 +923,9 @@ _GL_FUNCDECL_SYS (floorl, long double, (long double x));
 #  endif
 _GL_CXXALIAS_SYS (floorl, long double, (long double x));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (floorl);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef floorl
 # if HAVE_RAW_DECL_FLOORL
@@ -948,7 +975,7 @@ _GL_FUNCDECL_SYS (fma, double, (double x, double y, double z));
 _GL_CXXALIAS_SYS (fma, double, (double x, double y, double z));
 # endif
 # if __GLIBC__ >= 2
-_GL_CXXALIASWARN (fma);
+_GL_CXXALIASWARN1 (fma, double, (double x, double y, double z));
 # endif
 #elif defined GNULIB_POSIXCHECK
 # undef fma
@@ -1025,7 +1052,7 @@ _GL_CXXALIAS_RPL (fmod, double, (double x, double y));
 _GL_CXXALIAS_SYS (fmod, double, (double x, double y));
 # endif
 # if __GLIBC__ >= 2
-_GL_CXXALIASWARN (fmod);
+_GL_CXXALIASWARN1 (fmod, double, (double x, double y));
 # endif
 #elif defined GNULIB_POSIXCHECK
 # undef fmod
@@ -1050,7 +1077,9 @@ _GL_FUNCDECL_SYS (fmodl, long double, (long double x, long double y));
 #  endif
 _GL_CXXALIAS_SYS (fmodl, long double, (long double x, long double y));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (fmodl);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef fmodl
 # if HAVE_RAW_DECL_FMODL
@@ -1082,7 +1111,9 @@ _GL_FUNCDECL_SYS (frexpf, float, (float x, int *expptr) _GL_ARG_NONNULL ((2)));
 #  endif
 _GL_CXXALIAS_SYS (frexpf, float, (float x, int *expptr));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (frexpf);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef frexpf
 # if HAVE_RAW_DECL_FREXPF
@@ -1144,7 +1175,9 @@ _GL_CXXALIAS_SYS (frexpl, long double, (long double x, int *expptr));
 # endif
 #endif
 #if @GNULIB_FREXPL@ && !(@REPLACE_FREXPL@ && !@HAVE_DECL_FREXPL@)
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (frexpl);
+# endif
 #endif
 #if !@GNULIB_FREXPL@ && defined GNULIB_POSIXCHECK
 # undef frexpl
@@ -1170,7 +1203,9 @@ _GL_FUNCDECL_SYS (hypotf, float, (float x, float y));
 #  endif
 _GL_CXXALIAS_SYS (hypotf, float, (float x, float y));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (hypotf);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef hypotf
 # if HAVE_RAW_DECL_HYPOTF
@@ -1192,7 +1227,7 @@ _GL_CXXALIAS_RPL (hypot, double, (double x, double y));
 _GL_CXXALIAS_SYS (hypot, double, (double x, double y));
 # endif
 # if __GLIBC__ >= 2
-_GL_CXXALIASWARN (hypot);
+_GL_CXXALIASWARN1 (hypot, double, (double x, double y));
 # endif
 #elif defined GNULIB_POSIXCHECK
 # undef hypot
@@ -1217,7 +1252,9 @@ _GL_FUNCDECL_SYS (hypotl, long double, (long double x, long double y));
 #  endif
 _GL_CXXALIAS_SYS (hypotl, long double, (long double x, long double y));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (hypotl);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef hypotl
 # if HAVE_RAW_DECL_HYPOTL
@@ -1265,7 +1302,7 @@ _GL_FUNCDECL_SYS (ilogb, int, (double x));
 _GL_CXXALIAS_SYS (ilogb, int, (double x));
 # endif
 # if __GLIBC__ >= 2
-_GL_CXXALIASWARN (ilogb);
+_GL_CXXALIASWARN1 (ilogb, int, (double x));
 # endif
 #elif defined GNULIB_POSIXCHECK
 # undef ilogb
@@ -1299,6 +1336,55 @@ _GL_WARN_ON_USE (ilogbl, "ilogbl is unportable - "
 #endif
 
 
+#if @GNULIB_MDA_J0@
+/* On native Windows, map 'j0' to '_j0', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::j0 always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef j0
+#   define j0 _j0
+#  endif
+_GL_CXXALIAS_MDA (j0, double, (double x));
+# else
+_GL_CXXALIAS_SYS (j0, double, (double x));
+# endif
+_GL_CXXALIASWARN (j0);
+#endif
+
+#if @GNULIB_MDA_J1@
+/* On native Windows, map 'j1' to '_j1', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::j1 always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef j1
+#   define j1 _j1
+#  endif
+_GL_CXXALIAS_MDA (j1, double, (double x));
+# else
+_GL_CXXALIAS_SYS (j1, double, (double x));
+# endif
+_GL_CXXALIASWARN (j1);
+#endif
+
+#if @GNULIB_MDA_JN@
+/* On native Windows, map 'jn' to '_jn', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::jn always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef jn
+#   define jn _jn
+#  endif
+_GL_CXXALIAS_MDA (jn, double, (int n, double x));
+# else
+_GL_CXXALIAS_SYS (jn, double, (int n, double x));
+# endif
+_GL_CXXALIASWARN (jn);
+#endif
+
+
 /* Return x * 2^exp.  */
 #if @GNULIB_LDEXPF@
 # if !@HAVE_LDEXPF@
@@ -1306,7 +1392,9 @@ _GL_WARN_ON_USE (ilogbl, "ilogbl is unportable - "
 _GL_FUNCDECL_SYS (ldexpf, float, (float x, int exp));
 # endif
 _GL_CXXALIAS_SYS (ldexpf, float, (float x, int exp));
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (ldexpf);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef ldexpf
 # if HAVE_RAW_DECL_LDEXPF
@@ -1332,7 +1420,9 @@ _GL_CXXALIAS_SYS (ldexpl, long double, (long double x, int exp));
 # endif
 #endif
 #if @GNULIB_LDEXPL@
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (ldexpl);
+# endif
 #endif
 #if !@GNULIB_LDEXPL@ && defined GNULIB_POSIXCHECK
 # undef ldexpl
@@ -1379,7 +1469,7 @@ _GL_CXXALIAS_RPL (log, double, (double x));
 _GL_CXXALIAS_SYS (log, double, (double x));
 # endif
 # if __GLIBC__ >= 2
-_GL_CXXALIASWARN (log);
+_GL_CXXALIASWARN1 (log, double, (double x));
 # endif
 #elif defined GNULIB_POSIXCHECK
 # undef log
@@ -1404,7 +1494,9 @@ _GL_FUNCDECL_SYS (logl, long double, (long double x));
 #  endif
 _GL_CXXALIAS_SYS (logl, long double, (long double x));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (logl);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef logl
 # if HAVE_RAW_DECL_LOGL
@@ -1450,7 +1542,7 @@ _GL_CXXALIAS_RPL (log10, double, (double x));
 _GL_CXXALIAS_SYS (log10, double, (double x));
 # endif
 # if __GLIBC__ >= 2
-_GL_CXXALIASWARN (log10);
+_GL_CXXALIASWARN1 (log10, double, (double x));
 # endif
 #elif defined GNULIB_POSIXCHECK
 # undef log10
@@ -1475,7 +1567,9 @@ _GL_FUNCDECL_SYS (log10l, long double, (long double x));
 #  endif
 _GL_CXXALIAS_SYS (log10l, long double, (long double x));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (log10l);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef log10l
 # if HAVE_RAW_DECL_LOG10L
@@ -1523,7 +1617,7 @@ _GL_FUNCDECL_SYS (log1p, double, (double x));
 _GL_CXXALIAS_SYS (log1p, double, (double x));
 # endif
 # if __GLIBC__ >= 2
-_GL_CXXALIASWARN (log1p);
+_GL_CXXALIASWARN1 (log1p, double, (double x));
 # endif
 #elif defined GNULIB_POSIXCHECK
 # undef log1p
@@ -1597,7 +1691,7 @@ _GL_FUNCDECL_SYS (log2, double, (double x));
 _GL_CXXALIAS_SYS (log2, double, (double x));
 # endif
 # if __GLIBC__ >= 2
-_GL_CXXALIASWARN (log2);
+_GL_CXXALIASWARN1 (log2, double, (double x));
 # endif
 #elif defined GNULIB_POSIXCHECK
 # undef log2
@@ -1669,7 +1763,7 @@ _GL_FUNCDECL_SYS (logb, double, (double x));
 _GL_CXXALIAS_SYS (logb, double, (double x));
 # endif
 # if __GLIBC__ >= 2
-_GL_CXXALIASWARN (logb);
+_GL_CXXALIASWARN1 (logb, double, (double x));
 # endif
 #elif defined GNULIB_POSIXCHECK
 # undef logb
@@ -1739,7 +1833,7 @@ _GL_CXXALIAS_RPL (modf, double, (double x, double *iptr));
 _GL_CXXALIAS_SYS (modf, double, (double x, double *iptr));
 # endif
 # if __GLIBC__ >= 2
-_GL_CXXALIASWARN (modf);
+_GL_CXXALIASWARN1 (modf, double, (double x, double *iptr));
 # endif
 #elif defined GNULIB_POSIXCHECK
 # undef modf
@@ -1766,7 +1860,9 @@ _GL_FUNCDECL_SYS (modfl, long double, (long double x, long double *iptr)
 #  endif
 _GL_CXXALIAS_SYS (modfl, long double, (long double x, long double *iptr));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (modfl);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef modfl
 # if HAVE_RAW_DECL_MODFL
@@ -1830,7 +1926,7 @@ _GL_FUNCDECL_SYS (remainder, double, (double x, double y));
 _GL_CXXALIAS_SYS (remainder, double, (double x, double y));
 # endif
 # if __GLIBC__ >= 2
-_GL_CXXALIASWARN (remainder);
+_GL_CXXALIASWARN1 (remainder, double, (double x, double y));
 # endif
 #elif defined GNULIB_POSIXCHECK
 # undef remainder
@@ -1887,7 +1983,7 @@ _GL_FUNCDECL_SYS (rint, double, (double x));
 # endif
 _GL_CXXALIAS_SYS (rint, double, (double x));
 # if __GLIBC__ >= 2
-_GL_CXXALIASWARN (rint);
+_GL_CXXALIASWARN1 (rint, double, (double x));
 # endif
 #elif defined GNULIB_POSIXCHECK
 # undef rint
@@ -1959,7 +2055,7 @@ _GL_FUNCDECL_SYS (round, double, (double x));
 _GL_CXXALIAS_SYS (round, double, (double x));
 # endif
 # if __GLIBC__ >= 2
-_GL_CXXALIASWARN (round);
+_GL_CXXALIASWARN1 (round, double, (double x));
 # endif
 #elif defined GNULIB_POSIXCHECK
 # undef round
@@ -2026,7 +2122,9 @@ _GL_WARN_ON_USE (sinf, "sinf is unportable - "
 _GL_FUNCDECL_SYS (sinl, long double, (long double x));
 # endif
 _GL_CXXALIAS_SYS (sinl, long double, (long double x));
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (sinl);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef sinl
 # if HAVE_RAW_DECL_SINL
@@ -2100,7 +2198,9 @@ _GL_FUNCDECL_SYS (sqrtl, long double, (long double x));
 #  endif
 _GL_CXXALIAS_SYS (sqrtl, long double, (long double x));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (sqrtl);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef sqrtl
 # if HAVE_RAW_DECL_SQRTL
@@ -2140,7 +2240,9 @@ _GL_WARN_ON_USE (tanf, "tanf is unportable - "
 _GL_FUNCDECL_SYS (tanl, long double, (long double x));
 # endif
 _GL_CXXALIAS_SYS (tanl, long double, (long double x));
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (tanl);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef tanl
 # if HAVE_RAW_DECL_TANL
@@ -2213,7 +2315,7 @@ _GL_FUNCDECL_SYS (trunc, double, (double x));
 _GL_CXXALIAS_SYS (trunc, double, (double x));
 # endif
 # if __GLIBC__ >= 2
-_GL_CXXALIASWARN (trunc);
+_GL_CXXALIASWARN1 (trunc, double, (double x));
 # endif
 #elif defined GNULIB_POSIXCHECK
 # undef trunc
@@ -2247,6 +2349,55 @@ _GL_WARN_ON_USE (truncl, "truncl is unportable - "
 #endif
 
 
+#if @GNULIB_MDA_Y0@
+/* On native Windows, map 'y0' to '_y0', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::y0 always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef y0
+#   define y0 _y0
+#  endif
+_GL_CXXALIAS_MDA (y0, double, (double x));
+# else
+_GL_CXXALIAS_SYS (y0, double, (double x));
+# endif
+_GL_CXXALIASWARN (y0);
+#endif
+
+#if @GNULIB_MDA_Y1@
+/* On native Windows, map 'y1' to '_y1', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::y1 always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef y1
+#   define y1 _y1
+#  endif
+_GL_CXXALIAS_MDA (y1, double, (double x));
+# else
+_GL_CXXALIAS_SYS (y1, double, (double x));
+# endif
+_GL_CXXALIASWARN (y1);
+#endif
+
+#if @GNULIB_MDA_YN@
+/* On native Windows, map 'yn' to '_yn', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::yn always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef yn
+#   define yn _yn
+#  endif
+_GL_CXXALIAS_MDA (yn, double, (int n, double x));
+# else
+_GL_CXXALIAS_SYS (yn, double, (int n, double x));
+# endif
+_GL_CXXALIASWARN (yn);
+#endif
+
+
 /* Definitions of function-like macros come here, after the function
    declarations.  */
 
@@ -2266,7 +2417,7 @@ _GL_EXTERN_C int gl_isfinitel (long double x);
 #  if defined isfinite || defined GNULIB_NAMESPACE
 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isfinite)
 #   undef isfinite
-#   if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined _AIX))
+#   if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __OpenBSD__ || defined _AIX || (defined _WIN32 && !defined __CYGWIN__)))
   /* This platform's <cmath> possibly defines isfinite through a set of inline
      functions.  */
 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite, rpl_isfinite, bool)
@@ -2300,7 +2451,7 @@ _GL_EXTERN_C int gl_isinfl (long double x);
 #  if defined isinf || defined GNULIB_NAMESPACE
 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isinf)
 #   undef isinf
-#   if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__))
+#   if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __OpenBSD__ || (defined _WIN32 && !defined __CYGWIN__)))
   /* This platform's <cmath> possibly defines isinf through a set of inline
      functions.  */
 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf, rpl_isinf, bool)
@@ -2324,10 +2475,11 @@ _GL_WARN_REAL_FLOATING_DECL (isinf);
 # if @HAVE_ISNANF@
 /* The original <math.h> included above provides a declaration of isnan macro
    or (older) isnanf function.  */
-#  if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanf))
-    /* GCC 4.0 and newer provides three built-ins for isnan.  */
+#  if (__GNUC__ >= 4) || (__clang_major__ >= 4)
+    /* GCC >= 4.0 and clang provide a type-generic built-in for isnan.
+       GCC >= 4.0 also provides __builtin_isnanf, but clang doesn't.  */
 #   undef isnanf
-#   define isnanf(x) __builtin_isnanf ((float)(x))
+#   define isnanf(x) __builtin_isnan ((float)(x))
 #  elif defined isnan
 #   undef isnanf
 #   define isnanf(x) isnan ((float)(x))
@@ -2347,8 +2499,8 @@ _GL_EXTERN_C int isnanf (float x);
 # if @HAVE_ISNAND@
 /* The original <math.h> included above provides a declaration of isnan
    macro.  */
-#  if __GNUC__ >= 4
-    /* GCC 4.0 and newer provides three built-ins for isnan.  */
+#  if (__GNUC__ >= 4) || (__clang_major__ >= 4)
+    /* GCC >= 4.0 and clang provide a type-generic built-in for isnan.  */
 #   undef isnand
 #   define isnand(x) __builtin_isnan ((double)(x))
 #  else
@@ -2368,10 +2520,11 @@ _GL_EXTERN_C int isnand (double x);
 # if @HAVE_ISNANL@
 /* The original <math.h> included above provides a declaration of isnan
    macro or (older) isnanl function.  */
-#  if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanl))
-    /* GCC 4.0 and newer provides three built-ins for isnan.  */
+#  if (__GNUC__ >= 4) || (__clang_major__ >= 4)
+    /* GCC >= 4.0 and clang provide a type-generic built-in for isnan.
+       GCC >= 4.0 also provides __builtin_isnanl, but clang doesn't.  */
 #   undef isnanl
-#   define isnanl(x) __builtin_isnanl ((long double)(x))
+#   define isnanl(x) __builtin_isnan ((long double)(x))
 #  elif defined isnan
 #   undef isnanl
 #   define isnanl(x) isnan ((long double)(x))
@@ -2391,20 +2544,20 @@ _GL_EXTERN_C int isnanl (long double x) _GL_ATTRIBUTE_CONST;
    isnanf.h (e.g.) here, because those may end up being macros
    that recursively expand back to isnan.  So use the gnulib
    replacements for them directly. */
-#  if @HAVE_ISNANF@ && __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanf))
-#   define gl_isnan_f(x) __builtin_isnanf ((float)(x))
+#  if @HAVE_ISNANF@ && (__GNUC__ >= 4) || (__clang_major__ >= 4)
+#   define gl_isnan_f(x) __builtin_isnan ((float)(x))
 #  else
 _GL_EXTERN_C int rpl_isnanf (float x);
 #   define gl_isnan_f(x) rpl_isnanf (x)
 #  endif
-#  if @HAVE_ISNAND@ && __GNUC__ >= 4
+#  if @HAVE_ISNAND@ && (__GNUC__ >= 4) || (__clang_major__ >= 4)
 #   define gl_isnan_d(x) __builtin_isnan ((double)(x))
 #  else
 _GL_EXTERN_C int rpl_isnand (double x);
 #   define gl_isnan_d(x) rpl_isnand (x)
 #  endif
-#  if @HAVE_ISNANL@ && __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanl))
-#   define gl_isnan_l(x) __builtin_isnanl ((long double)(x))
+#  if @HAVE_ISNANL@ && (__GNUC__ >= 4) || (__clang_major__ >= 4)
+#   define gl_isnan_l(x) __builtin_isnan ((long double)(x))
 #  else
 _GL_EXTERN_C int rpl_isnanl (long double x) _GL_ATTRIBUTE_CONST;
 #   define gl_isnan_l(x) rpl_isnanl (x)
@@ -2414,18 +2567,18 @@ _GL_EXTERN_C int rpl_isnanl (long double x) _GL_ATTRIBUTE_CONST;
    (sizeof (x) == sizeof (long double) ? gl_isnan_l (x) : \
     sizeof (x) == sizeof (double) ? gl_isnan_d (x) : \
     gl_isnan_f (x))
-# elif __GNUC__ >= 4 && (!defined __clang__ || (__has_builtin (__builtin_isnanf) && __has_builtin (__builtin_isnanl)))
+# elif (__GNUC__ >= 4) || (__clang_major__ >= 4)
 #  undef isnan
 #  define isnan(x) \
-   (sizeof (x) == sizeof (long double) ? __builtin_isnanl ((long double)(x)) : \
+   (sizeof (x) == sizeof (long double) ? __builtin_isnan ((long double)(x)) : \
     sizeof (x) == sizeof (double) ? __builtin_isnan ((double)(x)) : \
-    __builtin_isnanf ((float)(x)))
+    __builtin_isnan ((float)(x)))
 # endif
 # ifdef __cplusplus
 #  if defined isnan || defined GNULIB_NAMESPACE
 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isnan)
 #   undef isnan
-#   if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__))
+#   if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || (defined __FreeBSD__ && __clang_major__ < 7) || defined __OpenBSD__ || (defined _WIN32 && !defined __CYGWIN__)))
   /* This platform's <cmath> possibly defines isnan through a set of inline
      functions.  */
 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan, rpl_isnan, bool)
@@ -2450,10 +2603,10 @@ _GL_WARN_REAL_FLOATING_DECL (isnan);
 
 
 #if @GNULIB_SIGNBIT@
-# if (@REPLACE_SIGNBIT_USING_GCC@ \
+# if (@REPLACE_SIGNBIT_USING_BUILTINS@ \
       && (!defined __cplusplus || __cplusplus < 201103))
 #  undef signbit
-   /* GCC 4.0 and newer provides three built-ins for signbit.  */
+   /* GCC >= 4.0 and clang provide three built-ins for signbit.  */
 #  define signbit(x) \
    (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \
     sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \
@@ -2464,7 +2617,7 @@ _GL_WARN_REAL_FLOATING_DECL (isnan);
 _GL_EXTERN_C int gl_signbitf (float arg);
 _GL_EXTERN_C int gl_signbitd (double arg);
 _GL_EXTERN_C int gl_signbitl (long double arg);
-#  if __GNUC__ >= 2 && !defined __STRICT_ANSI__
+#  if (__GNUC__ >= 2 || defined __clang__) && !defined __STRICT_ANSI__
 #   define _GL_NUM_UINT_WORDS(type) \
       ((sizeof (type) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
 #   if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT && !defined gl_signbitf
@@ -2508,7 +2661,7 @@ _GL_EXTERN_C int gl_signbitl (long double arg);
 #  if defined signbit || defined GNULIB_NAMESPACE
 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit)
 #   undef signbit
-#   if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined _AIX))
+#   if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __OpenBSD__ || defined _AIX || (defined _WIN32 && !defined __CYGWIN__)))
   /* This platform's <cmath> possibly defines signbit through a set of inline
      functions.  */
 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit, rpl_signbit, bool)
@@ -2529,4 +2682,5 @@ _GL_WARN_REAL_FLOATING_DECL (signbit);
 _GL_INLINE_HEADER_END
 
 #endif /* _@GUARD_PREFIX@_MATH_H */
+#endif /* _GL_INCLUDING_MATH_H */
 #endif /* _@GUARD_PREFIX@_MATH_H */
index a826b1b6e805f598f59ac9a7d4efc93f46cee84d..4f3bbb31ba6e28930510720112b14080c2ab8ac4 100644 (file)
@@ -1,5 +1,5 @@
 /* Convert multibyte character to wide character.
-   Copyright (C) 1999-2002, 2005-2020 Free Software Foundation, Inc.
+   Copyright (C) 1999-2002, 2005-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index c97043964f45498609ae4f1986f595a1410e02b3..eab0416ed7fe8cdce68cdcb0ac6d851c99b60f19 100644 (file)
@@ -1,5 +1,5 @@
 /* Convert multibyte character to wide character.
-   Copyright (C) 1999-2002, 2005-2020 Free Software Foundation, Inc.
+   Copyright (C) 1999-2002, 2005-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index a71d3943034aac56a45f8de5768b50d6ec50067a..caf7cb698cdd320d27d84b8319c08655365bad41 100644 (file)
@@ -1,5 +1,5 @@
 /* Convert multibyte character to wide character.
-   Copyright (C) 1999-2002, 2005-2020 Free Software Foundation, Inc.
+   Copyright (C) 1999-2002, 2005-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2008.
 
    This program is free software: you can redistribute it and/or modify
index 981a894b001e748b109ddef608d0256c8f76982a..b6e9841ea735dc9bf0b1286429816ec2339d6f1a 100644 (file)
@@ -1,5 +1,5 @@
 /* Test for initial conversion state.
-   Copyright (C) 2008-2020 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2008.
 
    This program is free software: you can redistribute it and/or modify
index 06ecec2dcad91c5a5715605efb0249c2ed31303e..0d544b0e934029b8a6c08c5dfa361a9286f21936 100644 (file)
@@ -1,5 +1,5 @@
 /* Convert string to wide string.
-   Copyright (C) 2008-2020 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2008.
 
    This program is free software: you can redistribute it and/or modify
index aca1ad8486734e2a9780089cd75ecd9acb63587d..328e9a887c99a6d9e4fa10220eff4032d7a66cce 100644 (file)
@@ -1,5 +1,5 @@
 /* Convert string to wide string.
-   Copyright (C) 2008-2020 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2008.
 
    This program is free software: you can redistribute it and/or modify
index 6d1c6855f0e4fb9f918fa3f9e458ff71bfd64bd4..c2bfdd2d8805f553371680d3e2906692c789dfd4 100644 (file)
@@ -1,5 +1,5 @@
 /* Convert string to wide string.
-   Copyright (C) 2008-2020 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2008.
 
    This program is free software: you can redistribute it and/or modify
index 22e414a1f775930257dce591ff68cea4cca406ac..bfcf5ccebb4e96252326f4cff65795ebd7e2a32c 100644 (file)
@@ -1,5 +1,5 @@
 /* Convert multibyte character to wide character.
-   Copyright (C) 2011-2020 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2011.
 
    This program is free software: you can redistribute it and/or modify
index 85ad3c4c901390e51aa841754863dac23efe5ae3..27b1643992d2f02f4dbc7f1824c19bf90787c714 100644 (file)
@@ -1,5 +1,5 @@
 /* Return the internal lock used by mbrtowc and mbrtoc32.
-   Copyright (C) 2019-2020 Free Software Foundation, Inc.
+   Copyright (C) 2019-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index e101978dfeb670c0e4697913fa7e6eb3cb41b935..696b12c5841ce01a2897d8b326249795f79fbba6 100644 (file)
@@ -1,5 +1,5 @@
 /* Use the internal lock used by mbrtowc and mbrtoc32.
-   Copyright (C) 2019-2020 Free Software Foundation, Inc.
+   Copyright (C) 2019-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 5fc2d280b37737a7455f9e362a99bf3e46ce7fd4..ef217c6427c3e4f1a4b990bd08a0559dabbc2419 100644 (file)
@@ -1,5 +1,5 @@
 /* Convert multibyte character to wide character.
-   Copyright (C) 2011-2020 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2011.
 
    This program is free software: you can redistribute it and/or modify
index bff63da06cc4955b0f05ad88f76da73ce664f250..cacaf1853fee6c5e6827b4eeedb019d6fabdb404 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2020
+/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2021
    Free Software Foundation, Inc.
 
    Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
index f6dd209929925880391d7ae68df92eed09a97af2..c0a53db61d93f908e985177908d6fc2b9c0e71af 100644 (file)
@@ -1,6 +1,6 @@
 # Suppress a valgrind message about use of uninitialized memory in memchr().
 
-# Copyright (C) 2009-2020 Free Software Foundation, Inc.
+# Copyright (C) 2009-2021 Free Software Foundation, Inc.
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
index 6f6574211f8df05798df36d454f2a0f440b133d6..87266fa87afe5e962fbe73f6f729bd4be3aaec44 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2020 Free Software
+/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2021 Free Software
    Foundation, Inc.
    This file is part of the GNU C Library.
 
index fe832d7bcfb34f4dc632092b7fa397a7abf6c093..fea618a9e5950f3ed7618a68ab7a301d56002f0d 100644 (file)
@@ -1,5 +1,5 @@
 /* Copy memory area and return pointer after last written byte.
-   Copyright (C) 2003, 2007, 2009-2020 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2007, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 7ff32e11338ca208c39b91510e5365ab8aee666d..dcd24fafc6e0336d088e6645eb42eeb878ce5f02 100644 (file)
@@ -1,6 +1,6 @@
 /* memrchr -- find the last occurrence of a byte in a memory block
 
-   Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2020 Free Software
+   Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2021 Free Software
    Foundation, Inc.
 
    Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
index b9477767b0df4123e17ae727299a99c1e01df216..eb9fb09a540a3f01c52196bd206d946e8b390a14 100644 (file)
@@ -1,5 +1,5 @@
 /* MIN, MAX macros.
-   Copyright (C) 1995, 1998, 2001, 2003, 2005, 2009-2020 Free Software
+   Copyright (C) 1995, 1998, 2001, 2003, 2005, 2009-2021 Free Software
    Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
index c0d4b616513f217d61bea1363aeaf2fd1fca02c7..d508db61ef387b27310e279f96cfca0dd75bcc6e 100644 (file)
@@ -1,7 +1,7 @@
 /* On some systems, mkdir ("foo/", 0700) fails because of the trailing
    slash.  On those systems, this wrapper removes the trailing slash.
 
-   Copyright (C) 2001, 2003, 2006, 2008-2020 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2003, 2006, 2008-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -77,7 +77,7 @@ rpl_mkdir (char const *dir, mode_t mode maybe_unused)
                          || (last[1] == '.' && last[2] == '\0')))
       {
         struct stat st;
-        if (stat (tmp_dir, &st) == 0)
+        if (stat (tmp_dir, &st) == 0 || errno == EOVERFLOW)
           errno = EEXIST;
         return -1;
       }
index 6aae7987095db5939bd38619770ba018251871d8..8ed805b2c07038d5411f67ac48a6e1d67af8d518 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2001-2003, 2006-2007, 2009-2020 Free Software
+/* Copyright (C) 1999, 2001-2003, 2006-2007, 2009-2021 Free Software
    Foundation, Inc.
    This file is part of the GNU C Library.
 
index 46b58e1bcac8a3e0c1d68d1879a22c163da4b348..9d733ddd10d8f08fa1689ff48c8446e12f26bc63 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-1999, 2001, 2005-2007, 2009-2020 Free Software
+/* Copyright (C) 1998-1999, 2001, 2005-2007, 2009-2021 Free Software
    Foundation, Inc.
    This file is derived from the one in the GNU C Library.
 
index 863668889c6afc2809facf76969d988d4c3ff426..658c4e3c68a71dfcdf3c89e6dbcfea3c0e40d4b2 100644 (file)
@@ -1,5 +1,5 @@
 /* Invalid parameter handler for MSVC runtime libraries.
-   Copyright (C) 2011-2020 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 93ee7859ca9ecba65fb294034a6956141a0cb7a0..46404aed071634cc891e29be7128cf779cddb3d3 100644 (file)
@@ -1,5 +1,5 @@
 /* Invalid parameter handler for MSVC runtime libraries.
-   Copyright (C) 2011-2020 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index bf93b882412154c1d11890bc492fc8debc26e8ff..e893ed6aa327a7706ddd69c426e2bbf35cb86f5a 100644 (file)
@@ -1,6 +1,6 @@
 /* Wrappers that don't throw invalid parameter notifications
    with MSVC runtime libraries.
-   Copyright (C) 2011-2020 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index fca541573fc3dce66adf1218f748cd5a14ce286c..a1979dd9fc8f8420d58a7364038ae53d230be809 100644 (file)
@@ -1,6 +1,6 @@
 /* Wrappers that don't throw invalid parameter notifications
    with MSVC runtime libraries.
-   Copyright (C) 2011-2020 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 84ad2154c984280bde685e5493eb2e4baaf39c5f..f091d5cc841d6a69abcc3b306a1ecfff53332c2f 100644 (file)
@@ -1,5 +1,5 @@
 /* Substitute for <netinet/in.h>.
-   Copyright (C) 2007-2020 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 751b42d7dcf6489653ef2a0a892f5e42d965e6f0..85991853318a5c9cae3a50075dd6ca27a1f7d10a 100644 (file)
@@ -1,5 +1,5 @@
 /* Open a descriptor to a file.
-   Copyright (C) 2007-2020 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 static int
 orig_open (const char *filename, int flags, mode_t mode)
 {
+#if defined _WIN32 && !defined __CYGWIN__
+  return _open (filename, flags, mode);
+#else
   return open (filename, flags, mode);
+#endif
 }
 
 /* Specification.  */
index fd96dd79494d73703459c7a0f05a004fb2e756ec..f30e210088d0fdc38988a39e11475e665608f059 100644 (file)
@@ -1,6 +1,6 @@
 /* Report a save- or restore-cwd failure in our openat replacement and then exit.
 
-   Copyright (C) 2005-2006, 2008-2020 Free Software Foundation, Inc.
+   Copyright (C) 2005-2006, 2008-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 5b824f7a9768334fd172658cc3cbd489b57fbe5c..5c42d034998b6319369c86e283859721cb77a130 100644 (file)
@@ -1,6 +1,6 @@
 /* Internals for openat-like functions.
 
-   Copyright (C) 2005-2006, 2009-2020 Free Software Foundation, Inc.
+   Copyright (C) 2005-2006, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index b5aaee8b1d36ec688039c6b651510002e28279a3..4f8be90f14606201db6b87e9c06450dd55c2d08b 100644 (file)
@@ -1,6 +1,6 @@
 /* Create /proc/self/fd-related names for subfiles of open directories.
 
-   Copyright (C) 2006, 2009-2020 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index baf656621d8ef869f92d9c75f93c9e560b67d7a1..ac9237497197f414dc2124e3c8df58ab850093cb 100644 (file)
@@ -1,5 +1,5 @@
 /* provide a replacement openat function
-   Copyright (C) 2004-2020 Free Software Foundation, Inc.
+   Copyright (C) 2004-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 824ce560e34bade6b3a850b1cbd24759abe31c33..70981241b2465f6466797a142c947219272f333f 100644 (file)
@@ -1,5 +1,5 @@
 /* provide a replacement openat function
-   Copyright (C) 2004-2006, 2008-2020 Free Software Foundation, Inc.
+   Copyright (C) 2004-2006, 2008-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 500fa44f6176c6d493441924138f0cffbaa2b29c..480b96b7e5919c0e971bf22f92701387b999c17e 100644 (file)
@@ -1,5 +1,5 @@
 /* Start reading the entries of a directory.
-   Copyright (C) 2006-2020 Free Software Foundation, Inc.
+   Copyright (C) 2006-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 15a236fae8c3ea321ed6ffcaab5b83228d813f05..49cf4629c7c3af524adeee993ac8e7f12861d1b9 100644 (file)
@@ -1,5 +1,5 @@
 /* Define PATH_MAX somehow.  Requires sys/types.h.
-   Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2020 Free Software
+   Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2021 Free Software
    Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
index 5a597c527015d111e1c35e55e01359a6b0037f15..efa4bd6c752651dce1fc72a07341b2d7264e8e13 100644 (file)
@@ -1,5 +1,5 @@
 /* Invoke pipe, but avoid some glitches.
-   Copyright (C) 2005-2006, 2009-2020 Free Software Foundation, Inc.
+   Copyright (C) 2005-2006, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -30,7 +30,6 @@
 int
 pipe_safer (int fd[2])
 {
-#if HAVE_PIPE
   if (pipe (fd) == 0)
     {
       int i;
@@ -39,18 +38,15 @@ pipe_safer (int fd[2])
           fd[i] = fd_safer (fd[i]);
           if (fd[i] < 0)
             {
-              int e = errno;
+              int saved_errno = errno;
               close (fd[1 - i]);
-              errno = e;
+              errno = saved_errno;
               return -1;
             }
         }
 
       return 0;
     }
-#else
-  errno = ENOSYS;
-#endif
 
   return -1;
 }
diff --git a/gnulib/import/pipe.c b/gnulib/import/pipe.c
new file mode 100644 (file)
index 0000000..584965a
--- /dev/null
@@ -0,0 +1,50 @@
+/* Create a pipe.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License along
+   with this program; if not, see <https://www.gnu.org/licenses/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <unistd.h>
+
+#if defined _WIN32 && ! defined __CYGWIN__
+/* Native Windows API.  */
+
+/* Get _pipe().  */
+# include <io.h>
+
+/* Get _O_BINARY.  */
+# include <fcntl.h>
+
+int
+pipe (int fd[2])
+{
+  /* Mingw changes fd to {-1,-1} on failure, but this violates
+     http://austingroupbugs.net/view.php?id=467 */
+  int tmp[2];
+  int result = _pipe (tmp, 4096, _O_BINARY);
+  if (!result)
+    {
+      fd[0] = tmp[0];
+      fd[1] = tmp[1];
+    }
+  return result;
+}
+
+#else
+
+# error "This platform lacks a pipe function, and Gnulib doesn't provide a replacement. This is a bug in Gnulib."
+
+#endif
index 04bf08415c6a0f001f532503b241cf55951ee249..bbb250feb8c22e1f631e8babd23b57a2ca06d552 100644 (file)
@@ -1,5 +1,5 @@
 /* Searching in a string.
-   Copyright (C) 2008-2020 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 53c5b317d5f88c66322d8b31f887378e44c1ce96..087d5e4178dca8508ae269430a4106dcd04adba9 100644 (file)
@@ -1,6 +1,6 @@
 # Suppress a valgrind message about use of uninitialized memory in rawmemchr().
 
-# Copyright (C) 2008-2020 Free Software Foundation, Inc.
+# Copyright (C) 2008-2021 Free Software Foundation, Inc.
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
index 91a351650dd3fb9866a081cef44452a23860cd9a..723198e1ba1b2c942df2954ef0d294db94b6d449 100644 (file)
@@ -1,5 +1,5 @@
 /* Read the next entry of a directory.
-   Copyright (C) 2011-2020 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 4d392ef69951cf48468160f2dbf2f7212bcb1814..c4b635ce7126c008354a5b870ae91ece17e3900c 100644 (file)
@@ -1,5 +1,5 @@
-/* Stub for readlink().
-   Copyright (C) 2003-2007, 2009-2020 Free Software Foundation, Inc.
+/* Read the contents of a symbolic link.
+   Copyright (C) 2003-2007, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -29,7 +29,7 @@
    such as DJGPP 2.03 and mingw32.  */
 
 ssize_t
-readlink (const char *name, char *buf _GL_UNUSED,
+readlink (char const *file, char *buf _GL_UNUSED,
           size_t bufsize _GL_UNUSED)
 {
   struct stat statbuf;
@@ -37,7 +37,7 @@ readlink (const char *name, char *buf _GL_UNUSED,
   /* In general we should use lstat() here, not stat().  But on platforms
      without symbolic links, lstat() - if it exists - would be equivalent to
      stat(), therefore we can use stat().  This saves us a configure check.  */
-  if (stat (name, &statbuf) >= 0)
+  if (stat (file, &statbuf) >= 0)
     errno = EINVAL;
   return -1;
 }
@@ -51,24 +51,54 @@ readlink (const char *name, char *buf _GL_UNUSED,
    for Solaris 9.  */
 
 ssize_t
-rpl_readlink (const char *name, char *buf, size_t bufsize)
+rpl_readlink (char const *file, char *buf, size_t bufsize)
 {
 # if READLINK_TRAILING_SLASH_BUG
-  size_t len = strlen (name);
-  if (len && name[len - 1] == '/')
+  size_t file_len = strlen (file);
+  if (file_len && file[file_len - 1] == '/')
     {
-      /* Even if name without the slash is a symlink to a directory,
+      /* Even if FILE without the slash is a symlink to a directory,
          both lstat() and stat() must resolve the trailing slash to
          the directory rather than the symlink.  We can therefore
          safely use stat() to distinguish between EINVAL and
          ENOTDIR/ENOENT, avoiding extra overhead of rpl_lstat().  */
       struct stat st;
-      if (stat (name, &st) == 0)
+      if (stat (file, &st) == 0 || errno == EOVERFLOW)
         errno = EINVAL;
       return -1;
     }
 # endif /* READLINK_TRAILING_SLASH_BUG */
-  return readlink (name, buf, bufsize);
+
+  ssize_t r = readlink (file, buf, bufsize);
+
+# if READLINK_TRUNCATE_BUG
+  if (r < 0 && errno == ERANGE)
+    {
+      /* Try again with a bigger buffer.  This is just for test cases;
+         real code invariably discards short reads.  */
+      char stackbuf[4032];
+      r = readlink (file, stackbuf, sizeof stackbuf);
+      if (r < 0)
+        {
+          if (errno == ERANGE)
+            {
+              /* Clear the buffer, which is good enough for real code.
+                 Thankfully, no test cases try short reads of enormous
+                 symlinks and what would be the point anyway?  */
+              r = bufsize;
+              memset (buf, 0, r);
+            }
+        }
+      else
+        {
+          if (bufsize < r)
+            r = bufsize;
+          memcpy (buf, stackbuf, r);
+        }
+    }
+# endif
+
+  return r;
 }
 
 #endif /* HAVE_READLINK */
index a24054de93d1fa09f0ed304fb7a0acd94969d5b3..35caeab7ed988f6808cacada823668f873317a69 100644 (file)
@@ -1,6 +1,6 @@
 /* realloc() function that is glibc compatible.
 
-   Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2020 Free Software
+   Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2021 Free Software
    Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
index 108dc40c4fb112e0c0abe4c5b52ff88c1a5109b9..e0f417de696bcc99eb61cf907d75dc85f6839868 100644 (file)
@@ -1,6 +1,6 @@
 /* Work around rename bugs in some systems.
 
-   Copyright (C) 2001-2003, 2005-2006, 2009-2020 Free Software Foundation, Inc.
+   Copyright (C) 2001-2003, 2005-2006, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index a18943d7d67a565a106e9a3533644ad86c5853fc..26fbbac7aa569200d1b403b5a66f94ed86b1a467 100644 (file)
@@ -1,5 +1,5 @@
 /* Restart reading the entries of a directory from the beginning.
-   Copyright (C) 2011-2020 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 2155224bd64c89964a807d2597a605cdabe2d9bd..3cca0ce76ebf44fcc0e78abb2041dac535477fbd 100644 (file)
@@ -1,6 +1,6 @@
 /* Work around rmdir bugs.
 
-   Copyright (C) 1988, 1990, 1999, 2003-2006, 2009-2020 Free Software
+   Copyright (C) 1988, 1990, 1999, 2003-2006, 2009-2021 Free Software
    Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
@@ -26,6 +26,9 @@
 #include "filename.h"
 
 #undef rmdir
+#if defined _WIN32 && !defined __CYGWIN__
+# define rmdir _rmdir
+#endif
 
 /* Remove directory DIR.
    Return 0 if successful, -1 if not.  */
index 09c339a5582205ac81682607b10856f09c467bbc..cf1c96e3ba0e5f93e8f7411f533ba1ccab570468 100644 (file)
@@ -1,6 +1,6 @@
 /* Determine whether two stat buffers are known to refer to the same file.
 
-   Copyright (C) 2006, 2009-2020 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index c2608d58b22d4bca2c0a1ba7dae13f61e6c59b42..0a18bc54461889973bdd8d1c44f0292a2adc7845 100644 (file)
@@ -1,6 +1,6 @@
 /* save-cwd.c -- Save and restore current working directory.
 
-   Copyright (C) 1995, 1997-1998, 2003-2006, 2009-2020 Free Software
+   Copyright (C) 1995, 1997-1998, 2003-2006, 2009-2021 Free Software
    Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
index db8bfd25fcfada17aecdd6691ba5ad6708279c9f..3cefba58c0af6a2102f3593c064998e4c68d71a5 100644 (file)
@@ -1,6 +1,6 @@
 /* Save and restore current working directory.
 
-   Copyright (C) 1995, 1997-1998, 2003, 2009-2020 Free Software Foundation,
+   Copyright (C) 1995, 1997-1998, 2003, 2009-2021 Free Software Foundation,
    Inc.
 
    This program is free software: you can redistribute it and/or modify
index 4c0db3e53b370b04a44e4a9bafc4794567cf8dd3..3e2b5ef27dbb6edc26702c4ef8ef0f020a671ad6 100644 (file)
@@ -1,3 +1,21 @@
+/* Variable-sized buffer with on-stack default allocation.
+   Copyright (C) 2017-2021 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Paul Eggert, 2017.  */
+
 #ifndef _GL_SCRATCH_BUFFER_H
 #define _GL_SCRATCH_BUFFER_H
 
index d03bc5a6dfa4a15365bf2fef045fac1fab84056e..78c7aaa31ec1c7b6e8cdea52ccf0565b5e67522c 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995-2003, 2005-2020 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995-2003, 2005-2021 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    This program is free software: you can redistribute it and/or modify
@@ -72,7 +72,7 @@ __libc_lock_define_initialized (static, envlock)
    values are from a small set.  Outside glibc this will eat up all
    memory after a while.  */
 #if defined _LIBC || (defined HAVE_SEARCH_H && defined HAVE_TSEARCH \
-                      && defined __GNUC__)
+                      && (defined __GNUC__ || defined __clang__))
 # define USE_TSEARCH    1
 # include <search.h>
 typedef int (*compar_fn_t) (const void *, const void *);
index 7dde32d1884c43c4627caad8055fb2870c96c554..5474ae03fc571d8f664b2a1ebf0fb4c879697889 100644 (file)
@@ -1,5 +1,5 @@
 /* Return the internal lock used by setlocale_null_r.
-   Copyright (C) 2019-2020 Free Software Foundation, Inc.
+   Copyright (C) 2019-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index abe55b5a3a315feca99c7a888bd61142c29d4fac..059af4e2c00a38e9a5472cb8923f23530fbdf797 100644 (file)
@@ -1,5 +1,5 @@
 /* Query the name of the current global locale.
-   Copyright (C) 2019-2020 Free Software Foundation, Inc.
+   Copyright (C) 2019-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 6844be5fac65c7e755377bd0ff6dc544d7c0ff08..5f45856605efdb3d04f7a7c548cfb32262df52cf 100644 (file)
@@ -1,5 +1,5 @@
 /* Query the name of the current global locale.
-   Copyright (C) 2019-2020 Free Software Foundation, Inc.
+   Copyright (C) 2019-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index c94b053d6af96734778e3f0bfd1a8dc274004e75..ed01d672c9d658c875ead57d89771185c52ff6a4 100644 (file)
@@ -1,6 +1,6 @@
 /* A GNU-like <signal.h>.
 
-   Copyright (C) 2006-2020 Free Software Foundation, Inc.
+   Copyright (C) 2006-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 #ifndef _@GUARD_PREFIX@_SIGNAL_H
 #define _@GUARD_PREFIX@_SIGNAL_H
 
-/* Mac OS X 10.3, FreeBSD 6.4, OpenBSD 3.8, OSF/1 4.0, Solaris 2.6, Android
-   declare pthread_sigmask in <pthread.h>, not in <signal.h>.
+/* Mac OS X 10.3, FreeBSD 6.4, OpenBSD 3.8, OSF/1 4.0, Solaris 2.6, Android,
+   OS/2 kLIBC declare pthread_sigmask in <pthread.h>, not in <signal.h>.
    But avoid namespace pollution on glibc systems.*/
 #if (@GNULIB_PTHREAD_SIGMASK@ || defined GNULIB_POSIXCHECK) \
     && ((defined __APPLE__ && defined __MACH__) \
         || defined __FreeBSD__ || defined __OpenBSD__ || defined __osf__ \
-        || defined __sun || defined __ANDROID__) \
+        || defined __sun || defined __ANDROID__ || defined __KLIBC__) \
     && ! defined __GLIBC__
 # include <pthread.h>
 #endif
index 884ffd829a24a9d1f6fed79a23adc08dd9af1977..523ed21b080c66979d311cc651980751ecdc515b 100644 (file)
@@ -1,6 +1,6 @@
 /* stat-related time functions.
 
-   Copyright (C) 2005, 2007, 2009-2020 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2007, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 19bdfaa379cdd0acf5586badf3bdf234f47e7271..914707ee53cba2954a619dc4be219f79e44dcfb9 100644 (file)
@@ -1,5 +1,5 @@
 /* Core of implementation of fstat and stat for native Windows.
-   Copyright (C) 2017-2020 Free Software Foundation, Inc.
+   Copyright (C) 2017-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
 #if defined _WIN32 && ! defined __CYGWIN__
 
-/* Ensure that <windows.h> defines FILE_ID_INFO.  */
-#if !defined _WIN32_WINNT || (_WIN32_WINNT < _WIN32_WINNT_WIN8)
-# undef _WIN32_WINNT
-# define _WIN32_WINNT _WIN32_WINNT_WIN8
+/* Attempt to make <windows.h> define FILE_ID_INFO.
+   But ensure that the redefinition of _WIN32_WINNT does not make us assume
+   Windows Vista or newer when building for an older version of Windows.  */
+#if HAVE_SDKDDKVER_H
+# include <sdkddkver.h>
+# if _WIN32_WINNT >= _WIN32_WINNT_VISTA
+#  define WIN32_ASSUME_VISTA 1
+# else
+#  define WIN32_ASSUME_VISTA 0
+# endif
+# if !defined _WIN32_WINNT || (_WIN32_WINNT < _WIN32_WINNT_WIN8)
+#  undef _WIN32_WINNT
+#  define _WIN32_WINNT _WIN32_WINNT_WIN8
+# endif
+#else
+# define WIN32_ASSUME_VISTA (_WIN32_WINNT >= _WIN32_WINNT_VISTA)
 #endif
 
 #include <sys/types.h>
 #undef GetFinalPathNameByHandle
 #define GetFinalPathNameByHandle GetFinalPathNameByHandleA
 
-#if !(_WIN32_WINNT >= _WIN32_WINNT_VISTA)
+/* Older mingw headers do not define VOLUME_NAME_NONE.  */
+#ifndef VOLUME_NAME_NONE
+# define VOLUME_NAME_NONE 4
+#endif
+
+#if !WIN32_ASSUME_VISTA
 
 /* Avoid warnings from gcc -Wcast-function-type.  */
 # define GetProcAddress \
@@ -149,7 +166,7 @@ _gl_fstat_by_handle (HANDLE h, const char *path, struct stat *buf)
   DWORD type = GetFileType (h);
   if (type == FILE_TYPE_DISK)
     {
-#if !(_WIN32_WINNT >= _WIN32_WINNT_VISTA)
+#if !WIN32_ASSUME_VISTA
       if (!initialized)
         initialize ();
 #endif
index 491a754baa124243e3c9708ae6039a2e04a94a01..27b4e472371d49666f5350937645841d773171cd 100644 (file)
@@ -1,5 +1,5 @@
 /* Core of implementation of fstat and stat for native Windows.
-   Copyright (C) 2017-2020 Free Software Foundation, Inc.
+   Copyright (C) 2017-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 9d3965d3ce5aebca61a5777cc1625c04a1aa52c0..505368f00546ad6b9666cc4a9b6842422749c7e6 100644 (file)
@@ -1,5 +1,5 @@
 /* Work around platform bugs in stat.
-   Copyright (C) 2009-2020 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index cd786bed2cd5aa155f936595221fc2342dbcc4db..eae9d132215e65c1abf80326325488527d15edec 100644 (file)
@@ -1,6 +1,6 @@
 /* A substitute for ISO C11 <stdalign.h>.
 
-   Copyright 2011-2020 Free Software Foundation, Inc.
+   Copyright 2011-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    requirement of a structure member (i.e., slot or field) that is of
    type TYPE, as an integer constant expression.
 
-   This differs from GCC's __alignof__ operator, which can yield a
-   better-performing alignment for an object of that type.  For
-   example, on x86 with GCC, __alignof__ (double) and __alignof__
-   (long long) are 8, whereas alignof (double) and alignof (long long)
-   are 4 unless the option '-malign-double' is used.
+   This differs from GCC's and clang's __alignof__ operator, which can
+   yield a better-performing alignment for an object of that type.  For
+   example, on x86 with GCC and on Linux/x86 with clang,
+   __alignof__ (double) and __alignof__ (long long) are 8, whereas
+   alignof (double) and alignof (long long) are 4 unless the option
+   '-malign-double' is used.
 
    The result cannot be used as a value for an 'enum' constant, if you
    want to be portable to HP-UX 10.20 cc and AIX 3.2.5 xlc.
 #undef _Alignof
 
 /* GCC releases before GCC 4.9 had a bug in _Alignof.  See GCC bug 52023
-   <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>.  */
+   <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>.
+   clang versions < 8.0.0 have the same bug.  */
 #if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \
-     || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9)))
+     || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9) \
+         && !defined __clang__) \
+     || (defined __clang__ && __clang_major__ < 8))
 # ifdef __cplusplus
 #  if 201103 <= __cplusplus
 #   define _Alignof(type) alignof (type)
 #  define _Alignas(a) alignas (a)
 # elif ((defined __APPLE__ && defined __MACH__                  \
          ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__)                 \
-         : __GNUC__ && !defined __ibmxl__) \
-        || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \
+         : __GNUC__ && !defined __ibmxl__)                      \
+        || (4 <= __clang_major__)                               \
+        || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC))  \
         || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__)
 #  define _Alignas(a) __attribute__ ((__aligned__ (a)))
 # elif 1300 <= _MSC_VER
index baacf98a38b81a2b2e88d40baa37c28088bb8101..28e0a53551411555fc6ee2840bf49bcdcb1da841 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2003, 2006-2020 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2003, 2006-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
index 2e50a1f01e8e226d291cf1c8a2e28a0b1c010928..3a0052d9ba9a753927ed73e9b006d35d2fce07d6 100644 (file)
@@ -1,6 +1,6 @@
 /* A substitute for POSIX 2008 <stddef.h>, for platforms that have issues.
 
-   Copyright (C) 2009-2020 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
 # ifndef _@GUARD_PREFIX@_STDDEF_H
 
+/* On AIX 7.2, with xlc in 64-bit mode, <stddef.h> defines max_align_t to a
+   type with alignment 4, but 'long' has alignment 8.  */
+#  if defined _AIX && defined _ARCH_PPC64
+#   if !GNULIB_defined_max_align_t
+#    ifdef _MAX_ALIGN_T
+/* /usr/include/stddef.h has already defined max_align_t.  Override it.  */
+typedef long rpl_max_align_t;
+#     define max_align_t rpl_max_align_t
+#    else
+/* Prevent /usr/include/stddef.h from defining max_align_t.  */
+typedef long max_align_t;
+#     define _MAX_ALIGN_T
+#    endif
+#    define GNULIB_defined_max_align_t 1
+#   endif
+#  endif
+
 /* The include_next requires a split double-inclusion guard.  */
 
 #  @INCLUDE_NEXT@ @NEXT_STDDEF_H@
    and the C11 standard allows this.  Work around this problem by
    using __alignof__ (which returns 8 for double) rather than _Alignof
    (which returns 4), and align each union member accordingly.  */
-#   ifdef __GNUC__
+#   if defined __GNUC__ || (__clang_major__ >= 4)
 #    define _GL_STDDEF_ALIGNAS(type) \
        __attribute__ ((__aligned__ (__alignof__ (type))))
 #   else
index 994c0c777c0d1f27c109b3b810dd6f84dddae7e4..7a8f27cef7e225074353b7794c22553018ab11d1 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2002, 2004-2020 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2002, 2004-2021 Free Software Foundation, Inc.
    Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood.
    This file is part of gnulib.
 
@@ -302,12 +302,11 @@ typedef gl_uint_fast32_t gl_uint_fast16_t;
 /* kLIBC's <stdint.h> defines _INTPTR_T_DECLARED and needs its own
    definitions of intptr_t and uintptr_t (which use int and unsigned)
    to avoid clashes with declarations of system functions like sbrk.
-   Similarly, mingw 5.22 <crtdefs.h> defines _INTPTR_T_DEFINED and
-   _UINTPTR_T_DEFINED and needs its own definitions of intptr_t and
+   Similarly, MinGW WSL-5.4.1 <stdint.h> needs its own intptr_t and
    uintptr_t to avoid conflicting declarations of system functions like
    _findclose in <io.h>.  */
 # if !((defined __KLIBC__ && defined _INTPTR_T_DECLARED) \
-       || (defined __MINGW32__ && defined _INTPTR_T_DEFINED && defined _UINTPTR_T_DEFINED))
+       || defined __MINGW32__)
 #  undef intptr_t
 #  undef uintptr_t
 #  ifdef _WIN64
@@ -580,11 +579,6 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
    <wchar.h> -> <stdio.h> -> <getopt.h> -> <stdlib.h>, and the latter includes
    <stdint.h> and assumes its types are already defined.  */
 # if @HAVE_WCHAR_H@ && ! (defined WCHAR_MIN && defined WCHAR_MAX)
-  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-     included before <wchar.h>.  */
-#  include <stddef.h>
-#  include <stdio.h>
-#  include <time.h>
 #  define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H
 #  include <wchar.h>
 #  undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H
index 6c338dd6c0b72457a7f8b70f3c606941d6e7f270..a9308405052c69cf7b576cd2b2617f5b46bb86d9 100644 (file)
@@ -1,6 +1,6 @@
 /* A GNU-like <stdio.h>.
 
-   Copyright (C) 2004, 2007-2020 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2007-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    gnulib and libintl do '#define printf __printf__' when they override
    the 'printf' function.  */
 #ifndef _GL_ATTRIBUTE_FORMAT
-# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
+# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) || defined __clang__
 #  define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
 # else
 #  define _GL_ATTRIBUTE_FORMAT(spec) /* empty */
 # endif
 #endif
 
-/* _GL_ATTRIBUTE_FORMAT_PRINTF
-   indicates to GCC that the function takes a format string and arguments,
-   where the format string directives are the ones standardized by ISO C99
-   and POSIX.  */
+/* An __attribute__ __format__ specifier for a function that takes a format
+   string and arguments, where the format string directives are the ones
+   standardized by ISO C99 and POSIX.
+   _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD  */
+/* __gnu_printf__ is supported in GCC >= 4.4.  */
 #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
-# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \
-   _GL_ATTRIBUTE_FORMAT ((__gnu_printf__, formatstring_parameter, first_argument))
+# define _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD __gnu_printf__
 #else
-# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \
-   _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument))
+# define _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD __printf__
 #endif
 
-/* _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_PRINTF,
-   except that it indicates to GCC that the supported format string directives
-   are the ones of the system printf(), rather than the ones standardized by
-   ISO C99 and POSIX.  */
+/* An __attribute__ __format__ specifier for a function that takes a format
+   string and arguments, where the format string directives are the ones of the
+   system printf(), rather than the ones standardized by ISO C99 and POSIX.
+   _GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM  */
+/* On mingw, Gnulib sets __USE_MINGW_ANSI_STDIO in order to get closer to
+   the standards.  The macro GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU indicates
+   whether this change is effective.  On older mingw, it is not.  */
 #if GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU
-# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \
-  _GL_ATTRIBUTE_FORMAT_PRINTF (formatstring_parameter, first_argument)
+# define _GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD
 #else
-# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \
-  _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument))
+# define _GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM __printf__
 #endif
 
+/* _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD
+   indicates to GCC that the function takes a format string and arguments,
+   where the format string directives are the ones standardized by ISO C99
+   and POSIX.  */
+#define _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD(formatstring_parameter, first_argument) \
+  _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, formatstring_parameter, first_argument))
+
+/* _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD,
+   except that it indicates to GCC that the supported format string directives
+   are the ones of the system printf(), rather than the ones standardized by
+   ISO C99 and POSIX.  */
+#define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \
+  _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM, formatstring_parameter, first_argument))
+
 /* _GL_ATTRIBUTE_FORMAT_SCANF
    indicates to GCC that the function takes a format string and arguments,
    where the format string directives are the ones standardized by ISO C99
 #   define dprintf rpl_dprintf
 #  endif
 _GL_FUNCDECL_RPL (dprintf, int, (int fd, const char *restrict format, ...)
-                                _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
+                                _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3)
                                 _GL_ARG_NONNULL ((2)));
 _GL_CXXALIAS_RPL (dprintf, int, (int fd, const char *restrict format, ...));
 # else
 #  if !@HAVE_DPRINTF@
 _GL_FUNCDECL_SYS (dprintf, int, (int fd, const char *restrict format, ...)
-                                _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
+                                _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3)
                                 _GL_ARG_NONNULL ((2)));
 #  endif
 _GL_CXXALIAS_SYS (dprintf, int, (int fd, const char *restrict format, ...));
@@ -215,6 +229,31 @@ _GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - "
                  "use gnulib module fclose for portable POSIX compliance");
 #endif
 
+#if @GNULIB_MDA_FCLOSEALL@
+/* On native Windows, map 'fcloseall' to '_fcloseall', so that -loldnames is
+   not required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::fcloseall on all platforms that have
+   it.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef fcloseall
+#   define fcloseall _fcloseall
+#  endif
+_GL_CXXALIAS_MDA (fcloseall, int, (void));
+# else
+#  if @HAVE_DECL_FCLOSEALL@
+#   if defined __FreeBSD__
+_GL_CXXALIAS_SYS (fcloseall, void, (void));
+#   else
+_GL_CXXALIAS_SYS (fcloseall, int, (void));
+#   endif
+#  endif
+# endif
+# if (defined _WIN32 && !defined __CYGWIN__) || @HAVE_DECL_FCLOSEALL@
+_GL_CXXALIASWARN (fcloseall);
+# endif
+#endif
+
 #if @GNULIB_FDOPEN@
 # if @REPLACE_FDOPEN@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
@@ -224,6 +263,12 @@ _GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - "
 _GL_FUNCDECL_RPL (fdopen, FILE *, (int fd, const char *mode)
                                   _GL_ARG_NONNULL ((2)));
 _GL_CXXALIAS_RPL (fdopen, FILE *, (int fd, const char *mode));
+# elif defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef fdopen
+#   define fdopen _fdopen
+#  endif
+_GL_CXXALIAS_MDA (fdopen, FILE *, (int fd, const char *mode));
 # else
 _GL_CXXALIAS_SYS (fdopen, FILE *, (int fd, const char *mode));
 # endif
@@ -233,6 +278,20 @@ _GL_CXXALIASWARN (fdopen);
 /* Assume fdopen is always declared.  */
 _GL_WARN_ON_USE (fdopen, "fdopen on native Windows platforms is not POSIX compliant - "
                  "use gnulib module fdopen for portability");
+#elif @GNULIB_MDA_FDOPEN@
+/* On native Windows, map 'fdopen' to '_fdopen', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::fdopen always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef fdopen
+#   define fdopen _fdopen
+#  endif
+_GL_CXXALIAS_MDA (fdopen, FILE *, (int fd, const char *mode));
+# else
+_GL_CXXALIAS_SYS (fdopen, FILE *, (int fd, const char *mode));
+# endif
+_GL_CXXALIASWARN (fdopen);
 #endif
 
 #if @GNULIB_FFLUSH@
@@ -297,6 +356,22 @@ _GL_CXXALIASWARN (fgets);
 # endif
 #endif
 
+#if @GNULIB_MDA_FILENO@
+/* On native Windows, map 'fileno' to '_fileno', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::fileno always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef fileno
+#   define fileno _fileno
+#  endif
+_GL_CXXALIAS_MDA (fileno, int, (FILE *restrict stream));
+# else
+_GL_CXXALIAS_SYS (fileno, int, (FILE *restrict stream));
+# endif
+_GL_CXXALIASWARN (fileno);
+#endif
+
 #if @GNULIB_FOPEN@
 # if @REPLACE_FOPEN@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
@@ -332,7 +407,7 @@ _GL_WARN_ON_USE (fopen, "fopen on native Windows platforms is not POSIX complian
 #  if @GNULIB_FPRINTF_POSIX@ || @GNULIB_VFPRINTF_POSIX@
 _GL_FUNCDECL_RPL (fprintf, int,
                   (FILE *restrict fp, const char *restrict format, ...)
-                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3)
                   _GL_ARG_NONNULL ((1, 2)));
 #  else
 _GL_FUNCDECL_RPL (fprintf, int,
@@ -824,6 +899,22 @@ _GL_WARN_ON_USE (getline, "getline is unportable - "
 _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
 #endif
 
+#if @GNULIB_MDA_GETW@
+/* On native Windows, map 'getw' to '_getw', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::getw always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef getw
+#   define getw _getw
+#  endif
+_GL_CXXALIAS_MDA (getw, int, (FILE *restrict stream));
+# else
+_GL_CXXALIAS_SYS (getw, int, (FILE *restrict stream));
+# endif
+_GL_CXXALIASWARN (getw);
+#endif
+
 #if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@
 struct obstack;
 /* Grow an obstack with formatted output.  Return the number of
@@ -837,7 +928,7 @@ struct obstack;
 #  endif
 _GL_FUNCDECL_RPL (obstack_printf, int,
                   (struct obstack *obs, const char *format, ...)
-                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3)
                   _GL_ARG_NONNULL ((1, 2)));
 _GL_CXXALIAS_RPL (obstack_printf, int,
                   (struct obstack *obs, const char *format, ...));
@@ -845,7 +936,7 @@ _GL_CXXALIAS_RPL (obstack_printf, int,
 #  if !@HAVE_DECL_OBSTACK_PRINTF@
 _GL_FUNCDECL_SYS (obstack_printf, int,
                   (struct obstack *obs, const char *format, ...)
-                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3)
                   _GL_ARG_NONNULL ((1, 2)));
 #  endif
 _GL_CXXALIAS_SYS (obstack_printf, int,
@@ -858,7 +949,7 @@ _GL_CXXALIASWARN (obstack_printf);
 #  endif
 _GL_FUNCDECL_RPL (obstack_vprintf, int,
                   (struct obstack *obs, const char *format, va_list args)
-                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0)
                   _GL_ARG_NONNULL ((1, 2)));
 _GL_CXXALIAS_RPL (obstack_vprintf, int,
                   (struct obstack *obs, const char *format, va_list args));
@@ -866,7 +957,7 @@ _GL_CXXALIAS_RPL (obstack_vprintf, int,
 #  if !@HAVE_DECL_OBSTACK_PRINTF@
 _GL_FUNCDECL_SYS (obstack_vprintf, int,
                   (struct obstack *obs, const char *format, va_list args)
-                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0)
                   _GL_ARG_NONNULL ((1, 2)));
 #  endif
 _GL_CXXALIAS_SYS (obstack_vprintf, int,
@@ -940,7 +1031,7 @@ _GL_WARN_ON_USE (popen, "popen is buggy on some platforms - "
 #if @GNULIB_PRINTF_POSIX@ || @GNULIB_PRINTF@
 # if (@GNULIB_PRINTF_POSIX@ && @REPLACE_PRINTF@) \
      || (@GNULIB_PRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@))
-#  if defined __GNUC__
+#  if defined __GNUC__ || defined __clang__
 #   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 /* Don't break __attribute__((format(printf,M,N))).  */
 #    define printf __printf__
@@ -950,7 +1041,7 @@ _GL_FUNCDECL_RPL_1 (__printf__, int,
                     (const char *restrict format, ...)
                     __asm__ (@ASM_SYMBOL_PREFIX@
                              _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf))
-                    _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2)
+                    _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (1, 2)
                     _GL_ARG_NONNULL ((1)));
 #   else
 _GL_FUNCDECL_RPL_1 (__printf__, int,
@@ -967,7 +1058,7 @@ _GL_CXXALIAS_RPL_1 (printf, __printf__, int, (const char *format, ...));
 #   endif
 _GL_FUNCDECL_RPL (printf, int,
                   (const char *restrict format, ...)
-                  _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (1, 2)
                   _GL_ARG_NONNULL ((1)));
 _GL_CXXALIAS_RPL (printf, int, (const char *restrict format, ...));
 #  endif
@@ -1037,6 +1128,22 @@ _GL_CXXALIASWARN (puts);
 # endif
 #endif
 
+#if @GNULIB_MDA_PUTW@
+/* On native Windows, map 'putw' to '_putw', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::putw always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef putw
+#   define putw _putw
+#  endif
+_GL_CXXALIAS_MDA (putw, int, (int w, FILE *restrict stream));
+# else
+_GL_CXXALIAS_SYS (putw, int, (int w, FILE *restrict stream));
+# endif
+_GL_CXXALIASWARN (putw);
+#endif
+
 #if @GNULIB_REMOVE@
 # if @REPLACE_REMOVE@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
@@ -1114,7 +1221,7 @@ _GL_WARN_ON_USE (renameat, "renameat is not portable - "
 
 #if @GNULIB_SCANF@
 # if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
-#  if defined __GNUC__
+#  if defined __GNUC__ || defined __clang__
 #   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #    undef scanf
 /* Don't break __attribute__((format(scanf,M,N))).  */
@@ -1153,7 +1260,7 @@ _GL_CXXALIASWARN (scanf);
 _GL_FUNCDECL_RPL (snprintf, int,
                   (char *restrict str, size_t size,
                    const char *restrict format, ...)
-                  _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (3, 4)
                   _GL_ARG_NONNULL ((3)));
 _GL_CXXALIAS_RPL (snprintf, int,
                   (char *restrict str, size_t size,
@@ -1163,14 +1270,16 @@ _GL_CXXALIAS_RPL (snprintf, int,
 _GL_FUNCDECL_SYS (snprintf, int,
                   (char *restrict str, size_t size,
                    const char *restrict format, ...)
-                  _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (3, 4)
                   _GL_ARG_NONNULL ((3)));
 #  endif
 _GL_CXXALIAS_SYS (snprintf, int,
                   (char *restrict str, size_t size,
                    const char *restrict format, ...));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (snprintf);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef snprintf
 # if HAVE_RAW_DECL_SNPRINTF
@@ -1195,7 +1304,7 @@ _GL_WARN_ON_USE (snprintf, "snprintf is unportable - "
 #  endif
 _GL_FUNCDECL_RPL (sprintf, int,
                   (char *restrict str, const char *restrict format, ...)
-                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3)
                   _GL_ARG_NONNULL ((1, 2)));
 _GL_CXXALIAS_RPL (sprintf, int,
                   (char *restrict str, const char *restrict format, ...));
@@ -1214,6 +1323,22 @@ _GL_WARN_ON_USE (sprintf, "sprintf is not always POSIX compliant - "
                  "POSIX compliance");
 #endif
 
+#if @GNULIB_MDA_TEMPNAM@
+/* On native Windows, map 'tempnam' to '_tempnam', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::tempnam always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef tempnam
+#   define tempnam _tempnam
+#  endif
+_GL_CXXALIAS_MDA (tempnam, char *, (const char *dir, const char *prefix));
+# else
+_GL_CXXALIAS_SYS (tempnam, char *, (const char *dir, const char *prefix));
+# endif
+_GL_CXXALIASWARN (tempnam);
+#endif
+
 #if @GNULIB_TMPFILE@
 # if @REPLACE_TMPFILE@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
@@ -1246,7 +1371,7 @@ _GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - "
 #  endif
 _GL_FUNCDECL_RPL (asprintf, int,
                   (char **result, const char *format, ...)
-                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3)
                   _GL_ARG_NONNULL ((1, 2)));
 _GL_CXXALIAS_RPL (asprintf, int,
                   (char **result, const char *format, ...));
@@ -1254,7 +1379,7 @@ _GL_CXXALIAS_RPL (asprintf, int,
 #  if !@HAVE_VASPRINTF@
 _GL_FUNCDECL_SYS (asprintf, int,
                   (char **result, const char *format, ...)
-                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3)
                   _GL_ARG_NONNULL ((1, 2)));
 #  endif
 _GL_CXXALIAS_SYS (asprintf, int,
@@ -1267,7 +1392,7 @@ _GL_CXXALIASWARN (asprintf);
 #  endif
 _GL_FUNCDECL_RPL (vasprintf, int,
                   (char **result, const char *format, va_list args)
-                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0)
                   _GL_ARG_NONNULL ((1, 2)));
 _GL_CXXALIAS_RPL (vasprintf, int,
                   (char **result, const char *format, va_list args));
@@ -1275,7 +1400,7 @@ _GL_CXXALIAS_RPL (vasprintf, int,
 #  if !@HAVE_VASPRINTF@
 _GL_FUNCDECL_SYS (vasprintf, int,
                   (char **result, const char *format, va_list args)
-                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0)
                   _GL_ARG_NONNULL ((1, 2)));
 #  endif
 _GL_CXXALIAS_SYS (vasprintf, int,
@@ -1291,7 +1416,7 @@ _GL_CXXALIASWARN (vasprintf);
 #  endif
 _GL_FUNCDECL_RPL (vdprintf, int,
                   (int fd, const char *restrict format, va_list args)
-                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0)
                   _GL_ARG_NONNULL ((2)));
 _GL_CXXALIAS_RPL (vdprintf, int,
                   (int fd, const char *restrict format, va_list args));
@@ -1299,7 +1424,7 @@ _GL_CXXALIAS_RPL (vdprintf, int,
 #  if !@HAVE_VDPRINTF@
 _GL_FUNCDECL_SYS (vdprintf, int,
                   (int fd, const char *restrict format, va_list args)
-                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0)
                   _GL_ARG_NONNULL ((2)));
 #  endif
 /* Need to cast, because on Solaris, the third parameter will likely be
@@ -1329,7 +1454,7 @@ _GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - "
 _GL_FUNCDECL_RPL (vfprintf, int,
                   (FILE *restrict fp,
                    const char *restrict format, va_list args)
-                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0)
                   _GL_ARG_NONNULL ((1, 2)));
 #  else
 _GL_FUNCDECL_RPL (vfprintf, int,
@@ -1382,7 +1507,9 @@ _GL_CXXALIAS_SYS (vfscanf, int,
                   (FILE *restrict stream,
                    const char *restrict format, va_list args));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (vfscanf);
+# endif
 #endif
 
 #if @GNULIB_VPRINTF_POSIX@ || @GNULIB_VPRINTF@
@@ -1394,7 +1521,7 @@ _GL_CXXALIASWARN (vfscanf);
 #  define GNULIB_overrides_vprintf 1
 #  if @GNULIB_VPRINTF_POSIX@ || @GNULIB_VFPRINTF_POSIX@
 _GL_FUNCDECL_RPL (vprintf, int, (const char *restrict format, va_list args)
-                                _GL_ATTRIBUTE_FORMAT_PRINTF (1, 0)
+                                _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (1, 0)
                                 _GL_ARG_NONNULL ((1)));
 #  else
 _GL_FUNCDECL_RPL (vprintf, int, (const char *restrict format, va_list args)
@@ -1436,7 +1563,9 @@ _GL_CXXALIAS_RPL (vscanf, int, (const char *restrict format, va_list args));
 # else
 _GL_CXXALIAS_SYS (vscanf, int, (const char *restrict format, va_list args));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (vscanf);
+# endif
 #endif
 
 #if @GNULIB_VSNPRINTF@
@@ -1447,7 +1576,7 @@ _GL_CXXALIASWARN (vscanf);
 _GL_FUNCDECL_RPL (vsnprintf, int,
                   (char *restrict str, size_t size,
                    const char *restrict format, va_list args)
-                  _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (3, 0)
                   _GL_ARG_NONNULL ((3)));
 _GL_CXXALIAS_RPL (vsnprintf, int,
                   (char *restrict str, size_t size,
@@ -1457,14 +1586,16 @@ _GL_CXXALIAS_RPL (vsnprintf, int,
 _GL_FUNCDECL_SYS (vsnprintf, int,
                   (char *restrict str, size_t size,
                    const char *restrict format, va_list args)
-                  _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (3, 0)
                   _GL_ARG_NONNULL ((3)));
 #  endif
 _GL_CXXALIAS_SYS (vsnprintf, int,
                   (char *restrict str, size_t size,
                    const char *restrict format, va_list args));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (vsnprintf);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef vsnprintf
 # if HAVE_RAW_DECL_VSNPRINTF
@@ -1481,7 +1612,7 @@ _GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - "
 _GL_FUNCDECL_RPL (vsprintf, int,
                   (char *restrict str,
                    const char *restrict format, va_list args)
-                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0)
                   _GL_ARG_NONNULL ((1, 2)));
 _GL_CXXALIAS_RPL (vsprintf, int,
                   (char *restrict str,
index 59f9e6c71d1e38fae1040b6e4f7eaf6494e02641..49fc44e14a1efbe79eed15a0eb0fadc7d51955e1 100644 (file)
@@ -1,6 +1,6 @@
 /* A GNU-like <stdlib.h>.
 
-   Copyright (C) 1995, 2001-2004, 2006-2020 Free Software Foundation, Inc.
+   Copyright (C) 1995, 2001-2004, 2006-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -53,8 +53,8 @@
 # include <sys/loadavg.h>
 #endif
 
-/* Native Windows platforms declare mktemp() in <io.h>.  */
-#if 0 && (defined _WIN32 && ! defined __CYGWIN__)
+/* Native Windows platforms declare _mktemp() in <io.h>.  */
+#if defined _WIN32 && !defined __CYGWIN__
 # include <io.h>
 #endif
 
@@ -102,7 +102,7 @@ struct random_data
 /* The __attribute__ feature is available in gcc versions 2.5 and later.
    The attribute __pure__ was added in gcc 2.96.  */
 #ifndef _GL_ATTRIBUTE_PURE
-# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
+# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined __clang__
 #  define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
 # else
 #  define _GL_ATTRIBUTE_PURE /* empty */
@@ -149,6 +149,31 @@ _GL_WARN_ON_USE (_Exit, "_Exit is unportable - "
 #endif
 
 
+/* Allocate memory with indefinite extent and specified alignment.  */
+#if @GNULIB_ALIGNED_ALLOC@
+# if @REPLACE_ALIGNED_ALLOC@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef aligned_alloc
+#   define aligned_alloc rpl_aligned_alloc
+#  endif
+_GL_FUNCDECL_RPL (aligned_alloc, void *, (size_t alignment, size_t size));
+_GL_CXXALIAS_RPL (aligned_alloc, void *, (size_t alignment, size_t size));
+# else
+#  if @HAVE_ALIGNED_ALLOC@
+_GL_CXXALIAS_SYS (aligned_alloc, void *, (size_t alignment, size_t size));
+#  endif
+# endif
+# if @HAVE_ALIGNED_ALLOC@
+_GL_CXXALIASWARN (aligned_alloc);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef aligned_alloc
+# if HAVE_RAW_DECL_ALIGNED_ALLOC
+_GL_WARN_ON_USE (aligned_alloc, "aligned_alloc is not portable - "
+                 "use gnulib module aligned_alloc for portability");
+# endif
+#endif
+
 #if @GNULIB_ATOLL@
 /* Parse a signed decimal integer.
    Returns the value of the integer.  Errors are not detected.  */
@@ -217,6 +242,94 @@ _GL_WARN_ON_USE (canonicalize_file_name,
 # endif
 #endif
 
+#if @GNULIB_MDA_ECVT@
+/* On native Windows, map 'ecvt' to '_ecvt', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::ecvt on all platforms that have
+   it.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef ecvt
+#   define ecvt _ecvt
+#  endif
+_GL_CXXALIAS_MDA (ecvt, char *,
+                  (double number, int ndigits, int *decptp, int *signp));
+# else
+#  if @HAVE_DECL_ECVT@
+_GL_CXXALIAS_SYS (ecvt, char *,
+                  (double number, int ndigits, int *decptp, int *signp));
+#  endif
+# endif
+# if (defined _WIN32 && !defined __CYGWIN__) || @HAVE_DECL_ECVT@
+_GL_CXXALIASWARN (ecvt);
+# endif
+#endif
+
+#if @GNULIB_MDA_FCVT@
+/* On native Windows, map 'fcvt' to '_fcvt', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::fcvt on all platforms that have
+   it.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef fcvt
+#   define fcvt _fcvt
+#  endif
+_GL_CXXALIAS_MDA (fcvt, char *,
+                  (double number, int ndigits, int *decptp, int *signp));
+# else
+#  if @HAVE_DECL_FCVT@
+_GL_CXXALIAS_SYS (fcvt, char *,
+                  (double number, int ndigits, int *decptp, int *signp));
+#  endif
+# endif
+# if (defined _WIN32 && !defined __CYGWIN__) || @HAVE_DECL_FCVT@
+_GL_CXXALIASWARN (fcvt);
+# endif
+#endif
+
+#if @GNULIB_FREE_POSIX@
+# if @REPLACE_FREE@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef free
+#   define free rpl_free
+#  endif
+_GL_FUNCDECL_RPL (free, void, (void *ptr));
+_GL_CXXALIAS_RPL (free, void, (void *ptr));
+# else
+_GL_CXXALIAS_SYS (free, void, (void *ptr));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (free);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef free
+/* Assume free is always declared.  */
+_GL_WARN_ON_USE (free, "free is not future POSIX compliant everywhere - "
+                 "use gnulib module free for portability");
+#endif
+
+#if @GNULIB_MDA_GCVT@
+/* On native Windows, map 'gcvt' to '_gcvt', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::gcvt on all platforms that have
+   it.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef gcvt
+#   define gcvt _gcvt
+#  endif
+_GL_CXXALIAS_MDA (gcvt, char *, (double number, int ndigits, char *buf));
+# else
+#  if @HAVE_DECL_GCVT@
+_GL_CXXALIAS_SYS (gcvt, char *, (double number, int ndigits, char *buf));
+#  endif
+# endif
+# if (defined _WIN32 && !defined __CYGWIN__) || @HAVE_DECL_GCVT@
+_GL_CXXALIASWARN (gcvt);
+# endif
+#endif
+
 #if @GNULIB_GETLOADAVG@
 /* Store max(NELEM,3) load average numbers in LOADAVG[].
    The three numbers are the load average of the last 1 minute, the last 5
@@ -468,6 +581,51 @@ _GL_WARN_ON_USE (mkstemps, "mkstemps is unportable - "
 # endif
 #endif
 
+#if @GNULIB_MDA_MKTEMP@
+/* On native Windows, map 'mktemp' to '_mktemp', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::mktemp always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef mktemp
+#   define mktemp _mktemp
+#  endif
+_GL_CXXALIAS_MDA (mktemp, char *, (char * /*template*/));
+# else
+_GL_CXXALIAS_SYS (mktemp, char *, (char * /*template*/));
+# endif
+_GL_CXXALIASWARN (mktemp);
+#endif
+
+/* Allocate memory with indefinite extent and specified alignment.  */
+#if @GNULIB_POSIX_MEMALIGN@
+# if @REPLACE_POSIX_MEMALIGN@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef posix_memalign
+#   define posix_memalign rpl_posix_memalign
+#  endif
+_GL_FUNCDECL_RPL (posix_memalign, int,
+                  (void **memptr, size_t alignment, size_t size)
+                  _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (posix_memalign, int,
+                  (void **memptr, size_t alignment, size_t size));
+# else
+#  if @HAVE_POSIX_MEMALIGN@
+_GL_CXXALIAS_SYS (posix_memalign, int,
+                  (void **memptr, size_t alignment, size_t size));
+#  endif
+# endif
+# if @HAVE_POSIX_MEMALIGN@
+_GL_CXXALIASWARN (posix_memalign);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_memalign
+# if HAVE_RAW_DECL_POSIX_MEMALIGN
+_GL_WARN_ON_USE (posix_memalign, "posix_memalign is not portable - "
+                 "use gnulib module posix_memalign for portability");
+# endif
+#endif
+
 #if @GNULIB_POSIX_OPENPT@
 /* Return an FD open to the master side of a pseudo-terminal.  Flags should
    include O_RDWR, and may also include O_NOCTTY.  */
@@ -546,6 +704,28 @@ _GL_WARN_ON_USE (ptsname_r, "ptsname_r is not portable - "
 #  endif
 _GL_FUNCDECL_RPL (putenv, int, (char *string) _GL_ARG_NONNULL ((1)));
 _GL_CXXALIAS_RPL (putenv, int, (char *string));
+# elif defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef putenv
+#   define putenv _putenv
+#  endif
+_GL_CXXALIAS_MDA (putenv, int, (char *string));
+# else
+_GL_CXXALIAS_SYS (putenv, int, (char *string));
+# endif
+_GL_CXXALIASWARN (putenv);
+#elif @GNULIB_MDA_PUTENV@
+/* On native Windows, map 'putenv' to '_putenv', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::putenv always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef putenv
+#   define putenv _putenv
+#  endif
+/* Need to cast, because on mingw, the parameter is either
+   'const char *string' or 'char *string'.  */
+_GL_CXXALIAS_MDA_CAST (putenv, int, (char *string));
 # else
 _GL_CXXALIAS_SYS (putenv, int, (char *string));
 # endif
index 6ad0130fad03577587ab7737010b8c8ad472a570..005a19fb513cc27cbeda1aa08335df4c50d818c5 100644 (file)
@@ -1,5 +1,5 @@
 /* Byte-wise substring search, using the Two-Way algorithm.
-   Copyright (C) 2008-2020 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Eric Blake <ebb9@byu.net>, 2008.
 
index 858d66fab1824e72b8b1ce901b743b5952628fe5..3fed52a53eb555db9587eddce5a44f4e52e83207 100644 (file)
@@ -1,5 +1,5 @@
 /* Searching in a string.
-   Copyright (C) 2003, 2007-2020 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2007-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index a85608a7c76a2222a98516b4a5ab6a35af444154..c71fd1544fd0d612f47620eef6ac9575549710df 100644 (file)
@@ -1,6 +1,6 @@
 # Suppress a valgrind message about use of uninitialized memory in strchrnul().
 
-# Copyright (C) 2008-2020 Free Software Foundation, Inc.
+# Copyright (C) 2008-2021 Free Software Foundation, Inc.
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
index 4da6007ac121acc3a7b7a712dfef99de84ed4baf..1a00b9d6eb0308a262de35e1c8f72c25349b6d4a 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1996-1998, 2002-2004, 2006-2007, 2009-2020 Free Software
+/* Copyright (C) 1991, 1996-1998, 2002-2004, 2006-2007, 2009-2021 Free Software
    Foundation, Inc.
 
    This file is part of the GNU C Library.
index d06c27200cd469aaf6f3b8d865efd8b194869566..9b63e81c2ee6219785384ad169a791461a895cfd 100644 (file)
@@ -1,5 +1,5 @@
 /* Optimized string comparison.
-   Copyright (C) 2001-2002, 2007, 2009-2020 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002, 2007, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published
@@ -29,7 +29,7 @@
 
 /* Help GCC to generate good code for string comparisons with
    immediate strings. */
-#if defined (__GNUC__) && defined (__OPTIMIZE__)
+#if (defined __GNUC__ || defined __clang__) && defined __OPTIMIZE__
 
 static inline int
 streq9 (const char *s1, const char *s2)
index 61b7689fd8139b06a6a59cca38f1a972634bc695..744714fa26c4e38e480a6009cc164c1f1aa943cd 100644 (file)
@@ -1,6 +1,6 @@
 /* strerror-override.c --- POSIX compatible system error routine
 
-   Copyright (C) 2010-2020 Free Software Foundation, Inc.
+   Copyright (C) 2010-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 062f51cf6ba594c8e7801f48d1d4902799f7bd0c..009c5609c1aa14549b0985fac170126751a6c9da 100644 (file)
@@ -1,6 +1,6 @@
 /* strerror-override.h --- POSIX compatible system error routine
 
-   Copyright (C) 2010-2020 Free Software Foundation, Inc.
+   Copyright (C) 2010-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 1a53a8b92776bdfcb1215594e389bf57fe457dd1..9a4972568b8d97e078002874c690a2efd0a323e8 100644 (file)
@@ -1,6 +1,6 @@
 /* strerror.c --- POSIX compatible system error routine
 
-   Copyright (C) 2007-2020 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 9ccc6c3b4f24f9db4e2b6f52b49f10df001f3db3..71965fb14b2b112900de1ee44e90f0d453f49ed7 100644 (file)
@@ -1,6 +1,6 @@
 /* strerror_r.c --- POSIX compatible system error routine
 
-   Copyright (C) 2010-2020 Free Software Foundation, Inc.
+   Copyright (C) 2010-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -120,6 +120,7 @@ local_snprintf (char *buf, size_t buflen, const char *format, ...)
     buf[buflen - 1] = '\0';
   return result;
 }
+# undef snprintf
 # define snprintf local_snprintf
 #endif
 
index a08e7057fbd77aebbf04eb47fee77ece4195445c..c76c1820b36bf088e6e663af7ec3751ba5d3ea84 100644 (file)
@@ -1,6 +1,6 @@
 /* A GNU-like <string.h>.
 
-   Copyright (C) 1995-1996, 2001-2020 Free Software Foundation, Inc.
+   Copyright (C) 1995-1996, 2001-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -55,7 +55,7 @@
 /* The __attribute__ feature is available in gcc versions 2.5 and later.
    The attribute __pure__ was added in gcc 2.96.  */
 #ifndef _GL_ATTRIBUTE_PURE
-# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
+# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined __clang__
 #  define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
 # else
 #  define _GL_ATTRIBUTE_PURE /* empty */
 # include <unistd.h>
 #endif
 
+/* AIX 7.2 declares ffsl and ffsll in <strings.h>, not in <string.h>.  */
+/* But in any case avoid namespace pollution on glibc systems.  */
+#if ((@GNULIB_FFSL@ || @GNULIB_FFSLL@ || defined GNULIB_POSIXCHECK) \
+     && defined _AIX) \
+    && ! defined __GLIBC__
+# include <strings.h>
+#endif
+
 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
 
 /* The definition of _GL_ARG_NONNULL is copied here.  */
@@ -110,10 +118,18 @@ _GL_WARN_ON_USE (ffsl, "ffsl is not portable - use the ffsl module");
 
 /* Find the index of the least-significant set bit.  */
 #if @GNULIB_FFSLL@
-# if !@HAVE_FFSLL@
+# if @REPLACE_FFSLL@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define ffsll rpl_ffsll
+#  endif
+_GL_FUNCDECL_RPL (ffsll, int, (long long int i));
+_GL_CXXALIAS_RPL (ffsll, int, (long long int i));
+# else
+#  if !@HAVE_FFSLL@
 _GL_FUNCDECL_SYS (ffsll, int, (long long int i));
-# endif
+#  endif
 _GL_CXXALIAS_SYS (ffsll, int, (long long int i));
+# endif
 _GL_CXXALIASWARN (ffsll);
 #elif defined GNULIB_POSIXCHECK
 # undef ffsll
@@ -123,10 +139,30 @@ _GL_WARN_ON_USE (ffsll, "ffsll is not portable - use the ffsll module");
 #endif
 
 
+#if @GNULIB_MDA_MEMCCPY@
+/* On native Windows, map 'memccpy' to '_memccpy', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::memccpy always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef memccpy
+#   define memccpy _memccpy
+#  endif
+_GL_CXXALIAS_MDA (memccpy, void *,
+                  (void *dest, const void *src, int c, size_t n));
+# else
+_GL_CXXALIAS_SYS (memccpy, void *,
+                  (void *dest, const void *src, int c, size_t n));
+# endif
+_GL_CXXALIASWARN (memccpy);
+#endif
+
+
 /* Return the first instance of C within N bytes of S, or NULL.  */
 #if @GNULIB_MEMCHR@
 # if @REPLACE_MEMCHR@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef memchr
 #   define memchr rpl_memchr
 #  endif
 _GL_FUNCDECL_RPL (memchr, void *, (void const *__s, int __c, size_t __n)
@@ -134,11 +170,6 @@ _GL_FUNCDECL_RPL (memchr, void *, (void const *__s, int __c, size_t __n)
                                   _GL_ARG_NONNULL ((1)));
 _GL_CXXALIAS_RPL (memchr, void *, (void const *__s, int __c, size_t __n));
 # else
-#  if ! @HAVE_MEMCHR@
-_GL_FUNCDECL_SYS (memchr, void *, (void const *__s, int __c, size_t __n)
-                                  _GL_ATTRIBUTE_PURE
-                                  _GL_ARG_NONNULL ((1)));
-#  endif
   /* On some systems, this function is defined as an overloaded function:
        extern "C" { const void * std::memchr (const void *, int, size_t); }
        extern "C++" { void * std::memchr (void *, int, size_t); }  */
@@ -334,7 +365,8 @@ _GL_WARN_ON_USE (stpncpy, "stpncpy is unportable - "
    GB18030 and the character to be searched is a digit.  */
 # undef strchr
 /* Assume strchr is always declared.  */
-_GL_WARN_ON_USE_CXX (strchr, const char *, (const char *, int),
+_GL_WARN_ON_USE_CXX (strchr,
+                     const char *, char *, (const char *, int),
                      "strchr cannot work correctly on character strings "
                      "in some multibyte locales - "
                      "use mbschr if you care about internationalization");
@@ -388,6 +420,12 @@ _GL_WARN_ON_USE (strchrnul, "strchrnul is unportable - "
 #  endif
 _GL_FUNCDECL_RPL (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1)));
 _GL_CXXALIAS_RPL (strdup, char *, (char const *__s));
+# elif defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef strdup
+#   define strdup _strdup
+#  endif
+_GL_CXXALIAS_MDA (strdup, char *, (char const *__s));
 # else
 #  if defined __cplusplus && defined GNULIB_NAMESPACE && defined strdup
     /* strdup exists as a function and as a macro.  Get rid of the macro.  */
@@ -405,6 +443,23 @@ _GL_CXXALIASWARN (strdup);
 _GL_WARN_ON_USE (strdup, "strdup is unportable - "
                  "use gnulib module strdup for portability");
 # endif
+#elif @GNULIB_MDA_STRDUP@
+/* On native Windows, map 'creat' to '_creat', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::creat always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef strdup
+#   define strdup _strdup
+#  endif
+_GL_CXXALIAS_MDA (strdup, char *, (char const *__s));
+# else
+#  if defined __cplusplus && defined GNULIB_NAMESPACE && defined strdup
+#   undef strdup
+#  endif
+_GL_CXXALIAS_SYS (strdup, char *, (char const *__s));
+# endif
+_GL_CXXALIASWARN (strdup);
 #endif
 
 /* Append no more than N characters from SRC onto DEST.  */
@@ -529,7 +584,8 @@ _GL_CXXALIASWARN (strpbrk);
    locale encoding is GB18030 and one of the characters to be searched is a
    digit.  */
 #  undef strpbrk
-_GL_WARN_ON_USE_CXX (strpbrk, const char *, (const char *, const char *),
+_GL_WARN_ON_USE_CXX (strpbrk,
+                     const char *, char *, (const char *, const char *),
                      "strpbrk cannot work correctly on character strings "
                      "in multibyte locales - "
                      "use mbspbrk if you care about internationalization");
@@ -537,7 +593,8 @@ _GL_WARN_ON_USE_CXX (strpbrk, const char *, (const char *, const char *),
 #elif defined GNULIB_POSIXCHECK
 # undef strpbrk
 # if HAVE_RAW_DECL_STRPBRK
-_GL_WARN_ON_USE_CXX (strpbrk, const char *, (const char *, const char *),
+_GL_WARN_ON_USE_CXX (strpbrk,
+                     const char *, char *, (const char *, const char *),
                      "strpbrk is unportable - "
                      "use gnulib module strpbrk for portability");
 # endif
@@ -558,7 +615,8 @@ _GL_WARN_ON_USE (strspn, "strspn cannot work correctly on character strings "
    GB18030 and the character to be searched is a digit.  */
 # undef strrchr
 /* Assume strrchr is always declared.  */
-_GL_WARN_ON_USE_CXX (strrchr, const char *, (const char *, int),
+_GL_WARN_ON_USE_CXX (strrchr,
+                     const char *, char *, (const char *, int),
                      "strrchr cannot work correctly on character strings "
                      "in some multibyte locales - "
                      "use mbsrchr if you care about internationalization");
@@ -1031,6 +1089,60 @@ _GL_WARN_ON_USE (strerror_r, "strerror_r is unportable - "
 # endif
 #endif
 
+/* Return the name of the system error code ERRNUM.  */
+#if @GNULIB_STRERRORNAME_NP@
+# if @REPLACE_STRERRORNAME_NP@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef strerrorname_np
+#   define strerrorname_np rpl_strerrorname_np
+#  endif
+_GL_FUNCDECL_RPL (strerrorname_np, const char *, (int errnum));
+_GL_CXXALIAS_RPL (strerrorname_np, const char *, (int errnum));
+# else
+#  if !@HAVE_STRERRORNAME_NP@
+_GL_FUNCDECL_SYS (strerrorname_np, const char *, (int errnum));
+#  endif
+_GL_CXXALIAS_SYS (strerrorname_np, const char *, (int errnum));
+# endif
+_GL_CXXALIASWARN (strerrorname_np);
+#elif defined GNULIB_POSIXCHECK
+# undef strerrorname_np
+# if HAVE_RAW_DECL_STRERRORNAME_NP
+_GL_WARN_ON_USE (strerrorname_np, "strerrorname_np is unportable - "
+                 "use gnulib module strerrorname_np for portability");
+# endif
+#endif
+
+/* Return an abbreviation string for the signal number SIG.  */
+#if @GNULIB_SIGABBREV_NP@
+# if ! @HAVE_SIGABBREV_NP@
+_GL_FUNCDECL_SYS (sigabbrev_np, const char *, (int sig));
+# endif
+_GL_CXXALIAS_SYS (sigabbrev_np, const char *, (int sig));
+_GL_CXXALIASWARN (sigabbrev_np);
+#elif defined GNULIB_POSIXCHECK
+# undef sigabbrev_np
+# if HAVE_RAW_DECL_SIGABBREV_NP
+_GL_WARN_ON_USE (sigabbrev_np, "sigabbrev_np is unportable - "
+                 "use gnulib module sigabbrev_np for portability");
+# endif
+#endif
+
+/* Return an English description string for the signal number SIG.  */
+#if @GNULIB_SIGDESCR_NP@
+# if ! @HAVE_SIGDESCR_NP@
+_GL_FUNCDECL_SYS (sigdescr_np, const char *, (int sig));
+# endif
+_GL_CXXALIAS_SYS (sigdescr_np, const char *, (int sig));
+_GL_CXXALIASWARN (sigdescr_np);
+#elif defined GNULIB_POSIXCHECK
+# undef sigdescr_np
+# if HAVE_RAW_DECL_SIGDESCR_NP
+_GL_WARN_ON_USE (sigdescr_np, "sigdescr_np is unportable - "
+                 "use gnulib module sigdescr_np for portability");
+# endif
+#endif
+
 #if @GNULIB_STRSIGNAL@
 # if @REPLACE_STRSIGNAL@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
index 6818b30614166bcdf63cb41e56a16dfd87f5429d..f2cbcb5483bb7dce223c2e5050a4134ef7163cf3 100644 (file)
@@ -1,6 +1,6 @@
 /* stripslash.c -- remove redundant trailing slashes from a file name
 
-   Copyright (C) 1990, 2001, 2003-2006, 2009-2020 Free Software Foundation,
+   Copyright (C) 1990, 2001, 2003-2006, 2009-2021 Free Software Foundation,
    Inc.
 
    This program is free software: you can redistribute it and/or modify
index dcecf0820dfb352615d25de5099029bdb48639ad..c27a0392c2bda765de3eda9372e0ecc99f311e6a 100644 (file)
@@ -1,5 +1,5 @@
 /* Find the length of STRING, but scan at most MAXLEN characters.
-   Copyright (C) 2005-2007, 2009-2020 Free Software Foundation, Inc.
+   Copyright (C) 2005-2007, 2009-2021 Free Software Foundation, Inc.
    Written by Simon Josefsson.
 
    This program is free software; you can redistribute it and/or modify
index 88edc182f884b25bb9d2df08f85d27e92245391c..d52811b627c7ac32d8796d3ae9afa3b4cc36086a 100644 (file)
@@ -1,5 +1,5 @@
 /* Find the length of STRING + 1, but scan at most MAXLEN bytes.
-   Copyright (C) 2005-2006, 2009-2020 Free Software Foundation, Inc.
+   Copyright (C) 2005-2006, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 2e21fea1f4b687cb967b8eabb841fbf4dcc49d30..da62073f35344ef6487efcad2c2bdc9b67128d32 100644 (file)
@@ -1,5 +1,5 @@
 /* Find the length of STRING + 1, but scan at most MAXLEN bytes.
-   Copyright (C) 2005, 2009-2020 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 2f8ae46f70ba70fe5f0b550cab4fcab3eb1ae73f..50daaf68d35f8913b86b3ac3597cac75e4df7798 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2020 Free Software
+/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2021 Free Software
    Foundation, Inc.
    This file is part of the GNU C Library.
 
index 1870a0af78776ea856111e84fff9dfb71d050473..ef576a6470d26b3b49c8f2f14d8928ccb05a9fe3 100644 (file)
@@ -1,5 +1,5 @@
 /* Reentrant string tokenizer.  Generic version.
-   Copyright (C) 1991, 1996-1999, 2001, 2004, 2007, 2009-2020 Free Software
+   Copyright (C) 1991, 1996-1999, 2001, 2004, 2007, 2009-2021 Free Software
    Foundation, Inc.
    This file is part of the GNU C Library.
 
index f14ac1f57238ed181e611a8fbf082fa89b647084..5b9280dda3645ec0f5dea6ca2d6348f5e97dd44c 100644 (file)
@@ -1,5 +1,5 @@
 /* Substitute for <sys/random.h>.
-   Copyright (C) 2020 Free Software Foundation, Inc.
+   Copyright (C) 2020-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
 #if @HAVE_SYS_RANDOM_H@
 
+/* On uClibc, <sys/random.h> assumes prior inclusion of <stddef.h>.  */
+# if defined __UCLIBC__
+#  include <stddef.h>
+# endif
 /* On Mac OS X 10.5, <sys/random.h> assumes prior inclusion of <sys/types.h>.
    On Max OS X 10.13, <sys/random.h> assumes prior inclusion of a file that
    includes <Availability.h>, such as <stdlib.h> or <unistd.h>.  */
index 88ac5f08afe3f9482fd1173d58b5257f775f8a11..2777007f06341e5281d61406e50daa0d6f77bbd7 100644 (file)
@@ -1,6 +1,6 @@
 /* Provide a sys/socket header file for systems lacking it (read: MinGW)
    and for systems where it is incomplete.
-   Copyright (C) 2005-2020 Free Software Foundation, Inc.
+   Copyright (C) 2005-2021 Free Software Foundation, Inc.
    Written by Simon Josefsson.
 
    This program is free software; you can redistribute it and/or modify
@@ -256,7 +256,7 @@ rpl_fd_isset (SOCKET fd, fd_set * set)
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   undef close
 #   define close close_used_without_including_unistd_h
-#  else
+#  elif !defined __clang__
     _GL_WARN_ON_USE (close,
                      "close() used without including <unistd.h>");
 #  endif
index 4494607279565442060bf6372e2f58d2feff0c11..13d12943cd04ecf0b0392c8cacb61b790fd59db2 100644 (file)
@@ -1,5 +1,5 @@
 /* Provide a more complete sys/stat.h header file.
-   Copyright (C) 2005-2020 Free Software Foundation, Inc.
+   Copyright (C) 2005-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -375,11 +375,11 @@ struct stat
 # define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH)
 #endif
 
-/* S_IXUGO is a common extension to POSIX.  */
+/* Although S_IXUGO and S_IRWXUGO are not specified by POSIX and are
+   not implemented in GNU/Linux, some Gnulib-using apps use the macros.  */
 #if !S_IXUGO
 # define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH)
 #endif
-
 #ifndef S_IRWXUGO
 # define S_IRWXUGO (S_IRWXU | S_IRWXG | S_IRWXO)
 #endif
@@ -391,6 +391,24 @@ struct stat
 #endif
 
 
+#if @GNULIB_MDA_CHMOD@
+/* On native Windows, map 'chmod' to '_chmod', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::chmod always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef chmod
+#   define chmod _chmod
+#  endif
+/* Need to cast, because in mingw the last argument is 'int mode'.  */
+_GL_CXXALIAS_MDA_CAST (chmod, int, (const char *filename, mode_t mode));
+# else
+_GL_CXXALIAS_SYS (chmod, int, (const char *filename, mode_t mode));
+# endif
+_GL_CXXALIASWARN (chmod);
+#endif
+
+
 #if @GNULIB_FCHMODAT@
 # if @REPLACE_FCHMODAT@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
@@ -432,7 +450,9 @@ _GL_CXXALIAS_RPL (fstat, int, (int fd, struct stat *buf));
 # else
 _GL_CXXALIAS_SYS (fstat, int, (int fd, struct stat *buf));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (fstat);
+# endif
 #elif @GNULIB_OVERRIDES_STRUCT_STAT@
 # undef fstat
 # define fstat fstat_used_without_requesting_gnulib_module_fstat
@@ -515,6 +535,23 @@ _GL_WARN_ON_USE (futimens, "futimens is not portable - "
 #endif
 
 
+#if @GNULIB_GETUMASK@
+# if !@HAVE_GETUMASK@
+_GL_FUNCDECL_SYS (getumask, mode_t, (void));
+# endif
+_GL_CXXALIAS_SYS (getumask, mode_t, (void));
+# if @HAVE_GETUMASK@
+_GL_CXXALIASWARN (getumask);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef getumask
+# if HAVE_RAW_DECL_GETUMASK
+_GL_WARN_ON_USE (getumask, "getumask is not portable - "
+                 "use gnulib module getumask for portability");
+# endif
+#endif
+
+
 #if @GNULIB_LCHMOD@
 /* Change the mode of FILENAME to MODE, without dereferencing it if FILENAME
    denotes a symbolic link.  */
@@ -571,21 +608,20 @@ _GL_WARN_ON_USE (lstat, "lstat is unportable - "
 #endif
 
 
-#if @REPLACE_MKDIR@
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-#  undef mkdir
-#  define mkdir rpl_mkdir
-# endif
+#if @GNULIB_MKDIR@
+# if @REPLACE_MKDIR@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef mkdir
+#   define mkdir rpl_mkdir
+#  endif
 _GL_FUNCDECL_RPL (mkdir, int, (char const *name, mode_t mode)
-                              _GL_ARG_NONNULL ((1)));
+                               _GL_ARG_NONNULL ((1)));
 _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode));
-#else
+# elif defined _WIN32 && !defined __CYGWIN__
 /* mingw's _mkdir() function has 1 argument, but we pass 2 arguments.
    Additionally, it declares _mkdir (and depending on compile flags, an
    alias mkdir), only in the nonstandard includes <direct.h> and <io.h>,
    which are included above.  */
-# if defined _WIN32 && ! defined __CYGWIN__
-
 #  if !GNULIB_defined_rpl_mkdir
 static int
 rpl_mkdir (char const *name, mode_t mode)
@@ -594,16 +630,44 @@ rpl_mkdir (char const *name, mode_t mode)
 }
 #   define GNULIB_defined_rpl_mkdir 1
 #  endif
-
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef mkdir
 #   define mkdir rpl_mkdir
 #  endif
 _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode));
 # else
 _GL_CXXALIAS_SYS (mkdir, int, (char const *name, mode_t mode));
 # endif
-#endif
 _GL_CXXALIASWARN (mkdir);
+#elif defined GNULIB_POSIXCHECK
+# undef mkdir
+# if HAVE_RAW_DECL_MKDIR
+_GL_WARN_ON_USE (mkdir, "mkdir does not always support two parameters - "
+                 "use gnulib module mkdir for portability");
+# endif
+#elif @GNULIB_MDA_MKDIR@
+/* On native Windows, map 'mkdir' to '_mkdir', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::mkdir always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !GNULIB_defined_rpl_mkdir
+static int
+rpl_mkdir (char const *name, mode_t mode)
+{
+  return _mkdir (name);
+}
+#   define GNULIB_defined_rpl_mkdir 1
+#  endif
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef mkdir
+#   define mkdir rpl_mkdir
+#  endif
+_GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode));
+# else
+_GL_CXXALIAS_SYS (mkdir, int, (char const *name, mode_t mode));
+# endif
+_GL_CXXALIASWARN (mkdir);
+#endif
 
 
 #if @GNULIB_MKDIRAT@
@@ -649,11 +713,21 @@ _GL_WARN_ON_USE (mkfifo, "mkfifo is not portable - "
 
 
 #if @GNULIB_MKFIFOAT@
-# if !@HAVE_MKFIFOAT@
+# if @REPLACE_MKFIFOAT@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef mkfifoat
+#   define mkfifoat rpl_mkfifoat
+#  endif
+_GL_FUNCDECL_RPL (mkfifoat, int, (int fd, char const *file, mode_t mode)
+                                 _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (mkfifoat, int, (int fd, char const *file, mode_t mode));
+# else
+#  if !@HAVE_MKFIFOAT@
 _GL_FUNCDECL_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode)
                                  _GL_ARG_NONNULL ((2)));
-# endif
+#  endif
 _GL_CXXALIAS_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode));
+# endif
 _GL_CXXALIASWARN (mkfifoat);
 #elif defined GNULIB_POSIXCHECK
 # undef mkfifoat
@@ -692,13 +766,25 @@ _GL_WARN_ON_USE (mknod, "mknod is not portable - "
 
 
 #if @GNULIB_MKNODAT@
-# if !@HAVE_MKNODAT@
+# if @REPLACE_MKNODAT@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef mknodat
+#   define mknodat rpl_mknodat
+#  endif
+_GL_FUNCDECL_RPL (mknodat, int,
+                  (int fd, char const *file, mode_t mode, dev_t dev)
+                  _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (mknodat, int,
+                  (int fd, char const *file, mode_t mode, dev_t dev));
+# else
+#  if !@HAVE_MKNODAT@
 _GL_FUNCDECL_SYS (mknodat, int,
                   (int fd, char const *file, mode_t mode, dev_t dev)
                   _GL_ARG_NONNULL ((2)));
-# endif
+#  endif
 _GL_CXXALIAS_SYS (mknodat, int,
                   (int fd, char const *file, mode_t mode, dev_t dev));
+# endif
 _GL_CXXALIASWARN (mknodat);
 #elif defined GNULIB_POSIXCHECK
 # undef mknodat
@@ -783,6 +869,24 @@ _GL_WARN_ON_USE (stat, "stat is unportable - "
 #endif
 
 
+#if @GNULIB_MDA_UMASK@
+/* On native Windows, map 'umask' to '_umask', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::umask always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef umask
+#   define umask _umask
+#  endif
+/* Need to cast, because in mingw the last argument is 'int mode'.  */
+_GL_CXXALIAS_MDA_CAST (umask, mode_t, (mode_t mask));
+# else
+_GL_CXXALIAS_SYS (umask, mode_t, (mode_t mask));
+# endif
+_GL_CXXALIASWARN (umask);
+#endif
+
+
 #if @GNULIB_UTIMENSAT@
 /* Use the rpl_ prefix also on Solaris <= 9, because on Solaris 9 our utimensat
    implementation relies on futimesat, which on Solaris 10 makes an invocation
index d30b26719b269b1119f27f9dea2fe9c184cb6da2..90a67d18426fcddf04260cd2bd791d21a1349c84 100644 (file)
@@ -1,6 +1,6 @@
 /* Provide a more complete sys/time.h.
 
-   Copyright (C) 2007-2020 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -135,7 +135,7 @@ _GL_WARN_ON_USE (gettimeofday, "gettimeofday is unportable - "
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   undef close
 #   define close close_used_without_including_unistd_h
-#  else
+#  elif !defined __clang__
      _GL_WARN_ON_USE (close,
                       "close() used without including <unistd.h>");
 #  endif
index e7e1a22ee5e2a7eb6586692aec3d716ad7c2d30f..654e80335fa4f58d2ccc6b1c3d12e33cf1134d57 100644 (file)
@@ -1,6 +1,6 @@
 /* Provide a more complete sys/types.h.
 
-   Copyright (C) 2011-2020 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 8588d3c07ab752e6f347d909def14a4b63efe60b..db724379a9510356a00287fc67bede64f389c98b 100644 (file)
@@ -1,5 +1,5 @@
 /* Substitute for <sys/uio.h>.
-   Copyright (C) 2011-2020 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index cfb0fc42ecad447dde9a2ca5fe6a8219b311db3c..3d91deef1e1e9acadeabe695202ef85c0dd0d4d8 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
 #include <string.h>
 
 #include <fcntl.h>
+#include <stdalign.h>
 #include <stdint.h>
 #include <sys/random.h>
 #include <sys/stat.h>
+#include <time.h>
 
 #if _LIBC
 # define struct_stat64 struct stat64
 # define __mkdir mkdir
 # define __open open
 # define __lxstat64(version, file, buf) lstat (file, buf)
+# define __getrandom getrandom
+# define __clock_gettime64 clock_gettime
+# define __timespec64 timespec
 #endif
 
-#ifdef _LIBC
-# include <random-bits.h>
-# define RANDOM_BITS(Var) ((Var) = random_bits ())
-typedef uint32_t random_value;
-# define RANDOM_VALUE_MAX UINT32_MAX
-# define BASE_62_DIGITS 5 /* 62**5 < UINT32_MAX */
-# define BASE_62_POWER (62 * 62 * 62 * 62 * 62) /* 2**BASE_62_DIGITS */
-#else
 /* Use getrandom if it works, falling back on a 64-bit linear
-   congruential generator that starts with whatever Var's value
-   happens to be.  */
-# define RANDOM_BITS(Var) \
-    ((void) (getrandom (&(Var), sizeof (Var), 0) == sizeof (Var) \
-             || ((Var) = 2862933555777941757 * (Var) + 3037000493)))
+   congruential generator that starts with Var's value
+   mixed in with a clock's low-order bits if available.  */
 typedef uint_fast64_t random_value;
-# define RANDOM_VALUE_MAX UINT_FAST64_MAX
-# define BASE_62_DIGITS 10 /* 62**10 < UINT_FAST64_MAX */
-# define BASE_62_POWER (62LL * 62 * 62 * 62 * 62 * 62 * 62 * 62 * 62 * 62)
+#define RANDOM_VALUE_MAX UINT_FAST64_MAX
+#define BASE_62_DIGITS 10 /* 62**10 < UINT_FAST64_MAX */
+#define BASE_62_POWER (62LL * 62 * 62 * 62 * 62 * 62 * 62 * 62 * 62 * 62)
+
+static random_value
+random_bits (random_value var)
+{
+  random_value r;
+  if (__getrandom (&r, sizeof r, 0) == sizeof r)
+    return r;
+#if _LIBC || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
+  /* Add entropy if getrandom is not supported.  */
+  struct __timespec64 tv;
+  __clock_gettime64 (CLOCK_MONOTONIC, &tv);
+  var ^= tv.tv_nsec;
 #endif
+  return 2862933555777941757 * var + 3037000493;
+}
 
 #if _LIBC
 /* Return nonzero if DIR is an existent directory.  */
@@ -250,8 +258,11 @@ try_tempname_len (char *tmpl, int suffixlen, void *args,
   unsigned int attempts = ATTEMPTS_MIN;
 #endif
 
-  /* A random variable.  */
-  random_value v;
+  /* A random variable.  The initial value is used only the for fallback path
+     on 'random_bits' on 'getrandom' failure.  Its initial value tries to use
+     some entropy from the ASLR and ignore possible bits from the stack
+     alignment.  */
+  random_value v = ((uintptr_t) &v) / alignof (max_align_t);
 
   /* How many random base-62 digits can currently be extracted from V.  */
   int vdigits = 0;
@@ -279,7 +290,7 @@ try_tempname_len (char *tmpl, int suffixlen, void *args,
           if (vdigits == 0)
             {
               do
-                RANDOM_BITS (v);
+                v = random_bits (v);
               while (unfair_min <= v);
 
               vdigits = BASE_62_DIGITS;
index 00dcbe4c93bd824af77466a016716dd58699ce12..a8681fc998ec0cf6acd85889ed419ecc20779ee5 100644 (file)
@@ -1,6 +1,6 @@
 /* Create a temporary file or directory.
 
-   Copyright (C) 2006, 2009-2020 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 1d11650e77f819d749b7ea18d1673c66bee46c78..1385980cdf57d342448a31119d5e1ef26063b9df 100644 (file)
@@ -1,6 +1,6 @@
 /* A more-standard <time.h>.
 
-   Copyright (C) 2007-2020 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -101,6 +101,25 @@ struct __time_t_must_be_integral {
 #  define GNULIB_defined_struct_time_t_must_be_integral 1
 # endif
 
+/* Define TIME_UTC, a positive integer constant used for timespec_get().  */
+# if ! @TIME_H_DEFINES_TIME_UTC@
+#  if !GNULIB_defined_TIME_UTC
+#   define TIME_UTC 1
+#   define GNULIB_defined_TIME_UTC 1
+#  endif
+# endif
+
+/* Set *TS to the current time, and return BASE.
+   Upon failure, return 0.  */
+# if @GNULIB_TIMESPEC_GET@
+#  if ! @HAVE_TIMESPEC_GET@
+_GL_FUNCDECL_SYS (timespec_get, int, (struct timespec *ts, int base)
+                                     _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (timespec_get, int, (struct timespec *ts, int base));
+_GL_CXXALIASWARN (timespec_get);
+# endif
+
 /* Sleep for at least RQTP seconds unless interrupted,  If interrupted,
    return -1 and store the remaining time into RMTP.  See
    <https://pubs.opengroup.org/onlinepubs/9699919799/functions/nanosleep.html>.  */
@@ -135,10 +154,27 @@ _GL_CXXALIASWARN (nanosleep);
 #   endif
 _GL_FUNCDECL_RPL (tzset, void, (void));
 _GL_CXXALIAS_RPL (tzset, void, (void));
+#  elif defined _WIN32 && !defined __CYGWIN__
+#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#    undef tzset
+#    define tzset _tzset
+#   endif
+_GL_CXXALIAS_MDA (tzset, void, (void));
 #  else
-#   if ! @HAVE_TZSET@
-_GL_FUNCDECL_SYS (tzset, void, (void));
+_GL_CXXALIAS_SYS (tzset, void, (void));
+#  endif
+_GL_CXXALIASWARN (tzset);
+# elif @GNULIB_MDA_TZSET@
+/* On native Windows, map 'tzset' to '_tzset', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::tzset always.  */
+#  if defined _WIN32 && !defined __CYGWIN__
+#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#    undef tzset
+#    define tzset _tzset
 #   endif
+_GL_CXXALIAS_MDA (tzset, void, (void));
+#  else
 _GL_CXXALIAS_SYS (tzset, void, (void));
 #  endif
 _GL_CXXALIASWARN (tzset);
@@ -350,17 +386,17 @@ _GL_WARN_ON_USE (asctime, "asctime can overrun buffers in some cases - "
 # endif
 # if defined GNULIB_POSIXCHECK
 #  undef asctime_r
-_GL_WARN_ON_USE (asctime, "asctime_r can overrun buffers in some cases - "
+_GL_WARN_ON_USE (asctime_r, "asctime_r can overrun buffers in some cases - "
                  "better use strftime (or even sprintf) instead");
 # endif
 # if defined GNULIB_POSIXCHECK
 #  undef ctime
-_GL_WARN_ON_USE (asctime, "ctime can overrun buffers in some cases - "
+_GL_WARN_ON_USE (ctime, "ctime can overrun buffers in some cases - "
                  "better use strftime (or even sprintf) instead");
 # endif
 # if defined GNULIB_POSIXCHECK
 #  undef ctime_r
-_GL_WARN_ON_USE (asctime, "ctime_r can overrun buffers in some cases - "
+_GL_WARN_ON_USE (ctime_r, "ctime_r can overrun buffers in some cases - "
                  "better use strftime (or even sprintf) instead");
 # endif
 
index e8fca2d5c4491aa13aeaa7ef82b398740900480a..d908986870463888c0e133af26b4caee6f3063bf 100644 (file)
@@ -1,6 +1,6 @@
 /* Reentrant time functions like localtime_r.
 
-   Copyright (C) 2003, 2006-2007, 2010-2020 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2006-2007, 2010-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 05f37406476ebb0f5f2abcc8aa9b661d9fd428ee..5e6ecb0f7cac490fbcf65d47d990ca785b613e45 100644 (file)
@@ -1,6 +1,6 @@
 /* Like unistd.h, but redefine some names to avoid glitches.
 
-   Copyright (C) 2005, 2009-2020 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 3e8350967832fbf365d666df5bbbbfbb9076247f..541bafe293d26fb2c76275b306f69601aeebf877 100644 (file)
@@ -1,6 +1,6 @@
 /* Invoke unistd-like functions, but avoid some glitches.
 
-   Copyright (C) 2001, 2003, 2005, 2009-2020 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2003, 2005, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index b211e4d61f7951d1bc031653e0d835ef21b5e770..5e9b47d981eed9c3aa17ed4d2104ad78e22a487f 100644 (file)
@@ -1,5 +1,5 @@
 /* Substitute for and wrapper around <unistd.h>.
-   Copyright (C) 2003-2020 Free Software Foundation, Inc.
+   Copyright (C) 2003-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 # undef __need_system_stdlib_h
 #endif
 
-/* Native Windows platforms declare chdir, getcwd, rmdir in
+/* Native Windows platforms declare _chdir, _getcwd, _rmdir in
    <io.h> and/or <direct.h>, not in <unistd.h>.
-   They also declare access(), chmod(), close(), dup(), dup2(), isatty(),
-   lseek(), read(), unlink(), write() in <io.h>.  */
-#if ((@GNULIB_CHDIR@ || @GNULIB_GETCWD@ || @GNULIB_RMDIR@ \
-      || defined GNULIB_POSIXCHECK) \
-     && (defined _WIN32 && ! defined __CYGWIN__))
-# include <io.h>     /* mingw32, mingw64 */
-# include <direct.h> /* mingw64, MSVC 9 */
-#elif (@GNULIB_CLOSE@ || @GNULIB_DUP@ || @GNULIB_DUP2@ || @GNULIB_ISATTY@ \
-       || @GNULIB_LSEEK@ || @GNULIB_READ@ || @GNULIB_UNLINK@ || @GNULIB_WRITE@ \
-       || defined GNULIB_POSIXCHECK) \
-      && (defined _WIN32 && ! defined __CYGWIN__)
+   They also declare _access(), _chmod(), _close(), _dup(), _dup2(), _isatty(),
+   _lseek(), _read(), _unlink(), _write() in <io.h>.  */
+#if defined _WIN32 && !defined __CYGWIN__
 # include <io.h>
+# include <direct.h>
+#endif
+
+/* Native Windows platforms declare _execl*, _execv* in <process.h>.  */
+#if defined _WIN32 && !defined __CYGWIN__
+# include <process.h>
 #endif
 
 /* AIX and OSF/1 5.1 declare getdomainname in <netdb.h>, not in <unistd.h>.
 
 /* MSVC defines off_t in <sys/types.h>.
    May also define off_t to a 64-bit type on native Windows.  */
-/* But avoid namespace pollution on glibc systems.  */
-#ifndef __GLIBC__
-/* Get off_t, ssize_t.  */
-# include <sys/types.h>
-#endif
+/* Get off_t, ssize_t, mode_t.  */
+#include <sys/types.h>
 
 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
 
@@ -273,6 +268,12 @@ _GL_INLINE_HEADER_BEGIN
 _GL_FUNCDECL_RPL (access, int, (const char *file, int mode)
                                _GL_ARG_NONNULL ((1)));
 _GL_CXXALIAS_RPL (access, int, (const char *file, int mode));
+# elif defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef access
+#   define access _access
+#  endif
+_GL_CXXALIAS_MDA (access, int, (const char *file, int mode));
 # else
 _GL_CXXALIAS_SYS (access, int, (const char *file, int mode));
 # endif
@@ -286,11 +287,33 @@ _GL_WARN_ON_USE (access, "access does not always support X_OK - "
                  "also, this function is a security risk - "
                  "use the gnulib module faccessat instead");
 # endif
+#elif @GNULIB_MDA_ACCESS@
+/* On native Windows, map 'access' to '_access', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::access always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef access
+#   define access _access
+#  endif
+_GL_CXXALIAS_MDA (access, int, (const char *file, int mode));
+# else
+_GL_CXXALIAS_SYS (access, int, (const char *file, int mode));
+# endif
+_GL_CXXALIASWARN (access);
 #endif
 
 
 #if @GNULIB_CHDIR@
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef chdir
+#   define chdir _chdir
+#  endif
+_GL_CXXALIAS_MDA (chdir, int, (const char *file));
+# else
 _GL_CXXALIAS_SYS (chdir, int, (const char *file) _GL_ARG_NONNULL ((1)));
+# endif
 _GL_CXXALIASWARN (chdir);
 #elif defined GNULIB_POSIXCHECK
 # undef chdir
@@ -298,6 +321,20 @@ _GL_CXXALIASWARN (chdir);
 _GL_WARN_ON_USE (chown, "chdir is not always in <unistd.h> - "
                  "use gnulib module chdir for portability");
 # endif
+#elif @GNULIB_MDA_CHDIR@
+/* On native Windows, map 'chdir' to '_chdir', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::chdir always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef chdir
+#   define chdir _chdir
+#  endif
+_GL_CXXALIAS_MDA (chdir, int, (const char *file));
+# else
+_GL_CXXALIAS_SYS (chdir, int, (const char *file) _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIASWARN (chdir);
 #endif
 
 
@@ -342,6 +379,12 @@ _GL_WARN_ON_USE (chown, "chown fails to follow symlinks on some systems and "
 #  endif
 _GL_FUNCDECL_RPL (close, int, (int fd));
 _GL_CXXALIAS_RPL (close, int, (int fd));
+# elif defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef close
+#   define close _close
+#  endif
+_GL_CXXALIAS_MDA (close, int, (int fd));
 # else
 _GL_CXXALIAS_SYS (close, int, (int fd));
 # endif
@@ -354,6 +397,20 @@ _GL_CXXALIASWARN (close);
 /* Assume close is always declared.  */
 _GL_WARN_ON_USE (close, "close does not portably work on sockets - "
                  "use gnulib module close for portability");
+#elif @GNULIB_MDA_CLOSE@
+/* On native Windows, map 'close' to '_close', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::close always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef close
+#   define close _close
+#  endif
+_GL_CXXALIAS_MDA (close, int, (int fd));
+# else
+_GL_CXXALIAS_SYS (close, int, (int fd));
+# endif
+_GL_CXXALIASWARN (close);
 #endif
 
 
@@ -368,10 +425,11 @@ _GL_CXXALIAS_SYS (copy_file_range, ssize_t, (int ifd, off_t *ipos,
 # endif
 _GL_CXXALIASWARN (copy_file_range);
 #elif defined GNULIB_POSIXCHECK
-/* Assume copy_file_range is always declared.  */
+# if HAVE_RAW_DECL_COPY_FILE_RANGE
 _GL_WARN_ON_USE (copy_file_range,
                  "copy_file_range is unportable - "
                  "use gnulib module copy_file_range for portability");
+# endif
 #endif
 
 
@@ -382,6 +440,12 @@ _GL_WARN_ON_USE (copy_file_range,
 #  endif
 _GL_FUNCDECL_RPL (dup, int, (int oldfd));
 _GL_CXXALIAS_RPL (dup, int, (int oldfd));
+# elif defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef dup
+#   define dup _dup
+#  endif
+_GL_CXXALIAS_MDA (dup, int, (int oldfd));
 # else
 _GL_CXXALIAS_SYS (dup, int, (int oldfd));
 # endif
@@ -392,6 +456,20 @@ _GL_CXXALIASWARN (dup);
 _GL_WARN_ON_USE (dup, "dup is unportable - "
                  "use gnulib module dup for portability");
 # endif
+#elif @GNULIB_MDA_DUP@
+/* On native Windows, map 'dup' to '_dup', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::dup always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef dup
+#   define dup _dup
+#  endif
+_GL_CXXALIAS_MDA (dup, int, (int oldfd));
+# else
+_GL_CXXALIAS_SYS (dup, int, (int oldfd));
+# endif
+_GL_CXXALIASWARN (dup);
 #endif
 
 
@@ -407,10 +485,13 @@ _GL_WARN_ON_USE (dup, "dup is unportable - "
 #  endif
 _GL_FUNCDECL_RPL (dup2, int, (int oldfd, int newfd));
 _GL_CXXALIAS_RPL (dup2, int, (int oldfd, int newfd));
-# else
-#  if !@HAVE_DUP2@
-_GL_FUNCDECL_SYS (dup2, int, (int oldfd, int newfd));
+# elif defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef dup2
+#   define dup2 _dup2
 #  endif
+_GL_CXXALIAS_MDA (dup2, int, (int oldfd, int newfd));
+# else
 _GL_CXXALIAS_SYS (dup2, int, (int oldfd, int newfd));
 # endif
 _GL_CXXALIASWARN (dup2);
@@ -420,6 +501,20 @@ _GL_CXXALIASWARN (dup2);
 _GL_WARN_ON_USE (dup2, "dup2 is unportable - "
                  "use gnulib module dup2 for portability");
 # endif
+#elif @GNULIB_MDA_DUP2@
+/* On native Windows, map 'dup2' to '_dup2', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::dup2 always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef dup2
+#   define dup2 _dup2
+#  endif
+_GL_CXXALIAS_MDA (dup2, int, (int oldfd, int newfd));
+# else
+_GL_CXXALIAS_SYS (dup2, int, (int oldfd, int newfd));
+# endif
+_GL_CXXALIASWARN (dup2);
 #endif
 
 
@@ -520,6 +615,282 @@ _GL_WARN_ON_USE (euidaccess, "euidaccess is unportable - "
 #endif
 
 
+#if @GNULIB_EXECL@
+# if @REPLACE_EXECL@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef execl
+#   define execl rpl_execl
+#  endif
+_GL_FUNCDECL_RPL (execl, int, (const char *program, const char *arg, ...)
+                              _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (execl, int, (const char *program, const char *arg, ...));
+# else
+_GL_CXXALIAS_SYS (execl, int, (const char *program, const char *arg, ...));
+# endif
+_GL_CXXALIASWARN (execl);
+#elif defined GNULIB_POSIXCHECK
+# undef execl
+# if HAVE_RAW_DECL_EXECL
+_GL_WARN_ON_USE (execl, "execl behaves very differently on mingw - "
+                 "use gnulib module execl for portability");
+# endif
+#elif @GNULIB_MDA_EXECL@
+/* On native Windows, map 'execl' to '_execl', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::execl always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef execl
+#   define execl _execl
+#  endif
+_GL_CXXALIAS_MDA (execl, intptr_t, (const char *program, const char *arg, ...));
+# else
+_GL_CXXALIAS_SYS (execl, int, (const char *program, const char *arg, ...));
+# endif
+_GL_CXXALIASWARN (execl);
+#endif
+
+#if @GNULIB_EXECLE@
+# if @REPLACE_EXECLE@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef execle
+#   define execle rpl_execle
+#  endif
+_GL_FUNCDECL_RPL (execle, int, (const char *program, const char *arg, ...)
+                               _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (execle, int, (const char *program, const char *arg, ...));
+# else
+_GL_CXXALIAS_SYS (execle, int, (const char *program, const char *arg, ...));
+# endif
+_GL_CXXALIASWARN (execle);
+#elif defined GNULIB_POSIXCHECK
+# undef execle
+# if HAVE_RAW_DECL_EXECLE
+_GL_WARN_ON_USE (execle, "execle behaves very differently on mingw - "
+                 "use gnulib module execle for portability");
+# endif
+#elif @GNULIB_MDA_EXECLE@
+/* On native Windows, map 'execle' to '_execle', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::execle always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef execle
+#   define execle _execle
+#  endif
+_GL_CXXALIAS_MDA (execle, intptr_t,
+                  (const char *program, const char *arg, ...));
+# else
+_GL_CXXALIAS_SYS (execle, int, (const char *program, const char *arg, ...));
+# endif
+_GL_CXXALIASWARN (execle);
+#endif
+
+#if @GNULIB_EXECLP@
+# if @REPLACE_EXECLP@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef execlp
+#   define execlp rpl_execlp
+#  endif
+_GL_FUNCDECL_RPL (execlp, int, (const char *program, const char *arg, ...)
+                               _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (execlp, int, (const char *program, const char *arg, ...));
+# else
+_GL_CXXALIAS_SYS (execlp, int, (const char *program, const char *arg, ...));
+# endif
+_GL_CXXALIASWARN (execlp);
+#elif defined GNULIB_POSIXCHECK
+# undef execlp
+# if HAVE_RAW_DECL_EXECLP
+_GL_WARN_ON_USE (execlp, "execlp behaves very differently on mingw - "
+                 "use gnulib module execlp for portability");
+# endif
+#elif @GNULIB_MDA_EXECLP@
+/* On native Windows, map 'execlp' to '_execlp', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::execlp always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef execlp
+#   define execlp _execlp
+#  endif
+_GL_CXXALIAS_MDA (execlp, intptr_t,
+                  (const char *program, const char *arg, ...));
+# else
+_GL_CXXALIAS_SYS (execlp, int, (const char *program, const char *arg, ...));
+# endif
+_GL_CXXALIASWARN (execlp);
+#endif
+
+
+#if @GNULIB_EXECV@
+# if @REPLACE_EXECV@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef execv
+#   define execv rpl_execv
+#  endif
+_GL_FUNCDECL_RPL (execv, int, (const char *program, char * const *argv)
+                              _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (execv, int, (const char *program, char * const *argv));
+# else
+_GL_CXXALIAS_SYS (execv, int, (const char *program, char * const *argv));
+# endif
+_GL_CXXALIASWARN (execv);
+#elif defined GNULIB_POSIXCHECK
+# undef execv
+# if HAVE_RAW_DECL_EXECV
+_GL_WARN_ON_USE (execv, "execv behaves very differently on mingw - "
+                 "use gnulib module execv for portability");
+# endif
+#elif @GNULIB_MDA_EXECV@
+/* On native Windows, map 'execv' to '_execv', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::execv always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef execv
+#   define execv _execv
+#  endif
+_GL_CXXALIAS_MDA_CAST (execv, intptr_t,
+                       (const char *program, char * const *argv));
+# else
+_GL_CXXALIAS_SYS (execv, int, (const char *program, char * const *argv));
+# endif
+_GL_CXXALIASWARN (execv);
+#endif
+
+#if @GNULIB_EXECVE@
+# if @REPLACE_EXECVE@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef execve
+#   define execve rpl_execve
+#  endif
+_GL_FUNCDECL_RPL (execve, int,
+                  (const char *program, char * const *argv, char * const *env)
+                  _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (execve, int,
+                  (const char *program, char * const *argv, char * const *env));
+# else
+_GL_CXXALIAS_SYS (execve, int,
+                  (const char *program, char * const *argv, char * const *env));
+# endif
+_GL_CXXALIASWARN (execve);
+#elif defined GNULIB_POSIXCHECK
+# undef execve
+# if HAVE_RAW_DECL_EXECVE
+_GL_WARN_ON_USE (execve, "execve behaves very differently on mingw - "
+                 "use gnulib module execve for portability");
+# endif
+#elif @GNULIB_MDA_EXECVE@
+/* On native Windows, map 'execve' to '_execve', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::execve always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef execve
+#   define execve _execve
+#  endif
+_GL_CXXALIAS_MDA_CAST (execve, intptr_t,
+                       (const char *program, char * const *argv,
+                        char * const *env));
+# else
+_GL_CXXALIAS_SYS (execve, int,
+                  (const char *program, char * const *argv, char * const *env));
+# endif
+_GL_CXXALIASWARN (execve);
+#endif
+
+#if @GNULIB_EXECVP@
+# if @REPLACE_EXECVP@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef execvp
+#   define execvp rpl_execvp
+#  endif
+_GL_FUNCDECL_RPL (execvp, int, (const char *program, char * const *argv)
+                               _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (execvp, int, (const char *program, char * const *argv));
+# else
+_GL_CXXALIAS_SYS (execvp, int, (const char *program, char * const *argv));
+# endif
+_GL_CXXALIASWARN (execvp);
+#elif defined GNULIB_POSIXCHECK
+# undef execvp
+# if HAVE_RAW_DECL_EXECVP
+_GL_WARN_ON_USE (execvp, "execvp behaves very differently on mingw - "
+                 "use gnulib module execvp for portability");
+# endif
+#elif @GNULIB_MDA_EXECVP@
+/* On native Windows, map 'execvp' to '_execvp', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::execvp always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef execvp
+#   define execvp _execvp
+#  endif
+_GL_CXXALIAS_MDA_CAST (execvp, intptr_t,
+                       (const char *program, char * const *argv));
+# else
+_GL_CXXALIAS_SYS (execvp, int, (const char *program, char * const *argv));
+# endif
+_GL_CXXALIASWARN (execvp);
+#endif
+
+#if @GNULIB_EXECVPE@
+# if @REPLACE_EXECVPE@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef execvpe
+#   define execvpe rpl_execvpe
+#  endif
+_GL_FUNCDECL_RPL (execvpe, int,
+                  (const char *program, char * const *argv, char * const *env)
+                  _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (execvpe, int,
+                  (const char *program, char * const *argv, char * const *env));
+# else
+#  if !@HAVE_DECL_EXECVPE@
+_GL_FUNCDECL_SYS (execvpe, int,
+                  (const char *program, char * const *argv, char * const *env)
+                  _GL_ARG_NONNULL ((1, 2)));
+#  endif
+_GL_CXXALIAS_SYS (execvpe, int,
+                  (const char *program, char * const *argv, char * const *env));
+# endif
+_GL_CXXALIASWARN (execvpe);
+#elif defined GNULIB_POSIXCHECK
+# undef execvpe
+# if HAVE_RAW_DECL_EXECVPE
+_GL_WARN_ON_USE (execvpe, "execvpe behaves very differently on mingw - "
+                 "use gnulib module execvpe for portability");
+# endif
+#elif @GNULIB_MDA_EXECVPE@
+/* On native Windows, map 'execvpe' to '_execvpe', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::execvpe on all platforms that have
+   it.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef execvpe
+#   define execvpe _execvpe
+#  endif
+_GL_CXXALIAS_MDA_CAST (execvpe, intptr_t,
+                       (const char *program, char * const *argv,
+                        char * const *env));
+# elif @HAVE_EXECVPE@
+#  if !@HAVE_DECL_EXECVPE@
+_GL_FUNCDECL_SYS (execvpe, int,
+                  (const char *program, char * const *argv, char * const *env)
+                  _GL_ARG_NONNULL ((1, 2)));
+#  endif
+_GL_CXXALIAS_SYS (execvpe, int,
+                  (const char *program, char * const *argv, char * const *env));
+# endif
+# if (defined _WIN32 && !defined __CYGWIN__) || @HAVE_EXECVPE@
+_GL_CXXALIASWARN (execvpe);
+# endif
+#endif
+
+
 #if @GNULIB_FACCESSAT@
 # if @REPLACE_FACCESSAT@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
@@ -607,7 +978,7 @@ _GL_CXXALIASWARN (fchownat);
 # undef fchownat
 # if HAVE_RAW_DECL_FCHOWNAT
 _GL_WARN_ON_USE (fchownat, "fchownat is not portable - "
-                 "use gnulib module openat for portability");
+                 "use gnulib module fchownat for portability");
 # endif
 #endif
 
@@ -695,6 +1066,12 @@ _GL_WARN_ON_USE (ftruncate, "ftruncate is unportable - "
 #  endif
 _GL_FUNCDECL_RPL (getcwd, char *, (char *buf, size_t size));
 _GL_CXXALIAS_RPL (getcwd, char *, (char *buf, size_t size));
+# elif defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef getcwd
+#   define getcwd _getcwd
+#  endif
+_GL_CXXALIAS_MDA (getcwd, char *, (char *buf, size_t size));
 # else
 /* Need to cast, because on mingw, the second parameter is
                                                    int size.  */
@@ -707,6 +1084,22 @@ _GL_CXXALIASWARN (getcwd);
 _GL_WARN_ON_USE (getcwd, "getcwd is unportable - "
                  "use gnulib module getcwd for portability");
 # endif
+#elif @GNULIB_MDA_GETCWD@
+/* On native Windows, map 'getcwd' to '_getcwd', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::getcwd always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef getcwd
+#   define getcwd _getcwd
+#  endif
+/* Need to cast, because on mingw, the second parameter is either
+   'int size' or 'size_t size'.  */
+_GL_CXXALIAS_MDA_CAST (getcwd, char *, (char *buf, size_t size));
+# else
+_GL_CXXALIAS_SYS_CAST (getcwd, char *, (char *buf, size_t size));
+# endif
+_GL_CXXALIASWARN (getcwd);
 #endif
 
 
@@ -1041,6 +1434,23 @@ _GL_WARN_ON_USE (getpass, "getpass is unportable - "
 #endif
 
 
+#if @GNULIB_MDA_GETPID@
+/* On native Windows, map 'getpid' to '_getpid', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::getpid always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef getpid
+#   define getpid _getpid
+#  endif
+_GL_CXXALIAS_MDA (getpid, int, (void));
+# else
+_GL_CXXALIAS_SYS (getpid, pid_t, (void));
+# endif
+_GL_CXXALIASWARN (getpid);
+#endif
+
+
 #if @GNULIB_GETUSERSHELL@
 /* Return the next valid login shell on the system, or NULL when the end of
    the list has been reached.  */
@@ -1113,6 +1523,12 @@ _GL_WARN_ON_USE (group_member, "group_member is unportable - "
 #  endif
 _GL_FUNCDECL_RPL (isatty, int, (int fd));
 _GL_CXXALIAS_RPL (isatty, int, (int fd));
+# elif defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef isatty
+#   define isatty _isatty
+#  endif
+_GL_CXXALIAS_MDA (isatty, int, (int fd));
 # else
 _GL_CXXALIAS_SYS (isatty, int, (int fd));
 # endif
@@ -1123,6 +1539,20 @@ _GL_CXXALIASWARN (isatty);
 _GL_WARN_ON_USE (isatty, "isatty has portability problems on native Windows - "
                  "use gnulib module isatty for portability");
 # endif
+#elif @GNULIB_MDA_ISATTY@
+/* On native Windows, map 'isatty' to '_isatty', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::isatty always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef isatty
+#   define isatty _isatty
+#  endif
+_GL_CXXALIAS_MDA (isatty, int, (int fd));
+# else
+_GL_CXXALIAS_SYS (isatty, int, (int fd));
+# endif
+_GL_CXXALIASWARN (isatty);
 #endif
 
 
@@ -1234,6 +1664,12 @@ _GL_WARN_ON_USE (linkat, "linkat is unportable - "
 #  endif
 _GL_FUNCDECL_RPL (lseek, off_t, (int fd, off_t offset, int whence));
 _GL_CXXALIAS_RPL (lseek, off_t, (int fd, off_t offset, int whence));
+# elif defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef lseek
+#   define lseek _lseek
+#  endif
+_GL_CXXALIAS_MDA (lseek, off_t, (int fd, off_t offset, int whence));
 # else
 _GL_CXXALIAS_SYS (lseek, off_t, (int fd, off_t offset, int whence));
 # endif
@@ -1244,6 +1680,20 @@ _GL_CXXALIASWARN (lseek);
 _GL_WARN_ON_USE (lseek, "lseek does not fail with ESPIPE on pipes on some "
                  "systems - use gnulib module lseek for portability");
 # endif
+#elif @GNULIB_MDA_LSEEK@
+/* On native Windows, map 'lseek' to '_lseek', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::lseek always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef lseek
+#   define lseek _lseek
+#  endif
+_GL_CXXALIAS_MDA (lseek, long, (int fd, long offset, int whence));
+# else
+_GL_CXXALIAS_SYS (lseek, off_t, (int fd, off_t offset, int whence));
+# endif
+_GL_CXXALIASWARN (lseek);
 #endif
 
 
@@ -1376,11 +1826,32 @@ _GL_WARN_ON_USE (pwrite, "pwrite is unportable - "
 _GL_FUNCDECL_RPL (read, ssize_t, (int fd, void *buf, size_t count)
                                  _GL_ARG_NONNULL ((2)));
 _GL_CXXALIAS_RPL (read, ssize_t, (int fd, void *buf, size_t count));
+# elif defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef read
+#   define read _read
+#  endif
+_GL_CXXALIAS_MDA (read, ssize_t, (int fd, void *buf, size_t count));
+# else
+_GL_CXXALIAS_SYS (read, ssize_t, (int fd, void *buf, size_t count));
+# endif
+_GL_CXXALIASWARN (read);
+#elif @GNULIB_MDA_READ@
+/* On native Windows, map 'read' to '_read', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::read always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef read
+#   define read _read
+#  endif
+#  ifdef __MINGW32__
+_GL_CXXALIAS_MDA (read, int, (int fd, void *buf, unsigned int count));
+#  else
+_GL_CXXALIAS_MDA (read, ssize_t, (int fd, void *buf, unsigned int count));
+#  endif
 # else
-/* Need to cast, because on mingw, the third parameter is
-                                                          unsigned int count
-   and the return type is 'int'.  */
-_GL_CXXALIAS_SYS_CAST (read, ssize_t, (int fd, void *buf, size_t count));
+_GL_CXXALIAS_SYS (read, ssize_t, (int fd, void *buf, size_t count));
 # endif
 _GL_CXXALIASWARN (read);
 #endif
@@ -1465,6 +1936,12 @@ _GL_WARN_ON_USE (readlinkat, "readlinkat is not portable - "
 #  endif
 _GL_FUNCDECL_RPL (rmdir, int, (char const *name) _GL_ARG_NONNULL ((1)));
 _GL_CXXALIAS_RPL (rmdir, int, (char const *name));
+# elif defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef rmdir
+#   define rmdir _rmdir
+#  endif
+_GL_CXXALIAS_MDA (rmdir, int, (char const *name));
 # else
 _GL_CXXALIAS_SYS (rmdir, int, (char const *name));
 # endif
@@ -1475,6 +1952,20 @@ _GL_CXXALIASWARN (rmdir);
 _GL_WARN_ON_USE (rmdir, "rmdir is unportable - "
                  "use gnulib module rmdir for portability");
 # endif
+#elif @GNULIB_MDA_RMDIR@
+/* On native Windows, map 'rmdir' to '_rmdir', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::rmdir always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef rmdir
+#   define rmdir _rmdir
+#  endif
+_GL_CXXALIAS_MDA (rmdir, int, (char const *name));
+# else
+_GL_CXXALIAS_SYS (rmdir, int, (char const *name));
+# endif
+_GL_CXXALIASWARN (rmdir);
 #endif
 
 
@@ -1533,6 +2024,23 @@ _GL_WARN_ON_USE (sleep, "sleep is unportable - "
 #endif
 
 
+#if @GNULIB_MDA_SWAB@
+/* On native Windows, map 'swab' to '_swab', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::creat always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef swab
+#   define swab _swab
+#  endif
+_GL_CXXALIAS_MDA (swab, void, (char *from, char *to, int n));
+# else
+_GL_CXXALIAS_SYS (swab, void, (const void *from, void *to, ssize_t n));
+# endif
+_GL_CXXALIASWARN (swab);
+#endif
+
+
 #if @GNULIB_SYMLINK@
 # if @REPLACE_SYMLINK@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
@@ -1657,6 +2165,12 @@ _GL_WARN_ON_USE (ttyname_r, "ttyname_r is not portable - "
 #  endif
 _GL_FUNCDECL_RPL (unlink, int, (char const *file) _GL_ARG_NONNULL ((1)));
 _GL_CXXALIAS_RPL (unlink, int, (char const *file));
+# elif defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef unlink
+#   define unlink _unlink
+#  endif
+_GL_CXXALIAS_MDA (unlink, int, (char const *file));
 # else
 _GL_CXXALIAS_SYS (unlink, int, (char const *file));
 # endif
@@ -1667,6 +2181,20 @@ _GL_CXXALIASWARN (unlink);
 _GL_WARN_ON_USE (unlink, "unlink is not portable - "
                  "use gnulib module unlink for portability");
 # endif
+#elif @GNULIB_MDA_UNLINK@
+/* On native Windows, map 'unlink' to '_unlink', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::unlink always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef unlink
+#   define unlink _unlink
+#  endif
+_GL_CXXALIAS_MDA (unlink, int, (char const *file));
+# else
+_GL_CXXALIAS_SYS (unlink, int, (char const *file));
+# endif
+_GL_CXXALIASWARN (unlink);
 #endif
 
 
@@ -1691,7 +2219,7 @@ _GL_CXXALIASWARN (unlinkat);
 # undef unlinkat
 # if HAVE_RAW_DECL_UNLINKAT
 _GL_WARN_ON_USE (unlinkat, "unlinkat is not portable - "
-                 "use gnulib module openat for portability");
+                 "use gnulib module unlinkat for portability");
 # endif
 #endif
 
@@ -1738,11 +2266,32 @@ _GL_WARN_ON_USE (usleep, "usleep is unportable - "
 _GL_FUNCDECL_RPL (write, ssize_t, (int fd, const void *buf, size_t count)
                                   _GL_ARG_NONNULL ((2)));
 _GL_CXXALIAS_RPL (write, ssize_t, (int fd, const void *buf, size_t count));
+# elif defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef write
+#   define write _write
+#  endif
+_GL_CXXALIAS_MDA (write, ssize_t, (int fd, const void *buf, size_t count));
+# else
+_GL_CXXALIAS_SYS (write, ssize_t, (int fd, const void *buf, size_t count));
+# endif
+_GL_CXXALIASWARN (write);
+#elif @GNULIB_MDA_WRITE@
+/* On native Windows, map 'write' to '_write', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::write always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef write
+#   define write _write
+#  endif
+#  ifdef __MINGW32__
+_GL_CXXALIAS_MDA (write, int, (int fd, const void *buf, unsigned int count));
+#  else
+_GL_CXXALIAS_MDA (write, ssize_t, (int fd, const void *buf, unsigned int count));
+#  endif
 # else
-/* Need to cast, because on mingw, the third parameter is
-                                                             unsigned int count
-   and the return type is 'int'.  */
-_GL_CXXALIAS_SYS_CAST (write, ssize_t, (int fd, const void *buf, size_t count));
+_GL_CXXALIAS_SYS (write, ssize_t, (int fd, const void *buf, size_t count));
 # endif
 _GL_CXXALIASWARN (write);
 #endif
index 766df35a93ec165d695c5ecf538143b6abb792f5..11089a072cd8c8feb3490ffe87422c1b23b23226 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995-2002, 2005-2020 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995-2002, 2005-2021 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    This program is free software: you can redistribute it and/or modify
index f1097612704aa5d0a43b966984943c5a3d1c309e..3cdcdca56715e5a144054f9717c383de18740fbc 100644 (file)
@@ -1,6 +1,6 @@
 /* Compile-time assert-like macros.
 
-   Copyright (C) 2005-2006, 2009-2020 Free Software Foundation, Inc.
+   Copyright (C) 2005-2006, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
 /* Define _GL_HAVE__STATIC_ASSERT to 1 if _Static_assert (R, DIAGNOSTIC)
    works as per C11.  This is supported by GCC 4.6.0 and later, in C
-   mode.
+   mode, and by clang (also in C++ mode).
 
    Define _GL_HAVE__STATIC_ASSERT1 to 1 if _Static_assert (R) works as
-   per C2X, and define _GL_HAVE_STATIC_ASSERT1 if static_assert (R)
-   works as per C++17.  This is supported by GCC 9.1 and later.
+   per C2X.  This is supported by GCC 9.1 and later, and by clang in
+   C++1z mode.
+
+   Define _GL_HAVE_STATIC_ASSERT1 if static_assert (R) works as per
+   C++17.  This is supported by GCC 9.1 and later, and by clang in
+   C++1z mode.
 
    Support compilers claiming conformance to the relevant standard,
    and also support GCC when not pedantic.  If we were willing to slow
@@ -35,7 +39,8 @@
    since this affects only the quality of diagnostics, why bother?  */
 #ifndef __cplusplus
 # if (201112L <= __STDC_VERSION__ \
-      || (!defined __STRICT_ANSI__ && 4 < __GNUC__ + (6 <= __GNUC_MINOR__)))
+      || (!defined __STRICT_ANSI__ \
+          && (4 < __GNUC__ + (6 <= __GNUC_MINOR__) || 4 <= __clang_major__)))
 #  define _GL_HAVE__STATIC_ASSERT 1
 # endif
 # if (202000L <= __STDC_VERSION__ \
 #  define _GL_HAVE__STATIC_ASSERT1 1
 # endif
 #else
-# if 201703L <= __cplusplus || 9 <= __GNUC__
+# if 4 <= __clang_major__
+#  define _GL_HAVE__STATIC_ASSERT 1
+# endif
+# if 4 <= __clang_major__ && 201411 <= __cpp_static_assert
+#  define _GL_HAVE__STATIC_ASSERT1 1
+# endif
+# if 201703L <= __cplusplus \
+     || 9 <= __GNUC__ \
+     || (4 <= __clang_major__ && 201411 <= __cpp_static_assert)
 #  define _GL_HAVE_STATIC_ASSERT1 1
 # endif
 #endif
@@ -292,7 +305,12 @@ template <int w>
 
    Although assuming R can help a compiler generate better code or
    diagnostics, performance can suffer if R uses hard-to-optimize
-   features such as function calls not inlined by the compiler.  */
+   features such as function calls not inlined by the compiler.
+
+   Avoid Clang's __builtin_assume, as it breaks GNU Emacs master
+   as of 2020-08-23T21:09:49Z!eggert@cs.ucla.edu; see
+   <https://bugs.gnu.org/43152#71>.  It's not known whether this breakage
+   is a Clang bug or an Emacs bug; play it safe for now.  */
 
 #if _GL_HAS_BUILTIN_UNREACHABLE
 # define assume(R) ((R) ? (void) 0 : __builtin_unreachable ())
index 23c10fdd1222f4fdb7d8c254d713699445184b8d..5d5b17f05be5fb34c32dc8605e4509667e178104 100644 (file)
@@ -1,5 +1,5 @@
 /* A C macro for emitting warnings if a function is used.
-   Copyright (C) 2010-2020 Free Software Foundation, Inc.
+   Copyright (C) 2010-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published
 extern __typeof__ (function) function __attribute__ ((__warning__ (message)))
 #  define _GL_WARN_ON_USE_ATTRIBUTE(message) \
   __attribute__ ((__warning__ (message)))
+# elif __clang_major__ >= 4
+/* Another compiler attribute is available in clang.  */
+#  define _GL_WARN_ON_USE(function, message) \
+extern __typeof__ (function) function \
+  __attribute__ ((__diagnose_if__ (1, message, "warning")))
+#  define _GL_WARN_ON_USE_ATTRIBUTE(message) \
+  __attribute__ ((__diagnose_if__ (1, message, "warning")))
 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
 /* Verify the existence of the function.  */
 #  define _GL_WARN_ON_USE(function, message) \
@@ -99,27 +106,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use
 # endif
 #endif
 
-/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string")
-   is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the
+/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message")
+   is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the
    function is declared with the given prototype, consisting of return type,
    parameters, and attributes.
    This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does
    not work in this case.  */
 #ifndef _GL_WARN_ON_USE_CXX
 # if !defined __cplusplus
-#  define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
+#  define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \
      _GL_WARN_ON_USE (function, msg)
 # else
 #  if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
-#   define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
-extern rettype function parameters_and_attributes \
-     __attribute__ ((__warning__ (msg)))
+/* A compiler attribute is available in gcc versions 4.3.0 and later.  */
+#   define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \
+extern rettype_gcc function parameters_and_attributes \
+  __attribute__ ((__warning__ (msg)))
+#  elif __clang_major__ >= 4
+/* Another compiler attribute is available in clang.  */
+#   define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \
+extern rettype_clang function parameters_and_attributes \
+  __attribute__ ((__diagnose_if__ (1, msg, "warning")))
 #  elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
 /* Verify the existence of the function.  */
-#   define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
-extern rettype function parameters_and_attributes
+#   define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \
+extern rettype_gcc function parameters_and_attributes
 #  else /* Unsupported.  */
-#   define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
+#   define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \
 _GL_WARN_EXTERN_C int _gl_warn_on_use
 #  endif
 # endif
index 7640a14be9e7aaf878d4dc27633a17c6b3b8289c..cdda6806bdd97fec9b56495748174348605a33f4 100644 (file)
@@ -1,6 +1,6 @@
 /* A substitute for ISO C99 <wchar.h>, for platforms that have issues.
 
-   Copyright (C) 2007-2020 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 # include <features.h> /* for __GLIBC__ */
 #endif
 
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.
-   In some builds of uClibc, <wchar.h> is nonexistent and wchar_t is defined
+/* In some builds of uClibc, <wchar.h> is nonexistent and wchar_t is defined
    by <stddef.h>.
    But avoid namespace pollution on glibc systems.  */
 #if !(defined __GLIBC__ && !defined __UCLIBC__)
 # include <stddef.h>
 #endif
-#ifndef __GLIBC__
-# include <stdio.h>
-# include <time.h>
-#endif
 
 /* Include the original <wchar.h> if it exists.
    Some builds of uClibc lack it.  */
@@ -95,7 +87,7 @@
 /* The __attribute__ feature is available in gcc versions 2.5 and later.
    The attribute __pure__ was added in gcc 2.96.  */
 #ifndef _GL_ATTRIBUTE_PURE
-# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
+# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined __clang__
 #  define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
 # else
 #  define _GL_ATTRIBUTE_PURE /* empty */
@@ -942,10 +934,18 @@ _GL_WARN_ON_USE (wcsxfrm, "wcsxfrm is unportable - "
 
 /* Duplicate S, returning an identical malloc'd string.  */
 #if @GNULIB_WCSDUP@
-# if !@HAVE_WCSDUP@
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef wcsdup
+#   define wcsdup _wcsdup
+#  endif
+_GL_CXXALIAS_MDA (wcsdup, wchar_t *, (const wchar_t *s));
+# else
+#  if !@HAVE_WCSDUP@
 _GL_FUNCDECL_SYS (wcsdup, wchar_t *, (const wchar_t *s));
-# endif
+#  endif
 _GL_CXXALIAS_SYS (wcsdup, wchar_t *, (const wchar_t *s));
+# endif
 _GL_CXXALIASWARN (wcsdup);
 #elif defined GNULIB_POSIXCHECK
 # undef wcsdup
@@ -953,6 +953,25 @@ _GL_CXXALIASWARN (wcsdup);
 _GL_WARN_ON_USE (wcsdup, "wcsdup is unportable - "
                  "use gnulib module wcsdup for portability");
 # endif
+#elif @GNULIB_MDA_WCSDUP@
+/* On native Windows, map 'wcsdup' to '_wcsdup', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::wcsdup always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef wcsdup
+#   define wcsdup _wcsdup
+#  endif
+_GL_CXXALIAS_MDA (wcsdup, wchar_t *, (const wchar_t *s));
+# else
+_GL_FUNCDECL_SYS (wcsdup, wchar_t *, (const wchar_t *s));
+#  if @HAVE_DECL_WCSDUP@
+_GL_CXXALIAS_SYS (wcsdup, wchar_t *, (const wchar_t *s));
+#  endif
+# endif
+# if (defined _WIN32 && !defined __CYGWIN__) || @HAVE_DECL_WCSDUP@
+_GL_CXXALIASWARN (wcsdup);
+# endif
 #endif
 
 
index 57b86928ff8e1fb44cbf3e3984a869c67a85063d..d1c4a3047e1d748e3869f0e6d197b245b1fe329a 100644 (file)
@@ -1,6 +1,6 @@
 /* A substitute for ISO C99 <wctype.h>, for platforms that lack it.
 
-   Copyright (C) 2006-2020 Free Software Foundation, Inc.
+   Copyright (C) 2006-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 #ifndef _@GUARD_PREFIX@_WCTYPE_H
 
 #if @HAVE_WINT_T@
-/* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>.
-   Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-# include <stddef.h>
-# include <stdio.h>
-# include <time.h>
+/* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>.  */
 # include <wchar.h>
 #endif
 
index c4be45a5f8bbc164fdbba325673496bbaa45af22..afdd8e7b3db91f32458cba6c6a9f39eb6849c94b 100644 (file)
@@ -1,5 +1,5 @@
 /* Init guards, somewhat like spinlocks (native Windows implementation).
-   Copyright (C) 2005-2020 Free Software Foundation, Inc.
+   Copyright (C) 2005-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 7eb38a2b1e92d62a3e70ecd6c7a36db7463f299a..b86c82997e4783b788cf449d082888b8bed20566 100644 (file)
@@ -1,5 +1,5 @@
 /* Plain mutexes (native Windows implementation).
-   Copyright (C) 2005-2020 Free Software Foundation, Inc.
+   Copyright (C) 2005-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 748b9883db6092542c76718545d6308de57d4269..63000352a6fc5efd982a2ae909c6aa7f75f0299a 100644 (file)
@@ -1,5 +1,5 @@
 /* Plain mutexes (native Windows implementation).
-   Copyright (C) 2005-2020 Free Software Foundation, Inc.
+   Copyright (C) 2005-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index c431bd67073bfe3a3a372e1aa1bfdaa45f274997..3c4a386f72fd3df984169d04951ce121cbc36c89 100644 (file)
@@ -1,5 +1,5 @@
 /* Once-only control (native Windows implementation).
-   Copyright (C) 2005-2020 Free Software Foundation, Inc.
+   Copyright (C) 2005-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index d31717e861ee1abb06b3e67fffa839c1dd02ca85..9dfbf3fa80a0da204ca18f3633be5f0e4d39f084 100644 (file)
@@ -1,5 +1,5 @@
 /* Once-only control (native Windows implementation).
-   Copyright (C) 2005-2020 Free Software Foundation, Inc.
+   Copyright (C) 2005-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index db3c40c442fd893a52032d3a097fbdd023b6cf58..8e2bd14b4eb7521a661e9d8e303433749b176d14 100644 (file)
@@ -1,5 +1,5 @@
 /* Plain recursive mutexes (native Windows implementation).
-   Copyright (C) 2005-2020 Free Software Foundation, Inc.
+   Copyright (C) 2005-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 3b315e5ce9f298b3b7a7b90c5c3599a5b296844a..d3a8f4785ec4fae5c0b3f1b891f0914ff65fa509 100644 (file)
@@ -1,5 +1,5 @@
 /* Plain recursive mutexes (native Windows implementation).
-   Copyright (C) 2005-2020 Free Software Foundation, Inc.
+   Copyright (C) 2005-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 64e761cd4fa2889eed857e88a069b868156bd40f..2c3f922a023c384443ea7810973f92df364e945e 100644 (file)
@@ -1,5 +1,5 @@
 /* Read-write locks (native Windows implementation).
-   Copyright (C) 2005-2020 Free Software Foundation, Inc.
+   Copyright (C) 2005-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index ae5b82f527550b8b7609bfb4e7309057d4b6dc05..7198c1e161e827614b9d3f941052f05c55534237 100644 (file)
@@ -1,5 +1,5 @@
 /* Read-write locks (native Windows implementation).
-   Copyright (C) 2005-2020 Free Software Foundation, Inc.
+   Copyright (C) 2005-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 55231b3065cb91aa8397ce91c9839f9ae44631f4..ab08897cf097e4837079ea5319dfb1d14062ce2e 100644 (file)
@@ -1,5 +1,5 @@
 /* Search wide character array for a wide character.
-   Copyright (C) 1999, 2011-2020 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2011-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 1999.
 
    This program is free software: you can redistribute it and/or modify
index b4f1970171b27a1dcce08565616c299796183f64..549818f81a60501e11de4182ec2082cf402ecd29 100644 (file)
@@ -1,5 +1,5 @@
 /* Search wide character array for a wide character.
-   Copyright (C) 2011-2020 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2011.
 
    This program is free software: you can redistribute it and/or modify
index 2e96ed84662d22eca9a518255cfc67fd0bd53e2e..64ffe39dc4bb6ce5d1c73b387640d877e1dd3161 100644 (file)
@@ -1,5 +1,5 @@
 /* Copy wide character array, return pointer after last written wide character.
-   Copyright (C) 2020 Free Software Foundation, Inc.
+   Copyright (C) 2020-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 13ee23031a0535b8086e8f006086d64ed14546f5..53daf59663eba59b2ca2722bd4c8bbba8c695451 100644 (file)
@@ -1,6 +1,6 @@
 /* xalloc-oversized.h -- memory allocation size checking
 
-   Copyright (C) 1990-2000, 2003-2004, 2006-2020 Free Software Foundation, Inc.
+   Copyright (C) 1990-2000, 2003-2004, 2006-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -41,7 +41,7 @@ typedef size_t __xalloc_count_type;
    positive and N must be nonnegative.  This is a macro, not a
    function, so that it works correctly even when SIZE_MAX < N.  */
 
-#if 7 <= __GNUC__
+#if 7 <= __GNUC__ && !defined __clang__
 # define xalloc_oversized(n, s) \
    __builtin_mul_overflow_p (n, s, (__xalloc_count_type) 1)
 #elif 5 <= __GNUC__ && !defined __ICC && !__STRICT_ANSI__
index e9b377ca47595d8ba17569e92f9b80b785b0f20b..02d045b53481da5cf79d347f7602f993c4979e29 100755 (executable)
@@ -70,7 +70,7 @@ IMPORTED_GNULIB_MODULES="\
 "
 
 # The gnulib commit ID to use for the update.
-GNULIB_COMMIT_SHA1="4e3f2d4cfdba14e1d89479362061a9280f2f22b6"
+GNULIB_COMMIT_SHA1="776af40e09b476a41073131a90022572f448c189"
 
 # The expected version number for the various auto tools we will
 # use after the import.