aboutsummaryrefslogtreecommitdiff
path: root/gnulib/import/m4
diff options
context:
space:
mode:
authorChristian Biesinger <cbiesinger@google.com>2020-08-26 15:37:28 -0700
committerJoel Brobecker <brobecker@adacore.com>2020-08-26 15:37:28 -0700
commit698be2d8e5dbd23eddb5aa464b50cdfab000e553 (patch)
tree009d82919309b6df0d282e875032d270a35e3db0 /gnulib/import/m4
parent05fd99cc80b1955e8c846dacfa57fe52816d4869 (diff)
downloadgdb-698be2d8e5dbd23eddb5aa464b50cdfab000e553.zip
gdb-698be2d8e5dbd23eddb5aa464b50cdfab000e553.tar.gz
gdb-698be2d8e5dbd23eddb5aa464b50cdfab000e553.tar.bz2
Update gnulib to current trunk
This fixes two issues on Windows: Update. https://sourceware.org/pipermail/gdb-patches/2020-June/169978.html gnulib/ChangeLog: 2020-08-26 Christian Biesinger <cbiesinger@google.com> Pedro Alves <palves@redhat.com> Joel Brobecker <brobecker@adacore.com> * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * config.in: Regenerate. * configure: Regenerate. * import/Makefile.am: Update. * import/Makefile.in: Regenerate. * import/alloca.in.h (if): Update. * import/assure.h (affirm): Update. * import/at-func.c: Update. * import/attribute.h: New file. * import/btowc.c: New file. * import/canonicalize-lgpl.c: Update. * import/count-one-bits.h (COUNT_ONE_BITS_GENERIC): Update. (COUNT_ONE_BITS): Update. (intrinsic): Update. (__popcnt64): Update. (popcount_supported): Update. * import/ctype.in.h: New file. * import/dirent-private.h (WIN32_FIND_DATA): Update. * import/dirent.in.h (_GL_ATTRIBUTE_PURE): Update. * import/dirname.h: Update. * import/dosname.h: Remove. * import/error.h (_GL_ATTRIBUTE_FORMAT): Update. * import/extra/update-copyright: Update. * import/fchdir.c: Update. * import/fcntl.in.h (GNULIB_defined_rpl_fcntl): Update. (GNULIB_defined_fcntl): Update. * import/filename.h (HAS_DEVICE): Update. (IS_ABSOLUTE_PATH): Update. (IS_PATH_WITH_DIR): Update. (FILE_SYSTEM_PREFIX_LEN): Update. (_IS_DRIVE_LETTER): Update. (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): Update. (IS_ABSOLUTE_FILE_NAME): Update. (IS_RELATIVE_FILE_NAME): Update. (IS_FILE_NAME_WITH_DIR): Update. * import/filenamecat-lgpl.c (mfile_name_concat): Update. * import/fnmatch.c (WIDE_CHAR_SUPPORT): Update. (btowc): Update. (iswctype): Update. (mempcpy): Update. (strnlen): Update. (towlower): Update. (wcscat): Update. (wcslen): Update. (wctype): Update. (wmemchr): Update. (wmempcpy): Update. (SIZE_MAX): Update. (isblank): Update. (__libc_use_alloca): Update. (alloca): Update. (alloca_account): Update. (STREQ): Update. (CHAR_CLASS_MAX_LENGTH): Update. (IS_CHAR_CLASS): Update. (ISWCTYPE): Update. (if): Update. (HANDLE_MULTIBYTE): Update. (internal_function): Update. (FOLD): Update. (CHAR): Update. (UCHAR): Update. (INT): Update. (FCT): Update. (EXT): Update. (END): Update. (L_): Update. (BTOWC): Update. (STRLEN): Update. (STRCAT): Update. (MEMPCPY): Update. (MEMCHR): Update. (WIDE_CHAR_VERSION): Update. (STRUCT): Update. (FINDIDX): Update. (findidx): Update. (ALLOCA_LIMIT): Update. (SHLIB_COMPAT): Update. * import/fnmatch_loop.c (struct STRUCT): Update. (FCT): Update. (EXT): Update. (END): Update. (str): Update. (NEW_PATTERN): Update. * import/getcwd.c: Update. * import/getlogin_r.c (GetUserName): Update. * import/getprogname.c (getprogname): Update. * import/getrandom.c: New file. * import/gettimeofday.c: Remove. * import/glob.in.h (_Restrict_): Update. * import/inttypes.in.h (_GL_FUNCDECL_RPL): Update. (_GL_CXXALIAS_RPL): Update. (_GL_FUNCDECL_SYS): Update. (_GL_CXXALIAS_SYS): Update. * import/isblank.c: New file. * import/isnanl-nolibm.h (__has_builtin): Update. * import/libc-config.h (versioned_symbol): Update. (compat_symbol): Update. * import/limits.in.h (_GL_ALREADY_INCLUDING_LIMITS_H): Update. * import/m4/btowc.m4: New file. * import/m4/ctype.m4: New file. * import/m4/exponentl.m4: Update. * import/m4/fnmatch.m4: Update. * import/m4/getrandom.m4: New file. * import/m4/glob.m4: Update. * import/m4/gnulib-cache.m4: Update. * import/m4/gnulib-common.m4: Update. * import/m4/gnulib-comp.m4: Update. * import/m4/inttypes.m4: Update. * import/m4/isblank.m4: New file. * import/m4/isnanl.m4: Update. * import/m4/largefile.m4: Update. * import/m4/mbtowc.m4: New file. * import/m4/memmem.m4: Update. * import/m4/minmax.m4: New file. * import/m4/signal_h.m4: Update. * import/m4/stdio_h.m4: Update. * import/m4/stdlib_h.m4: Update. * import/m4/string_h.m4: Update. * import/m4/strnlen.m4: New file. * import/m4/sys_random_h.m4: New file. * import/m4/sys_socket_h.m4: Update. * import/m4/sys_stat_h.m4: Update. * import/m4/time_h.m4: Update. * import/m4/unistd_h.m4: Update. * import/m4/wchar_h.m4: Update. * import/m4/wint_t.m4: Update. * import/m4/wmemchr.m4: New file. * import/m4/wmempcpy.m4: New file. * import/math.in.h (__has_builtin): Update. * import/mbrtowc.c (FALLTHROUGH): Update. * import/mbtowc-impl.h: New file. * import/mbtowc.c: New file. * import/minmax.h: New file. * import/open.c (open): Update. * import/openat-proc.c (openat_proc_name): Update. * import/openat.c (rpl_openat): Update. (openat_needs_fchdir): Update. * import/openat.h (FCHOWNAT_INLINE): Update. (CHOWNAT_INLINE): Update. (FCHMODAT_INLINE): Update. (CHMODAT_INLINE): Update. * import/opendir.c (WIN32_FIND_DATA): Update. (GetFullPathName): Update. (FindFirstFile): Update. * import/readdir.c (FindNextFile): Update. * import/rename.c (MoveFileEx): Update. * import/rewinddir.c (FindFirstFile): Update. * import/rmdir.c: Update. * import/signal.in.h (_GL_FUNCDECL_RPL): Update. (_GL_CXXALIAS_RPL): Update. (_GL_FUNCDECL_SYS): Update. (_GL_CXXALIAS_SYS): Update. * import/stat-w32.c (_WIN32_WINNT): Update. (LoadLibrary): Update. (GetFinalPathNameByHandle): Update. (GetProcAddress): Update. (DWORD): Update. (GetFileInformationByHandleExFunc): Update. (GetFinalPathNameByHandleFunc): Update. * import/stat.c (WIN32_FIND_DATA): Update. (CreateFile): Update. (FindFirstFile): Update. * import/stdio.in.h (_GL_ATTRIBUTE_FORMAT): Update. (_GL_FUNCDECL_RPL): Update. (_GL_CXXALIAS_RPL): Update. (_GL_FUNCDECL_SYS): Update. (_GL_CXXALIAS_SYS): Update. (_GL_FUNCDECL_RPL_1): Update. (_GL_CXXALIAS_RPL_1): Update. (_GL_CXXALIAS_SYS_CAST): Update. * import/stdlib.in.h (_GL_ATTRIBUTE_PURE): Update. (_GL_FUNCDECL_RPL): Update. (_GL_CXXALIAS_RPL): Update. (_GL_FUNCDECL_SYS): Update. (_GL_CXXALIAS_SYS): Update. * import/string.in.h (_GL_ATTRIBUTE_PURE): Update. (_GL_WARN_ON_USE): Update. (_GL_WARN_ON_USE_CXX): Update. (_GL_FUNCDECL_RPL): Update. (_GL_CXXALIAS_RPL): Update. (_GL_CXXALIAS_SYS): Update. (mbstok_r): Update. * import/strnlen.c: New file. * import/sys_random.in.h: New file. * import/sys_socket.in.h (GNULIB_defined_socklen_t): Update. (_GL_FUNCDECL_RPL): Update. (_GL_CXXALIAS_RPL): Update. (_GL_CXXALIAS_SYS_CAST): Update. * import/sys_stat.in.h (_GL_FUNCDECL_RPL): Update. (_GL_CXXALIAS_RPL): Update. (_GL_FUNCDECL_SYS): Update. (_GL_CXXALIAS_SYS): Update. (lchmod): Update. (_GL_CXXALIAS_RPL_1): Update. (stat): Update. * import/tempname.c (__set_errno): Update. (__secure_getenv): Update. (__try_tempname): Update. (__getpid): Update. (__gettimeofday): Update. (RANDOM_BITS): Update. (uint64_t): Update. (RANDOM_VALUE_MAX): Update. (BASE_62_DIGITS): Update. (BASE_62_POWER): Update. (try_tempname_len): Update. (try_file): Update. (try_dir): Update. (try_nocreate): Update. (gen_tempname_len): Update. (__gen_tempname): Update. (try_tempname): Update. * import/tempname.h (gen_tempname_len): Update. (try_tempname_len): Update. * import/time.in.h (_GL_FUNCDECL_RPL): Update. (_GL_CXXALIAS_RPL): Update. (_GL_CXXALIAS_SYS): Update. * import/unistd.in.h (if): Update. (_GL_FUNCDECL_SYS): Update. (_GL_CXXALIAS_SYS): Update. (_GL_CXXALIASWARN): Update. (_GL_WARN_ON_USE): Update. (_GL_FUNCDECL_RPL): Update. (_GL_CXXALIAS_RPL): Update. * import/verify.h: Update. * import/warn-on-use.h (_GL_WARN_ON_USE_CXX): Update. * import/wchar.in.h (_GL_ATTRIBUTE_PURE): Update. (_GL_FUNCDECL_RPL): Update. (_GL_CXXALIAS_RPL): Update. (_GL_FUNCDECL_SYS): Update. (_GL_CXXALIAS_SYS): Update. (_GL_CXXALIASWARN): Update. (_GL_WARN_ON_USE): Update. (_GL_CXXALIAS_SYS_CAST2): Update. (_GL_CXXALIASWARN1): Update. * import/windows-rwlock.c (CreateEvent): Update. * import/wmemchr-impl.h: New file. * import/wmemchr.c: New file. * import/wmempcpy.c: New file. * update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add gettimeofday. (GNULIB_COMMIT_SHA1): Update gnulib revision.
Diffstat (limited to 'gnulib/import/m4')
-rw-r--r--gnulib/import/m4/btowc.m4120
-rw-r--r--gnulib/import/m4/ctype.m432
-rw-r--r--gnulib/import/m4/exponentl.m414
-rw-r--r--gnulib/import/m4/fnmatch.m46
-rw-r--r--gnulib/import/m4/getrandom.m465
-rw-r--r--gnulib/import/m4/glob.m43
-rw-r--r--gnulib/import/m4/gnulib-cache.m42
-rw-r--r--gnulib/import/m4/gnulib-common.m4229
-rw-r--r--gnulib/import/m4/gnulib-comp.m481
-rw-r--r--gnulib/import/m4/inttypes.m44
-rw-r--r--gnulib/import/m4/isblank.m417
-rw-r--r--gnulib/import/m4/isnanl.m417
-rw-r--r--gnulib/import/m4/largefile.m43
-rw-r--r--gnulib/import/m4/mbtowc.m424
-rw-r--r--gnulib/import/m4/memmem.m44
-rw-r--r--gnulib/import/m4/minmax.m444
-rw-r--r--gnulib/import/m4/signal_h.m44
-rw-r--r--gnulib/import/m4/stdio_h.m44
-rw-r--r--gnulib/import/m4/stdlib_h.m44
-rw-r--r--gnulib/import/m4/string_h.m45
-rw-r--r--gnulib/import/m4/strnlen.m430
-rw-r--r--gnulib/import/m4/sys_random_h.m452
-rw-r--r--gnulib/import/m4/sys_socket_h.m44
-rw-r--r--gnulib/import/m4/sys_stat_h.m47
-rw-r--r--gnulib/import/m4/time_h.m46
-rw-r--r--gnulib/import/m4/unistd_h.m49
-rw-r--r--gnulib/import/m4/wchar_h.m49
-rw-r--r--gnulib/import/m4/wint_t.m412
-rw-r--r--gnulib/import/m4/wmemchr.m432
-rw-r--r--gnulib/import/m4/wmempcpy.m421
30 files changed, 787 insertions, 77 deletions
diff --git a/gnulib/import/m4/btowc.m4 b/gnulib/import/m4/btowc.m4
new file mode 100644
index 0000000..c28ccb2
--- /dev/null
+++ b/gnulib/import/m4/btowc.m4
@@ -0,0 +1,120 @@
+# btowc.m4 serial 11
+dnl Copyright (C) 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.
+
+AC_DEFUN([gl_FUNC_BTOWC],
+[
+ AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+
+ dnl Check whether <wchar.h> is usable at all, first. Otherwise the test
+ dnl program below may lead to an endless loop. See
+ dnl <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42440>.
+ AC_REQUIRE([gl_WCHAR_H_INLINE_OK])
+
+ AC_CHECK_FUNCS_ONCE([btowc])
+ if test $ac_cv_func_btowc = no; then
+ HAVE_BTOWC=0
+ else
+
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gt_LOCALE_FR])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+
+ dnl Cygwin 1.7.2 btowc('\0') is WEOF, not 0.
+ AC_CACHE_CHECK([whether btowc(0) is correct],
+ [gl_cv_func_btowc_nul],
+ [
+ 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 ()
+{
+ if (btowc ('\0') != 0)
+ return 1;
+ return 0;
+}]])],
+ [gl_cv_func_btowc_nul=yes],
+ [gl_cv_func_btowc_nul=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ # Guess no on Cygwin.
+ cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_btowc_nul="guessing yes" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_btowc_nul="guessing yes" ;;
+ esac
+changequote([,])dnl
+ ])
+ ])
+
+ dnl IRIX 6.5 btowc(EOF) is 0xFF, not WEOF.
+ AC_CACHE_CHECK([whether btowc(EOF) is correct],
+ [gl_cv_func_btowc_eof],
+ [
+ dnl Initial guess, used when cross-compiling or when no suitable locale
+ dnl is present.
+changequote(,)dnl
+ case "$host_os" in
+ # Guess no on IRIX.
+ irix*) gl_cv_func_btowc_eof="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_btowc_eof="guessing yes" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_btowc_eof="guessing yes" ;;
+ esac
+changequote([,])dnl
+ if test $LOCALE_FR != none; then
+ 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 ()
+{
+ if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
+ {
+ if (btowc (EOF) != WEOF)
+ return 1;
+ }
+ return 0;
+}]])],
+ [gl_cv_func_btowc_eof=yes],
+ [gl_cv_func_btowc_eof=no],
+ [:])
+ fi
+ ])
+
+ case "$gl_cv_func_btowc_nul" in
+ *yes) ;;
+ *) REPLACE_BTOWC=1 ;;
+ esac
+ case "$gl_cv_func_btowc_eof" in
+ *yes) ;;
+ *) REPLACE_BTOWC=1 ;;
+ esac
+ fi
+])
+
+# Prerequisites of lib/btowc.c.
+AC_DEFUN([gl_PREREQ_BTOWC], [
+ :
+])
diff --git a/gnulib/import/m4/ctype.m4 b/gnulib/import/m4/ctype.m4
new file mode 100644
index 0000000..0b123d5
--- /dev/null
+++ b/gnulib/import/m4/ctype.m4
@@ -0,0 +1,32 @@
+# ctype_h.m4 serial 6
+dnl Copyright (C) 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_CTYPE_H],
+[
+ AC_REQUIRE([gl_CTYPE_H_DEFAULTS])
+
+ dnl <ctype.h> is always overridden, because of GNULIB_POSIXCHECK.
+ gl_NEXT_HEADERS([ctype.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 <ctype.h>
+ ]], [isblank])
+])
+
+AC_DEFUN([gl_CTYPE_MODULE_INDICATOR],
+[
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_CTYPE_H_DEFAULTS])
+ gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+])
+
+AC_DEFUN([gl_CTYPE_H_DEFAULTS],
+[
+ GNULIB_ISBLANK=0; AC_SUBST([GNULIB_ISBLANK])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_ISBLANK=1; AC_SUBST([HAVE_ISBLANK])
+])
diff --git a/gnulib/import/m4/exponentl.m4 b/gnulib/import/m4/exponentl.m4
index b33b3bf..0a35c11 100644
--- a/gnulib/import/m4/exponentl.m4
+++ b/gnulib/import/m4/exponentl.m4
@@ -1,4 +1,4 @@
-# exponentl.m4 serial 4
+# exponentl.m4 serial 5
dnl Copyright (C) 2007-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,
@@ -22,14 +22,14 @@ typedef union { long double value; unsigned int word[NWORDS]; }
memory_long_double;
static unsigned int ored_words[NWORDS];
static unsigned int anded_words[NWORDS];
-static void add_to_ored_words (long double x)
+static void add_to_ored_words (long double *x)
{
memory_long_double m;
size_t i;
/* Clear it first, in case
sizeof (long double) < sizeof (memory_long_double). */
memset (&m, 0, sizeof (memory_long_double));
- m.value = x;
+ m.value = *x;
for (i = 0; i < NWORDS; i++)
{
ored_words[i] |= m.word[i];
@@ -38,17 +38,15 @@ static void add_to_ored_words (long double x)
}
int main ()
{
+ static long double samples[5] = { 0.25L, 0.5L, 1.0L, 2.0L, 4.0L };
size_t j;
FILE *fp = fopen ("conftest.out", "w");
if (fp == NULL)
return 1;
for (j = 0; j < NWORDS; j++)
anded_words[j] = ~ (unsigned int) 0;
- add_to_ored_words (0.25L);
- add_to_ored_words (0.5L);
- add_to_ored_words (1.0L);
- add_to_ored_words (2.0L);
- add_to_ored_words (4.0L);
+ for (j = 0; j < 5; j++)
+ add_to_ored_words (&samples[j]);
/* Remove bits that are common (e.g. if representation of the first mantissa
bit is explicit). */
for (j = 0; j < NWORDS; j++)
diff --git a/gnulib/import/m4/fnmatch.m4 b/gnulib/import/m4/fnmatch.m4
index 0f41f8c..2f8e4a8 100644
--- a/gnulib/import/m4/fnmatch.m4
+++ b/gnulib/import/m4/fnmatch.m4
@@ -1,4 +1,4 @@
-# Check for fnmatch - serial 14. -*- coding: utf-8 -*-
+# Check for fnmatch - serial 15. -*- coding: utf-8 -*-
# Copyright (C) 2000-2007, 2009-2020 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
@@ -149,7 +149,5 @@ AC_DEFUN([gl_PREREQ_FNMATCH],
[
dnl Prerequisites of lib/fnmatch.c.
AC_REQUIRE([AC_TYPE_MBSTATE_T])
- AC_CHECK_DECLS([isblank], [], [], [[#include <ctype.h>]])
- AC_CHECK_FUNCS_ONCE([btowc isblank iswctype mbsrtowcs mempcpy wmemchr wmemcpy wmempcpy])
- AC_CHECK_HEADERS_ONCE([wctype.h])
+ AC_CHECK_FUNCS_ONCE([mbsrtowcs])
])
diff --git a/gnulib/import/m4/getrandom.m4 b/gnulib/import/m4/getrandom.m4
new file mode 100644
index 0000000..2a0034b
--- /dev/null
+++ b/gnulib/import/m4/getrandom.m4
@@ -0,0 +1,65 @@
+# getrandom.m4 serial 6
+dnl Copyright 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 Written by Paul Eggert.
+
+AC_DEFUN([gl_FUNC_GETRANDOM],
+[
+ AC_REQUIRE([gl_SYS_RANDOM_H_DEFAULTS])
+ AC_CHECK_FUNCS_ONCE([getrandom])
+ if test "$ac_cv_func_getrandom" != yes; then
+ HAVE_GETRANDOM=0
+ else
+ dnl On Solaris 11.4 the return type is 'int', not 'ssize_t'.
+ AC_CACHE_CHECK([whether getrandom is compatible with its GNU+BSD signature],
+ [gl_cv_func_getrandom_ok],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[/* Additional includes are needed before <sys/random.h> on Mac OS X. */
+ #include <sys/types.h>
+ #include <stdlib.h>
+ #include <sys/random.h>
+ ssize_t getrandom (void *, size_t, unsigned int);
+ ]],
+ [[]])
+ ],
+ [gl_cv_func_getrandom_ok=yes],
+ [gl_cv_func_getrandom_ok=no])
+ ])
+ if test $gl_cv_func_getrandom_ok = no; then
+ REPLACE_GETRANDOM=1
+ fi
+ fi
+
+ case "$host_os" in
+ mingw*)
+ AC_CHECK_HEADERS([bcrypt.h])
+ AC_CACHE_CHECK([whether the bcrypt library is guaranteed to be present],
+ [gl_cv_lib_assume_bcrypt],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <windows.h>]],
+ [[#if !(_WIN32_WINNT >= _WIN32_WINNT_WIN7)
+ cannot assume it
+ #endif
+ ]])
+ ],
+ [gl_cv_lib_assume_bcrypt=yes],
+ [gl_cv_lib_assume_bcrypt=no])
+ ])
+ if test $gl_cv_lib_assume_bcrypt = yes; then
+ AC_DEFINE([HAVE_LIB_BCRYPT], [1],
+ [Define to 1 if the bcrypt library is guaranteed to be present.])
+ LIB_GETRANDOM='-lbcrypt'
+ else
+ LIB_GETRANDOM='-ladvapi32'
+ fi
+ ;;
+ *)
+ LIB_GETRANDOM= ;;
+ esac
+ AC_SUBST([LIB_GETRANDOM])
+])
diff --git a/gnulib/import/m4/glob.m4 b/gnulib/import/m4/glob.m4
index dbd09e8..d4cd03f 100644
--- a/gnulib/import/m4/glob.m4
+++ b/gnulib/import/m4/glob.m4
@@ -1,4 +1,4 @@
-# glob.m4 serial 23
+# glob.m4 serial 24
dnl Copyright (C) 2005-2007, 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,
@@ -47,6 +47,7 @@ char a[_GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2 ? 1
[[glob_t found;
if (glob ("conf*-globtest", 0, NULL, &found) == GLOB_NOMATCH)
return 1;
+ globfree (&found);
]])],
[gl_cv_glob_lists_symlinks=yes],
[gl_cv_glob_lists_symlinks=no],
diff --git a/gnulib/import/m4/gnulib-cache.m4 b/gnulib/import/m4/gnulib-cache.m4
index ce00c9e..db95504 100644
--- a/gnulib/import/m4/gnulib-cache.m4
+++ b/gnulib/import/m4/gnulib-cache.m4
@@ -47,6 +47,7 @@
# fnmatch-gnu \
# frexpl \
# getcwd \
+# gettimeofday \
# glob \
# inet_ntop \
# inttypes \
@@ -87,6 +88,7 @@ gl_MODULES([
fnmatch-gnu
frexpl
getcwd
+ gettimeofday
glob
inet_ntop
inttypes
diff --git a/gnulib/import/m4/gnulib-common.m4 b/gnulib/import/m4/gnulib-common.m4
index b4795c1..f4ba5e3 100644
--- a/gnulib/import/m4/gnulib-common.m4
+++ b/gnulib/import/m4/gnulib-common.m4
@@ -1,4 +1,4 @@
-# gnulib-common.m4 serial 48
+# gnulib-common.m4 serial 50
dnl Copyright (C) 2007-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,
@@ -15,6 +15,15 @@ AC_DEFUN([gl_COMMON], [
AC_REQUIRE([gl_ZZGNULIB])
])
AC_DEFUN([gl_COMMON_BODY], [
+ AH_VERBATIM([_GL_GNUC_PREREQ],
+[/* True if the compiler says it groks GNU C version MAJOR.MINOR. */
+#if defined __GNUC__ && defined __GNUC_MINOR__
+# define _GL_GNUC_PREREQ(major, minor) \
+ ((major) < __GNUC__ + ((minor) <= __GNUC_MINOR__))
+#else
+# define _GL_GNUC_PREREQ(major, minor) 0
+#endif
+])
AH_VERBATIM([_Noreturn],
[/* The _Noreturn keyword of C11. */
#ifndef _Noreturn
@@ -31,12 +40,12 @@ AC_DEFUN([gl_COMMON_BODY], [
# define _Noreturn [[noreturn]]
# elif ((!defined __cplusplus || defined __clang__) \
&& (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \
- || 4 < __GNUC__ + (7 <= __GNUC_MINOR__) \
+ || _GL_GNUC_PREREQ (4, 7) \
|| (defined __apple_build_version__ \
? 6000000 <= __apple_build_version__ \
: 3 < __clang_major__ + (5 <= __clang_minor__))))
/* _Noreturn works as-is. */
-# elif 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || 0x5110 <= __SUNPRO_C
+# elif _GL_GNUC_PREREQ (2, 8) || 0x5110 <= __SUNPRO_C
# define _Noreturn __attribute__ ((__noreturn__))
# elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0)
# define _Noreturn __declspec (noreturn)
@@ -55,48 +64,206 @@ AC_DEFUN([gl_COMMON_BODY], [
#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__
# define __GNUC_STDC_INLINE__ 1
#endif])
- AH_VERBATIM([unused_parameter],
-[/* Define as a marker that can be attached to declarations that might not
- be used. This helps to reduce warnings, such as from
- GCC -Wunused-parameter. */
-#if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
-# define _GL_UNUSED __attribute__ ((__unused__))
+ AH_VERBATIM([attribute],
+[/* Attributes. */
+#ifdef __has_attribute
+# define _GL_HAS_ATTRIBUTE(attr) __has_attribute (__##attr##__)
#else
-# define _GL_UNUSED
+# define _GL_HAS_ATTRIBUTE(attr) _GL_ATTR_##attr
+# define _GL_ATTR_alloc_size _GL_GNUC_PREREQ (4, 3)
+# define _GL_ATTR_always_inline _GL_GNUC_PREREQ (3, 2)
+# define _GL_ATTR_artificial _GL_GNUC_PREREQ (4, 3)
+# 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_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)
+# define _GL_ATTR_format _GL_GNUC_PREREQ (2, 7)
+# define _GL_ATTR_leaf _GL_GNUC_PREREQ (4, 6)
+# ifdef _ICC
+# define _GL_ATTR_may_alias 0
+# else
+# define _GL_ATTR_may_alias _GL_GNUC_PREREQ (3, 3)
+# endif
+# define _GL_ATTR_malloc _GL_GNUC_PREREQ (3, 0)
+# define _GL_ATTR_noinline _GL_GNUC_PREREQ (3, 1)
+# define _GL_ATTR_nonnull _GL_GNUC_PREREQ (3, 3)
+# define _GL_ATTR_nonstring _GL_GNUC_PREREQ (8, 0)
+# define _GL_ATTR_nothrow _GL_GNUC_PREREQ (3, 3)
+# define _GL_ATTR_packed _GL_GNUC_PREREQ (2, 7)
+# define _GL_ATTR_pure _GL_GNUC_PREREQ (2, 96)
+# define _GL_ATTR_returns_nonnull _GL_GNUC_PREREQ (4, 9)
+# define _GL_ATTR_sentinel _GL_GNUC_PREREQ (4, 0)
+# define _GL_ATTR_unused _GL_GNUC_PREREQ (2, 7)
+# define _GL_ATTR_warn_unused_result _GL_GNUC_PREREQ (3, 4)
#endif
-/* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name
- is a misnomer outside of parameter lists. */
-#define _UNUSED_PARAMETER_ _GL_UNUSED
-
-/* gcc supports the "unused" attribute on possibly unused labels, and
- g++ has since version 4.5. Note to support C++ as well as C,
- _GL_UNUSED_LABEL should be used with a trailing ; */
-#if !defined __cplusplus || __GNUC__ > 4 \
- || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
-# define _GL_UNUSED_LABEL _GL_UNUSED
+
+]dnl There is no _GL_ATTRIBUTE_ALIGNED; use stdalign's _Alignas instead.
+[
+#if _GL_HAS_ATTRIBUTE (alloc_size)
+# define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args))
#else
-# define _GL_UNUSED_LABEL
+# define _GL_ATTRIBUTE_ALLOC_SIZE(args)
#endif
-/* The __pure__ attribute was added in gcc 2.96. */
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
-# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
+#if _GL_HAS_ATTRIBUTE (always_inline)
+# define _GL_ATTRIBUTE_ALWAYS_INLINE __attribute__ ((__always_inline__))
#else
-# define _GL_ATTRIBUTE_PURE /* empty */
+# define _GL_ATTRIBUTE_ALWAYS_INLINE
#endif
-/* The __const__ attribute was added in gcc 2.95. */
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
+#if _GL_HAS_ATTRIBUTE (artificial)
+# define _GL_ATTRIBUTE_ARTIFICIAL __attribute__ ((__artificial__))
+#else
+# define _GL_ATTRIBUTE_ARTIFICIAL
+#endif
+
+/* Avoid __attribute__ ((cold)) on MinGW; see thread starting at
+ <https://lists.gnu.org/r/emacs-devel/2019-04/msg01152.html>. */
+#if _GL_HAS_ATTRIBUTE (cold) && !defined __MINGW32__
+# define _GL_ATTRIBUTE_COLD __attribute__ ((__cold__))
+#else
+# define _GL_ATTRIBUTE_COLD
+#endif
+
+#if _GL_HAS_ATTRIBUTE (const)
# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__))
#else
-# define _GL_ATTRIBUTE_CONST /* empty */
+# define _GL_ATTRIBUTE_CONST
#endif
-/* The __malloc__ attribute was added in gcc 3. */
-#if 3 <= __GNUC__
+#if 201710L < __STDC_VERSION__
+# define _GL_ATTRIBUTE_DEPRECATED [[__deprecated__]]
+#elif _GL_HAS_ATTRIBUTE (deprecated)
+# define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__))
+#else
+# define _GL_ATTRIBUTE_DEPRECATED
+#endif
+
+#if _GL_HAS_ATTRIBUTE (error)
+# define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__error__ (msg)))
+# define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__warning__ (msg)))
+#else
+# define _GL_ATTRIBUTE_ERROR(msg)
+# define _GL_ATTRIBUTE_WARNING(msg)
+#endif
+
+#if _GL_HAS_ATTRIBUTE (externally_visible)
+# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE __attribute__ ((externally_visible))
+#else
+# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE
+#endif
+
+/* FALLTHROUGH is special, because it always expands to something. */
+#if 201710L < __STDC_VERSION__
+# define _GL_ATTRIBUTE_FALLTHROUGH [[__fallthrough__]]
+#elif _GL_HAS_ATTRIBUTE (fallthrough)
+# define _GL_ATTRIBUTE_FALLTHROUGH __attribute__ ((__fallthrough__))
+#else
+# define _GL_ATTRIBUTE_FALLTHROUGH ((void) 0)
+#endif
+
+#if _GL_HAS_ATTRIBUTE (format)
+# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
+#else
+# define _GL_ATTRIBUTE_FORMAT(spec)
+#endif
+
+#if _GL_HAS_ATTRIBUTE (leaf)
+# define _GL_ATTRIBUTE_LEAF __attribute__ ((__leaf__))
+#else
+# define _GL_ATTRIBUTE_LEAF
+#endif
+
+#if _GL_HAS_ATTRIBUTE (may_alias)
+# define _GL_ATTRIBUTE_MAY_ALIAS __attribute__ ((__may_alias__))
+#else
+# define _GL_ATTRIBUTE_MAY_ALIAS
+#endif
+
+#if 201710L < __STDC_VERSION__
+# define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]]
+#elif _GL_HAS_ATTRIBUTE (unused)
+# define _GL_ATTRIBUTE_MAYBE_UNUSED __attribute__ ((__unused__))
+#else
+# define _GL_ATTRIBUTE_MAYBE_UNUSED
+#endif
+/* Earlier spellings of this macro. */
+#define _GL_UNUSED _GL_ATTRIBUTE_MAYBE_UNUSED
+#define _UNUSED_PARAMETER_ _GL_ATTRIBUTE_MAYBE_UNUSED
+
+#if _GL_HAS_ATTRIBUTE (malloc)
# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
#else
-# define _GL_ATTRIBUTE_MALLOC /* empty */
+# define _GL_ATTRIBUTE_MALLOC
+#endif
+
+#if 201710L < __STDC_VERSION__
+# define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]]
+#elif _GL_HAS_ATTRIBUTE (warn_unused_result)
+# define _GL_ATTRIBUTE_NODISCARD __attribute__ ((__warn_unused_result__))
+#else
+# define _GL_ATTRIBUTE_NODISCARD
+#endif
+
+#if _GL_HAS_ATTRIBUTE (noinline)
+# define _GL_ATTRIBUTE_NOINLINE __attribute__ ((__noinline__))
+#else
+# define _GL_ATTRIBUTE_NOINLINE
+#endif
+
+#if _GL_HAS_ATTRIBUTE (nonnull)
+# define _GL_ATTRIBUTE_NONNULL(args) __attribute__ ((__nonnull__ args))
+#else
+# define _GL_ATTRIBUTE_NONNULL(args)
+#endif
+
+#if _GL_HAS_ATTRIBUTE (nonstring)
+# define _GL_ATTRIBUTE_NONSTRING __attribute__ ((__nonstring__))
+#else
+# define _GL_ATTRIBUTE_NONSTRING
+#endif
+
+/* There is no _GL_ATTRIBUTE_NORETURN; use _Noreturn instead. */
+
+#if _GL_HAS_ATTRIBUTE (nothrow) && !defined __cplusplus
+# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__))
+#else
+# define _GL_ATTRIBUTE_NOTHROW
+#endif
+
+#if _GL_HAS_ATTRIBUTE (packed)
+# define _GL_ATTRIBUTE_PACKED __attribute__ ((__packed__))
+#else
+# define _GL_ATTRIBUTE_PACKED
+#endif
+
+#if _GL_HAS_ATTRIBUTE (pure)
+# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
+#else
+# define _GL_ATTRIBUTE_PURE
+#endif
+
+#if _GL_HAS_ATTRIBUTE (returns_nonnull)
+# define _GL_ATTRIBUTE_RETURNS_NONNULL __attribute__ ((__returns_nonnull__))
+#else
+# define _GL_ATTRIBUTE_RETURNS_NONNULL
+#endif
+
+#if _GL_HAS_ATTRIBUTE (sentinel)
+# define _GL_ATTRIBUTE_SENTINEL(pos) __attribute__ ((__sentinel__ pos))
+#else
+# define _GL_ATTRIBUTE_SENTINEL(pos)
+#endif
+
+]dnl There is no _GL_ATTRIBUTE_VISIBILITY; see m4/visibility.m4 instead.
+[
+/* To support C++ as well as C, use _GL_UNUSED_LABEL with trailing ';'. */
+#if !defined __cplusplus || _GL_GNUC_PREREQ (4, 5)
+# define _GL_UNUSED_LABEL _GL_ATTRIBUTE_MAYBE_UNUSED
+#else
+# define _GL_UNUSED_LABEL
#endif
])
AH_VERBATIM([async_safe],
diff --git a/gnulib/import/m4/gnulib-comp.m4 b/gnulib/import/m4/gnulib-comp.m4
index 0c67b32..8c2c28e 100644
--- a/gnulib/import/m4/gnulib-comp.m4
+++ b/gnulib/import/m4/gnulib-comp.m4
@@ -49,6 +49,8 @@ AC_DEFUN([gl_EARLY],
# Code from module arpa_inet:
# Code from module assure:
# Code from module at-internal:
+ # Code from module attribute:
+ # Code from module btowc:
# Code from module builtin-expect:
# Code from module c99:
# Code from module canonicalize-lgpl:
@@ -58,12 +60,12 @@ AC_DEFUN([gl_EARLY],
# Code from module close:
# Code from module closedir:
# Code from module count-one-bits:
+ # Code from module ctype:
# Code from module d-ino:
# Code from module d-type:
# Code from module dirent:
# Code from module dirfd:
# Code from module dirname-lgpl:
- # Code from module dosname:
# Code from module double-slash-root:
# Code from module dup:
# Code from module dup2:
@@ -98,6 +100,7 @@ AC_DEFUN([gl_EARLY],
# Code from module getdtablesize:
# Code from module getlogin_r:
# Code from module getprogname:
+ # Code from module getrandom:
# Code from module gettext-h:
# Code from module gettimeofday:
# Code from module glob:
@@ -108,6 +111,7 @@ AC_DEFUN([gl_EARLY],
# Code from module intprops:
# Code from module inttypes:
# Code from module inttypes-incomplete:
+ # Code from module isblank:
# Code from module isnand-nolibm:
# Code from module isnanl-nolibm:
# Code from module largefile:
@@ -125,11 +129,13 @@ AC_DEFUN([gl_EARLY],
# Code from module mbrtowc:
# Code from module mbsinit:
# Code from module mbsrtowcs:
+ # Code from module mbtowc:
# Code from module memchr:
# Code from module memmem:
# Code from module memmem-simple:
# Code from module mempcpy:
# Code from module memrchr:
+ # Code from module minmax:
# Code from module mkdir:
# Code from module mkdtemp:
# Code from module mkostemp:
@@ -179,10 +185,12 @@ AC_DEFUN([gl_EARLY],
# Code from module strerror-override:
# Code from module strerror_r-posix:
# Code from module string:
+ # Code from module strnlen:
# Code from module strnlen1:
# Code from module strstr:
# Code from module strstr-simple:
# Code from module strtok_r:
+ # Code from module sys_random:
# Code from module sys_socket:
# Code from module sys_stat:
# Code from module sys_time:
@@ -204,6 +212,8 @@ AC_DEFUN([gl_EARLY],
# Code from module windows-once:
# Code from module windows-recmutex:
# Code from module windows-rwlock:
+ # Code from module wmemchr:
+ # Code from module wmempcpy:
# Code from module xalloc-oversized:
])
@@ -226,6 +236,13 @@ AC_DEFUN([gl_INIT],
gl_FUNC_ALLOCA
gl_HEADER_ARPA_INET
AC_PROG_MKDIR_P
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ gl_FUNC_BTOWC
+ if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
+ AC_LIBOBJ([btowc])
+ gl_PREREQ_BTOWC
+ fi
+ gl_WCHAR_MODULE_INDICATOR([btowc])
gl___BUILTIN_EXPECT
gl_CANONICALIZE_LGPL
if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
@@ -251,6 +268,7 @@ AC_DEFUN([gl_INIT],
AC_LIBOBJ([closedir])
fi
gl_DIRENT_MODULE_INDICATOR([closedir])
+ gl_CTYPE_H
gl_CHECK_TYPE_STRUCT_DIRENT_D_INO
gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE
gl_DIRENT_H
@@ -376,6 +394,12 @@ AC_DEFUN([gl_INIT],
gl_UNISTD_MODULE_INDICATOR([getlogin_r])
AC_REQUIRE([gl_LIB_GETLOGIN])
gl_FUNC_GETPROGNAME
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ gl_FUNC_GETRANDOM
+ if test $HAVE_GETRANDOM = 0 || test $REPLACE_GETRANDOM = 1; then
+ AC_LIBOBJ([getrandom])
+ fi
+ gl_SYS_RANDOM_MODULE_INDICATOR([getrandom])
AC_SUBST([LIBINTL])
AC_SUBST([LTLIBINTL])
gl_FUNC_GETTIMEOFDAY
@@ -406,6 +430,12 @@ AC_DEFUN([gl_INIT],
gl_ARPA_INET_MODULE_INDICATOR([inet_ntop])
gl_INTTYPES_H
gl_INTTYPES_INCOMPLETE
+ gl_FUNC_ISBLANK
+ if test $HAVE_ISBLANK = 0; then
+ AC_LIBOBJ([isblank])
+ fi
+ gl_MODULE_INDICATOR([isblank])
+ gl_CTYPE_MODULE_INDICATOR([isblank])
gl_FUNC_ISNAND_NO_LIBM
if test $gl_func_isnand_no_libm != yes; then
AC_LIBOBJ([isnand])
@@ -465,6 +495,12 @@ AC_DEFUN([gl_INIT],
gl_PREREQ_MBSRTOWCS
fi
gl_WCHAR_MODULE_INDICATOR([mbsrtowcs])
+ gl_FUNC_MBTOWC
+ if test $HAVE_MBTOWC = 0 || test $REPLACE_MBTOWC = 1; then
+ AC_LIBOBJ([mbtowc])
+ gl_PREREQ_MBTOWC
+ fi
+ gl_STDLIB_MODULE_INDICATOR([mbtowc])
gl_FUNC_MEMCHR
if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
AC_LIBOBJ([memchr])
@@ -492,6 +528,7 @@ AC_DEFUN([gl_INIT],
gl_PREREQ_MEMRCHR
fi
gl_STRING_MODULE_INDICATOR([memrchr])
+ gl_MINMAX
gl_FUNC_MKDIR
if test $REPLACE_MKDIR = 1; then
AC_LIBOBJ([mkdir])
@@ -644,6 +681,12 @@ AC_DEFUN([gl_INIT],
dnl For the modules argp, error.
gl_MODULE_INDICATOR([strerror_r-posix])
gl_HEADER_STRING_H
+ gl_FUNC_STRNLEN
+ if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
+ AC_LIBOBJ([strnlen])
+ gl_PREREQ_STRNLEN
+ fi
+ gl_STRING_MODULE_INDICATOR([strnlen])
gl_FUNC_STRSTR
if test $REPLACE_STRSTR = 1; then
AC_LIBOBJ([strstr])
@@ -659,6 +702,8 @@ AC_DEFUN([gl_INIT],
gl_PREREQ_STRTOK_R
fi
gl_STRING_MODULE_INDICATOR([strtok_r])
+ gl_HEADER_SYS_RANDOM
+ AC_PROG_MKDIR_P
AC_REQUIRE([gl_HEADER_SYS_SOCKET])
AC_PROG_MKDIR_P
gl_HEADER_SYS_STAT_H
@@ -712,6 +757,16 @@ AC_DEFUN([gl_INIT],
AC_LIBOBJ([windows-rwlock])
;;
esac
+ gl_FUNC_WMEMCHR
+ if test $HAVE_WMEMCHR = 0; then
+ AC_LIBOBJ([wmemchr])
+ fi
+ gl_WCHAR_MODULE_INDICATOR([wmemchr])
+ gl_FUNC_WMEMPCPY
+ if test $HAVE_WMEMPCPY = 0; then
+ AC_LIBOBJ([wmempcpy])
+ fi
+ gl_WCHAR_MODULE_INDICATOR([wmempcpy])
# End of code from modules
m4_ifval(gl_LIBSOURCES_LIST, [
m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ ||
@@ -860,7 +915,9 @@ AC_DEFUN([gl_FILE_LIST], [
lib/arpa_inet.in.h
lib/assure.h
lib/at-func.c
+ lib/attribute.h
lib/basename-lgpl.c
+ lib/btowc.c
lib/c++defs.h
lib/canonicalize-lgpl.c
lib/cdefs.h
@@ -872,12 +929,12 @@ AC_DEFUN([gl_FILE_LIST], [
lib/closedir.c
lib/count-one-bits.c
lib/count-one-bits.h
+ lib/ctype.in.h
lib/dirent-private.h
lib/dirent.in.h
lib/dirfd.c
lib/dirname-lgpl.c
lib/dirname.h
- lib/dosname.h
lib/dup-safer-flag.c
lib/dup-safer.c
lib/dup.c
@@ -916,6 +973,7 @@ AC_DEFUN([gl_FILE_LIST], [
lib/getlogin_r.c
lib/getprogname.c
lib/getprogname.h
+ lib/getrandom.c
lib/gettext.h
lib/gettimeofday.c
lib/glob-libc.h
@@ -932,6 +990,7 @@ AC_DEFUN([gl_FILE_LIST], [
lib/inet_ntop.c
lib/intprops.h
lib/inttypes.in.h
+ lib/isblank.c
lib/isnan.c
lib/isnand-nolibm.h
lib/isnand.c
@@ -964,13 +1023,16 @@ AC_DEFUN([gl_FILE_LIST], [
lib/mbsrtowcs-impl.h
lib/mbsrtowcs-state.c
lib/mbsrtowcs.c
+ lib/mbtowc-impl.h
lib/mbtowc-lock.c
lib/mbtowc-lock.h
+ lib/mbtowc.c
lib/memchr.c
lib/memchr.valgrind
lib/memmem.c
lib/mempcpy.c
lib/memrchr.c
+ lib/minmax.h
lib/mkdir.c
lib/mkdtemp.c
lib/mkostemp.c
@@ -1027,10 +1089,12 @@ AC_DEFUN([gl_FILE_LIST], [
lib/strerror_r.c
lib/string.in.h
lib/stripslash.c
+ lib/strnlen.c
lib/strnlen1.c
lib/strnlen1.h
lib/strstr.c
lib/strtok_r.c
+ lib/sys_random.in.h
lib/sys_socket.c
lib/sys_socket.in.h
lib/sys_stat.in.h
@@ -1060,18 +1124,23 @@ AC_DEFUN([gl_FILE_LIST], [
lib/windows-recmutex.h
lib/windows-rwlock.c
lib/windows-rwlock.h
+ lib/wmemchr-impl.h
+ lib/wmemchr.c
+ lib/wmempcpy.c
lib/xalloc-oversized.h
m4/00gnulib.m4
m4/__inline.m4
m4/absolute-header.m4
m4/alloca.m4
m4/arpa_inet_h.m4
+ m4/btowc.m4
m4/builtin-expect.m4
m4/canonicalize.m4
m4/chdir-long.m4
m4/close.m4
m4/closedir.m4
m4/codeset.m4
+ m4/ctype.m4
m4/d-ino.m4
m4/d-type.m4
m4/dirent_h.m4
@@ -1111,6 +1180,7 @@ AC_DEFUN([gl_FILE_LIST], [
m4/getlogin_r.m4
m4/getpagesize.m4
m4/getprogname.m4
+ m4/getrandom.m4
m4/gettimeofday.m4
m4/glob.m4
m4/glob_h.m4
@@ -1119,6 +1189,7 @@ AC_DEFUN([gl_FILE_LIST], [
m4/inet_ntop.m4
m4/inttypes-pri.m4
m4/inttypes.m4
+ m4/isblank.m4
m4/isnand.m4
m4/isnanl.m4
m4/largefile.m4
@@ -1138,10 +1209,12 @@ AC_DEFUN([gl_FILE_LIST], [
m4/mbsinit.m4
m4/mbsrtowcs.m4
m4/mbstate_t.m4
+ m4/mbtowc.m4
m4/memchr.m4
m4/memmem.m4
m4/mempcpy.m4
m4/memrchr.m4
+ m4/minmax.m4
m4/mkdir.m4
m4/mkdtemp.m4
m4/mkostemp.m4
@@ -1188,8 +1261,10 @@ AC_DEFUN([gl_FILE_LIST], [
m4/strerror.m4
m4/strerror_r.m4
m4/string_h.m4
+ m4/strnlen.m4
m4/strstr.m4
m4/strtok_r.m4
+ m4/sys_random_h.m4
m4/sys_socket_h.m4
m4/sys_stat_h.m4
m4/sys_time_h.m4
@@ -1207,5 +1282,7 @@ AC_DEFUN([gl_FILE_LIST], [
m4/wchar_t.m4
m4/wctype_h.m4
m4/wint_t.m4
+ m4/wmemchr.m4
+ m4/wmempcpy.m4
m4/zzgnulib.m4
])
diff --git a/gnulib/import/m4/inttypes.m4 b/gnulib/import/m4/inttypes.m4
index d0487d6..224d0cd 100644
--- a/gnulib/import/m4/inttypes.m4
+++ b/gnulib/import/m4/inttypes.m4
@@ -1,4 +1,4 @@
-# inttypes.m4 serial 28
+# inttypes.m4 serial 29
dnl Copyright (C) 2006-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -28,6 +28,8 @@ AC_DEFUN_ONCE([gl_INTTYPES_INCOMPLETE],
dnl corresponding gnulib module is not in use.
gl_WARN_ON_USE_PREPARE([[#include <inttypes.h>
]], [imaxabs imaxdiv strtoimax strtoumax])
+
+ AC_REQUIRE([AC_C_RESTRICT])
])
# Ensure that the PRI* and SCN* macros are defined appropriately.
diff --git a/gnulib/import/m4/isblank.m4 b/gnulib/import/m4/isblank.m4
new file mode 100644
index 0000000..5e1b783
--- /dev/null
+++ b/gnulib/import/m4/isblank.m4
@@ -0,0 +1,17 @@
+# isblank.m4 serial 3
+dnl Copyright (C) 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_FUNC_ISBLANK],
+[
+ dnl Persuade glibc <ctype.h> to declare isblank().
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+ AC_REQUIRE([gl_CTYPE_H_DEFAULTS])
+ AC_CHECK_FUNCS_ONCE([isblank])
+ if test $ac_cv_func_isblank = no; then
+ HAVE_ISBLANK=0
+ fi
+])
diff --git a/gnulib/import/m4/isnanl.m4 b/gnulib/import/m4/isnanl.m4
index 9874418..75d5462 100644
--- a/gnulib/import/m4/isnanl.m4
+++ b/gnulib/import/m4/isnanl.m4
@@ -1,4 +1,4 @@
-# isnanl.m4 serial 20
+# isnanl.m4 serial 21
dnl Copyright (C) 2007-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,
@@ -68,7 +68,10 @@ AC_DEFUN([gl_HAVE_ISNANL_NO_LIBM],
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[#include <math.h>
- #if __GNUC__ >= 4
+ #ifndef __has_builtin
+ # define __has_builtin(name) 0
+ #endif
+ #if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanl))
# undef isnanl
# define isnanl(x) __builtin_isnanl ((long double)(x))
#elif defined isnan
@@ -93,7 +96,10 @@ AC_DEFUN([gl_HAVE_ISNANL_IN_LIBM],
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[#include <math.h>
- #if __GNUC__ >= 4
+ #ifndef __has_builtin
+ # define __has_builtin(name) 0
+ #endif
+ #if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanl))
# undef isnanl
# define isnanl(x) __builtin_isnanl ((long double)(x))
#elif defined isnan
@@ -123,7 +129,10 @@ AC_DEFUN([gl_FUNC_ISNANL_WORKS],
#include <float.h>
#include <limits.h>
#include <math.h>
-#if __GNUC__ >= 4
+#ifndef __has_builtin
+# define __has_builtin(name) 0
+#endif
+#if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanl))
# undef isnanl
# define isnanl(x) __builtin_isnanl ((long double)(x))
#elif defined isnan
diff --git a/gnulib/import/m4/largefile.m4 b/gnulib/import/m4/largefile.m4
index e381339..8017ca7 100644
--- a/gnulib/import/m4/largefile.m4
+++ b/gnulib/import/m4/largefile.m4
@@ -113,9 +113,6 @@ if test "$enable_largefile" != no; then
[Define for large files, on AIX-style hosts.],
[_AC_SYS_LARGEFILE_TEST_INCLUDES])
fi
-
- AC_DEFINE([_DARWIN_USE_64_BIT_INODE], [1],
- [Enable large inode numbers on Mac OS X 10.5.])
fi
])# AC_SYS_LARGEFILE
])# m4_version_prereq 2.70
diff --git a/gnulib/import/m4/mbtowc.m4 b/gnulib/import/m4/mbtowc.m4
new file mode 100644
index 0000000..befcffa
--- /dev/null
+++ b/gnulib/import/m4/mbtowc.m4
@@ -0,0 +1,24 @@
+# mbtowc.m4 serial 3
+dnl Copyright (C) 2011-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_FUNC_MBTOWC],
+[
+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+
+ AC_CHECK_FUNCS([mbtowc])
+ if test $ac_cv_func_mbtowc = no; then
+ HAVE_MBTOWC=0
+ else
+ if false; then
+ REPLACE_MBTOWC=1
+ fi
+ fi
+])
+
+# Prerequisites of lib/mbtowc.c.
+AC_DEFUN([gl_PREREQ_MBTOWC], [
+ :
+])
diff --git a/gnulib/import/m4/memmem.m4 b/gnulib/import/m4/memmem.m4
index e034d7b..35a5bb1 100644
--- a/gnulib/import/m4/memmem.m4
+++ b/gnulib/import/m4/memmem.m4
@@ -1,4 +1,4 @@
-# memmem.m4 serial 26
+# memmem.m4 serial 27
dnl Copyright (C) 2002-2004, 2007-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,
@@ -37,7 +37,7 @@ AC_DEFUN([gl_FUNC_MEMMEM_SIMPLE],
/* Check for empty needle behavior. */
{
const char *haystack = "AAA";
- if (memmem (haystack, 3, NULL, 0) != haystack)
+ if (memmem (haystack, 3, (const char *) 1, 0) != haystack)
result |= 2;
}
return result;
diff --git a/gnulib/import/m4/minmax.m4 b/gnulib/import/m4/minmax.m4
new file mode 100644
index 0000000..e5b28b0
--- /dev/null
+++ b/gnulib/import/m4/minmax.m4
@@ -0,0 +1,44 @@
+# minmax.m4 serial 4
+dnl Copyright (C) 2005, 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_PREREQ([2.53])
+
+AC_DEFUN([gl_MINMAX],
+[
+ AC_REQUIRE([gl_PREREQ_MINMAX])
+])
+
+# Prerequisites of lib/minmax.h.
+AC_DEFUN([gl_PREREQ_MINMAX],
+[
+ gl_MINMAX_IN_HEADER([limits.h])
+ gl_MINMAX_IN_HEADER([sys/param.h])
+])
+
+dnl gl_MINMAX_IN_HEADER(HEADER)
+dnl The parameter has to be a literal header name; it cannot be macro,
+dnl nor a shell variable. (Because autoheader collects only AC_DEFINE
+dnl invocations with a literal macro name.)
+AC_DEFUN([gl_MINMAX_IN_HEADER],
+[
+ m4_pushdef([header], AS_TR_SH([$1]))
+ m4_pushdef([HEADER], AS_TR_CPP([$1]))
+ AC_CACHE_CHECK([whether <$1> defines MIN and MAX],
+ [gl_cv_minmax_in_]header,
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <$1>
+ int x = MIN (42, 17);]],
+ [[]])],
+ [gl_cv_minmax_in_]header[=yes],
+ [gl_cv_minmax_in_]header[=no])])
+ if test $gl_cv_minmax_in_[]header = yes; then
+ AC_DEFINE([HAVE_MINMAX_IN_]HEADER, 1,
+ [Define to 1 if <$1> defines the MIN and MAX macros.])
+ fi
+ m4_popdef([HEADER])
+ m4_popdef([header])
+])
diff --git a/gnulib/import/m4/signal_h.m4 b/gnulib/import/m4/signal_h.m4
index 0868438..b262980 100644
--- a/gnulib/import/m4/signal_h.m4
+++ b/gnulib/import/m4/signal_h.m4
@@ -1,4 +1,4 @@
-# signal_h.m4 serial 18
+# signal_h.m4 serial 19
dnl Copyright (C) 2007-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,
@@ -34,6 +34,8 @@ AC_DEFUN([gl_SIGNAL_H],
]], [pthread_sigmask sigaction
sigaddset sigdelset sigemptyset sigfillset sigismember
sigpending sigprocmask])
+
+ AC_REQUIRE([AC_C_RESTRICT])
])
AC_DEFUN([gl_CHECK_TYPE_SIGSET_T],
diff --git a/gnulib/import/m4/stdio_h.m4 b/gnulib/import/m4/stdio_h.m4
index c603b51..5f968bc 100644
--- a/gnulib/import/m4/stdio_h.m4
+++ b/gnulib/import/m4/stdio_h.m4
@@ -1,4 +1,4 @@
-# stdio_h.m4 serial 49
+# stdio_h.m4 serial 50
dnl Copyright (C) 2007-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,
@@ -107,6 +107,8 @@ AC_DEFUN([gl_STDIO_H],
gl_WARN_ON_USE_PREPARE([[#include <stdio.h>
]], [dprintf fpurge fseeko ftello getdelim getline gets pclose popen
renameat snprintf tmpfile vdprintf vsnprintf])
+
+ AC_REQUIRE([AC_C_RESTRICT])
])
AC_DEFUN([gl_STDIO_MODULE_INDICATOR],
diff --git a/gnulib/import/m4/stdlib_h.m4 b/gnulib/import/m4/stdlib_h.m4
index 61a3e31..743066a 100644
--- a/gnulib/import/m4/stdlib_h.m4
+++ b/gnulib/import/m4/stdlib_h.m4
@@ -1,4 +1,4 @@
-# stdlib_h.m4 serial 48
+# stdlib_h.m4 serial 49
dnl Copyright (C) 2007-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,
@@ -27,6 +27,8 @@ AC_DEFUN([gl_STDLIB_H],
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_DEFUN([gl_STDLIB_MODULE_INDICATOR],
diff --git a/gnulib/import/m4/string_h.m4 b/gnulib/import/m4/string_h.m4
index 4c1f685..cc51337 100644
--- a/gnulib/import/m4/string_h.m4
+++ b/gnulib/import/m4/string_h.m4
@@ -5,7 +5,7 @@
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 22
+# serial 23
# Written by Paul Eggert.
@@ -18,7 +18,6 @@ AC_DEFUN([gl_HEADER_STRING_H],
AC_DEFUN([gl_HEADER_STRING_H_BODY],
[
- AC_REQUIRE([AC_C_RESTRICT])
AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
gl_NEXT_HEADERS([string.h])
@@ -30,6 +29,8 @@ 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])
+
+ AC_REQUIRE([AC_C_RESTRICT])
])
AC_DEFUN([gl_STRING_MODULE_INDICATOR],
diff --git a/gnulib/import/m4/strnlen.m4 b/gnulib/import/m4/strnlen.m4
new file mode 100644
index 0000000..71b8e1b
--- /dev/null
+++ b/gnulib/import/m4/strnlen.m4
@@ -0,0 +1,30 @@
+# strnlen.m4 serial 13
+dnl Copyright (C) 2002-2003, 2005-2007, 2009-2020 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_STRNLEN],
+[
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+
+ dnl Persuade glibc <string.h> to declare strnlen().
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+ AC_CHECK_DECLS_ONCE([strnlen])
+ if test $ac_cv_have_decl_strnlen = no; then
+ HAVE_DECL_STRNLEN=0
+ else
+ m4_pushdef([AC_LIBOBJ], [:])
+ dnl Note: AC_FUNC_STRNLEN does AC_LIBOBJ([strnlen]).
+ AC_FUNC_STRNLEN
+ m4_popdef([AC_LIBOBJ])
+ if test $ac_cv_func_strnlen_working = no; then
+ REPLACE_STRNLEN=1
+ fi
+ fi
+])
+
+# Prerequisites of lib/strnlen.c.
+AC_DEFUN([gl_PREREQ_STRNLEN], [:])
diff --git a/gnulib/import/m4/sys_random_h.m4 b/gnulib/import/m4/sys_random_h.m4
new file mode 100644
index 0000000..a964b15
--- /dev/null
+++ b/gnulib/import/m4/sys_random_h.m4
@@ -0,0 +1,52 @@
+# sys_random_h.m4 serial 4
+dnl Copyright (C) 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_HEADER_SYS_RANDOM],
+[
+ AC_REQUIRE([gl_SYS_RANDOM_H_DEFAULTS])
+ dnl <sys/random.h> is always overridden, because of GNULIB_POSIXCHECK.
+ gl_CHECK_NEXT_HEADERS([sys/random.h])
+ if test $ac_cv_header_sys_random_h = yes; then
+ HAVE_SYS_RANDOM_H=1
+ else
+ HAVE_SYS_RANDOM_H=0
+ fi
+ AC_SUBST([HAVE_SYS_RANDOM_H])
+
+ m4_ifdef([gl_UNISTD_H_DEFAULTS], [AC_REQUIRE([gl_UNISTD_H_DEFAULTS])])
+ if test $ac_cv_header_sys_random_h = yes; then
+ UNISTD_H_HAVE_SYS_RANDOM_H=1
+ fi
+
+ 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([[
+#if HAVE_SYS_RANDOM_H
+/* Additional includes are needed before <sys/random.h> on Mac OS X. */
+# include <sys/types.h>
+# include <stdlib.h>
+# include <sys/random.h>
+#endif
+ ]],
+ [getrandom])
+])
+
+AC_DEFUN([gl_SYS_RANDOM_MODULE_INDICATOR],
+[
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_SYS_RANDOM_H_DEFAULTS])
+ gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+ dnl Define it also as a C macro, for the benefit of the unit tests.
+ gl_MODULE_INDICATOR_FOR_TESTS([$1])
+])
+
+AC_DEFUN([gl_SYS_RANDOM_H_DEFAULTS],
+[
+ GNULIB_GETRANDOM=0; AC_SUBST([GNULIB_GETRANDOM])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_GETRANDOM=1; AC_SUBST([HAVE_GETRANDOM])
+ REPLACE_GETRANDOM=0; AC_SUBST([REPLACE_GETRANDOM])
+])
diff --git a/gnulib/import/m4/sys_socket_h.m4 b/gnulib/import/m4/sys_socket_h.m4
index 1471aea..bf902f0 100644
--- a/gnulib/import/m4/sys_socket_h.m4
+++ b/gnulib/import/m4/sys_socket_h.m4
@@ -1,4 +1,4 @@
-# sys_socket_h.m4 serial 24
+# sys_socket_h.m4 serial 25
dnl Copyright (C) 2005-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,
@@ -95,6 +95,8 @@ AC_DEFUN([gl_HEADER_SYS_SOCKET],
#include <sys/socket.h>
]], [socket connect accept bind getpeername getsockname getsockopt
listen recv send recvfrom sendto setsockopt shutdown accept4])
+
+ AC_REQUIRE([AC_C_RESTRICT])
])
AC_DEFUN([gl_PREREQ_SYS_H_SOCKET],
diff --git a/gnulib/import/m4/sys_stat_h.m4 b/gnulib/import/m4/sys_stat_h.m4
index a5f35d4..3efba5a 100644
--- a/gnulib/import/m4/sys_stat_h.m4
+++ b/gnulib/import/m4/sys_stat_h.m4
@@ -1,4 +1,4 @@
-# sys_stat_h.m4 serial 32 -*- Autoconf -*-
+# sys_stat_h.m4 serial 33 -*- Autoconf -*-
dnl Copyright (C) 2006-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -48,7 +48,9 @@ AC_DEFUN([gl_HEADER_SYS_STAT_H],
gl_WARN_ON_USE_PREPARE([[#include <sys/stat.h>
]], [fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat
mknod mknodat stat utimensat])
-]) # gl_HEADER_SYS_STAT_H
+
+ AC_REQUIRE([AC_C_RESTRICT])
+])
AC_DEFUN([gl_SYS_STAT_MODULE_INDICATOR],
[
@@ -92,7 +94,6 @@ AC_DEFUN([gl_SYS_STAT_H_DEFAULTS],
REPLACE_FSTAT=0; AC_SUBST([REPLACE_FSTAT])
REPLACE_FSTATAT=0; AC_SUBST([REPLACE_FSTATAT])
REPLACE_FUTIMENS=0; AC_SUBST([REPLACE_FUTIMENS])
- REPLACE_LCHMOD=0; AC_SUBST([REPLACE_LCHMOD])
REPLACE_LSTAT=0; AC_SUBST([REPLACE_LSTAT])
REPLACE_MKDIR=0; AC_SUBST([REPLACE_MKDIR])
REPLACE_MKFIFO=0; AC_SUBST([REPLACE_MKFIFO])
diff --git a/gnulib/import/m4/time_h.m4 b/gnulib/import/m4/time_h.m4
index aae0ae2..d0f8932 100644
--- a/gnulib/import/m4/time_h.m4
+++ b/gnulib/import/m4/time_h.m4
@@ -2,7 +2,7 @@
# Copyright (C) 2000-2001, 2003-2007, 2009-2020 Free Software Foundation, Inc.
-# serial 11
+# serial 12
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -19,10 +19,12 @@ AC_DEFUN([gl_HEADER_TIME_H],
AC_DEFUN([gl_HEADER_TIME_H_BODY],
[
- AC_REQUIRE([AC_C_RESTRICT])
AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS])
+
gl_NEXT_HEADERS([time.h])
AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC])
+
+ AC_REQUIRE([AC_C_RESTRICT])
])
dnl Check whether 'struct timespec' is declared
diff --git a/gnulib/import/m4/unistd_h.m4 b/gnulib/import/m4/unistd_h.m4
index ea2bb01..dfa38f8 100644
--- a/gnulib/import/m4/unistd_h.m4
+++ b/gnulib/import/m4/unistd_h.m4
@@ -1,4 +1,4 @@
-# unistd_h.m4 serial 77
+# unistd_h.m4 serial 80
dnl Copyright (C) 2006-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -43,11 +43,13 @@ AC_DEFUN([gl_UNISTD_H],
#endif
]], [access chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir
fchownat fdatasync fsync ftruncate getcwd getdomainname getdtablesize
- getgroups gethostname getlogin getlogin_r getpagesize getpass
+ getentropy getgroups gethostname getlogin getlogin_r getpagesize getpass
getusershell setusershell endusershell
group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite
readlink readlinkat rmdir sethostname sleep symlink symlinkat
truncate ttyname_r unlink unlinkat usleep])
+
+ AC_REQUIRE([AC_C_RESTRICT])
])
AC_DEFUN([gl_UNISTD_MODULE_INDICATOR],
@@ -80,6 +82,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
GNULIB_GETCWD=0; AC_SUBST([GNULIB_GETCWD])
GNULIB_GETDOMAINNAME=0; AC_SUBST([GNULIB_GETDOMAINNAME])
GNULIB_GETDTABLESIZE=0; AC_SUBST([GNULIB_GETDTABLESIZE])
+ GNULIB_GETENTROPY=0; AC_SUBST([GNULIB_GETENTROPY])
GNULIB_GETGROUPS=0; AC_SUBST([GNULIB_GETGROUPS])
GNULIB_GETHOSTNAME=0; AC_SUBST([GNULIB_GETHOSTNAME])
GNULIB_GETLOGIN=0; AC_SUBST([GNULIB_GETLOGIN])
@@ -127,6 +130,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
HAVE_FSYNC=1; AC_SUBST([HAVE_FSYNC])
HAVE_FTRUNCATE=1; AC_SUBST([HAVE_FTRUNCATE])
HAVE_GETDTABLESIZE=1; AC_SUBST([HAVE_GETDTABLESIZE])
+ HAVE_GETENTROPY=1; AC_SUBST([HAVE_GETENTROPY])
HAVE_GETGROUPS=1; AC_SUBST([HAVE_GETGROUPS])
HAVE_GETHOSTNAME=1; AC_SUBST([HAVE_GETHOSTNAME])
HAVE_GETLOGIN=1; AC_SUBST([HAVE_GETLOGIN])
@@ -196,6 +200,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
REPLACE_UNLINKAT=0; AC_SUBST([REPLACE_UNLINKAT])
REPLACE_USLEEP=0; AC_SUBST([REPLACE_USLEEP])
REPLACE_WRITE=0; AC_SUBST([REPLACE_WRITE])
+ UNISTD_H_HAVE_SYS_RANDOM_H=0; AC_SUBST([UNISTD_H_HAVE_SYS_RANDOM_H])
UNISTD_H_HAVE_WINSOCK2_H=0; AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H])
UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS])
diff --git a/gnulib/import/m4/wchar_h.m4 b/gnulib/import/m4/wchar_h.m4
index d1b7228..6c4e8a6 100644
--- a/gnulib/import/m4/wchar_h.m4
+++ b/gnulib/import/m4/wchar_h.m4
@@ -7,7 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
dnl Written by Eric Blake.
-# wchar_h.m4 serial 44
+# wchar_h.m4 serial 46
AC_DEFUN([gl_WCHAR_H],
[
@@ -52,11 +52,14 @@ AC_DEFUN([gl_WCHAR_H],
#include <wchar.h>
]],
[btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb
- wcsrtombs wcsnrtombs wcwidth wmemchr wmemcmp wmemcpy wmemmove wmemset
+ wcsrtombs wcsnrtombs wcwidth
+ wmemchr wmemcmp wmemcpy wmemmove wmempcpy wmemset
wcslen wcsnlen wcscpy wcpcpy wcsncpy wcpncpy wcscat wcsncat wcscmp
wcsncmp wcscasecmp wcsncasecmp wcscoll wcsxfrm wcsdup wcschr wcsrchr
wcscspn wcsspn wcspbrk wcsstr wcstok wcswidth wcsftime
])
+
+ AC_REQUIRE([AC_C_RESTRICT])
])
dnl Check whether <wchar.h> is usable at all.
@@ -157,6 +160,7 @@ AC_DEFUN([gl_WCHAR_H_DEFAULTS],
GNULIB_WMEMCMP=0; AC_SUBST([GNULIB_WMEMCMP])
GNULIB_WMEMCPY=0; AC_SUBST([GNULIB_WMEMCPY])
GNULIB_WMEMMOVE=0; AC_SUBST([GNULIB_WMEMMOVE])
+ GNULIB_WMEMPCPY=0; AC_SUBST([GNULIB_WMEMPCPY])
GNULIB_WMEMSET=0; AC_SUBST([GNULIB_WMEMSET])
GNULIB_WCSLEN=0; AC_SUBST([GNULIB_WCSLEN])
GNULIB_WCSNLEN=0; AC_SUBST([GNULIB_WCSNLEN])
@@ -196,6 +200,7 @@ AC_DEFUN([gl_WCHAR_H_DEFAULTS],
HAVE_WMEMCMP=1; AC_SUBST([HAVE_WMEMCMP])
HAVE_WMEMCPY=1; AC_SUBST([HAVE_WMEMCPY])
HAVE_WMEMMOVE=1; AC_SUBST([HAVE_WMEMMOVE])
+ HAVE_WMEMPCPY=1; AC_SUBST([HAVE_WMEMPCPY])
HAVE_WMEMSET=1; AC_SUBST([HAVE_WMEMSET])
HAVE_WCSLEN=1; AC_SUBST([HAVE_WCSLEN])
HAVE_WCSNLEN=1; AC_SUBST([HAVE_WCSNLEN])
diff --git a/gnulib/import/m4/wint_t.m4 b/gnulib/import/m4/wint_t.m4
index 877fd86..5e6c178 100644
--- a/gnulib/import/m4/wint_t.m4
+++ b/gnulib/import/m4/wint_t.m4
@@ -1,4 +1,4 @@
-# wint_t.m4 serial 7
+# wint_t.m4 serial 8
dnl Copyright (C) 2003, 2007-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,
@@ -35,7 +35,7 @@ AC_DEFUN([gt_TYPE_WINT_T],
AC_CACHE_CHECK([whether wint_t is too small],
[gl_cv_type_wint_t_too_small],
[AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([[
+ [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
@@ -46,10 +46,10 @@ AC_DEFUN([gt_TYPE_WINT_T],
# include <time.h>
#endif
#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])])
+ 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
GNULIB_OVERRIDES_WINT_T=1
else
diff --git a/gnulib/import/m4/wmemchr.m4 b/gnulib/import/m4/wmemchr.m4
new file mode 100644
index 0000000..62bd89c
--- /dev/null
+++ b/gnulib/import/m4/wmemchr.m4
@@ -0,0 +1,32 @@
+# wmemchr.m4 serial 4
+dnl Copyright (C) 2011-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_FUNC_WMEMCHR],
+[
+ AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+ dnl We cannot use AC_CHECK_FUNCS here, because the MSVC 9 header files
+ 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>
+]],
+ [[return ! wmemchr ((const wchar_t *) 0, (wchar_t) ' ', 0);]])
+ ],
+ [gl_cv_func_wmemchr=yes],
+ [gl_cv_func_wmemchr=no])
+ ])
+ if test $gl_cv_func_wmemchr = no; then
+ HAVE_WMEMCHR=0
+ fi
+])
diff --git a/gnulib/import/m4/wmempcpy.m4 b/gnulib/import/m4/wmempcpy.m4
new file mode 100644
index 0000000..1795fc8
--- /dev/null
+++ b/gnulib/import/m4/wmempcpy.m4
@@ -0,0 +1,21 @@
+# wmempcpy.m4 serial 1
+dnl Copyright (C) 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_FUNC_WMEMPCPY],
+[
+ AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+
+ dnl Persuade glibc <wchar.h> to declare wmempcpy().
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+ dnl The wmempcpy() declaration in lib/wchar.in.h uses 'restrict'.
+ AC_REQUIRE([AC_C_RESTRICT])
+
+ AC_CHECK_FUNCS_ONCE([wmempcpy])
+ if test $ac_cv_func_wmempcpy = no; then
+ HAVE_WMEMPCPY=0
+ fi
+])