From 3e4d43911365653e0f9e2423d473fef85d347e32 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Sun, 6 Feb 2022 20:51:06 +0100 Subject: [PATCH] package/guile: fix build with glibc 2.34 Fix the following build failure with glibc 2.34 raised since bump to version 3.0.7 in commit d8bee3950aa851620d6a954aebad1f984caa105a: In file included from regexec.c:1368, from regex.c:74: ./malloc/dynarray-skeleton.c:195:24: error: expected declaration specifiers or '...' before '(' token 195 | __attribute_nonnull__ ((1)) | ^ https://lists.gnu.org/archive/html/bug-guile/2021-08/msg00003.html Fixes: - http://autobuild.buildroot.org/results/27a2a69e1177f15daec65eca035b99ea5355c34b Signed-off-by: Fabrice Fontaine Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- ...38a53d64054ae2fc8b86c0f87c418c6176e6.patch | 13930 ++++++++++++++++ package/guile/guile.mk | 7 +- 2 files changed, 13935 insertions(+), 2 deletions(-) create mode 100644 package/guile/0004-Update-gnulib-to-8f4538a53d64054ae2fc8b86c0f87c418c6176e6.patch diff --git a/package/guile/0004-Update-gnulib-to-8f4538a53d64054ae2fc8b86c0f87c418c6176e6.patch b/package/guile/0004-Update-gnulib-to-8f4538a53d64054ae2fc8b86c0f87c418c6176e6.patch new file mode 100644 index 0000000000..f471dbc5c0 --- /dev/null +++ b/package/guile/0004-Update-gnulib-to-8f4538a53d64054ae2fc8b86c0f87c418c6176e6.patch @@ -0,0 +1,13930 @@ +From b4a80f4239b19fea4d2cc3e9d197f24b809f0624 Mon Sep 17 00:00:00 2001 +From: Daniel Llorens +Date: Mon, 16 Aug 2021 13:23:27 +0200 +Subject: Update gnulib to 8f4538a53d64054ae2fc8b86c0f87c418c6176e6 + +Includes gnulib:0c907f7da13232908f05c415b8cec56024071906 to fix #49930 +https://lists.gnu.org/archive/html/bug-guile/2021-08/msg00003.html. + +[Retrieved from: +https://git.savannah.gnu.org/cgit/guile.git/commit/?id=b4a80f4239b19fea4d2cc3e9d197f24b809f0624] +Signed-off-by: Fabrice Fontaine +--- + build-aux/announce-gen | 49 +- + build-aux/gendocs.sh | 6 +- + build-aux/git-version-gen | 8 +- + build-aux/gnupload | 17 +- + build-aux/useless-if-before-free | 18 +- + lib/Makefile.am | 986 ++++++++++++++++++++------------------- + lib/_Noreturn.h | 2 +- + lib/accept.c | 10 +- + lib/accept4.c | 14 +- + lib/alignof.h | 12 +- + lib/alloca.c | 4 +- + lib/alloca.in.h | 20 +- + lib/arpa_inet.in.h | 12 +- + lib/asnprintf.c | 14 +- + lib/assure.h | 10 +- + lib/attribute.h | 16 +- + lib/basename-lgpl.c | 10 +- + lib/basename-lgpl.h | 26 +- + lib/binary-io.c | 10 +- + lib/binary-io.h | 10 +- + lib/bind.c | 10 +- + lib/btowc.c | 10 +- + lib/byteswap.in.h | 10 +- + lib/c-ctype.c | 18 + + lib/c-ctype.h | 24 +- + lib/c-strcase.h | 12 +- + lib/c-strcasecmp.c | 12 +- + lib/c-strcaseeq.h | 14 +- + lib/c-strncasecmp.c | 12 +- + lib/canonicalize-lgpl.c | 3 +- + lib/cdefs.h | 43 +- + lib/ceil.c | 10 +- + lib/cloexec.c | 14 +- + lib/cloexec.h | 14 +- + lib/close.c | 10 +- + lib/connect.c | 10 +- + lib/copysign.c | 10 +- + lib/dirent.in.h | 111 +++-- + lib/dirfd.c | 10 +- + lib/dirname-lgpl.c | 10 +- + lib/dirname.h | 39 +- + lib/dup2.c | 10 +- + lib/duplocale.c | 10 +- + lib/dynarray.h | 20 +- + lib/errno.in.h | 12 +- + lib/fcntl.c | 10 +- + lib/fcntl.in.h | 10 +- + lib/fd-hook.c | 14 +- + lib/fd-hook.h | 14 +- + lib/float+.h | 12 +- + lib/float.c | 10 +- + lib/float.in.h | 10 +- + lib/floor.c | 10 +- + lib/free.c | 10 +- + lib/frexp.c | 10 +- + lib/fstat.c | 10 +- + lib/fsync.c | 14 +- + lib/full-read.c | 10 +- + lib/full-read.h | 10 +- + lib/full-write.c | 10 +- + lib/full-write.h | 10 +- + lib/gai_strerror.c | 12 +- + lib/getaddrinfo.c | 12 +- + lib/getdtablesize.c | 10 +- + lib/getlogin.c | 10 +- + lib/getpeername.c | 10 +- + lib/getrandom.c | 16 +- + lib/getsockname.c | 10 +- + lib/getsockopt.c | 10 +- + lib/gettext.h | 14 +- + lib/hard-locale.c | 10 +- + lib/hard-locale.h | 10 +- + lib/iconv.c | 14 +- + lib/iconv.in.h | 12 +- + lib/iconv_close.c | 14 +- + lib/iconv_open-aix.gperf | 14 +- + lib/iconv_open-hpux.gperf | 14 +- + lib/iconv_open-irix.gperf | 14 +- + lib/iconv_open-osf.gperf | 14 +- + lib/iconv_open-solaris.gperf | 14 +- + lib/iconv_open-zos.gperf | 14 +- + lib/iconv_open.c | 14 +- + lib/iconveh.h | 10 +- + lib/inet_ntop.c | 12 +- + lib/inet_pton.c | 10 +- + lib/inttypes.in.h | 10 +- + lib/isfinite.c | 14 +- + lib/isinf.c | 14 +- + lib/isnan.c | 10 +- + lib/isnand-nolibm.h | 10 +- + lib/isnand.c | 10 +- + lib/isnanf-nolibm.h | 10 +- + lib/isnanf.c | 10 +- + lib/isnanl-nolibm.h | 10 +- + lib/isnanl.c | 10 +- + lib/itold.c | 10 +- + lib/langinfo.in.h | 12 +- + lib/lc-charset-dispatch.c | 10 +- + lib/lc-charset-dispatch.h | 10 +- + lib/libc-config.h | 20 +- + lib/libunistring.valgrind | 22 +- + lib/limits.in.h | 28 +- + lib/link.c | 12 +- + lib/listen.c | 10 +- + lib/localcharset.c | 14 +- + lib/localcharset.h | 14 +- + lib/locale.in.h | 10 +- + lib/localeconv.c | 10 +- + lib/log.c | 10 +- + lib/log1p.c | 10 +- + lib/lstat.c | 10 +- + lib/malloc.c | 47 +- + lib/malloc/dynarray_at_failure.c | 3 +- + lib/malloca.c | 36 +- + lib/malloca.h | 36 +- + lib/math.c | 18 + + lib/math.in.h | 10 +- + lib/mbrtowc-impl-utf8.h | 10 +- + lib/mbrtowc-impl.h | 10 +- + lib/mbrtowc.c | 10 +- + lib/mbsinit.c | 10 +- + lib/mbtowc-impl.h | 10 +- + lib/mbtowc-lock.c | 10 +- + lib/mbtowc-lock.h | 10 +- + lib/mbtowc.c | 10 +- + lib/memchr.c | 24 +- + lib/memchr.valgrind | 10 +- + lib/mempcpy.c | 12 +- + lib/minmax.h | 12 +- + lib/mkdir.c | 10 +- + lib/mkostemp.c | 10 +- + lib/msvc-inval.c | 14 +- + lib/msvc-inval.h | 14 +- + lib/msvc-nothrow.c | 14 +- + lib/msvc-nothrow.h | 14 +- + lib/netdb.in.h | 12 +- + lib/netinet_in.in.h | 12 +- + lib/nl_langinfo-lock.c | 10 +- + lib/nl_langinfo.c | 10 +- + lib/nproc.c | 12 +- + lib/nproc.h | 12 +- + lib/nstrftime.c | 19 +- + lib/open.c | 10 +- + lib/pathmax.h | 12 +- + lib/pipe.c | 14 +- + lib/pipe2.c | 14 +- + lib/poll.c | 14 +- + lib/poll.in.h | 14 +- + lib/printf-args.c | 14 +- + lib/printf-args.h | 14 +- + lib/printf-parse.c | 25 +- + lib/printf-parse.h | 14 +- + lib/putenv.c | 10 +- + lib/raise.c | 10 +- + lib/rawmemchr.c | 10 +- + lib/rawmemchr.valgrind | 10 +- + lib/read.c | 10 +- + lib/readlink.c | 10 +- + lib/realloc.c | 68 +-- + lib/recv.c | 10 +- + lib/recvfrom.c | 10 +- + lib/regex_internal.c | 9 +- + lib/regexec.c | 12 +- + lib/rename.c | 10 +- + lib/rmdir.c | 10 +- + lib/round.c | 14 +- + lib/safe-read.c | 10 +- + lib/safe-read.h | 10 +- + lib/safe-write.c | 10 +- + lib/safe-write.h | 10 +- + lib/same-inode.h | 10 +- + lib/scratch_buffer.h | 20 +- + lib/select.c | 23 +- + lib/send.c | 10 +- + lib/sendto.c | 10 +- + lib/setenv.c | 10 +- + lib/setlocale-lock.c | 10 +- + lib/setlocale_null.c | 10 +- + lib/setlocale_null.h | 10 +- + lib/setsockopt.c | 10 +- + lib/shutdown.c | 10 +- + lib/signal.in.h | 10 +- + lib/signbitd.c | 10 +- + lib/signbitf.c | 10 +- + lib/signbitl.c | 10 +- + lib/size_max.h | 12 +- + lib/snprintf.c | 14 +- + lib/socket.c | 10 +- + lib/sockets.c | 10 +- + lib/sockets.h | 10 +- + lib/stat-time.c | 18 + + lib/stat-time.h | 10 +- + lib/stat-w32.c | 10 +- + lib/stat-w32.h | 10 +- + lib/stat.c | 10 +- + lib/stdalign.in.h | 12 +- + lib/stdbool.in.h | 12 +- + lib/stddef.in.h | 12 +- + lib/stdint.in.h | 16 +- + lib/stdio.in.h | 126 +++-- + lib/stdlib.in.h | 185 ++++++-- + lib/strdup.c | 14 +- + lib/streq.h | 14 +- + lib/strftime.h | 10 +- + lib/striconveh.c | 10 +- + lib/striconveh.h | 18 +- + lib/string.in.h | 68 ++- + lib/stripslash.c | 10 +- + lib/sys-limits.h | 12 +- + lib/sys_file.in.h | 12 +- + lib/sys_random.in.h | 12 +- + lib/sys_select.in.h | 12 +- + lib/sys_socket.c | 18 + + lib/sys_socket.in.h | 12 +- + lib/sys_stat.in.h | 12 +- + lib/sys_time.in.h | 12 +- + lib/sys_times.in.h | 12 +- + lib/sys_types.in.h | 12 +- + lib/sys_uio.in.h | 12 +- + lib/tempname.h | 10 +- + lib/time-internal.h | 14 +- + lib/time.in.h | 12 +- + lib/time_r.c | 14 +- + lib/time_rz.c | 14 +- + lib/times.c | 12 +- + lib/trunc.c | 10 +- + lib/tzset.c | 12 +- + lib/unistd.c | 18 + + lib/unistd.in.h | 25 +- + lib/unsetenv.c | 10 +- + lib/vasnprintf.c | 50 +- + lib/vasnprintf.h | 14 +- + lib/verify.h | 14 +- + lib/vsnprintf.c | 14 +- + lib/w32sock.h | 10 +- + lib/wchar.in.h | 63 ++- + lib/wcrtomb.c | 10 +- + lib/wctype-h.c | 19 + + lib/wctype.in.h | 22 +- + lib/windows-initguard.h | 12 +- + lib/write.c | 10 +- + lib/xalloc-oversized.h | 47 +- + lib/xsize.c | 18 + + lib/xsize.h | 12 +- + m4/arpa_inet_h.m4 | 31 +- + m4/dirent_h.m4 | 45 +- + m4/environ.m4 | 5 +- + m4/fcntl_h.m4 | 39 +- + m4/flock.m4 | 4 +- + m4/fstat.m4 | 4 +- + m4/getaddrinfo.m4 | 10 +- + m4/gnulib-common.m4 | 140 +++++- + m4/gnulib-comp.m4 | 140 ++++-- + m4/hostent.m4 | 4 +- + m4/iconv_h.m4 | 27 +- + m4/inttypes.m4 | 31 +- + m4/langinfo_h.m4 | 25 +- + m4/largefile.m4 | 28 +- + m4/limits-h.m4 | 3 +- + m4/locale_h.m4 | 37 +- + m4/malloc.m4 | 152 ++++-- + m4/math_h.m4 | 227 ++++----- + m4/memchr.m4 | 4 +- + m4/mempcpy.m4 | 4 +- + m4/mktime.m4 | 4 +- + m4/netdb_h.m4 | 25 +- + m4/poll_h.m4 | 29 +- + m4/printf.m4 | 5 +- + m4/rawmemchr.m4 | 4 +- + m4/realloc.m4 | 47 +- + m4/regex.m4 | 44 +- + m4/select.m4 | 4 +- + m4/servent.m4 | 4 +- + m4/signal_h.m4 | 33 +- + m4/sockpfaf.m4 | 6 +- + m4/stat.m4 | 4 +- + m4/stddef_h.m4 | 23 +- + m4/stdint.m4 | 6 +- + m4/stdio_h.m4 | 168 ++++--- + m4/stdlib_h.m4 | 116 +++-- + m4/strdup.m4 | 6 +- + m4/string_h.m4 | 124 ++--- + m4/sys_file_h.m4 | 29 +- + m4/sys_random_h.m4 | 25 +- + m4/sys_select_h.m4 | 29 +- + m4/sys_socket_h.m4 | 53 ++- + m4/sys_stat_h.m4 | 65 ++- + m4/sys_time_h.m4 | 34 +- + m4/sys_times_h.m4 | 25 +- + m4/sys_types_h.m4 | 16 +- + m4/sys_uio_h.m4 | 23 +- + m4/threadlib.m4 | 64 ++- + m4/time_h.m4 | 62 +-- + m4/time_r.m4 | 2 +- + m4/time_rz.m4 | 2 +- + m4/timegm.m4 | 4 +- + m4/tzset.m4 | 4 +- + m4/unistd_h.m4 | 194 ++++---- + m4/visibility.m4 | 6 +- + m4/wchar_h.m4 | 109 +++-- + m4/wctype_h.m4 | 39 +- + m4/wint_t.m4 | 10 +- + m4/year2038.m4 | 124 +++++ + maint.mk | 3 +- + 304 files changed, 4266 insertions(+), 3005 deletions(-) + create mode 100644 m4/year2038.m4 + +diff --git a/build-aux/announce-gen b/build-aux/announce-gen +index 84d2d63..f3b5461 100755 +--- a/build-aux/announce-gen ++++ b/build-aux/announce-gen +@@ -35,12 +35,14 @@ + eval 'exec perl -wSx "$0" "$@"' + if 0; + +-my $VERSION = '2020-05-10 16:13'; # UTC ++my $VERSION = '2021-08-04 09:17'; # UTC + # The definition above must lie within the first 8 lines in order + # for the Emacs time-stamp write hook (at end) to update it. + # If you change this file with Emacs, please let the write hook + # do its job. Otherwise, update this string manually. + ++my $copyright_year = '2021'; ++ + use strict; + use Getopt::Long; + use POSIX qw(strftime); +@@ -49,12 +51,6 @@ use POSIX qw(strftime); + + my %valid_release_types = map {$_ => 1} qw (alpha beta stable); + my @archive_suffixes = qw (tar.gz tar.bz2 tar.lz tar.lzma tar.xz); +-my %digest_classes = +- ( +- 'md5' => (eval { require Digest::MD5; } and 'Digest::MD5'), +- 'sha1' => ((eval { require Digest::SHA; } and 'Digest::SHA') +- or (eval { require Digest::SHA1; } and 'Digest::SHA1')) +- ); + my $srcdir = '.'; + + sub usage ($) +@@ -94,7 +90,7 @@ The following are optional: + VERSION is the result of running git describe + in the gnulib source directory. + required if gnulib is in TOOL_LIST. +- --no-print-checksums do not emit MD5 or SHA1 checksums ++ --no-print-checksums do not emit SHA1 or SHA256 checksums + --archive-suffix=SUF add SUF to the list of archive suffixes + --mail-headers=HEADERS a space-separated list of mail headers, e.g., + To: x\@example.com Cc: y-announce\@example.com,... +@@ -161,7 +157,7 @@ sub print_locations ($\@\%@) + + =item C. ++Print the SHA1 and SHA256 signature section for each C<@file>. + + =cut + +@@ -169,23 +165,18 @@ sub print_checksums (@) + { + my (@file) = @_; + +- print "Here are the MD5 and SHA1 checksums:\n"; ++ print "Here are the SHA1 and SHA256 checksums:\n"; + print "\n"; + +- foreach my $meth (qw (md5 sha1)) ++ use Digest::file qw(digest_file_hex digest_file_base64); ++ ++ foreach my $f (@file) + { +- my $class = $digest_classes{$meth} or next; +- foreach my $f (@file) +- { +- open IN, '<', $f +- or die "$ME: $f: cannot open for reading: $!\n"; +- binmode IN; +- my $dig = $class->new->addfile(*IN)->hexdigest; +- close IN; +- print "$dig $f\n"; +- } ++ print digest_file_hex($f, "SHA-1"), " $f\n"; ++ print digest_file_base64($f, "SHA-256"), " $f\n"; + } +- print "\n"; ++ print "\nThe SHA256 checksum is base64 encoded, instead of the\n"; ++ print "hexadecimal encoding that most checksum tools default to.\n\n"; + } + + =item C \@archive_suffixes, + + help => sub { usage 0 }, +- version => sub { print "$ME version $VERSION\n"; exit }, ++ version => ++ sub ++ { ++ print "$ME version $VERSION\n"; ++ print "Copyright (C) $copyright_year Free Software Foundation, Inc.\n"; ++ print "License GPLv3+: GNU GPL version 3 or later .\n" ++ . "This is free software: you are free to change and redistribute it.\n" ++ . "There is NO WARRANTY, to the extent permitted by law.\n"; ++ print "\n"; ++ my $author = "Jim Meyering"; ++ print "Written by $author.\n"; ++ exit ++ }, + ) or usage 1; + + my $fail = 0; +diff --git a/build-aux/gendocs.sh b/build-aux/gendocs.sh +index 1872de9..1241ee3 100755 +--- a/build-aux/gendocs.sh ++++ b/build-aux/gendocs.sh +@@ -2,7 +2,7 @@ + # gendocs.sh -- generate a GNU manual in many formats. This script is + # mentioned in maintain.texi. See the help message below for usage details. + +-scriptversion=2021-01-01.00 ++scriptversion=2021-07-19.18 + + # Copyright 2003-2021 Free Software Foundation, Inc. + # +@@ -58,7 +58,7 @@ EMAIL=webmasters@gnu.org # please override with --email + commonarg= # passed to all makeinfo/texi2html invcations. + dirargs= # passed to all tools (-I dir). + dirs= # -I directories. +-htmlarg="--css-ref=/software/gnulib/manual.css -c TOP_NODE_UP_URL=/manual" ++htmlarg="--css-ref=https://www.gnu.org/software/gnulib/manual.css -c TOP_NODE_UP_URL=/manual" + default_htmlarg=true + infoarg=--no-split + generate_ascii=true +@@ -202,7 +202,7 @@ base=$PACKAGE + + if $default_htmlarg && test -n "$use_texi2html"; then + # The legacy texi2html doesn't support TOP_NODE_UP_URL +- htmlarg="--css-ref=/software/gnulib/manual.css" ++ htmlarg="--css-ref=https://www.gnu.org/software/gnulib/manual.css" + fi + + if test -n "$srcfile"; then +diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen +index be0fc20..5e42afb 100755 +--- a/build-aux/git-version-gen ++++ b/build-aux/git-version-gen +@@ -75,10 +75,10 @@ me=$0 + year=`expr "$scriptversion" : '\([^-]*\)'` + version="git-version-gen $scriptversion + +-Copyright $year Free Software Foundation, Inc. +-There is NO warranty. You may redistribute this software +-under the terms of the GNU General Public License. +-For more information about these matters, see the files named COPYING." ++Copyright (C) ${year} Free Software Foundation, Inc. ++License GPLv3+: GNU GPL version 3 or later . ++This is free software: you are free to change and redistribute it. ++There is NO WARRANTY, to the extent permitted by law." + + usage="\ + Usage: $me [OPTION]... \$srcdir/.tarball-version [TAG-NORMALIZATION-SED-SCRIPT] +diff --git a/build-aux/gnupload b/build-aux/gnupload +index 434741d..e7822ae 100755 +--- a/build-aux/gnupload ++++ b/build-aux/gnupload +@@ -1,13 +1,13 @@ + #!/bin/sh + # Sign files and upload them. + +-scriptversion=2018-05-19.18; # UTC ++scriptversion=2021-04-11.09; # UTC + + # 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 +-# the Free Software Foundation; either version 3, or (at your option) ++# the Free Software Foundation; either version 2, or (at your option) + # any later version. + # + # This program is distributed in the hope that it will be useful, +@@ -27,8 +27,8 @@ set -e + GPG=gpg + # Choose the proper version of gpg, so as to avoid a + # "gpg-agent is not available in this session" error +-# when gpg-agent is version 3 but gpg is still version 1. +-# FIXME-2020: remove, once all major distros ship gpg version 3 as /usr/bin/gpg ++# when gpg-agent is version 2 but gpg is still version 1. ++# FIXME-2020: remove, once all major distros ship gpg version 2 as /usr/bin/gpg + gpg_agent_version=`(gpg-agent --version) 2>/dev/null | sed -e '2,$d' -e 's/^[^0-9]*//'` + case "$gpg_agent_version" in + 2.*) +@@ -145,6 +145,12 @@ the build-aux/ directory of the gnulib package + + Send patches and bug reports to ." + ++copyright_year=`echo "$scriptversion" | sed -e 's/[^0-9].*//'` ++copyright="Copyright (C) ${copyright_year} Free Software Foundation, Inc. ++License GPLv2+: GNU GPL version 2 or later . ++This is free software: you are free to change and redistribute it. ++There is NO WARRANTY, to the extent permitted by law." ++ + # Read local configuration file + if test -r "$conffile"; then + echo "$0: Reading configuration file $conffile" +@@ -209,7 +215,8 @@ while test -n "$1"; do + ;; + --version) + echo "gnupload $scriptversion" +- exit $? ++ echo "$copyright" ++ exit 0 + ;; + --) + shift +diff --git a/build-aux/useless-if-before-free b/build-aux/useless-if-before-free +index 784d80b..5bbbc44 100755 +--- a/build-aux/useless-if-before-free ++++ b/build-aux/useless-if-before-free +@@ -36,12 +36,14 @@ + eval 'exec perl -wSx "$0" "$@"' + if 0; + +-my $VERSION = '2020-04-04 15:07'; # UTC ++my $VERSION = '2021-04-11 10:11'; # UTC + # The definition above must lie within the first 8 lines in order + # for the Emacs time-stamp write hook (at end) to update it. + # If you change this file with Emacs, please let the write hook + # do its job. Otherwise, update this string manually. + ++my $copyright_year = '2021'; ++ + use strict; + use warnings; + use Getopt::Long; +@@ -118,7 +120,19 @@ sub is_NULL ($) + GetOptions + ( + help => sub { usage 0 }, +- version => sub { print "$ME version $VERSION\n"; exit }, ++ version => ++ sub ++ { ++ print "$ME version $VERSION\n"; ++ print "Copyright (C) $copyright_year Free Software Foundation, Inc.\n"; ++ print "License GPLv3+: GNU GPL version 3 or later .\n" ++ . "This is free software: you are free to change and redistribute it.\n" ++ . "There is NO WARRANTY, to the extent permitted by law.\n"; ++ print "\n"; ++ my $author = "Jim Meyering"; ++ print "Written by $author.\n"; ++ exit ++ }, + list => \$list, + 'name=s@' => \@name, + ) or usage 1; +diff --git a/lib/Makefile.am b/lib/Makefile.am +index 02480f6..cb29c31 100644 +--- a/lib/Makefile.am ++++ b/lib/Makefile.am +@@ -288,8 +288,8 @@ arpa/inet.h: arpa_inet.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON + -e 's|@''HAVE_FEATURES_H''@|$(HAVE_FEATURES_H)|g' \ + -e 's|@''NEXT_ARPA_INET_H''@|$(NEXT_ARPA_INET_H)|g' \ + -e 's|@''HAVE_ARPA_INET_H''@|$(HAVE_ARPA_INET_H)|g' \ +- -e 's/@''GNULIB_INET_NTOP''@/$(GNULIB_INET_NTOP)/g' \ +- -e 's/@''GNULIB_INET_PTON''@/$(GNULIB_INET_PTON)/g' \ ++ -e 's/@''GNULIB_INET_NTOP''@/$(GL_GNULIB_INET_NTOP)/g' \ ++ -e 's/@''GNULIB_INET_PTON''@/$(GL_GNULIB_INET_PTON)/g' \ + -e 's|@''HAVE_WS2TCPIP_H''@|$(HAVE_WS2TCPIP_H)|g' \ + -e 's|@''HAVE_DECL_INET_NTOP''@|$(HAVE_DECL_INET_NTOP)|g' \ + -e 's|@''HAVE_DECL_INET_PTON''@|$(HAVE_DECL_INET_PTON)|g' \ +@@ -470,14 +470,14 @@ dirent.h: dirent.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_DIRENT_H''@|$(NEXT_DIRENT_H)|g' \ +- -e 's/@''GNULIB_OPENDIR''@/$(GNULIB_OPENDIR)/g' \ +- -e 's/@''GNULIB_READDIR''@/$(GNULIB_READDIR)/g' \ +- -e 's/@''GNULIB_REWINDDIR''@/$(GNULIB_REWINDDIR)/g' \ +- -e 's/@''GNULIB_CLOSEDIR''@/$(GNULIB_CLOSEDIR)/g' \ +- -e 's/@''GNULIB_DIRFD''@/$(GNULIB_DIRFD)/g' \ +- -e 's/@''GNULIB_FDOPENDIR''@/$(GNULIB_FDOPENDIR)/g' \ +- -e 's/@''GNULIB_SCANDIR''@/$(GNULIB_SCANDIR)/g' \ +- -e 's/@''GNULIB_ALPHASORT''@/$(GNULIB_ALPHASORT)/g' \ ++ -e 's/@''GNULIB_OPENDIR''@/$(GL_GNULIB_OPENDIR)/g' \ ++ -e 's/@''GNULIB_READDIR''@/$(GL_GNULIB_READDIR)/g' \ ++ -e 's/@''GNULIB_REWINDDIR''@/$(GL_GNULIB_REWINDDIR)/g' \ ++ -e 's/@''GNULIB_CLOSEDIR''@/$(GL_GNULIB_CLOSEDIR)/g' \ ++ -e 's/@''GNULIB_DIRFD''@/$(GL_GNULIB_DIRFD)/g' \ ++ -e 's/@''GNULIB_FDOPENDIR''@/$(GL_GNULIB_FDOPENDIR)/g' \ ++ -e 's/@''GNULIB_SCANDIR''@/$(GL_GNULIB_SCANDIR)/g' \ ++ -e 's/@''GNULIB_ALPHASORT''@/$(GL_GNULIB_ALPHASORT)/g' \ + -e 's/@''HAVE_OPENDIR''@/$(HAVE_OPENDIR)/g' \ + -e 's/@''HAVE_READDIR''@/$(HAVE_READDIR)/g' \ + -e 's/@''HAVE_REWINDDIR''@/$(HAVE_REWINDDIR)/g' \ +@@ -543,6 +543,32 @@ EXTRA_libgnu_la_SOURCES += duplocale.c + ## begin gnulib module dynarray + + if gl_GNULIB_ENABLED_dynarray ++BUILT_SOURCES += malloc/dynarray.gl.h malloc/dynarray-skeleton.gl.h ++ ++malloc/dynarray.gl.h: malloc/dynarray.h ++ $(AM_V_at)$(MKDIR_P) malloc ++ $(AM_V_GEN)rm -f $@-t $@ && \ ++ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ ++ sed -e '/libc_hidden_proto/d' < $(srcdir)/malloc/dynarray.h; \ ++ } > $@-t && \ ++ mv $@-t $@ ++MOSTLYCLEANFILES += malloc/dynarray.gl.h malloc/dynarray.gl.h-t ++ ++malloc/dynarray-skeleton.gl.h: malloc/dynarray-skeleton.c ++ $(AM_V_at)$(MKDIR_P) malloc ++ $(AM_V_GEN)rm -f $@-t $@ && \ ++ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ ++ sed -e 's|||g' \ ++ -e 's|__attribute_maybe_unused__|_GL_ATTRIBUTE_MAYBE_UNUSED|g' \ ++ -e 's|__attribute_nonnull__|_GL_ATTRIBUTE_NONNULL|g' \ ++ -e 's|__attribute_warn_unused_result__|_GL_ATTRIBUTE_NODISCARD|g' \ ++ -e 's|__glibc_likely|_GL_LIKELY|g' \ ++ -e 's|__glibc_unlikely|_GL_UNLIKELY|g' \ ++ < $(srcdir)/malloc/dynarray-skeleton.c; \ ++ } > $@-t && \ ++ mv $@-t $@ ++MOSTLYCLEANFILES += malloc/dynarray-skeleton.gl.h malloc/dynarray-skeleton.gl.h-t ++ + libgnu_la_SOURCES += malloc/dynarray_at_failure.c malloc/dynarray_emplace_enlarge.c malloc/dynarray_finalize.c malloc/dynarray_resize.c malloc/dynarray_resize_clear.c + + endif +@@ -620,13 +646,13 @@ fcntl.h: fcntl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_FCNTL_H''@|$(NEXT_FCNTL_H)|g' \ +- -e 's/@''GNULIB_CREAT''@/$(GNULIB_CREAT)/g' \ +- -e 's/@''GNULIB_FCNTL''@/$(GNULIB_FCNTL)/g' \ +- -e 's/@''GNULIB_NONBLOCKING''@/$(GNULIB_NONBLOCKING)/g' \ +- -e 's/@''GNULIB_OPEN''@/$(GNULIB_OPEN)/g' \ +- -e 's/@''GNULIB_OPENAT''@/$(GNULIB_OPENAT)/g' \ +- -e 's/@''GNULIB_MDA_CREAT''@/$(GNULIB_MDA_CREAT)/g' \ +- -e 's/@''GNULIB_MDA_OPEN''@/$(GNULIB_MDA_OPEN)/g' \ ++ -e 's/@''GNULIB_CREAT''@/$(GL_GNULIB_CREAT)/g' \ ++ -e 's/@''GNULIB_FCNTL''@/$(GL_GNULIB_FCNTL)/g' \ ++ -e 's/@''GNULIB_NONBLOCKING''@/$(GL_GNULIB_NONBLOCKING)/g' \ ++ -e 's/@''GNULIB_OPEN''@/$(GL_GNULIB_OPEN)/g' \ ++ -e 's/@''GNULIB_OPENAT''@/$(GL_GNULIB_OPENAT)/g' \ ++ -e 's/@''GNULIB_MDA_CREAT''@/$(GL_GNULIB_MDA_CREAT)/g' \ ++ -e 's/@''GNULIB_MDA_OPEN''@/$(GL_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' \ +@@ -930,7 +956,7 @@ iconv.h: iconv.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_ICONV_H''@|$(NEXT_ICONV_H)|g' \ +- -e 's/@''GNULIB_ICONV''@/$(GNULIB_ICONV)/g' \ ++ -e 's/@''GNULIB_ICONV''@/$(GL_GNULIB_ICONV)/g' \ + -e 's|@''ICONV_CONST''@|$(ICONV_CONST)|g' \ + -e 's|@''REPLACE_ICONV''@|$(REPLACE_ICONV)|g' \ + -e 's|@''REPLACE_ICONV_OPEN''@|$(REPLACE_ICONV_OPEN)|g' \ +@@ -984,10 +1010,8 @@ EXTRA_libgnu_la_SOURCES += iconv.c iconv_close.c iconv_open.c + + ## begin gnulib module idx + +-if gl_GNULIB_ENABLED_idx + libgnu_la_SOURCES += idx.h + +-endif + ## end gnulib module idx + + ## begin gnulib module inet_ntop +@@ -1031,10 +1055,10 @@ inttypes.h: inttypes.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_U + -e 's|@''NEXT_INTTYPES_H''@|$(NEXT_INTTYPES_H)|g' \ + -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \ + -e 's/@''PRIPTR_PREFIX''@/$(PRIPTR_PREFIX)/g' \ +- -e 's/@''GNULIB_IMAXABS''@/$(GNULIB_IMAXABS)/g' \ +- -e 's/@''GNULIB_IMAXDIV''@/$(GNULIB_IMAXDIV)/g' \ +- -e 's/@''GNULIB_STRTOIMAX''@/$(GNULIB_STRTOIMAX)/g' \ +- -e 's/@''GNULIB_STRTOUMAX''@/$(GNULIB_STRTOUMAX)/g' \ ++ -e 's/@''GNULIB_IMAXABS''@/$(GL_GNULIB_IMAXABS)/g' \ ++ -e 's/@''GNULIB_IMAXDIV''@/$(GL_GNULIB_IMAXDIV)/g' \ ++ -e 's/@''GNULIB_STRTOIMAX''@/$(GL_GNULIB_STRTOIMAX)/g' \ ++ -e 's/@''GNULIB_STRTOUMAX''@/$(GL_GNULIB_STRTOUMAX)/g' \ + -e 's/@''HAVE_DECL_IMAXABS''@/$(HAVE_DECL_IMAXABS)/g' \ + -e 's/@''HAVE_DECL_IMAXDIV''@/$(HAVE_DECL_IMAXDIV)/g' \ + -e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \ +@@ -1151,7 +1175,7 @@ langinfo.h: langinfo.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_LANGINFO_H''@|$(NEXT_LANGINFO_H)|g' \ +- -e 's/@''GNULIB_NL_LANGINFO''@/$(GNULIB_NL_LANGINFO)/g' \ ++ -e 's/@''GNULIB_NL_LANGINFO''@/$(GL_GNULIB_NL_LANGINFO)/g' \ + -e 's|@''HAVE_LANGINFO_CODESET''@|$(HAVE_LANGINFO_CODESET)|g' \ + -e 's|@''HAVE_LANGINFO_T_FMT_AMPM''@|$(HAVE_LANGINFO_T_FMT_AMPM)|g' \ + -e 's|@''HAVE_LANGINFO_ALTMON''@|$(HAVE_LANGINFO_ALTMON)|g' \ +@@ -1264,11 +1288,11 @@ locale.h: locale.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_LOCALE_H''@|$(NEXT_LOCALE_H)|g' \ +- -e 's/@''GNULIB_LOCALECONV''@/$(GNULIB_LOCALECONV)/g' \ +- -e 's/@''GNULIB_SETLOCALE''@/$(GNULIB_SETLOCALE)/g' \ +- -e 's/@''GNULIB_SETLOCALE_NULL''@/$(GNULIB_SETLOCALE_NULL)/g' \ +- -e 's/@''GNULIB_DUPLOCALE''@/$(GNULIB_DUPLOCALE)/g' \ +- -e 's/@''GNULIB_LOCALENAME''@/$(GNULIB_LOCALENAME)/g' \ ++ -e 's/@''GNULIB_LOCALECONV''@/$(GL_GNULIB_LOCALECONV)/g' \ ++ -e 's/@''GNULIB_SETLOCALE''@/$(GL_GNULIB_SETLOCALE)/g' \ ++ -e 's/@''GNULIB_SETLOCALE_NULL''@/$(GL_GNULIB_SETLOCALE_NULL)/g' \ ++ -e 's/@''GNULIB_DUPLOCALE''@/$(GL_GNULIB_DUPLOCALE)/g' \ ++ -e 's/@''GNULIB_LOCALENAME''@/$(GL_GNULIB_LOCALENAME)/g' \ + -e 's|@''HAVE_NEWLOCALE''@|$(HAVE_NEWLOCALE)|g' \ + -e 's|@''HAVE_DUPLOCALE''@|$(HAVE_DUPLOCALE)|g' \ + -e 's|@''HAVE_FREELOCALE''@|$(HAVE_FREELOCALE)|g' \ +@@ -1379,108 +1403,108 @@ math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $( + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_AS_FIRST_DIRECTIVE_MATH_H''@|$(NEXT_AS_FIRST_DIRECTIVE_MATH_H)|g' \ +- -e 's/@''GNULIB_ACOSF''@/$(GNULIB_ACOSF)/g' \ +- -e 's/@''GNULIB_ACOSL''@/$(GNULIB_ACOSL)/g' \ +- -e 's/@''GNULIB_ASINF''@/$(GNULIB_ASINF)/g' \ +- -e 's/@''GNULIB_ASINL''@/$(GNULIB_ASINL)/g' \ +- -e 's/@''GNULIB_ATANF''@/$(GNULIB_ATANF)/g' \ +- -e 's/@''GNULIB_ATANL''@/$(GNULIB_ATANL)/g' \ +- -e 's/@''GNULIB_ATAN2F''@/$(GNULIB_ATAN2F)/g' \ +- -e 's/@''GNULIB_CBRT''@/$(GNULIB_CBRT)/g' \ +- -e 's/@''GNULIB_CBRTF''@/$(GNULIB_CBRTF)/g' \ +- -e 's/@''GNULIB_CBRTL''@/$(GNULIB_CBRTL)/g' \ +- -e 's/@''GNULIB_CEIL''@/$(GNULIB_CEIL)/g' \ +- -e 's/@''GNULIB_CEILF''@/$(GNULIB_CEILF)/g' \ +- -e 's/@''GNULIB_CEILL''@/$(GNULIB_CEILL)/g' \ +- -e 's/@''GNULIB_COPYSIGN''@/$(GNULIB_COPYSIGN)/g' \ +- -e 's/@''GNULIB_COPYSIGNF''@/$(GNULIB_COPYSIGNF)/g' \ +- -e 's/@''GNULIB_COPYSIGNL''@/$(GNULIB_COPYSIGNL)/g' \ +- -e 's/@''GNULIB_COSF''@/$(GNULIB_COSF)/g' \ +- -e 's/@''GNULIB_COSL''@/$(GNULIB_COSL)/g' \ +- -e 's/@''GNULIB_COSHF''@/$(GNULIB_COSHF)/g' \ +- -e 's/@''GNULIB_EXPF''@/$(GNULIB_EXPF)/g' \ +- -e 's/@''GNULIB_EXPL''@/$(GNULIB_EXPL)/g' \ +- -e 's/@''GNULIB_EXP2''@/$(GNULIB_EXP2)/g' \ +- -e 's/@''GNULIB_EXP2F''@/$(GNULIB_EXP2F)/g' \ +- -e 's/@''GNULIB_EXP2L''@/$(GNULIB_EXP2L)/g' \ +- -e 's/@''GNULIB_EXPM1''@/$(GNULIB_EXPM1)/g' \ +- -e 's/@''GNULIB_EXPM1F''@/$(GNULIB_EXPM1F)/g' \ +- -e 's/@''GNULIB_EXPM1L''@/$(GNULIB_EXPM1L)/g' \ +- -e 's/@''GNULIB_FABSF''@/$(GNULIB_FABSF)/g' \ +- -e 's/@''GNULIB_FABSL''@/$(GNULIB_FABSL)/g' \ +- -e 's/@''GNULIB_FLOOR''@/$(GNULIB_FLOOR)/g' \ +- -e 's/@''GNULIB_FLOORF''@/$(GNULIB_FLOORF)/g' \ +- -e 's/@''GNULIB_FLOORL''@/$(GNULIB_FLOORL)/g' \ +- -e 's/@''GNULIB_FMA''@/$(GNULIB_FMA)/g' \ +- -e 's/@''GNULIB_FMAF''@/$(GNULIB_FMAF)/g' \ +- -e 's/@''GNULIB_FMAL''@/$(GNULIB_FMAL)/g' \ +- -e 's/@''GNULIB_FMOD''@/$(GNULIB_FMOD)/g' \ +- -e 's/@''GNULIB_FMODF''@/$(GNULIB_FMODF)/g' \ +- -e 's/@''GNULIB_FMODL''@/$(GNULIB_FMODL)/g' \ +- -e 's/@''GNULIB_FREXPF''@/$(GNULIB_FREXPF)/g' \ +- -e 's/@''GNULIB_FREXP''@/$(GNULIB_FREXP)/g' \ +- -e 's/@''GNULIB_FREXPL''@/$(GNULIB_FREXPL)/g' \ +- -e 's/@''GNULIB_HYPOT''@/$(GNULIB_HYPOT)/g' \ +- -e 's/@''GNULIB_HYPOTF''@/$(GNULIB_HYPOTF)/g' \ +- -e 's/@''GNULIB_HYPOTL''@/$(GNULIB_HYPOTL)/g' \ ++ -e 's/@''GNULIB_ACOSF''@/$(GL_GNULIB_ACOSF)/g' \ ++ -e 's/@''GNULIB_ACOSL''@/$(GL_GNULIB_ACOSL)/g' \ ++ -e 's/@''GNULIB_ASINF''@/$(GL_GNULIB_ASINF)/g' \ ++ -e 's/@''GNULIB_ASINL''@/$(GL_GNULIB_ASINL)/g' \ ++ -e 's/@''GNULIB_ATANF''@/$(GL_GNULIB_ATANF)/g' \ ++ -e 's/@''GNULIB_ATANL''@/$(GL_GNULIB_ATANL)/g' \ ++ -e 's/@''GNULIB_ATAN2F''@/$(GL_GNULIB_ATAN2F)/g' \ ++ -e 's/@''GNULIB_CBRT''@/$(GL_GNULIB_CBRT)/g' \ ++ -e 's/@''GNULIB_CBRTF''@/$(GL_GNULIB_CBRTF)/g' \ ++ -e 's/@''GNULIB_CBRTL''@/$(GL_GNULIB_CBRTL)/g' \ ++ -e 's/@''GNULIB_CEIL''@/$(GL_GNULIB_CEIL)/g' \ ++ -e 's/@''GNULIB_CEILF''@/$(GL_GNULIB_CEILF)/g' \ ++ -e 's/@''GNULIB_CEILL''@/$(GL_GNULIB_CEILL)/g' \ ++ -e 's/@''GNULIB_COPYSIGN''@/$(GL_GNULIB_COPYSIGN)/g' \ ++ -e 's/@''GNULIB_COPYSIGNF''@/$(GL_GNULIB_COPYSIGNF)/g' \ ++ -e 's/@''GNULIB_COPYSIGNL''@/$(GL_GNULIB_COPYSIGNL)/g' \ ++ -e 's/@''GNULIB_COSF''@/$(GL_GNULIB_COSF)/g' \ ++ -e 's/@''GNULIB_COSL''@/$(GL_GNULIB_COSL)/g' \ ++ -e 's/@''GNULIB_COSHF''@/$(GL_GNULIB_COSHF)/g' \ ++ -e 's/@''GNULIB_EXPF''@/$(GL_GNULIB_EXPF)/g' \ ++ -e 's/@''GNULIB_EXPL''@/$(GL_GNULIB_EXPL)/g' \ ++ -e 's/@''GNULIB_EXP2''@/$(GL_GNULIB_EXP2)/g' \ ++ -e 's/@''GNULIB_EXP2F''@/$(GL_GNULIB_EXP2F)/g' \ ++ -e 's/@''GNULIB_EXP2L''@/$(GL_GNULIB_EXP2L)/g' \ ++ -e 's/@''GNULIB_EXPM1''@/$(GL_GNULIB_EXPM1)/g' \ ++ -e 's/@''GNULIB_EXPM1F''@/$(GL_GNULIB_EXPM1F)/g' \ ++ -e 's/@''GNULIB_EXPM1L''@/$(GL_GNULIB_EXPM1L)/g' \ ++ -e 's/@''GNULIB_FABSF''@/$(GL_GNULIB_FABSF)/g' \ ++ -e 's/@''GNULIB_FABSL''@/$(GL_GNULIB_FABSL)/g' \ ++ -e 's/@''GNULIB_FLOOR''@/$(GL_GNULIB_FLOOR)/g' \ ++ -e 's/@''GNULIB_FLOORF''@/$(GL_GNULIB_FLOORF)/g' \ ++ -e 's/@''GNULIB_FLOORL''@/$(GL_GNULIB_FLOORL)/g' \ ++ -e 's/@''GNULIB_FMA''@/$(GL_GNULIB_FMA)/g' \ ++ -e 's/@''GNULIB_FMAF''@/$(GL_GNULIB_FMAF)/g' \ ++ -e 's/@''GNULIB_FMAL''@/$(GL_GNULIB_FMAL)/g' \ ++ -e 's/@''GNULIB_FMOD''@/$(GL_GNULIB_FMOD)/g' \ ++ -e 's/@''GNULIB_FMODF''@/$(GL_GNULIB_FMODF)/g' \ ++ -e 's/@''GNULIB_FMODL''@/$(GL_GNULIB_FMODL)/g' \ ++ -e 's/@''GNULIB_FREXPF''@/$(GL_GNULIB_FREXPF)/g' \ ++ -e 's/@''GNULIB_FREXP''@/$(GL_GNULIB_FREXP)/g' \ ++ -e 's/@''GNULIB_FREXPL''@/$(GL_GNULIB_FREXPL)/g' \ ++ -e 's/@''GNULIB_HYPOT''@/$(GL_GNULIB_HYPOT)/g' \ ++ -e 's/@''GNULIB_HYPOTF''@/$(GL_GNULIB_HYPOTF)/g' \ ++ -e 's/@''GNULIB_HYPOTL''@/$(GL_GNULIB_HYPOTL)/g' \ + < $(srcdir)/math.in.h | \ +- sed -e 's/@''GNULIB_ILOGB''@/$(GNULIB_ILOGB)/g' \ +- -e 's/@''GNULIB_ILOGBF''@/$(GNULIB_ILOGBF)/g' \ +- -e 's/@''GNULIB_ILOGBL''@/$(GNULIB_ILOGBL)/g' \ +- -e 's/@''GNULIB_ISFINITE''@/$(GNULIB_ISFINITE)/g' \ +- -e 's/@''GNULIB_ISINF''@/$(GNULIB_ISINF)/g' \ +- -e 's/@''GNULIB_ISNAN''@/$(GNULIB_ISNAN)/g' \ +- -e 's/@''GNULIB_ISNANF''@/$(GNULIB_ISNANF)/g' \ +- -e 's/@''GNULIB_ISNAND''@/$(GNULIB_ISNAND)/g' \ +- -e 's/@''GNULIB_ISNANL''@/$(GNULIB_ISNANL)/g' \ +- -e 's/@''GNULIB_LDEXPF''@/$(GNULIB_LDEXPF)/g' \ +- -e 's/@''GNULIB_LDEXPL''@/$(GNULIB_LDEXPL)/g' \ +- -e 's/@''GNULIB_LOG''@/$(GNULIB_LOG)/g' \ +- -e 's/@''GNULIB_LOGF''@/$(GNULIB_LOGF)/g' \ +- -e 's/@''GNULIB_LOGL''@/$(GNULIB_LOGL)/g' \ +- -e 's/@''GNULIB_LOG10''@/$(GNULIB_LOG10)/g' \ +- -e 's/@''GNULIB_LOG10F''@/$(GNULIB_LOG10F)/g' \ +- -e 's/@''GNULIB_LOG10L''@/$(GNULIB_LOG10L)/g' \ +- -e 's/@''GNULIB_LOG1P''@/$(GNULIB_LOG1P)/g' \ +- -e 's/@''GNULIB_LOG1PF''@/$(GNULIB_LOG1PF)/g' \ +- -e 's/@''GNULIB_LOG1PL''@/$(GNULIB_LOG1PL)/g' \ +- -e 's/@''GNULIB_LOG2''@/$(GNULIB_LOG2)/g' \ +- -e 's/@''GNULIB_LOG2F''@/$(GNULIB_LOG2F)/g' \ +- -e 's/@''GNULIB_LOG2L''@/$(GNULIB_LOG2L)/g' \ +- -e 's/@''GNULIB_LOGB''@/$(GNULIB_LOGB)/g' \ +- -e 's/@''GNULIB_LOGBF''@/$(GNULIB_LOGBF)/g' \ +- -e 's/@''GNULIB_LOGBL''@/$(GNULIB_LOGBL)/g' \ +- -e 's/@''GNULIB_MODF''@/$(GNULIB_MODF)/g' \ +- -e 's/@''GNULIB_MODFF''@/$(GNULIB_MODFF)/g' \ +- -e 's/@''GNULIB_MODFL''@/$(GNULIB_MODFL)/g' \ +- -e 's/@''GNULIB_POWF''@/$(GNULIB_POWF)/g' \ +- -e 's/@''GNULIB_REMAINDER''@/$(GNULIB_REMAINDER)/g' \ +- -e 's/@''GNULIB_REMAINDERF''@/$(GNULIB_REMAINDERF)/g' \ +- -e 's/@''GNULIB_REMAINDERL''@/$(GNULIB_REMAINDERL)/g' \ +- -e 's/@''GNULIB_RINT''@/$(GNULIB_RINT)/g' \ +- -e 's/@''GNULIB_RINTF''@/$(GNULIB_RINTF)/g' \ +- -e 's/@''GNULIB_RINTL''@/$(GNULIB_RINTL)/g' \ +- -e 's/@''GNULIB_ROUND''@/$(GNULIB_ROUND)/g' \ +- -e 's/@''GNULIB_ROUNDF''@/$(GNULIB_ROUNDF)/g' \ +- -e 's/@''GNULIB_ROUNDL''@/$(GNULIB_ROUNDL)/g' \ +- -e 's/@''GNULIB_SIGNBIT''@/$(GNULIB_SIGNBIT)/g' \ +- -e 's/@''GNULIB_SINF''@/$(GNULIB_SINF)/g' \ +- -e 's/@''GNULIB_SINL''@/$(GNULIB_SINL)/g' \ +- -e 's/@''GNULIB_SINHF''@/$(GNULIB_SINHF)/g' \ +- -e 's/@''GNULIB_SQRTF''@/$(GNULIB_SQRTF)/g' \ +- -e 's/@''GNULIB_SQRTL''@/$(GNULIB_SQRTL)/g' \ +- -e 's/@''GNULIB_TANF''@/$(GNULIB_TANF)/g' \ +- -e 's/@''GNULIB_TANL''@/$(GNULIB_TANL)/g' \ +- -e 's/@''GNULIB_TANHF''@/$(GNULIB_TANHF)/g' \ +- -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/@''GNULIB_ILOGB''@/$(GL_GNULIB_ILOGB)/g' \ ++ -e 's/@''GNULIB_ILOGBF''@/$(GL_GNULIB_ILOGBF)/g' \ ++ -e 's/@''GNULIB_ILOGBL''@/$(GL_GNULIB_ILOGBL)/g' \ ++ -e 's/@''GNULIB_ISFINITE''@/$(GL_GNULIB_ISFINITE)/g' \ ++ -e 's/@''GNULIB_ISINF''@/$(GL_GNULIB_ISINF)/g' \ ++ -e 's/@''GNULIB_ISNAN''@/$(GL_GNULIB_ISNAN)/g' \ ++ -e 's/@''GNULIB_ISNANF''@/$(GL_GNULIB_ISNANF)/g' \ ++ -e 's/@''GNULIB_ISNAND''@/$(GL_GNULIB_ISNAND)/g' \ ++ -e 's/@''GNULIB_ISNANL''@/$(GL_GNULIB_ISNANL)/g' \ ++ -e 's/@''GNULIB_LDEXPF''@/$(GL_GNULIB_LDEXPF)/g' \ ++ -e 's/@''GNULIB_LDEXPL''@/$(GL_GNULIB_LDEXPL)/g' \ ++ -e 's/@''GNULIB_LOG''@/$(GL_GNULIB_LOG)/g' \ ++ -e 's/@''GNULIB_LOGF''@/$(GL_GNULIB_LOGF)/g' \ ++ -e 's/@''GNULIB_LOGL''@/$(GL_GNULIB_LOGL)/g' \ ++ -e 's/@''GNULIB_LOG10''@/$(GL_GNULIB_LOG10)/g' \ ++ -e 's/@''GNULIB_LOG10F''@/$(GL_GNULIB_LOG10F)/g' \ ++ -e 's/@''GNULIB_LOG10L''@/$(GL_GNULIB_LOG10L)/g' \ ++ -e 's/@''GNULIB_LOG1P''@/$(GL_GNULIB_LOG1P)/g' \ ++ -e 's/@''GNULIB_LOG1PF''@/$(GL_GNULIB_LOG1PF)/g' \ ++ -e 's/@''GNULIB_LOG1PL''@/$(GL_GNULIB_LOG1PL)/g' \ ++ -e 's/@''GNULIB_LOG2''@/$(GL_GNULIB_LOG2)/g' \ ++ -e 's/@''GNULIB_LOG2F''@/$(GL_GNULIB_LOG2F)/g' \ ++ -e 's/@''GNULIB_LOG2L''@/$(GL_GNULIB_LOG2L)/g' \ ++ -e 's/@''GNULIB_LOGB''@/$(GL_GNULIB_LOGB)/g' \ ++ -e 's/@''GNULIB_LOGBF''@/$(GL_GNULIB_LOGBF)/g' \ ++ -e 's/@''GNULIB_LOGBL''@/$(GL_GNULIB_LOGBL)/g' \ ++ -e 's/@''GNULIB_MODF''@/$(GL_GNULIB_MODF)/g' \ ++ -e 's/@''GNULIB_MODFF''@/$(GL_GNULIB_MODFF)/g' \ ++ -e 's/@''GNULIB_MODFL''@/$(GL_GNULIB_MODFL)/g' \ ++ -e 's/@''GNULIB_POWF''@/$(GL_GNULIB_POWF)/g' \ ++ -e 's/@''GNULIB_REMAINDER''@/$(GL_GNULIB_REMAINDER)/g' \ ++ -e 's/@''GNULIB_REMAINDERF''@/$(GL_GNULIB_REMAINDERF)/g' \ ++ -e 's/@''GNULIB_REMAINDERL''@/$(GL_GNULIB_REMAINDERL)/g' \ ++ -e 's/@''GNULIB_RINT''@/$(GL_GNULIB_RINT)/g' \ ++ -e 's/@''GNULIB_RINTF''@/$(GL_GNULIB_RINTF)/g' \ ++ -e 's/@''GNULIB_RINTL''@/$(GL_GNULIB_RINTL)/g' \ ++ -e 's/@''GNULIB_ROUND''@/$(GL_GNULIB_ROUND)/g' \ ++ -e 's/@''GNULIB_ROUNDF''@/$(GL_GNULIB_ROUNDF)/g' \ ++ -e 's/@''GNULIB_ROUNDL''@/$(GL_GNULIB_ROUNDL)/g' \ ++ -e 's/@''GNULIB_SIGNBIT''@/$(GL_GNULIB_SIGNBIT)/g' \ ++ -e 's/@''GNULIB_SINF''@/$(GL_GNULIB_SINF)/g' \ ++ -e 's/@''GNULIB_SINL''@/$(GL_GNULIB_SINL)/g' \ ++ -e 's/@''GNULIB_SINHF''@/$(GL_GNULIB_SINHF)/g' \ ++ -e 's/@''GNULIB_SQRTF''@/$(GL_GNULIB_SQRTF)/g' \ ++ -e 's/@''GNULIB_SQRTL''@/$(GL_GNULIB_SQRTL)/g' \ ++ -e 's/@''GNULIB_TANF''@/$(GL_GNULIB_TANF)/g' \ ++ -e 's/@''GNULIB_TANL''@/$(GL_GNULIB_TANL)/g' \ ++ -e 's/@''GNULIB_TANHF''@/$(GL_GNULIB_TANHF)/g' \ ++ -e 's/@''GNULIB_TRUNC''@/$(GL_GNULIB_TRUNC)/g' \ ++ -e 's/@''GNULIB_TRUNCF''@/$(GL_GNULIB_TRUNCF)/g' \ ++ -e 's/@''GNULIB_TRUNCL''@/$(GL_GNULIB_TRUNCL)/g' \ ++ -e 's/@''GNULIB_MDA_J0''@/$(GL_GNULIB_MDA_J0)/g' \ ++ -e 's/@''GNULIB_MDA_J1''@/$(GL_GNULIB_MDA_J1)/g' \ ++ -e 's/@''GNULIB_MDA_JN''@/$(GL_GNULIB_MDA_JN)/g' \ ++ -e 's/@''GNULIB_MDA_Y0''@/$(GL_GNULIB_MDA_Y0)/g' \ ++ -e 's/@''GNULIB_MDA_Y1''@/$(GL_GNULIB_MDA_Y1)/g' \ ++ -e 's/@''GNULIB_MDA_YN''@/$(GL_GNULIB_MDA_YN)/g' \ + | \ + sed -e 's|@''HAVE_ACOSF''@|$(HAVE_ACOSF)|g' \ + -e 's|@''HAVE_ACOSL''@|$(HAVE_ACOSL)|g' \ +@@ -1804,7 +1828,7 @@ netdb.h: netdb.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_NETDB_H''@|$(NEXT_NETDB_H)|g' \ + -e 's|@''HAVE_NETDB_H''@|$(HAVE_NETDB_H)|g' \ +- -e 's/@''GNULIB_GETADDRINFO''@/$(GNULIB_GETADDRINFO)/g' \ ++ -e 's/@''GNULIB_GETADDRINFO''@/$(GL_GNULIB_GETADDRINFO)/g' \ + -e 's|@''HAVE_STRUCT_ADDRINFO''@|$(HAVE_STRUCT_ADDRINFO)|g' \ + -e 's|@''HAVE_DECL_FREEADDRINFO''@|$(HAVE_DECL_FREEADDRINFO)|g' \ + -e 's|@''HAVE_DECL_GAI_STRERROR''@|$(HAVE_DECL_GAI_STRERROR)|g' \ +@@ -1937,7 +1961,7 @@ poll.h: poll.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_POLL_H''@|$(NEXT_POLL_H)|g' \ +- -e 's/@''GNULIB_POLL''@/$(GNULIB_POLL)/g' \ ++ -e 's/@''GNULIB_POLL''@/$(GL_GNULIB_POLL)/g' \ + -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \ + -e 's|@''HAVE_POLL''@|$(HAVE_POLL)|g' \ + -e 's|@''REPLACE_POLL''@|$(REPLACE_POLL)|g' \ +@@ -2098,6 +2122,21 @@ EXTRA_DIST += same-inode.h + ## begin gnulib module scratch_buffer + + if gl_GNULIB_ENABLED_scratch_buffer ++BUILT_SOURCES += malloc/scratch_buffer.gl.h ++ ++malloc/scratch_buffer.gl.h: malloc/scratch_buffer.h ++ $(AM_V_at)$(MKDIR_P) malloc ++ $(AM_V_GEN)rm -f $@-t $@ && \ ++ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ ++ sed -e 's|__always_inline|inline _GL_ATTRIBUTE_ALWAYS_INLINE|g' \ ++ -e 's|__glibc_likely|_GL_LIKELY|g' \ ++ -e 's|__glibc_unlikely|_GL_UNLIKELY|g' \ ++ -e '/libc_hidden_proto/d' \ ++ < $(srcdir)/malloc/scratch_buffer.h; \ ++ } > $@-t && \ ++ mv $@-t $@ ++MOSTLYCLEANFILES += malloc/scratch_buffer.gl.h malloc/scratch_buffer.gl.h-t ++ + libgnu_la_SOURCES += malloc/scratch_buffer_dupfree.c malloc/scratch_buffer_grow.c malloc/scratch_buffer_grow_preserve.c malloc/scratch_buffer_set_array_size.c + + endif +@@ -2185,11 +2224,11 @@ signal.h: signal.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_SIGNAL_H''@|$(NEXT_SIGNAL_H)|g' \ +- -e 's/@''GNULIB_PTHREAD_SIGMASK''@/$(GNULIB_PTHREAD_SIGMASK)/g' \ +- -e 's/@''GNULIB_RAISE''@/$(GNULIB_RAISE)/g' \ +- -e 's/@''GNULIB_SIGNAL_H_SIGPIPE''@/$(GNULIB_SIGNAL_H_SIGPIPE)/g' \ +- -e 's/@''GNULIB_SIGPROCMASK''@/$(GNULIB_SIGPROCMASK)/g' \ +- -e 's/@''GNULIB_SIGACTION''@/$(GNULIB_SIGACTION)/g' \ ++ -e 's/@''GNULIB_PTHREAD_SIGMASK''@/$(GL_GNULIB_PTHREAD_SIGMASK)/g' \ ++ -e 's/@''GNULIB_RAISE''@/$(GL_GNULIB_RAISE)/g' \ ++ -e 's/@''GNULIB_SIGNAL_H_SIGPIPE''@/$(GL_GNULIB_SIGNAL_H_SIGPIPE)/g' \ ++ -e 's/@''GNULIB_SIGPROCMASK''@/$(GL_GNULIB_SIGPROCMASK)/g' \ ++ -e 's/@''GNULIB_SIGACTION''@/$(GL_GNULIB_SIGACTION)/g' \ + -e 's|@''HAVE_POSIX_SIGNALBLOCKING''@|$(HAVE_POSIX_SIGNALBLOCKING)|g' \ + -e 's|@''HAVE_PTHREAD_SIGMASK''@|$(HAVE_PTHREAD_SIGMASK)|g' \ + -e 's|@''HAVE_RAISE''@|$(HAVE_RAISE)|g' \ +@@ -2442,7 +2481,7 @@ stdint.h: stdint.in.h $(top_builddir)/config.status + -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \ + -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \ + -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \ +- -e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \ ++ -e 's/@''GNULIBHEADERS_OVERRIDE_WINT_T''@/$(GNULIBHEADERS_OVERRIDE_WINT_T)/g' \ + < $(srcdir)/stdint.in.h; \ + } > $@-t && \ + mv $@-t $@ +@@ -2470,65 +2509,65 @@ stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \ +- -e 's/@''GNULIB_DPRINTF''@/$(GNULIB_DPRINTF)/g' \ +- -e 's/@''GNULIB_FCLOSE''@/$(GNULIB_FCLOSE)/g' \ +- -e 's/@''GNULIB_FDOPEN''@/$(GNULIB_FDOPEN)/g' \ +- -e 's/@''GNULIB_FFLUSH''@/$(GNULIB_FFLUSH)/g' \ +- -e 's/@''GNULIB_FGETC''@/$(GNULIB_FGETC)/g' \ +- -e 's/@''GNULIB_FGETS''@/$(GNULIB_FGETS)/g' \ +- -e 's/@''GNULIB_FOPEN''@/$(GNULIB_FOPEN)/g' \ +- -e 's/@''GNULIB_FPRINTF''@/$(GNULIB_FPRINTF)/g' \ +- -e 's/@''GNULIB_FPRINTF_POSIX''@/$(GNULIB_FPRINTF_POSIX)/g' \ +- -e 's/@''GNULIB_FPURGE''@/$(GNULIB_FPURGE)/g' \ +- -e 's/@''GNULIB_FPUTC''@/$(GNULIB_FPUTC)/g' \ +- -e 's/@''GNULIB_FPUTS''@/$(GNULIB_FPUTS)/g' \ +- -e 's/@''GNULIB_FREAD''@/$(GNULIB_FREAD)/g' \ +- -e 's/@''GNULIB_FREOPEN''@/$(GNULIB_FREOPEN)/g' \ +- -e 's/@''GNULIB_FSCANF''@/$(GNULIB_FSCANF)/g' \ +- -e 's/@''GNULIB_FSEEK''@/$(GNULIB_FSEEK)/g' \ +- -e 's/@''GNULIB_FSEEKO''@/$(GNULIB_FSEEKO)/g' \ +- -e 's/@''GNULIB_FTELL''@/$(GNULIB_FTELL)/g' \ +- -e 's/@''GNULIB_FTELLO''@/$(GNULIB_FTELLO)/g' \ +- -e 's/@''GNULIB_FWRITE''@/$(GNULIB_FWRITE)/g' \ +- -e 's/@''GNULIB_GETC''@/$(GNULIB_GETC)/g' \ +- -e 's/@''GNULIB_GETCHAR''@/$(GNULIB_GETCHAR)/g' \ +- -e 's/@''GNULIB_GETDELIM''@/$(GNULIB_GETDELIM)/g' \ +- -e 's/@''GNULIB_GETLINE''@/$(GNULIB_GETLINE)/g' \ +- -e 's/@''GNULIB_OBSTACK_PRINTF''@/$(GNULIB_OBSTACK_PRINTF)/g' \ +- -e 's/@''GNULIB_OBSTACK_PRINTF_POSIX''@/$(GNULIB_OBSTACK_PRINTF_POSIX)/g' \ +- -e 's/@''GNULIB_PCLOSE''@/$(GNULIB_PCLOSE)/g' \ +- -e 's/@''GNULIB_PERROR''@/$(GNULIB_PERROR)/g' \ +- -e 's/@''GNULIB_POPEN''@/$(GNULIB_POPEN)/g' \ +- -e 's/@''GNULIB_PRINTF''@/$(GNULIB_PRINTF)/g' \ +- -e 's/@''GNULIB_PRINTF_POSIX''@/$(GNULIB_PRINTF_POSIX)/g' \ +- -e 's/@''GNULIB_PUTC''@/$(GNULIB_PUTC)/g' \ +- -e 's/@''GNULIB_PUTCHAR''@/$(GNULIB_PUTCHAR)/g' \ +- -e 's/@''GNULIB_PUTS''@/$(GNULIB_PUTS)/g' \ +- -e 's/@''GNULIB_REMOVE''@/$(GNULIB_REMOVE)/g' \ +- -e 's/@''GNULIB_RENAME''@/$(GNULIB_RENAME)/g' \ +- -e 's/@''GNULIB_RENAMEAT''@/$(GNULIB_RENAMEAT)/g' \ +- -e 's/@''GNULIB_SCANF''@/$(GNULIB_SCANF)/g' \ +- -e 's/@''GNULIB_SNPRINTF''@/$(GNULIB_SNPRINTF)/g' \ +- -e 's/@''GNULIB_SPRINTF_POSIX''@/$(GNULIB_SPRINTF_POSIX)/g' \ +- -e 's/@''GNULIB_STDIO_H_NONBLOCKING''@/$(GNULIB_STDIO_H_NONBLOCKING)/g' \ +- -e 's/@''GNULIB_STDIO_H_SIGPIPE''@/$(GNULIB_STDIO_H_SIGPIPE)/g' \ +- -e 's/@''GNULIB_TMPFILE''@/$(GNULIB_TMPFILE)/g' \ +- -e 's/@''GNULIB_VASPRINTF''@/$(GNULIB_VASPRINTF)/g' \ +- -e 's/@''GNULIB_VDPRINTF''@/$(GNULIB_VDPRINTF)/g' \ +- -e 's/@''GNULIB_VFPRINTF''@/$(GNULIB_VFPRINTF)/g' \ +- -e 's/@''GNULIB_VFPRINTF_POSIX''@/$(GNULIB_VFPRINTF_POSIX)/g' \ +- -e 's/@''GNULIB_VFSCANF''@/$(GNULIB_VFSCANF)/g' \ +- -e 's/@''GNULIB_VSCANF''@/$(GNULIB_VSCANF)/g' \ +- -e 's/@''GNULIB_VPRINTF''@/$(GNULIB_VPRINTF)/g' \ +- -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' \ ++ -e 's/@''GNULIB_DPRINTF''@/$(GL_GNULIB_DPRINTF)/g' \ ++ -e 's/@''GNULIB_FCLOSE''@/$(GL_GNULIB_FCLOSE)/g' \ ++ -e 's/@''GNULIB_FDOPEN''@/$(GL_GNULIB_FDOPEN)/g' \ ++ -e 's/@''GNULIB_FFLUSH''@/$(GL_GNULIB_FFLUSH)/g' \ ++ -e 's/@''GNULIB_FGETC''@/$(GL_GNULIB_FGETC)/g' \ ++ -e 's/@''GNULIB_FGETS''@/$(GL_GNULIB_FGETS)/g' \ ++ -e 's/@''GNULIB_FOPEN''@/$(GL_GNULIB_FOPEN)/g' \ ++ -e 's/@''GNULIB_FPRINTF''@/$(GL_GNULIB_FPRINTF)/g' \ ++ -e 's/@''GNULIB_FPRINTF_POSIX''@/$(GL_GNULIB_FPRINTF_POSIX)/g' \ ++ -e 's/@''GNULIB_FPURGE''@/$(GL_GNULIB_FPURGE)/g' \ ++ -e 's/@''GNULIB_FPUTC''@/$(GL_GNULIB_FPUTC)/g' \ ++ -e 's/@''GNULIB_FPUTS''@/$(GL_GNULIB_FPUTS)/g' \ ++ -e 's/@''GNULIB_FREAD''@/$(GL_GNULIB_FREAD)/g' \ ++ -e 's/@''GNULIB_FREOPEN''@/$(GL_GNULIB_FREOPEN)/g' \ ++ -e 's/@''GNULIB_FSCANF''@/$(GL_GNULIB_FSCANF)/g' \ ++ -e 's/@''GNULIB_FSEEK''@/$(GL_GNULIB_FSEEK)/g' \ ++ -e 's/@''GNULIB_FSEEKO''@/$(GL_GNULIB_FSEEKO)/g' \ ++ -e 's/@''GNULIB_FTELL''@/$(GL_GNULIB_FTELL)/g' \ ++ -e 's/@''GNULIB_FTELLO''@/$(GL_GNULIB_FTELLO)/g' \ ++ -e 's/@''GNULIB_FWRITE''@/$(GL_GNULIB_FWRITE)/g' \ ++ -e 's/@''GNULIB_GETC''@/$(GL_GNULIB_GETC)/g' \ ++ -e 's/@''GNULIB_GETCHAR''@/$(GL_GNULIB_GETCHAR)/g' \ ++ -e 's/@''GNULIB_GETDELIM''@/$(GL_GNULIB_GETDELIM)/g' \ ++ -e 's/@''GNULIB_GETLINE''@/$(GL_GNULIB_GETLINE)/g' \ ++ -e 's/@''GNULIB_OBSTACK_PRINTF''@/$(GL_GNULIB_OBSTACK_PRINTF)/g' \ ++ -e 's/@''GNULIB_OBSTACK_PRINTF_POSIX''@/$(GL_GNULIB_OBSTACK_PRINTF_POSIX)/g' \ ++ -e 's/@''GNULIB_PCLOSE''@/$(GL_GNULIB_PCLOSE)/g' \ ++ -e 's/@''GNULIB_PERROR''@/$(GL_GNULIB_PERROR)/g' \ ++ -e 's/@''GNULIB_POPEN''@/$(GL_GNULIB_POPEN)/g' \ ++ -e 's/@''GNULIB_PRINTF''@/$(GL_GNULIB_PRINTF)/g' \ ++ -e 's/@''GNULIB_PRINTF_POSIX''@/$(GL_GNULIB_PRINTF_POSIX)/g' \ ++ -e 's/@''GNULIB_PUTC''@/$(GL_GNULIB_PUTC)/g' \ ++ -e 's/@''GNULIB_PUTCHAR''@/$(GL_GNULIB_PUTCHAR)/g' \ ++ -e 's/@''GNULIB_PUTS''@/$(GL_GNULIB_PUTS)/g' \ ++ -e 's/@''GNULIB_REMOVE''@/$(GL_GNULIB_REMOVE)/g' \ ++ -e 's/@''GNULIB_RENAME''@/$(GL_GNULIB_RENAME)/g' \ ++ -e 's/@''GNULIB_RENAMEAT''@/$(GL_GNULIB_RENAMEAT)/g' \ ++ -e 's/@''GNULIB_SCANF''@/$(GL_GNULIB_SCANF)/g' \ ++ -e 's/@''GNULIB_SNPRINTF''@/$(GL_GNULIB_SNPRINTF)/g' \ ++ -e 's/@''GNULIB_SPRINTF_POSIX''@/$(GL_GNULIB_SPRINTF_POSIX)/g' \ ++ -e 's/@''GNULIB_STDIO_H_NONBLOCKING''@/$(GL_GNULIB_STDIO_H_NONBLOCKING)/g' \ ++ -e 's/@''GNULIB_STDIO_H_SIGPIPE''@/$(GL_GNULIB_STDIO_H_SIGPIPE)/g' \ ++ -e 's/@''GNULIB_TMPFILE''@/$(GL_GNULIB_TMPFILE)/g' \ ++ -e 's/@''GNULIB_VASPRINTF''@/$(GL_GNULIB_VASPRINTF)/g' \ ++ -e 's/@''GNULIB_VDPRINTF''@/$(GL_GNULIB_VDPRINTF)/g' \ ++ -e 's/@''GNULIB_VFPRINTF''@/$(GL_GNULIB_VFPRINTF)/g' \ ++ -e 's/@''GNULIB_VFPRINTF_POSIX''@/$(GL_GNULIB_VFPRINTF_POSIX)/g' \ ++ -e 's/@''GNULIB_VFSCANF''@/$(GL_GNULIB_VFSCANF)/g' \ ++ -e 's/@''GNULIB_VSCANF''@/$(GL_GNULIB_VSCANF)/g' \ ++ -e 's/@''GNULIB_VPRINTF''@/$(GL_GNULIB_VPRINTF)/g' \ ++ -e 's/@''GNULIB_VPRINTF_POSIX''@/$(GL_GNULIB_VPRINTF_POSIX)/g' \ ++ -e 's/@''GNULIB_VSNPRINTF''@/$(GL_GNULIB_VSNPRINTF)/g' \ ++ -e 's/@''GNULIB_VSPRINTF_POSIX''@/$(GL_GNULIB_VSPRINTF_POSIX)/g' \ ++ -e 's/@''GNULIB_MDA_FCLOSEALL''@/$(GL_GNULIB_MDA_FCLOSEALL)/g' \ ++ -e 's/@''GNULIB_MDA_FDOPEN''@/$(GL_GNULIB_MDA_FDOPEN)/g' \ ++ -e 's/@''GNULIB_MDA_FILENO''@/$(GL_GNULIB_MDA_FILENO)/g' \ ++ -e 's/@''GNULIB_MDA_GETW''@/$(GL_GNULIB_MDA_GETW)/g' \ ++ -e 's/@''GNULIB_MDA_PUTW''@/$(GL_GNULIB_MDA_PUTW)/g' \ ++ -e 's/@''GNULIB_MDA_TEMPNAM''@/$(GL_GNULIB_MDA_TEMPNAM)/g' \ + < $(srcdir)/stdio.in.h | \ + sed -e 's|@''HAVE_DECL_FCLOSEALL''@|$(HAVE_DECL_FCLOSEALL)|g' \ + -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \ +@@ -2606,51 +2645,51 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -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' \ +- -e 's/@''GNULIB_MALLOC_POSIX''@/$(GNULIB_MALLOC_POSIX)/g' \ +- -e 's/@''GNULIB_MBTOWC''@/$(GNULIB_MBTOWC)/g' \ +- -e 's/@''GNULIB_MKDTEMP''@/$(GNULIB_MKDTEMP)/g' \ +- -e 's/@''GNULIB_MKOSTEMP''@/$(GNULIB_MKOSTEMP)/g' \ +- -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' \ +- -e 's/@''GNULIB_PUTENV''@/$(GNULIB_PUTENV)/g' \ +- -e 's/@''GNULIB_QSORT_R''@/$(GNULIB_QSORT_R)/g' \ +- -e 's/@''GNULIB_RANDOM''@/$(GNULIB_RANDOM)/g' \ +- -e 's/@''GNULIB_RANDOM_R''@/$(GNULIB_RANDOM_R)/g' \ +- -e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \ +- -e 's/@''GNULIB_REALLOCARRAY''@/$(GNULIB_REALLOCARRAY)/g' \ +- -e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \ +- -e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \ +- -e 's/@''GNULIB_SECURE_GETENV''@/$(GNULIB_SECURE_GETENV)/g' \ +- -e 's/@''GNULIB_SETENV''@/$(GNULIB_SETENV)/g' \ +- -e 's/@''GNULIB_STRTOD''@/$(GNULIB_STRTOD)/g' \ +- -e 's/@''GNULIB_STRTOL''@/$(GNULIB_STRTOL)/g' \ +- -e 's/@''GNULIB_STRTOLD''@/$(GNULIB_STRTOLD)/g' \ +- -e 's/@''GNULIB_STRTOLL''@/$(GNULIB_STRTOLL)/g' \ +- -e 's/@''GNULIB_STRTOUL''@/$(GNULIB_STRTOUL)/g' \ +- -e 's/@''GNULIB_STRTOULL''@/$(GNULIB_STRTOULL)/g' \ +- -e 's/@''GNULIB_SYSTEM_POSIX''@/$(GNULIB_SYSTEM_POSIX)/g' \ +- -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' \ ++ -e 's/@''GNULIB__EXIT''@/$(GL_GNULIB__EXIT)/g' \ ++ -e 's/@''GNULIB_ALIGNED_ALLOC''@/$(GL_GNULIB_ALIGNED_ALLOC)/g' \ ++ -e 's/@''GNULIB_ATOLL''@/$(GL_GNULIB_ATOLL)/g' \ ++ -e 's/@''GNULIB_CALLOC_POSIX''@/$(GL_GNULIB_CALLOC_POSIX)/g' \ ++ -e 's/@''GNULIB_CANONICALIZE_FILE_NAME''@/$(GL_GNULIB_CANONICALIZE_FILE_NAME)/g' \ ++ -e 's/@''GNULIB_FREE_POSIX''@/$(GL_GNULIB_FREE_POSIX)/g' \ ++ -e 's/@''GNULIB_GETLOADAVG''@/$(GL_GNULIB_GETLOADAVG)/g' \ ++ -e 's/@''GNULIB_GETSUBOPT''@/$(GL_GNULIB_GETSUBOPT)/g' \ ++ -e 's/@''GNULIB_GRANTPT''@/$(GL_GNULIB_GRANTPT)/g' \ ++ -e 's/@''GNULIB_MALLOC_POSIX''@/$(GL_GNULIB_MALLOC_POSIX)/g' \ ++ -e 's/@''GNULIB_MBTOWC''@/$(GL_GNULIB_MBTOWC)/g' \ ++ -e 's/@''GNULIB_MKDTEMP''@/$(GL_GNULIB_MKDTEMP)/g' \ ++ -e 's/@''GNULIB_MKOSTEMP''@/$(GL_GNULIB_MKOSTEMP)/g' \ ++ -e 's/@''GNULIB_MKOSTEMPS''@/$(GL_GNULIB_MKOSTEMPS)/g' \ ++ -e 's/@''GNULIB_MKSTEMP''@/$(GL_GNULIB_MKSTEMP)/g' \ ++ -e 's/@''GNULIB_MKSTEMPS''@/$(GL_GNULIB_MKSTEMPS)/g' \ ++ -e 's/@''GNULIB_POSIX_MEMALIGN''@/$(GL_GNULIB_POSIX_MEMALIGN)/g' \ ++ -e 's/@''GNULIB_POSIX_OPENPT''@/$(GL_GNULIB_POSIX_OPENPT)/g' \ ++ -e 's/@''GNULIB_PTSNAME''@/$(GL_GNULIB_PTSNAME)/g' \ ++ -e 's/@''GNULIB_PTSNAME_R''@/$(GL_GNULIB_PTSNAME_R)/g' \ ++ -e 's/@''GNULIB_PUTENV''@/$(GL_GNULIB_PUTENV)/g' \ ++ -e 's/@''GNULIB_QSORT_R''@/$(GL_GNULIB_QSORT_R)/g' \ ++ -e 's/@''GNULIB_RANDOM''@/$(GL_GNULIB_RANDOM)/g' \ ++ -e 's/@''GNULIB_RANDOM_R''@/$(GL_GNULIB_RANDOM_R)/g' \ ++ -e 's/@''GNULIB_REALLOC_POSIX''@/$(GL_GNULIB_REALLOC_POSIX)/g' \ ++ -e 's/@''GNULIB_REALLOCARRAY''@/$(GL_GNULIB_REALLOCARRAY)/g' \ ++ -e 's/@''GNULIB_REALPATH''@/$(GL_GNULIB_REALPATH)/g' \ ++ -e 's/@''GNULIB_RPMATCH''@/$(GL_GNULIB_RPMATCH)/g' \ ++ -e 's/@''GNULIB_SECURE_GETENV''@/$(GL_GNULIB_SECURE_GETENV)/g' \ ++ -e 's/@''GNULIB_SETENV''@/$(GL_GNULIB_SETENV)/g' \ ++ -e 's/@''GNULIB_STRTOD''@/$(GL_GNULIB_STRTOD)/g' \ ++ -e 's/@''GNULIB_STRTOL''@/$(GL_GNULIB_STRTOL)/g' \ ++ -e 's/@''GNULIB_STRTOLD''@/$(GL_GNULIB_STRTOLD)/g' \ ++ -e 's/@''GNULIB_STRTOLL''@/$(GL_GNULIB_STRTOLL)/g' \ ++ -e 's/@''GNULIB_STRTOUL''@/$(GL_GNULIB_STRTOUL)/g' \ ++ -e 's/@''GNULIB_STRTOULL''@/$(GL_GNULIB_STRTOULL)/g' \ ++ -e 's/@''GNULIB_SYSTEM_POSIX''@/$(GL_GNULIB_SYSTEM_POSIX)/g' \ ++ -e 's/@''GNULIB_UNLOCKPT''@/$(GL_GNULIB_UNLOCKPT)/g' \ ++ -e 's/@''GNULIB_UNSETENV''@/$(GL_GNULIB_UNSETENV)/g' \ ++ -e 's/@''GNULIB_WCTOMB''@/$(GL_GNULIB_WCTOMB)/g' \ ++ -e 's/@''GNULIB_MDA_ECVT''@/$(GL_GNULIB_MDA_ECVT)/g' \ ++ -e 's/@''GNULIB_MDA_FCVT''@/$(GL_GNULIB_MDA_FCVT)/g' \ ++ -e 's/@''GNULIB_MDA_GCVT''@/$(GL_GNULIB_MDA_GCVT)/g' \ ++ -e 's/@''GNULIB_MDA_MKTEMP''@/$(GL_GNULIB_MDA_MKTEMP)/g' \ ++ -e 's/@''GNULIB_MDA_PUTENV''@/$(GL_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' \ +@@ -2711,6 +2750,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ + -e 's|@''REPLACE_RANDOM''@|$(REPLACE_RANDOM)|g' \ + -e 's|@''REPLACE_RANDOM_R''@|$(REPLACE_RANDOM_R)|g' \ + -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \ ++ -e 's|@''REPLACE_REALLOCARRAY''@|$(REPLACE_REALLOCARRAY)|g' \ + -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \ + -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \ + -e 's|@''REPLACE_SETSTATE''@|$(REPLACE_SETSTATE)|g' \ +@@ -2779,49 +2819,49 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \ +- -e 's/@''GNULIB_EXPLICIT_BZERO''@/$(GNULIB_EXPLICIT_BZERO)/g' \ +- -e 's/@''GNULIB_FFSL''@/$(GNULIB_FFSL)/g' \ +- -e 's/@''GNULIB_FFSLL''@/$(GNULIB_FFSLL)/g' \ +- -e 's/@''GNULIB_MBSLEN''@/$(GNULIB_MBSLEN)/g' \ +- -e 's/@''GNULIB_MBSNLEN''@/$(GNULIB_MBSNLEN)/g' \ +- -e 's/@''GNULIB_MBSCHR''@/$(GNULIB_MBSCHR)/g' \ +- -e 's/@''GNULIB_MBSRCHR''@/$(GNULIB_MBSRCHR)/g' \ +- -e 's/@''GNULIB_MBSSTR''@/$(GNULIB_MBSSTR)/g' \ +- -e 's/@''GNULIB_MBSCASECMP''@/$(GNULIB_MBSCASECMP)/g' \ +- -e 's/@''GNULIB_MBSNCASECMP''@/$(GNULIB_MBSNCASECMP)/g' \ +- -e 's/@''GNULIB_MBSPCASECMP''@/$(GNULIB_MBSPCASECMP)/g' \ +- -e 's/@''GNULIB_MBSCASESTR''@/$(GNULIB_MBSCASESTR)/g' \ +- -e 's/@''GNULIB_MBSCSPN''@/$(GNULIB_MBSCSPN)/g' \ +- -e 's/@''GNULIB_MBSPBRK''@/$(GNULIB_MBSPBRK)/g' \ +- -e 's/@''GNULIB_MBSSPN''@/$(GNULIB_MBSSPN)/g' \ +- -e 's/@''GNULIB_MBSSEP''@/$(GNULIB_MBSSEP)/g' \ +- -e 's/@''GNULIB_MBSTOK_R''@/$(GNULIB_MBSTOK_R)/g' \ +- -e 's/@''GNULIB_MEMCHR''@/$(GNULIB_MEMCHR)/g' \ +- -e 's/@''GNULIB_MEMMEM''@/$(GNULIB_MEMMEM)/g' \ +- -e 's/@''GNULIB_MEMPCPY''@/$(GNULIB_MEMPCPY)/g' \ +- -e 's/@''GNULIB_MEMRCHR''@/$(GNULIB_MEMRCHR)/g' \ +- -e 's/@''GNULIB_RAWMEMCHR''@/$(GNULIB_RAWMEMCHR)/g' \ +- -e 's/@''GNULIB_STPCPY''@/$(GNULIB_STPCPY)/g' \ +- -e 's/@''GNULIB_STPNCPY''@/$(GNULIB_STPNCPY)/g' \ +- -e 's/@''GNULIB_STRCHRNUL''@/$(GNULIB_STRCHRNUL)/g' \ +- -e 's/@''GNULIB_STRDUP''@/$(GNULIB_STRDUP)/g' \ +- -e 's/@''GNULIB_STRNCAT''@/$(GNULIB_STRNCAT)/g' \ +- -e 's/@''GNULIB_STRNDUP''@/$(GNULIB_STRNDUP)/g' \ +- -e 's/@''GNULIB_STRNLEN''@/$(GNULIB_STRNLEN)/g' \ +- -e 's/@''GNULIB_STRPBRK''@/$(GNULIB_STRPBRK)/g' \ +- -e 's/@''GNULIB_STRSEP''@/$(GNULIB_STRSEP)/g' \ +- -e 's/@''GNULIB_STRSTR''@/$(GNULIB_STRSTR)/g' \ +- -e 's/@''GNULIB_STRCASESTR''@/$(GNULIB_STRCASESTR)/g' \ +- -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' \ ++ -e 's/@''GNULIB_EXPLICIT_BZERO''@/$(GL_GNULIB_EXPLICIT_BZERO)/g' \ ++ -e 's/@''GNULIB_FFSL''@/$(GL_GNULIB_FFSL)/g' \ ++ -e 's/@''GNULIB_FFSLL''@/$(GL_GNULIB_FFSLL)/g' \ ++ -e 's/@''GNULIB_MBSLEN''@/$(GL_GNULIB_MBSLEN)/g' \ ++ -e 's/@''GNULIB_MBSNLEN''@/$(GL_GNULIB_MBSNLEN)/g' \ ++ -e 's/@''GNULIB_MBSCHR''@/$(GL_GNULIB_MBSCHR)/g' \ ++ -e 's/@''GNULIB_MBSRCHR''@/$(GL_GNULIB_MBSRCHR)/g' \ ++ -e 's/@''GNULIB_MBSSTR''@/$(GL_GNULIB_MBSSTR)/g' \ ++ -e 's/@''GNULIB_MBSCASECMP''@/$(GL_GNULIB_MBSCASECMP)/g' \ ++ -e 's/@''GNULIB_MBSNCASECMP''@/$(GL_GNULIB_MBSNCASECMP)/g' \ ++ -e 's/@''GNULIB_MBSPCASECMP''@/$(GL_GNULIB_MBSPCASECMP)/g' \ ++ -e 's/@''GNULIB_MBSCASESTR''@/$(GL_GNULIB_MBSCASESTR)/g' \ ++ -e 's/@''GNULIB_MBSCSPN''@/$(GL_GNULIB_MBSCSPN)/g' \ ++ -e 's/@''GNULIB_MBSPBRK''@/$(GL_GNULIB_MBSPBRK)/g' \ ++ -e 's/@''GNULIB_MBSSPN''@/$(GL_GNULIB_MBSSPN)/g' \ ++ -e 's/@''GNULIB_MBSSEP''@/$(GL_GNULIB_MBSSEP)/g' \ ++ -e 's/@''GNULIB_MBSTOK_R''@/$(GL_GNULIB_MBSTOK_R)/g' \ ++ -e 's/@''GNULIB_MEMCHR''@/$(GL_GNULIB_MEMCHR)/g' \ ++ -e 's/@''GNULIB_MEMMEM''@/$(GL_GNULIB_MEMMEM)/g' \ ++ -e 's/@''GNULIB_MEMPCPY''@/$(GL_GNULIB_MEMPCPY)/g' \ ++ -e 's/@''GNULIB_MEMRCHR''@/$(GL_GNULIB_MEMRCHR)/g' \ ++ -e 's/@''GNULIB_RAWMEMCHR''@/$(GL_GNULIB_RAWMEMCHR)/g' \ ++ -e 's/@''GNULIB_STPCPY''@/$(GL_GNULIB_STPCPY)/g' \ ++ -e 's/@''GNULIB_STPNCPY''@/$(GL_GNULIB_STPNCPY)/g' \ ++ -e 's/@''GNULIB_STRCHRNUL''@/$(GL_GNULIB_STRCHRNUL)/g' \ ++ -e 's/@''GNULIB_STRDUP''@/$(GL_GNULIB_STRDUP)/g' \ ++ -e 's/@''GNULIB_STRNCAT''@/$(GL_GNULIB_STRNCAT)/g' \ ++ -e 's/@''GNULIB_STRNDUP''@/$(GL_GNULIB_STRNDUP)/g' \ ++ -e 's/@''GNULIB_STRNLEN''@/$(GL_GNULIB_STRNLEN)/g' \ ++ -e 's/@''GNULIB_STRPBRK''@/$(GL_GNULIB_STRPBRK)/g' \ ++ -e 's/@''GNULIB_STRSEP''@/$(GL_GNULIB_STRSEP)/g' \ ++ -e 's/@''GNULIB_STRSTR''@/$(GL_GNULIB_STRSTR)/g' \ ++ -e 's/@''GNULIB_STRCASESTR''@/$(GL_GNULIB_STRCASESTR)/g' \ ++ -e 's/@''GNULIB_STRTOK_R''@/$(GL_GNULIB_STRTOK_R)/g' \ ++ -e 's/@''GNULIB_STRERROR''@/$(GL_GNULIB_STRERROR)/g' \ ++ -e 's/@''GNULIB_STRERROR_R''@/$(GL_GNULIB_STRERROR_R)/g' \ ++ -e 's/@''GNULIB_STRERRORNAME_NP''@/$(GL_GNULIB_STRERRORNAME_NP)/g' \ ++ -e 's/@''GNULIB_SIGABBREV_NP''@/$(GL_GNULIB_SIGABBREV_NP)/g' \ ++ -e 's/@''GNULIB_SIGDESCR_NP''@/$(GL_GNULIB_SIGDESCR_NP)/g' \ ++ -e 's/@''GNULIB_STRSIGNAL''@/$(GL_GNULIB_STRSIGNAL)/g' \ ++ -e 's/@''GNULIB_STRVERSCMP''@/$(GL_GNULIB_STRVERSCMP)/g' \ ++ -e 's/@''GNULIB_MDA_MEMCCPY''@/$(GL_GNULIB_MDA_MEMCCPY)/g' \ ++ -e 's/@''GNULIB_MDA_STRDUP''@/$(GL_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' \ +@@ -2893,7 +2933,7 @@ sys/file.h: sys_file.in.h $(top_builddir)/config.status $(WARN_ON_USE_H) + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_SYS_FILE_H''@|$(NEXT_SYS_FILE_H)|g' \ + -e 's/@''HAVE_FLOCK''@/$(HAVE_FLOCK)/g' \ +- -e 's/@''GNULIB_FLOCK''@/$(GNULIB_FLOCK)/g' \ ++ -e 's/@''GNULIB_FLOCK''@/$(GL_GNULIB_FLOCK)/g' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + < $(srcdir)/sys_file.in.h; \ + } > $@-t && \ +@@ -2922,7 +2962,7 @@ sys/random.h: sys_random.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_N + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_SYS_RANDOM_H''@|$(NEXT_SYS_RANDOM_H)|g' \ + -e 's|@''HAVE_SYS_RANDOM_H''@|$(HAVE_SYS_RANDOM_H)|g' \ +- -e 's/@''GNULIB_GETRANDOM''@/$(GNULIB_GETRANDOM)/g' \ ++ -e 's/@''GNULIB_GETRANDOM''@/$(GL_GNULIB_GETRANDOM)/g' \ + -e 's/@''HAVE_GETRANDOM''@/$(HAVE_GETRANDOM)/g' \ + -e 's/@''REPLACE_GETRANDOM''@/$(REPLACE_GETRANDOM)/g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ +@@ -2955,8 +2995,8 @@ sys/select.h: sys_select.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_SYS_SELECT_H''@|$(NEXT_SYS_SELECT_H)|g' \ + -e 's|@''HAVE_SYS_SELECT_H''@|$(HAVE_SYS_SELECT_H)|g' \ +- -e 's/@''GNULIB_PSELECT''@/$(GNULIB_PSELECT)/g' \ +- -e 's/@''GNULIB_SELECT''@/$(GNULIB_SELECT)/g' \ ++ -e 's/@''GNULIB_PSELECT''@/$(GL_GNULIB_PSELECT)/g' \ ++ -e 's/@''GNULIB_SELECT''@/$(GL_GNULIB_SELECT)/g' \ + -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \ + -e 's|@''HAVE_PSELECT''@|$(HAVE_PSELECT)|g' \ + -e 's|@''REPLACE_PSELECT''@|$(REPLACE_PSELECT)|g' \ +@@ -2990,22 +3030,22 @@ sys/socket.h: sys_socket.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_SYS_SOCKET_H''@|$(NEXT_SYS_SOCKET_H)|g' \ + -e 's|@''HAVE_SYS_SOCKET_H''@|$(HAVE_SYS_SOCKET_H)|g' \ +- -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \ +- -e 's/@''GNULIB_SOCKET''@/$(GNULIB_SOCKET)/g' \ +- -e 's/@''GNULIB_CONNECT''@/$(GNULIB_CONNECT)/g' \ +- -e 's/@''GNULIB_ACCEPT''@/$(GNULIB_ACCEPT)/g' \ +- -e 's/@''GNULIB_BIND''@/$(GNULIB_BIND)/g' \ +- -e 's/@''GNULIB_GETPEERNAME''@/$(GNULIB_GETPEERNAME)/g' \ +- -e 's/@''GNULIB_GETSOCKNAME''@/$(GNULIB_GETSOCKNAME)/g' \ +- -e 's/@''GNULIB_GETSOCKOPT''@/$(GNULIB_GETSOCKOPT)/g' \ +- -e 's/@''GNULIB_LISTEN''@/$(GNULIB_LISTEN)/g' \ +- -e 's/@''GNULIB_RECV''@/$(GNULIB_RECV)/g' \ +- -e 's/@''GNULIB_SEND''@/$(GNULIB_SEND)/g' \ +- -e 's/@''GNULIB_RECVFROM''@/$(GNULIB_RECVFROM)/g' \ +- -e 's/@''GNULIB_SENDTO''@/$(GNULIB_SENDTO)/g' \ +- -e 's/@''GNULIB_SETSOCKOPT''@/$(GNULIB_SETSOCKOPT)/g' \ +- -e 's/@''GNULIB_SHUTDOWN''@/$(GNULIB_SHUTDOWN)/g' \ +- -e 's/@''GNULIB_ACCEPT4''@/$(GNULIB_ACCEPT4)/g' \ ++ -e 's/@''GNULIB_CLOSE''@/$(GL_GNULIB_CLOSE)/g' \ ++ -e 's/@''GNULIB_SOCKET''@/$(GL_GNULIB_SOCKET)/g' \ ++ -e 's/@''GNULIB_CONNECT''@/$(GL_GNULIB_CONNECT)/g' \ ++ -e 's/@''GNULIB_ACCEPT''@/$(GL_GNULIB_ACCEPT)/g' \ ++ -e 's/@''GNULIB_BIND''@/$(GL_GNULIB_BIND)/g' \ ++ -e 's/@''GNULIB_GETPEERNAME''@/$(GL_GNULIB_GETPEERNAME)/g' \ ++ -e 's/@''GNULIB_GETSOCKNAME''@/$(GL_GNULIB_GETSOCKNAME)/g' \ ++ -e 's/@''GNULIB_GETSOCKOPT''@/$(GL_GNULIB_GETSOCKOPT)/g' \ ++ -e 's/@''GNULIB_LISTEN''@/$(GL_GNULIB_LISTEN)/g' \ ++ -e 's/@''GNULIB_RECV''@/$(GL_GNULIB_RECV)/g' \ ++ -e 's/@''GNULIB_SEND''@/$(GL_GNULIB_SEND)/g' \ ++ -e 's/@''GNULIB_RECVFROM''@/$(GL_GNULIB_RECVFROM)/g' \ ++ -e 's/@''GNULIB_SENDTO''@/$(GL_GNULIB_SENDTO)/g' \ ++ -e 's/@''GNULIB_SETSOCKOPT''@/$(GL_GNULIB_SETSOCKOPT)/g' \ ++ -e 's/@''GNULIB_SHUTDOWN''@/$(GL_GNULIB_SHUTDOWN)/g' \ ++ -e 's/@''GNULIB_ACCEPT4''@/$(GL_GNULIB_ACCEPT4)/g' \ + -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \ + -e 's|@''HAVE_WS2TCPIP_H''@|$(HAVE_WS2TCPIP_H)|g' \ + -e 's|@''HAVE_STRUCT_SOCKADDR_STORAGE''@|$(HAVE_STRUCT_SOCKADDR_STORAGE)|g' \ +@@ -3042,25 +3082,25 @@ sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNU + -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \ + -e 's|@''WINDOWS_64_BIT_ST_SIZE''@|$(WINDOWS_64_BIT_ST_SIZE)|g' \ + -e 's|@''WINDOWS_STAT_TIMESPEC''@|$(WINDOWS_STAT_TIMESPEC)|g' \ +- -e 's/@''GNULIB_FCHMODAT''@/$(GNULIB_FCHMODAT)/g' \ +- -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' \ +- -e 's/@''GNULIB_MKNOD''@/$(GNULIB_MKNOD)/g' \ +- -e 's/@''GNULIB_MKNODAT''@/$(GNULIB_MKNODAT)/g' \ +- -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/@''GNULIB_FCHMODAT''@/$(GL_GNULIB_FCHMODAT)/g' \ ++ -e 's/@''GNULIB_FSTAT''@/$(GL_GNULIB_FSTAT)/g' \ ++ -e 's/@''GNULIB_FSTATAT''@/$(GL_GNULIB_FSTATAT)/g' \ ++ -e 's/@''GNULIB_FUTIMENS''@/$(GL_GNULIB_FUTIMENS)/g' \ ++ -e 's/@''GNULIB_GETUMASK''@/$(GL_GNULIB_GETUMASK)/g' \ ++ -e 's/@''GNULIB_LCHMOD''@/$(GL_GNULIB_LCHMOD)/g' \ ++ -e 's/@''GNULIB_LSTAT''@/$(GL_GNULIB_LSTAT)/g' \ ++ -e 's/@''GNULIB_MKDIR''@/$(GL_GNULIB_MKDIR)/g' \ ++ -e 's/@''GNULIB_MKDIRAT''@/$(GL_GNULIB_MKDIRAT)/g' \ ++ -e 's/@''GNULIB_MKFIFO''@/$(GL_GNULIB_MKFIFO)/g' \ ++ -e 's/@''GNULIB_MKFIFOAT''@/$(GL_GNULIB_MKFIFOAT)/g' \ ++ -e 's/@''GNULIB_MKNOD''@/$(GL_GNULIB_MKNOD)/g' \ ++ -e 's/@''GNULIB_MKNODAT''@/$(GL_GNULIB_MKNODAT)/g' \ ++ -e 's/@''GNULIB_STAT''@/$(GL_GNULIB_STAT)/g' \ ++ -e 's/@''GNULIB_UTIMENSAT''@/$(GL_GNULIB_UTIMENSAT)/g' \ ++ -e 's/@''GNULIB_OVERRIDES_STRUCT_STAT''@/$(GL_GNULIB_OVERRIDES_STRUCT_STAT)/g' \ ++ -e 's/@''GNULIB_MDA_CHMOD''@/$(GL_GNULIB_MDA_CHMOD)/g' \ ++ -e 's/@''GNULIB_MDA_MKDIR''@/$(GL_GNULIB_MDA_MKDIR)/g' \ ++ -e 's/@''GNULIB_MDA_UMASK''@/$(GL_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' \ +@@ -3114,7 +3154,7 @@ sys/time.h: sys_time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNU + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_SYS_TIME_H''@|$(NEXT_SYS_TIME_H)|g' \ +- -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \ ++ -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GL_GNULIB_GETTIMEOFDAY)/g' \ + -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \ + -e 's/@''HAVE_GETTIMEOFDAY''@/$(HAVE_GETTIMEOFDAY)/g' \ + -e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \ +@@ -3148,7 +3188,7 @@ sys/times.h: sys_times.in.h $(top_builddir)/config.status $(WARN_ON_USE_H) $(ARG + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_SYS_TIMES_H''@|$(NEXT_SYS_TIMES_H)|g' \ +- -e 's/@''GNULIB_TIMES''@/$(GNULIB_TIMES)/g' \ ++ -e 's/@''GNULIB_TIMES''@/$(GL_GNULIB_TIMES)/g' \ + -e 's|@''HAVE_STRUCT_TMS''@|$(HAVE_STRUCT_TMS)|g' \ + -e 's|@''HAVE_TIMES''@|$(HAVE_TIMES)|g' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ +@@ -3239,18 +3279,18 @@ time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $( + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \ +- -e 's/@''GNULIB_CTIME''@/$(GNULIB_CTIME)/g' \ +- -e 's/@''GNULIB_LOCALTIME''@/$(GNULIB_LOCALTIME)/g' \ +- -e 's/@''GNULIB_MKTIME''@/$(GNULIB_MKTIME)/g' \ +- -e 's/@''GNULIB_NANOSLEEP''@/$(GNULIB_NANOSLEEP)/g' \ +- -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/@''GNULIB_CTIME''@/$(GL_GNULIB_CTIME)/g' \ ++ -e 's/@''GNULIB_LOCALTIME''@/$(GL_GNULIB_LOCALTIME)/g' \ ++ -e 's/@''GNULIB_MKTIME''@/$(GL_GNULIB_MKTIME)/g' \ ++ -e 's/@''GNULIB_NANOSLEEP''@/$(GL_GNULIB_NANOSLEEP)/g' \ ++ -e 's/@''GNULIB_STRFTIME''@/$(GL_GNULIB_STRFTIME)/g' \ ++ -e 's/@''GNULIB_STRPTIME''@/$(GL_GNULIB_STRPTIME)/g' \ ++ -e 's/@''GNULIB_TIMEGM''@/$(GL_GNULIB_TIMEGM)/g' \ ++ -e 's/@''GNULIB_TIMESPEC_GET''@/$(GL_GNULIB_TIMESPEC_GET)/g' \ ++ -e 's/@''GNULIB_TIME_R''@/$(GL_GNULIB_TIME_R)/g' \ ++ -e 's/@''GNULIB_TIME_RZ''@/$(GL_GNULIB_TIME_RZ)/g' \ ++ -e 's/@''GNULIB_TZSET''@/$(GL_GNULIB_TZSET)/g' \ ++ -e 's/@''GNULIB_MDA_TZSET''@/$(GL_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' \ +@@ -3360,89 +3400,89 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \ + -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \ +- -e 's/@''GNULIB_ACCESS''@/$(GNULIB_ACCESS)/g' \ +- -e 's/@''GNULIB_CHDIR''@/$(GNULIB_CHDIR)/g' \ +- -e 's/@''GNULIB_CHOWN''@/$(GNULIB_CHOWN)/g' \ +- -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \ +- -e 's/@''GNULIB_COPY_FILE_RANGE''@/$(GNULIB_COPY_FILE_RANGE)/g' \ +- -e 's/@''GNULIB_DUP''@/$(GNULIB_DUP)/g' \ +- -e 's/@''GNULIB_DUP2''@/$(GNULIB_DUP2)/g' \ +- -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' \ +- -e 's/@''GNULIB_FDATASYNC''@/$(GNULIB_FDATASYNC)/g' \ +- -e 's/@''GNULIB_FSYNC''@/$(GNULIB_FSYNC)/g' \ +- -e 's/@''GNULIB_FTRUNCATE''@/$(GNULIB_FTRUNCATE)/g' \ +- -e 's/@''GNULIB_GETCWD''@/$(GNULIB_GETCWD)/g' \ +- -e 's/@''GNULIB_GETDOMAINNAME''@/$(GNULIB_GETDOMAINNAME)/g' \ +- -e 's/@''GNULIB_GETDTABLESIZE''@/$(GNULIB_GETDTABLESIZE)/g' \ +- -e 's/@''GNULIB_GETENTROPY''@/$(GNULIB_GETENTROPY)/g' \ +- -e 's/@''GNULIB_GETGROUPS''@/$(GNULIB_GETGROUPS)/g' \ +- -e 's/@''GNULIB_GETHOSTNAME''@/$(GNULIB_GETHOSTNAME)/g' \ +- -e 's/@''GNULIB_GETLOGIN''@/$(GNULIB_GETLOGIN)/g' \ +- -e 's/@''GNULIB_GETLOGIN_R''@/$(GNULIB_GETLOGIN_R)/g' \ +- -e 's/@''GNULIB_GETOPT_POSIX''@/$(GNULIB_GETOPT_POSIX)/g' \ +- -e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \ +- -e 's/@''GNULIB_GETPASS''@/$(GNULIB_GETPASS)/g' \ +- -e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \ +- -e 's/@''GNULIB_GROUP_MEMBER''@/$(GNULIB_GROUP_MEMBER)/g' \ +- -e 's/@''GNULIB_ISATTY''@/$(GNULIB_ISATTY)/g' \ +- -e 's/@''GNULIB_LCHOWN''@/$(GNULIB_LCHOWN)/g' \ +- -e 's/@''GNULIB_LINK''@/$(GNULIB_LINK)/g' \ +- -e 's/@''GNULIB_LINKAT''@/$(GNULIB_LINKAT)/g' \ +- -e 's/@''GNULIB_LSEEK''@/$(GNULIB_LSEEK)/g' \ +- -e 's/@''GNULIB_PIPE''@/$(GNULIB_PIPE)/g' \ +- -e 's/@''GNULIB_PIPE2''@/$(GNULIB_PIPE2)/g' \ +- -e 's/@''GNULIB_PREAD''@/$(GNULIB_PREAD)/g' \ +- -e 's/@''GNULIB_PWRITE''@/$(GNULIB_PWRITE)/g' \ +- -e 's/@''GNULIB_READ''@/$(GNULIB_READ)/g' \ +- -e 's/@''GNULIB_READLINK''@/$(GNULIB_READLINK)/g' \ +- -e 's/@''GNULIB_READLINKAT''@/$(GNULIB_READLINKAT)/g' \ +- -e 's/@''GNULIB_RMDIR''@/$(GNULIB_RMDIR)/g' \ +- -e 's/@''GNULIB_SETHOSTNAME''@/$(GNULIB_SETHOSTNAME)/g' \ +- -e 's/@''GNULIB_SLEEP''@/$(GNULIB_SLEEP)/g' \ +- -e 's/@''GNULIB_SYMLINK''@/$(GNULIB_SYMLINK)/g' \ +- -e 's/@''GNULIB_SYMLINKAT''@/$(GNULIB_SYMLINKAT)/g' \ +- -e 's/@''GNULIB_TRUNCATE''@/$(GNULIB_TRUNCATE)/g' \ +- -e 's/@''GNULIB_TTYNAME_R''@/$(GNULIB_TTYNAME_R)/g' \ +- -e 's/@''GNULIB_UNISTD_H_GETOPT''@/0$(GNULIB_GL_UNISTD_H_GETOPT)/g' \ +- -e 's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GNULIB_UNISTD_H_NONBLOCKING)/g' \ +- -e 's/@''GNULIB_UNISTD_H_SIGPIPE''@/$(GNULIB_UNISTD_H_SIGPIPE)/g' \ +- -e 's/@''GNULIB_UNLINK''@/$(GNULIB_UNLINK)/g' \ +- -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' \ ++ -e 's/@''GNULIB_ACCESS''@/$(GL_GNULIB_ACCESS)/g' \ ++ -e 's/@''GNULIB_CHDIR''@/$(GL_GNULIB_CHDIR)/g' \ ++ -e 's/@''GNULIB_CHOWN''@/$(GL_GNULIB_CHOWN)/g' \ ++ -e 's/@''GNULIB_CLOSE''@/$(GL_GNULIB_CLOSE)/g' \ ++ -e 's/@''GNULIB_COPY_FILE_RANGE''@/$(GL_GNULIB_COPY_FILE_RANGE)/g' \ ++ -e 's/@''GNULIB_DUP''@/$(GL_GNULIB_DUP)/g' \ ++ -e 's/@''GNULIB_DUP2''@/$(GL_GNULIB_DUP2)/g' \ ++ -e 's/@''GNULIB_DUP3''@/$(GL_GNULIB_DUP3)/g' \ ++ -e 's/@''GNULIB_ENVIRON''@/$(GL_GNULIB_ENVIRON)/g' \ ++ -e 's/@''GNULIB_EUIDACCESS''@/$(GL_GNULIB_EUIDACCESS)/g' \ ++ -e 's/@''GNULIB_EXECL''@/$(GL_GNULIB_EXECL)/g' \ ++ -e 's/@''GNULIB_EXECLE''@/$(GL_GNULIB_EXECLE)/g' \ ++ -e 's/@''GNULIB_EXECLP''@/$(GL_GNULIB_EXECLP)/g' \ ++ -e 's/@''GNULIB_EXECV''@/$(GL_GNULIB_EXECV)/g' \ ++ -e 's/@''GNULIB_EXECVE''@/$(GL_GNULIB_EXECVE)/g' \ ++ -e 's/@''GNULIB_EXECVP''@/$(GL_GNULIB_EXECVP)/g' \ ++ -e 's/@''GNULIB_EXECVPE''@/$(GL_GNULIB_EXECVPE)/g' \ ++ -e 's/@''GNULIB_FACCESSAT''@/$(GL_GNULIB_FACCESSAT)/g' \ ++ -e 's/@''GNULIB_FCHDIR''@/$(GL_GNULIB_FCHDIR)/g' \ ++ -e 's/@''GNULIB_FCHOWNAT''@/$(GL_GNULIB_FCHOWNAT)/g' \ ++ -e 's/@''GNULIB_FDATASYNC''@/$(GL_GNULIB_FDATASYNC)/g' \ ++ -e 's/@''GNULIB_FSYNC''@/$(GL_GNULIB_FSYNC)/g' \ ++ -e 's/@''GNULIB_FTRUNCATE''@/$(GL_GNULIB_FTRUNCATE)/g' \ ++ -e 's/@''GNULIB_GETCWD''@/$(GL_GNULIB_GETCWD)/g' \ ++ -e 's/@''GNULIB_GETDOMAINNAME''@/$(GL_GNULIB_GETDOMAINNAME)/g' \ ++ -e 's/@''GNULIB_GETDTABLESIZE''@/$(GL_GNULIB_GETDTABLESIZE)/g' \ ++ -e 's/@''GNULIB_GETENTROPY''@/$(GL_GNULIB_GETENTROPY)/g' \ ++ -e 's/@''GNULIB_GETGROUPS''@/$(GL_GNULIB_GETGROUPS)/g' \ ++ -e 's/@''GNULIB_GETHOSTNAME''@/$(GL_GNULIB_GETHOSTNAME)/g' \ ++ -e 's/@''GNULIB_GETLOGIN''@/$(GL_GNULIB_GETLOGIN)/g' \ ++ -e 's/@''GNULIB_GETLOGIN_R''@/$(GL_GNULIB_GETLOGIN_R)/g' \ ++ -e 's/@''GNULIB_GETOPT_POSIX''@/$(GL_GNULIB_GETOPT_POSIX)/g' \ ++ -e 's/@''GNULIB_GETPAGESIZE''@/$(GL_GNULIB_GETPAGESIZE)/g' \ ++ -e 's/@''GNULIB_GETPASS''@/$(GL_GNULIB_GETPASS)/g' \ ++ -e 's/@''GNULIB_GETUSERSHELL''@/$(GL_GNULIB_GETUSERSHELL)/g' \ ++ -e 's/@''GNULIB_GROUP_MEMBER''@/$(GL_GNULIB_GROUP_MEMBER)/g' \ ++ -e 's/@''GNULIB_ISATTY''@/$(GL_GNULIB_ISATTY)/g' \ ++ -e 's/@''GNULIB_LCHOWN''@/$(GL_GNULIB_LCHOWN)/g' \ ++ -e 's/@''GNULIB_LINK''@/$(GL_GNULIB_LINK)/g' \ ++ -e 's/@''GNULIB_LINKAT''@/$(GL_GNULIB_LINKAT)/g' \ ++ -e 's/@''GNULIB_LSEEK''@/$(GL_GNULIB_LSEEK)/g' \ ++ -e 's/@''GNULIB_PIPE''@/$(GL_GNULIB_PIPE)/g' \ ++ -e 's/@''GNULIB_PIPE2''@/$(GL_GNULIB_PIPE2)/g' \ ++ -e 's/@''GNULIB_PREAD''@/$(GL_GNULIB_PREAD)/g' \ ++ -e 's/@''GNULIB_PWRITE''@/$(GL_GNULIB_PWRITE)/g' \ ++ -e 's/@''GNULIB_READ''@/$(GL_GNULIB_READ)/g' \ ++ -e 's/@''GNULIB_READLINK''@/$(GL_GNULIB_READLINK)/g' \ ++ -e 's/@''GNULIB_READLINKAT''@/$(GL_GNULIB_READLINKAT)/g' \ ++ -e 's/@''GNULIB_RMDIR''@/$(GL_GNULIB_RMDIR)/g' \ ++ -e 's/@''GNULIB_SETHOSTNAME''@/$(GL_GNULIB_SETHOSTNAME)/g' \ ++ -e 's/@''GNULIB_SLEEP''@/$(GL_GNULIB_SLEEP)/g' \ ++ -e 's/@''GNULIB_SYMLINK''@/$(GL_GNULIB_SYMLINK)/g' \ ++ -e 's/@''GNULIB_SYMLINKAT''@/$(GL_GNULIB_SYMLINKAT)/g' \ ++ -e 's/@''GNULIB_TRUNCATE''@/$(GL_GNULIB_TRUNCATE)/g' \ ++ -e 's/@''GNULIB_TTYNAME_R''@/$(GL_GNULIB_TTYNAME_R)/g' \ ++ -e 's/@''GNULIB_UNISTD_H_GETOPT''@/0$(GL_GNULIB_UNISTD_H_GETOPT)/g' \ ++ -e 's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GL_GNULIB_UNISTD_H_NONBLOCKING)/g' \ ++ -e 's/@''GNULIB_UNISTD_H_SIGPIPE''@/$(GL_GNULIB_UNISTD_H_SIGPIPE)/g' \ ++ -e 's/@''GNULIB_UNLINK''@/$(GL_GNULIB_UNLINK)/g' \ ++ -e 's/@''GNULIB_UNLINKAT''@/$(GL_GNULIB_UNLINKAT)/g' \ ++ -e 's/@''GNULIB_USLEEP''@/$(GL_GNULIB_USLEEP)/g' \ ++ -e 's/@''GNULIB_WRITE''@/$(GL_GNULIB_WRITE)/g' \ ++ -e 's/@''GNULIB_MDA_ACCESS''@/$(GL_GNULIB_MDA_ACCESS)/g' \ ++ -e 's/@''GNULIB_MDA_CHDIR''@/$(GL_GNULIB_MDA_CHDIR)/g' \ ++ -e 's/@''GNULIB_MDA_CLOSE''@/$(GL_GNULIB_MDA_CLOSE)/g' \ ++ -e 's/@''GNULIB_MDA_DUP''@/$(GL_GNULIB_MDA_DUP)/g' \ ++ -e 's/@''GNULIB_MDA_DUP2''@/$(GL_GNULIB_MDA_DUP2)/g' \ ++ -e 's/@''GNULIB_MDA_EXECL''@/$(GL_GNULIB_MDA_EXECL)/g' \ ++ -e 's/@''GNULIB_MDA_EXECLE''@/$(GL_GNULIB_MDA_EXECLE)/g' \ ++ -e 's/@''GNULIB_MDA_EXECLP''@/$(GL_GNULIB_MDA_EXECLP)/g' \ ++ -e 's/@''GNULIB_MDA_EXECV''@/$(GL_GNULIB_MDA_EXECV)/g' \ ++ -e 's/@''GNULIB_MDA_EXECVE''@/$(GL_GNULIB_MDA_EXECVE)/g' \ ++ -e 's/@''GNULIB_MDA_EXECVP''@/$(GL_GNULIB_MDA_EXECVP)/g' \ ++ -e 's/@''GNULIB_MDA_EXECVPE''@/$(GL_GNULIB_MDA_EXECVPE)/g' \ ++ -e 's/@''GNULIB_MDA_GETCWD''@/$(GL_GNULIB_MDA_GETCWD)/g' \ ++ -e 's/@''GNULIB_MDA_GETPID''@/$(GL_GNULIB_MDA_GETPID)/g' \ ++ -e 's/@''GNULIB_MDA_ISATTY''@/$(GL_GNULIB_MDA_ISATTY)/g' \ ++ -e 's/@''GNULIB_MDA_LSEEK''@/$(GL_GNULIB_MDA_LSEEK)/g' \ ++ -e 's/@''GNULIB_MDA_READ''@/$(GL_GNULIB_MDA_READ)/g' \ ++ -e 's/@''GNULIB_MDA_RMDIR''@/$(GL_GNULIB_MDA_RMDIR)/g' \ ++ -e 's/@''GNULIB_MDA_SWAB''@/$(GL_GNULIB_MDA_SWAB)/g' \ ++ -e 's/@''GNULIB_MDA_UNLINK''@/$(GL_GNULIB_MDA_UNLINK)/g' \ ++ -e 's/@''GNULIB_MDA_WRITE''@/$(GL_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' \ +@@ -3617,49 +3657,49 @@ wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) + -e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \ + -e 's|@''HAVE_WCHAR_H''@|$(HAVE_WCHAR_H)|g' \ + -e 's/@''HAVE_CRTDEFS_H''@/$(HAVE_CRTDEFS_H)/g' \ +- -e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \ +- -e 's/@''GNULIB_BTOWC''@/$(GNULIB_BTOWC)/g' \ +- -e 's/@''GNULIB_WCTOB''@/$(GNULIB_WCTOB)/g' \ +- -e 's/@''GNULIB_MBSINIT''@/$(GNULIB_MBSINIT)/g' \ +- -e 's/@''GNULIB_MBRTOWC''@/$(GNULIB_MBRTOWC)/g' \ +- -e 's/@''GNULIB_MBRLEN''@/$(GNULIB_MBRLEN)/g' \ +- -e 's/@''GNULIB_MBSRTOWCS''@/$(GNULIB_MBSRTOWCS)/g' \ +- -e 's/@''GNULIB_MBSNRTOWCS''@/$(GNULIB_MBSNRTOWCS)/g' \ +- -e 's/@''GNULIB_WCRTOMB''@/$(GNULIB_WCRTOMB)/g' \ +- -e 's/@''GNULIB_WCSRTOMBS''@/$(GNULIB_WCSRTOMBS)/g' \ +- -e 's/@''GNULIB_WCSNRTOMBS''@/$(GNULIB_WCSNRTOMBS)/g' \ +- -e 's/@''GNULIB_WCWIDTH''@/$(GNULIB_WCWIDTH)/g' \ +- -e 's/@''GNULIB_WMEMCHR''@/$(GNULIB_WMEMCHR)/g' \ +- -e 's/@''GNULIB_WMEMCMP''@/$(GNULIB_WMEMCMP)/g' \ +- -e 's/@''GNULIB_WMEMCPY''@/$(GNULIB_WMEMCPY)/g' \ +- -e 's/@''GNULIB_WMEMMOVE''@/$(GNULIB_WMEMMOVE)/g' \ +- -e 's/@''GNULIB_WMEMPCPY''@/$(GNULIB_WMEMPCPY)/g' \ +- -e 's/@''GNULIB_WMEMSET''@/$(GNULIB_WMEMSET)/g' \ +- -e 's/@''GNULIB_WCSLEN''@/$(GNULIB_WCSLEN)/g' \ +- -e 's/@''GNULIB_WCSNLEN''@/$(GNULIB_WCSNLEN)/g' \ +- -e 's/@''GNULIB_WCSCPY''@/$(GNULIB_WCSCPY)/g' \ +- -e 's/@''GNULIB_WCPCPY''@/$(GNULIB_WCPCPY)/g' \ +- -e 's/@''GNULIB_WCSNCPY''@/$(GNULIB_WCSNCPY)/g' \ +- -e 's/@''GNULIB_WCPNCPY''@/$(GNULIB_WCPNCPY)/g' \ +- -e 's/@''GNULIB_WCSCAT''@/$(GNULIB_WCSCAT)/g' \ +- -e 's/@''GNULIB_WCSNCAT''@/$(GNULIB_WCSNCAT)/g' \ +- -e 's/@''GNULIB_WCSCMP''@/$(GNULIB_WCSCMP)/g' \ +- -e 's/@''GNULIB_WCSNCMP''@/$(GNULIB_WCSNCMP)/g' \ +- -e 's/@''GNULIB_WCSCASECMP''@/$(GNULIB_WCSCASECMP)/g' \ +- -e 's/@''GNULIB_WCSNCASECMP''@/$(GNULIB_WCSNCASECMP)/g' \ +- -e 's/@''GNULIB_WCSCOLL''@/$(GNULIB_WCSCOLL)/g' \ +- -e 's/@''GNULIB_WCSXFRM''@/$(GNULIB_WCSXFRM)/g' \ +- -e 's/@''GNULIB_WCSDUP''@/$(GNULIB_WCSDUP)/g' \ +- -e 's/@''GNULIB_WCSCHR''@/$(GNULIB_WCSCHR)/g' \ +- -e 's/@''GNULIB_WCSRCHR''@/$(GNULIB_WCSRCHR)/g' \ +- -e 's/@''GNULIB_WCSCSPN''@/$(GNULIB_WCSCSPN)/g' \ +- -e 's/@''GNULIB_WCSSPN''@/$(GNULIB_WCSSPN)/g' \ +- -e 's/@''GNULIB_WCSPBRK''@/$(GNULIB_WCSPBRK)/g' \ +- -e 's/@''GNULIB_WCSSTR''@/$(GNULIB_WCSSTR)/g' \ +- -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' \ ++ -e 's/@''GNULIBHEADERS_OVERRIDE_WINT_T''@/$(GNULIBHEADERS_OVERRIDE_WINT_T)/g' \ ++ -e 's/@''GNULIB_BTOWC''@/$(GL_GNULIB_BTOWC)/g' \ ++ -e 's/@''GNULIB_WCTOB''@/$(GL_GNULIB_WCTOB)/g' \ ++ -e 's/@''GNULIB_MBSINIT''@/$(GL_GNULIB_MBSINIT)/g' \ ++ -e 's/@''GNULIB_MBRTOWC''@/$(GL_GNULIB_MBRTOWC)/g' \ ++ -e 's/@''GNULIB_MBRLEN''@/$(GL_GNULIB_MBRLEN)/g' \ ++ -e 's/@''GNULIB_MBSRTOWCS''@/$(GL_GNULIB_MBSRTOWCS)/g' \ ++ -e 's/@''GNULIB_MBSNRTOWCS''@/$(GL_GNULIB_MBSNRTOWCS)/g' \ ++ -e 's/@''GNULIB_WCRTOMB''@/$(GL_GNULIB_WCRTOMB)/g' \ ++ -e 's/@''GNULIB_WCSRTOMBS''@/$(GL_GNULIB_WCSRTOMBS)/g' \ ++ -e 's/@''GNULIB_WCSNRTOMBS''@/$(GL_GNULIB_WCSNRTOMBS)/g' \ ++ -e 's/@''GNULIB_WCWIDTH''@/$(GL_GNULIB_WCWIDTH)/g' \ ++ -e 's/@''GNULIB_WMEMCHR''@/$(GL_GNULIB_WMEMCHR)/g' \ ++ -e 's/@''GNULIB_WMEMCMP''@/$(GL_GNULIB_WMEMCMP)/g' \ ++ -e 's/@''GNULIB_WMEMCPY''@/$(GL_GNULIB_WMEMCPY)/g' \ ++ -e 's/@''GNULIB_WMEMMOVE''@/$(GL_GNULIB_WMEMMOVE)/g' \ ++ -e 's/@''GNULIB_WMEMPCPY''@/$(GL_GNULIB_WMEMPCPY)/g' \ ++ -e 's/@''GNULIB_WMEMSET''@/$(GL_GNULIB_WMEMSET)/g' \ ++ -e 's/@''GNULIB_WCSLEN''@/$(GL_GNULIB_WCSLEN)/g' \ ++ -e 's/@''GNULIB_WCSNLEN''@/$(GL_GNULIB_WCSNLEN)/g' \ ++ -e 's/@''GNULIB_WCSCPY''@/$(GL_GNULIB_WCSCPY)/g' \ ++ -e 's/@''GNULIB_WCPCPY''@/$(GL_GNULIB_WCPCPY)/g' \ ++ -e 's/@''GNULIB_WCSNCPY''@/$(GL_GNULIB_WCSNCPY)/g' \ ++ -e 's/@''GNULIB_WCPNCPY''@/$(GL_GNULIB_WCPNCPY)/g' \ ++ -e 's/@''GNULIB_WCSCAT''@/$(GL_GNULIB_WCSCAT)/g' \ ++ -e 's/@''GNULIB_WCSNCAT''@/$(GL_GNULIB_WCSNCAT)/g' \ ++ -e 's/@''GNULIB_WCSCMP''@/$(GL_GNULIB_WCSCMP)/g' \ ++ -e 's/@''GNULIB_WCSNCMP''@/$(GL_GNULIB_WCSNCMP)/g' \ ++ -e 's/@''GNULIB_WCSCASECMP''@/$(GL_GNULIB_WCSCASECMP)/g' \ ++ -e 's/@''GNULIB_WCSNCASECMP''@/$(GL_GNULIB_WCSNCASECMP)/g' \ ++ -e 's/@''GNULIB_WCSCOLL''@/$(GL_GNULIB_WCSCOLL)/g' \ ++ -e 's/@''GNULIB_WCSXFRM''@/$(GL_GNULIB_WCSXFRM)/g' \ ++ -e 's/@''GNULIB_WCSDUP''@/$(GL_GNULIB_WCSDUP)/g' \ ++ -e 's/@''GNULIB_WCSCHR''@/$(GL_GNULIB_WCSCHR)/g' \ ++ -e 's/@''GNULIB_WCSRCHR''@/$(GL_GNULIB_WCSRCHR)/g' \ ++ -e 's/@''GNULIB_WCSCSPN''@/$(GL_GNULIB_WCSCSPN)/g' \ ++ -e 's/@''GNULIB_WCSSPN''@/$(GL_GNULIB_WCSSPN)/g' \ ++ -e 's/@''GNULIB_WCSPBRK''@/$(GL_GNULIB_WCSPBRK)/g' \ ++ -e 's/@''GNULIB_WCSSTR''@/$(GL_GNULIB_WCSSTR)/g' \ ++ -e 's/@''GNULIB_WCSTOK''@/$(GL_GNULIB_WCSTOK)/g' \ ++ -e 's/@''GNULIB_WCSWIDTH''@/$(GL_GNULIB_WCSWIDTH)/g' \ ++ -e 's/@''GNULIB_WCSFTIME''@/$(GL_GNULIB_WCSFTIME)/g' \ ++ -e 's/@''GNULIB_MDA_WCSDUP''@/$(GL_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' \ +@@ -3760,14 +3800,14 @@ wctype.h: wctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_WCTYPE_H''@|$(NEXT_WCTYPE_H)|g' \ + -e 's/@''HAVE_CRTDEFS_H''@/$(HAVE_CRTDEFS_H)/g' \ +- -e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \ +- -e 's/@''GNULIB_ISWBLANK''@/$(GNULIB_ISWBLANK)/g' \ +- -e 's/@''GNULIB_ISWDIGIT''@/$(GNULIB_ISWDIGIT)/g' \ +- -e 's/@''GNULIB_ISWXDIGIT''@/$(GNULIB_ISWXDIGIT)/g' \ +- -e 's/@''GNULIB_WCTYPE''@/$(GNULIB_WCTYPE)/g' \ +- -e 's/@''GNULIB_ISWCTYPE''@/$(GNULIB_ISWCTYPE)/g' \ +- -e 's/@''GNULIB_WCTRANS''@/$(GNULIB_WCTRANS)/g' \ +- -e 's/@''GNULIB_TOWCTRANS''@/$(GNULIB_TOWCTRANS)/g' \ ++ -e 's/@''GNULIBHEADERS_OVERRIDE_WINT_T''@/$(GNULIBHEADERS_OVERRIDE_WINT_T)/g' \ ++ -e 's/@''GNULIB_ISWBLANK''@/$(GL_GNULIB_ISWBLANK)/g' \ ++ -e 's/@''GNULIB_ISWDIGIT''@/$(GL_GNULIB_ISWDIGIT)/g' \ ++ -e 's/@''GNULIB_ISWXDIGIT''@/$(GL_GNULIB_ISWXDIGIT)/g' \ ++ -e 's/@''GNULIB_WCTYPE''@/$(GL_GNULIB_WCTYPE)/g' \ ++ -e 's/@''GNULIB_ISWCTYPE''@/$(GL_GNULIB_ISWCTYPE)/g' \ ++ -e 's/@''GNULIB_WCTRANS''@/$(GL_GNULIB_WCTRANS)/g' \ ++ -e 's/@''GNULIB_TOWCTRANS''@/$(GL_GNULIB_TOWCTRANS)/g' \ + -e 's/@''HAVE_ISWBLANK''@/$(HAVE_ISWBLANK)/g' \ + -e 's/@''HAVE_ISWCNTRL''@/$(HAVE_ISWCNTRL)/g' \ + -e 's/@''HAVE_WCTYPE_T''@/$(HAVE_WCTYPE_T)/g' \ +diff --git a/lib/_Noreturn.h b/lib/_Noreturn.h +index cb72f26..6fed3c7 100644 +--- a/lib/_Noreturn.h ++++ b/lib/_Noreturn.h +@@ -29,7 +29,7 @@ + # elif ((!defined __cplusplus || defined __clang__) \ + && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ + || (!defined __STRICT_ANSI__ \ +- && (__4 < __GNUC__ + (7 <= __GNUC_MINOR__) \ ++ && (4 < __GNUC__ + (7 <= __GNUC_MINOR__) \ + || (defined __apple_build_version__ \ + ? 6000000 <= __apple_build_version__ \ + : 3 < __clang_major__ + (5 <= __clang_minor__)))))) +diff --git a/lib/accept.c b/lib/accept.c +index 4ec4f43..71457db 100644 +--- a/lib/accept.c ++++ b/lib/accept.c +@@ -2,12 +2,12 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/accept4.c b/lib/accept4.c +index b444e22..4c2b80e 100644 +--- a/lib/accept4.c ++++ b/lib/accept4.c +@@ -1,18 +1,18 @@ + /* Accept a connection on a socket, with specific opening flags. + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser 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, ++ This file 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 Lesser General Public License for more details. + +- You should have received a copy of the GNU Lesser General Public License along +- with this program; if not, see . */ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ + + #include + +diff --git a/lib/alignof.h b/lib/alignof.h +index 6977c3e..e6e7a51 100644 +--- a/lib/alignof.h ++++ b/lib/alignof.h +@@ -1,18 +1,18 @@ + /* Determine alignment of types. + Copyright (C) 2003-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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License +- along with this program; if not, see . */ ++ along with this program. If not, see . */ + + #ifndef _ALIGNOF_H + #define _ALIGNOF_H +diff --git a/lib/alloca.c b/lib/alloca.c +index 91b9ec3..4880283 100644 +--- a/lib/alloca.c ++++ b/lib/alloca.c +@@ -1,5 +1,7 @@ + /* alloca.c -- allocate automatically reclaimed memory +- (Mostly) portable public-domain implementation -- D A Gwyn ++ This file is in the public domain. */ ++ ++/* (Mostly) portable implementation -- D A Gwyn + + This implementation of the PWB library alloca function, + which is used to allocate space off the run-time stack so +diff --git a/lib/alloca.in.h b/lib/alloca.in.h +index 9c7ccbb..65c2d4d 100644 +--- a/lib/alloca.in.h ++++ b/lib/alloca.in.h +@@ -3,20 +3,18 @@ + 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 +- under the terms of the GNU Lesser General Public License as published +- by the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 +- Lesser General Public License for more details. ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU Lesser General Public License for more details. + +- You should have received a copy of the GNU Lesser General Public +- License along with this program; if not, see +- . +- */ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ + + /* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H + means there is a real alloca function. */ +diff --git a/lib/arpa_inet.in.h b/lib/arpa_inet.in.h +index 0ac83ab..9968067 100644 +--- a/lib/arpa_inet.in.h ++++ b/lib/arpa_inet.in.h +@@ -2,18 +2,18 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License +- along with this program; if not, see . */ ++ along with this program. If not, see . */ + + #ifndef _@GUARD_PREFIX@_ARPA_INET_H + +diff --git a/lib/asnprintf.c b/lib/asnprintf.c +index 420440a..c5367b2 100644 +--- a/lib/asnprintf.c ++++ b/lib/asnprintf.c +@@ -1,18 +1,18 @@ + /* Formatted output to strings. + Copyright (C) 1999, 2002, 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + +- You should have received a copy of the GNU Lesser General Public License along +- with this program; if not, see . */ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ + + #include + +diff --git a/lib/assure.h b/lib/assure.h +index d95c0c9..49aa82f 100644 +--- a/lib/assure.h ++++ b/lib/assure.h +@@ -2,12 +2,12 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/attribute.h b/lib/attribute.h +index 27a0fce..80a23f5 100644 +--- a/lib/attribute.h ++++ b/lib/attribute.h +@@ -2,15 +2,15 @@ + + 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 Lesser General Public License as published +- by the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 +- Lesser General Public License for more details. ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ +@@ -32,7 +32,7 @@ + + + /* This file defines two types of attributes: +- * C2X standard attributes. These have macro names that do not begin with ++ * C2x standard attributes. These have macro names that do not begin with + 'ATTRIBUTE_'. + * Selected GCC attributes; see: + https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html +diff --git a/lib/basename-lgpl.c b/lib/basename-lgpl.c +index 405edfa..5dbd157 100644 +--- a/lib/basename-lgpl.c ++++ b/lib/basename-lgpl.c +@@ -3,12 +3,12 @@ + 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 +- it under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/basename-lgpl.h b/lib/basename-lgpl.h +index 222d21f..d520c09 100644 +--- a/lib/basename-lgpl.h ++++ b/lib/basename-lgpl.h +@@ -1,20 +1,20 @@ +-/* Extract the last component (base name) of a file name. ++/* Extract the last component (base name) of a file name. + +- Copyright (C) 1998, 2001, 2003-2006, 2009-2021 Free Software Foundation, +- Inc. ++ 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details. ++ This file 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 Lesser General Public License for more details. + +- You should have received a copy of the GNU Lesser General Public License +- along with this program. If not, see . */ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ + + #ifndef _BASENAME_LGPL_H + #define _BASENAME_LGPL_H +diff --git a/lib/binary-io.c b/lib/binary-io.c +index 83a820a..adc0ae2 100644 +--- a/lib/binary-io.c ++++ b/lib/binary-io.c +@@ -1,12 +1,12 @@ + /* Binary mode I/O. + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/binary-io.h b/lib/binary-io.h +index 1dfbe5a..0fa8d54 100644 +--- a/lib/binary-io.h ++++ b/lib/binary-io.h +@@ -1,12 +1,12 @@ + /* Binary mode I/O. + Copyright (C) 2001, 2003, 2005, 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/bind.c b/lib/bind.c +index 87fe0ed..0e47254 100644 +--- a/lib/bind.c ++++ b/lib/bind.c +@@ -2,12 +2,12 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/btowc.c b/lib/btowc.c +index e800878..b8239af 100644 +--- a/lib/btowc.c ++++ b/lib/btowc.c +@@ -2,12 +2,12 @@ + Copyright (C) 2008, 2010-2021 Free Software Foundation, Inc. + Written by Bruno Haible , 2008. + +- This program is free software: you can redistribute it and/or modify +- it under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/byteswap.in.h b/lib/byteswap.in.h +index c176238..113f878 100644 +--- a/lib/byteswap.in.h ++++ b/lib/byteswap.in.h +@@ -2,12 +2,12 @@ + Copyright (C) 2005, 2007, 2009-2021 Free Software Foundation, Inc. + Written by Oskar Liljeblad , 2005. + +- This program is free software: you can redistribute it and/or modify +- it under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/c-ctype.c b/lib/c-ctype.c +index 5d9d4d8..300f97c 100644 +--- a/lib/c-ctype.c ++++ b/lib/c-ctype.c +@@ -1,3 +1,21 @@ ++/* Character handling in C locale. ++ ++ Copyright (C) 2003-2021 Free Software Foundation, Inc. ++ ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. ++ ++ This file 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 Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ ++ + #include ++ + #define C_CTYPE_INLINE _GL_EXTERN_INLINE + #include "c-ctype.h" +diff --git a/lib/c-ctype.h b/lib/c-ctype.h +index e8403db..3a652ac 100644 +--- a/lib/c-ctype.h ++++ b/lib/c-ctype.h +@@ -7,18 +7,18 @@ + + Copyright (C) 2000-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 Lesser General Public License as published by +-the Free Software Foundation; either version 2 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 Lesser General Public License for more details. +- +-You should have received a copy of the GNU Lesser General Public License +-along with this program; if not, see . */ ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. ++ ++ This file 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 Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ + + #ifndef C_CTYPE_H + #define C_CTYPE_H +diff --git a/lib/c-strcase.h b/lib/c-strcase.h +index 8240dbc..82f99bb 100644 +--- a/lib/c-strcase.h ++++ b/lib/c-strcase.h +@@ -2,18 +2,18 @@ + Copyright (C) 1995-1996, 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License +- along with this program; if not, see . */ ++ along with this program. If not, see . */ + + #ifndef C_STRCASE_H + #define C_STRCASE_H +diff --git a/lib/c-strcasecmp.c b/lib/c-strcasecmp.c +index 805dc99..3c22455 100644 +--- a/lib/c-strcasecmp.c ++++ b/lib/c-strcasecmp.c +@@ -1,18 +1,18 @@ + /* c-strcasecmp.c -- case insensitive string comparator in C locale + Copyright (C) 1998-1999, 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License +- along with this program; if not, see . */ ++ along with this program. If not, see . */ + + #include + +diff --git a/lib/c-strcaseeq.h b/lib/c-strcaseeq.h +index ed979aa..66b9cf3 100644 +--- a/lib/c-strcaseeq.h ++++ b/lib/c-strcaseeq.h +@@ -1,15 +1,15 @@ + /* Optimized case-insensitive string comparison in C locale. + 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 Lesser General Public License as published +- by the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 +- Lesser General Public License for more details. ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ +diff --git a/lib/c-strncasecmp.c b/lib/c-strncasecmp.c +index c3203fd..f3ca786 100644 +--- a/lib/c-strncasecmp.c ++++ b/lib/c-strncasecmp.c +@@ -1,18 +1,18 @@ + /* c-strncasecmp.c -- case insensitive string comparator in C locale + Copyright (C) 1998-1999, 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License +- along with this program; if not, see . */ ++ along with this program. If not, see . */ + + #include + +diff --git a/lib/canonicalize-lgpl.c b/lib/canonicalize-lgpl.c +index c6fef17..92e9639 100644 +--- a/lib/canonicalize-lgpl.c ++++ b/lib/canonicalize-lgpl.c +@@ -74,7 +74,6 @@ + # define __pathconf pathconf + # define __rawmemchr rawmemchr + # define __readlink readlink +-# define __stat stat + # if IN_RELOCWRAPPER + /* When building the relocatable program wrapper, use the system's memmove + function, not the gnulib override, otherwise we would get a link error. +@@ -105,7 +104,7 @@ file_accessible (char const *file) + return __faccessat (AT_FDCWD, file, F_OK, AT_EACCESS) == 0; + # else + struct stat st; +- return __stat (file, &st) == 0 || errno == EOVERFLOW; ++ return stat (file, &st) == 0 || errno == EOVERFLOW; + # endif + } + +diff --git a/lib/cdefs.h b/lib/cdefs.h +index 90f9741..4dac9d2 100644 +--- a/lib/cdefs.h ++++ b/lib/cdefs.h +@@ -259,9 +259,7 @@ + # define __attribute_const__ /* Ignore */ + #endif + +-#if defined __STDC_VERSION__ && 201710L < __STDC_VERSION__ +-# define __attribute_maybe_unused__ [[__maybe_unused__]] +-#elif __GNUC_PREREQ (2,7) || __glibc_has_attribute (__unused__) ++#if __GNUC_PREREQ (2,7) || __glibc_has_attribute (__unused__) + # define __attribute_maybe_unused__ __attribute__ ((__unused__)) + #else + # define __attribute_maybe_unused__ /* Ignore */ +@@ -320,7 +318,9 @@ + #endif + + /* The nonnull function attribute marks pointer parameters that +- must not be NULL. */ ++ must not be NULL. This has the name __nonnull in glibc, ++ and __attribute_nonnull__ in files shared with Gnulib to avoid ++ collision with a different __nonnull in DragonFlyBSD 5.9. */ + #ifndef __attribute_nonnull__ + # if __GNUC_PREREQ (3,3) || __glibc_has_attribute (__nonnull__) + # define __attribute_nonnull__(params) __attribute__ ((__nonnull__ params)) +@@ -332,6 +332,16 @@ + # define __nonnull(params) __attribute_nonnull__ (params) + #endif + ++/* The returns_nonnull function attribute marks the return type of the function ++ as always being non-null. */ ++#ifndef __returns_nonnull ++# if __GNUC_PREREQ (4, 9) || __glibc_has_attribute (__returns_nonnull__) ++# define __returns_nonnull __attribute__ ((__returns_nonnull__)) ++# else ++# define __returns_nonnull ++# endif ++#endif ++ + /* If fortification mode, we warn about unused results of certain + function calls which can lead to problems. */ + #if __GNUC_PREREQ (3,4) || __glibc_has_attribute (__warn_unused_result__) +@@ -485,9 +495,9 @@ + [!!sizeof (struct { int __error_if_negative: (expr) ? 2 : -1; })] + #endif + +-/* The #ifndef lets Gnulib avoid including these on non-glibc +- platforms, where the includes typically do not exist. */ +-#ifndef __WORDSIZE ++/* Gnulib avoids including these, as they don't work on non-glibc or ++ older glibc platforms. */ ++#ifndef __GNULIB_CDEFS + # include + # include + #endif +@@ -594,9 +604,26 @@ _Static_assert (0, "IEEE 128-bits long double requires redirection on this platf + array according to access mode, or at least one element when + size-index is not provided: + access (access-mode, [, ]) */ +-#define __attr_access(x) __attribute__ ((__access__ x)) ++# define __attr_access(x) __attribute__ ((__access__ x)) ++# if __GNUC_PREREQ (11, 0) ++# define __attr_access_none(argno) __attribute__ ((__access__ (__none__, argno))) ++# else ++# define __attr_access_none(argno) ++# endif + #else + # define __attr_access(x) ++# define __attr_access_none(argno) ++#endif ++ ++#if __GNUC_PREREQ (11, 0) ++/* Designates dealloc as a function to call to deallocate objects ++ allocated by the declared function. */ ++# define __attr_dealloc(dealloc, argno) \ ++ __attribute__ ((__malloc__ (dealloc, argno))) ++# define __attr_dealloc_free __attr_dealloc (__builtin_free, 1) ++#else ++# define __attr_dealloc(dealloc, argno) ++# define __attr_dealloc_free + #endif + + /* Specify that a function such as setjmp or vfork may return +diff --git a/lib/ceil.c b/lib/ceil.c +index 06e7e5e..fce05d9 100644 +--- a/lib/ceil.c ++++ b/lib/ceil.c +@@ -1,12 +1,12 @@ + /* Round towards positive infinity. + Copyright (C) 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser 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, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/cloexec.c b/lib/cloexec.c +index 1f58b72..7defa93 100644 +--- a/lib/cloexec.c ++++ b/lib/cloexec.c +@@ -2,20 +2,20 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License +- along with this program. If not, see . ++ along with this program. If not, see . */ + +- The code is taken from glibc/manual/llio.texi */ ++/* The code is taken from glibc/manual/llio.texi */ + + #include + +diff --git a/lib/cloexec.h b/lib/cloexec.h +index 7a71ad4..97a3659 100644 +--- a/lib/cloexec.h ++++ b/lib/cloexec.h +@@ -2,20 +2,18 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License +- along with this program. If not, see . +- +-*/ ++ along with this program. If not, see . */ + + #include + +diff --git a/lib/close.c b/lib/close.c +index 11e31db..5b9ab6c 100644 +--- a/lib/close.c ++++ b/lib/close.c +@@ -1,12 +1,12 @@ + /* close replacement. + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/connect.c b/lib/connect.c +index fe0de7e..b2b2e93 100644 +--- a/lib/connect.c ++++ b/lib/connect.c +@@ -2,12 +2,12 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/copysign.c b/lib/copysign.c +index ad5b102..fee131b 100644 +--- a/lib/copysign.c ++++ b/lib/copysign.c +@@ -1,12 +1,12 @@ + /* Copy sign into another 'double' number. + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser 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, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/dirent.in.h b/lib/dirent.in.h +index a285bde..5775edf 100644 +--- a/lib/dirent.in.h ++++ b/lib/dirent.in.h +@@ -1,12 +1,12 @@ + /* A GNU-like . + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +@@ -74,6 +74,30 @@ typedef struct gl_directory DIR; + + /* Declare overridden functions. */ + ++#if @GNULIB_CLOSEDIR@ ++# if @REPLACE_CLOSEDIR@ ++# if !(defined __cplusplus && defined GNULIB_NAMESPACE) ++# undef closedir ++# define closedir rpl_closedir ++# define GNULIB_defined_closedir 1 ++# endif ++_GL_FUNCDECL_RPL (closedir, int, (DIR *dirp) _GL_ARG_NONNULL ((1))); ++_GL_CXXALIAS_RPL (closedir, int, (DIR *dirp)); ++# else ++# if !@HAVE_CLOSEDIR@ ++_GL_FUNCDECL_SYS (closedir, int, (DIR *dirp) _GL_ARG_NONNULL ((1))); ++# endif ++_GL_CXXALIAS_SYS (closedir, int, (DIR *dirp)); ++# endif ++_GL_CXXALIASWARN (closedir); ++#elif defined GNULIB_POSIXCHECK ++# undef closedir ++# if HAVE_RAW_DECL_CLOSEDIR ++_GL_WARN_ON_USE (closedir, "closedir is not portable - " ++ "use gnulib module closedir for portability"); ++# endif ++#endif ++ + #if @GNULIB_OPENDIR@ + # if @REPLACE_OPENDIR@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) +@@ -81,20 +105,36 @@ typedef struct gl_directory DIR; + # define opendir rpl_opendir + # define GNULIB_defined_opendir 1 + # endif +-_GL_FUNCDECL_RPL (opendir, DIR *, (const char *dir_name) _GL_ARG_NONNULL ((1))); ++_GL_FUNCDECL_RPL (opendir, DIR *, ++ (const char *dir_name) ++ _GL_ARG_NONNULL ((1)) ++ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC (closedir, 1)); + _GL_CXXALIAS_RPL (opendir, DIR *, (const char *dir_name)); + # else +-# if !@HAVE_OPENDIR@ +-_GL_FUNCDECL_SYS (opendir, DIR *, (const char *dir_name) _GL_ARG_NONNULL ((1))); ++# if !@HAVE_OPENDIR@ || __GNUC__ >= 11 ++_GL_FUNCDECL_SYS (opendir, DIR *, ++ (const char *dir_name) ++ _GL_ARG_NONNULL ((1)) ++ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC (closedir, 1)); + # endif + _GL_CXXALIAS_SYS (opendir, DIR *, (const char *dir_name)); + # endif + _GL_CXXALIASWARN (opendir); +-#elif defined GNULIB_POSIXCHECK +-# undef opendir +-# if HAVE_RAW_DECL_OPENDIR ++#else ++# if @GNULIB_CLOSEDIR@ && __GNUC__ >= 11 && !defined opendir ++/* For -Wmismatched-dealloc: Associate opendir with closedir or ++ rpl_closedir. */ ++_GL_FUNCDECL_SYS (opendir, DIR *, ++ (const char *dir_name) ++ _GL_ARG_NONNULL ((1)) ++ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC (closedir, 1)); ++# endif ++# if defined GNULIB_POSIXCHECK ++# undef opendir ++# if HAVE_RAW_DECL_OPENDIR + _GL_WARN_ON_USE (opendir, "opendir is not portable - " + "use gnulib module opendir for portability"); ++# endif + # endif + #endif + +@@ -126,30 +166,6 @@ _GL_WARN_ON_USE (rewinddir, "rewinddir is not portable - " + # endif + #endif + +-#if @GNULIB_CLOSEDIR@ +-# if @REPLACE_CLOSEDIR@ +-# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +-# undef closedir +-# define closedir rpl_closedir +-# define GNULIB_defined_closedir 1 +-# endif +-_GL_FUNCDECL_RPL (closedir, int, (DIR *dirp) _GL_ARG_NONNULL ((1))); +-_GL_CXXALIAS_RPL (closedir, int, (DIR *dirp)); +-# else +-# if !@HAVE_CLOSEDIR@ +-_GL_FUNCDECL_SYS (closedir, int, (DIR *dirp) _GL_ARG_NONNULL ((1))); +-# endif +-_GL_CXXALIAS_SYS (closedir, int, (DIR *dirp)); +-# endif +-_GL_CXXALIASWARN (closedir); +-#elif defined GNULIB_POSIXCHECK +-# undef closedir +-# if HAVE_RAW_DECL_CLOSEDIR +-_GL_WARN_ON_USE (closedir, "closedir is not portable - " +- "use gnulib module closedir for portability"); +-# endif +-#endif +- + #if @GNULIB_DIRFD@ + /* Return the file descriptor associated with the given directory stream, + or -1 if none exists. */ +@@ -200,20 +216,33 @@ _GL_WARN_ON_USE (dirfd, "dirfd is unportable - " + # undef fdopendir + # define fdopendir rpl_fdopendir + # endif +-_GL_FUNCDECL_RPL (fdopendir, DIR *, (int fd)); ++_GL_FUNCDECL_RPL (fdopendir, DIR *, ++ (int fd) ++ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC (closedir, 1)); + _GL_CXXALIAS_RPL (fdopendir, DIR *, (int fd)); + # else +-# if !@HAVE_FDOPENDIR@ || !@HAVE_DECL_FDOPENDIR@ +-_GL_FUNCDECL_SYS (fdopendir, DIR *, (int fd)); ++# if !@HAVE_FDOPENDIR@ || !@HAVE_DECL_FDOPENDIR@ || __GNUC__ >= 11 ++_GL_FUNCDECL_SYS (fdopendir, DIR *, ++ (int fd) ++ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC (closedir, 1)); + # endif + _GL_CXXALIAS_SYS (fdopendir, DIR *, (int fd)); + # endif + _GL_CXXALIASWARN (fdopendir); +-#elif defined GNULIB_POSIXCHECK +-# undef fdopendir +-# if HAVE_RAW_DECL_FDOPENDIR ++#else ++# if @GNULIB_CLOSEDIR@ && __GNUC__ >= 11 && !defined fdopendir ++/* For -Wmismatched-dealloc: Associate fdopendir with closedir or ++ rpl_closedir. */ ++_GL_FUNCDECL_SYS (fdopendir, DIR *, ++ (int fd) ++ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC (closedir, 1)); ++# endif ++# if defined GNULIB_POSIXCHECK ++# undef fdopendir ++# if HAVE_RAW_DECL_FDOPENDIR + _GL_WARN_ON_USE (fdopendir, "fdopendir is unportable - " + "use gnulib module fdopendir for portability"); ++# endif + # endif + #endif + +diff --git a/lib/dirfd.c b/lib/dirfd.c +index 7da640f..640cb4f 100644 +--- a/lib/dirfd.c ++++ b/lib/dirfd.c +@@ -2,12 +2,12 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/dirname-lgpl.c b/lib/dirname-lgpl.c +index 9cc5db7..95f9c99 100644 +--- a/lib/dirname-lgpl.c ++++ b/lib/dirname-lgpl.c +@@ -3,12 +3,12 @@ + 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 +- it under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/dirname.h b/lib/dirname.h +index dce1859..25abc7b 100644 +--- a/lib/dirname.h ++++ b/lib/dirname.h +@@ -1,26 +1,26 @@ +-/* Take file names apart into directory and base names. ++/* Take file names apart into directory and base names. + +- Copyright (C) 1998, 2001, 2003-2006, 2009-2021 Free Software Foundation, +- Inc. ++ 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details. ++ This file 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 Lesser General Public License for more details. + +- You should have received a copy of the GNU Lesser General Public License +- along with this program. If not, see . */ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ + + #ifndef DIRNAME_H_ + # define DIRNAME_H_ 1 + + # include +-# include ++# include + # include "filename.h" + # include "basename-lgpl.h" + +@@ -33,11 +33,16 @@ extern "C" { + #endif + + # if GNULIB_DIRNAME +-char *base_name (char const *file) _GL_ATTRIBUTE_MALLOC; +-char *dir_name (char const *file); ++char *base_name (char const *file) ++ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE ++ _GL_ATTRIBUTE_RETURNS_NONNULL; ++char *dir_name (char const *file) ++ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE ++ _GL_ATTRIBUTE_RETURNS_NONNULL; + # endif + +-char *mdir_name (char const *file); ++char *mdir_name (char const *file) ++ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE; + size_t dir_len (char const *file) _GL_ATTRIBUTE_PURE; + + bool strip_trailing_slashes (char *file); +diff --git a/lib/dup2.c b/lib/dup2.c +index 653ef89..53e5552 100644 +--- a/lib/dup2.c ++++ b/lib/dup2.c +@@ -2,12 +2,12 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/duplocale.c b/lib/duplocale.c +index 430634d..bc8740d 100644 +--- a/lib/duplocale.c ++++ b/lib/duplocale.c +@@ -1,12 +1,12 @@ + /* Duplicate a locale object. + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser 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, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/dynarray.h b/lib/dynarray.h +index 5db6ed9..ec64273 100644 +--- a/lib/dynarray.h ++++ b/lib/dynarray.h +@@ -1,12 +1,12 @@ + /* Type-safe arrays which grow dynamically. + Copyright 2021 Free Software Foundation, Inc. + +- This program is free software: you can redistribute it and/or modify +- it under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +@@ -257,18 +257,22 @@ static DYNARRAY_ELEMENT * + + #if defined DYNARRAY_STRUCT || defined DYNARRAY_ELEMENT || defined DYNARRAY_PREFIX + +-# include ++# ifndef _GL_LIKELY ++/* Rely on __builtin_expect, as provided by the module 'builtin-expect'. */ ++# define _GL_LIKELY(cond) __builtin_expect ((cond), 1) ++# define _GL_UNLIKELY(cond) __builtin_expect ((cond), 0) ++# endif + + /* Define auxiliary structs and declare auxiliary functions, common to all + instantiations of dynarray. */ +-# include ++# include + + /* Define the instantiation, specified through + DYNARRAY_STRUCT + DYNARRAY_ELEMENT + DYNARRAY_PREFIX + etc. */ +-# include ++# include + + #else + +diff --git a/lib/errno.in.h b/lib/errno.in.h +index 0ae2ace..3cad9e2 100644 +--- a/lib/errno.in.h ++++ b/lib/errno.in.h +@@ -2,18 +2,18 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License +- along with this program; if not, see . */ ++ along with this program. If not, see . */ + + #ifndef _@GUARD_PREFIX@_ERRNO_H + +diff --git a/lib/fcntl.c b/lib/fcntl.c +index e6c4b8e..c744eb9 100644 +--- a/lib/fcntl.c ++++ b/lib/fcntl.c +@@ -2,12 +2,12 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/fcntl.in.h b/lib/fcntl.in.h +index 7254a56..26dedc3 100644 +--- a/lib/fcntl.in.h ++++ b/lib/fcntl.in.h +@@ -2,12 +2,12 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/fd-hook.c b/lib/fd-hook.c +index f8e2781..75b1626 100644 +--- a/lib/fd-hook.c ++++ b/lib/fd-hook.c +@@ -2,15 +2,15 @@ + Copyright (C) 2009-2021 Free Software Foundation, Inc. + Written by Bruno Haible , 2009. + +- This program is free software: you can redistribute it and/or modify it +- under the terms of the GNU Lesser General Public License as published +- by the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 +- Lesser General Public License for more details. ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ +diff --git a/lib/fd-hook.h b/lib/fd-hook.h +index 0005db7..98e2a52 100644 +--- a/lib/fd-hook.h ++++ b/lib/fd-hook.h +@@ -1,15 +1,15 @@ + /* Hook for making file descriptor functions close(), ioctl() extensible. + 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 Lesser General Public License as published +- by the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 +- Lesser General Public License for more details. ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ +diff --git a/lib/float+.h b/lib/float+.h +index d814bf1..ad891f6 100644 +--- a/lib/float+.h ++++ b/lib/float+.h +@@ -2,18 +2,18 @@ + Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc. + Written by Bruno Haible , 2007. + +- This program is free software; you can redistribute it and/or modify +- it under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License +- along with this program; if not, see . */ ++ along with this program. If not, see . */ + + #ifndef _FLOATPLUS_H + #define _FLOATPLUS_H +diff --git a/lib/float.c b/lib/float.c +index 5c16d61..dd1e84a 100644 +--- a/lib/float.c ++++ b/lib/float.c +@@ -2,12 +2,12 @@ + Copyright (C) 2011-2021 Free Software Foundation, Inc. + Written by Bruno Haible , 2011. + +- This program is free software: you can redistribute it and/or modify +- it under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/float.in.h b/lib/float.in.h +index 1179df5..f52aba3 100644 +--- a/lib/float.in.h ++++ b/lib/float.in.h +@@ -2,12 +2,12 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/floor.c b/lib/floor.c +index 9f13d16..1530300 100644 +--- a/lib/floor.c ++++ b/lib/floor.c +@@ -1,12 +1,12 @@ + /* Round towards negative infinity. + Copyright (C) 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser 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, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/free.c b/lib/free.c +index b221241..780f03d 100644 +--- a/lib/free.c ++++ b/lib/free.c +@@ -2,12 +2,12 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/frexp.c b/lib/frexp.c +index 55340b8..ab5f343 100644 +--- a/lib/frexp.c ++++ b/lib/frexp.c +@@ -1,12 +1,12 @@ + /* Split a double into fraction and mantissa. + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/fstat.c b/lib/fstat.c +index 30440d6..512c688 100644 +--- a/lib/fstat.c ++++ b/lib/fstat.c +@@ -1,12 +1,12 @@ + /* fstat() replacement. + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/fsync.c b/lib/fsync.c +index 71fcdde..99a932d 100644 +--- a/lib/fsync.c ++++ b/lib/fsync.c +@@ -9,15 +9,15 @@ + + Copyright (C) 2008-2021 Free Software Foundation, Inc. + +- This library is free software; you can redistribute it and/or +- modify it under the terms of the GNU Lesser General Public +- License as published by the Free Software Foundation; either +- version 2.1 of the License, or (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This library is distributed in the hope that it will be useful, ++ This file 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 +- Lesser General Public License for more details. ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ +diff --git a/lib/full-read.c b/lib/full-read.c +index 32ff1a5..53be659 100644 +--- a/lib/full-read.c ++++ b/lib/full-read.c +@@ -1,12 +1,12 @@ + /* An interface to read that retries after partial reads and interrupts. + Copyright (C) 2002-2003, 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/full-read.h b/lib/full-read.h +index 450d645..b36f2e1 100644 +--- a/lib/full-read.h ++++ b/lib/full-read.h +@@ -2,12 +2,12 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/full-write.c b/lib/full-write.c +index acbfc31..614ca0b 100644 +--- a/lib/full-write.c ++++ b/lib/full-write.c +@@ -2,12 +2,12 @@ + + Copyright (C) 1993-1994, 1997-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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/full-write.h b/lib/full-write.h +index 1220d05..c316224 100644 +--- a/lib/full-write.h ++++ b/lib/full-write.h +@@ -2,12 +2,12 @@ + + Copyright (C) 2002-2003, 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/gai_strerror.c b/lib/gai_strerror.c +index 907e8e6..4874ef5 100644 +--- a/lib/gai_strerror.c ++++ b/lib/gai_strerror.c +@@ -3,18 +3,18 @@ + This file is part of the GNU C Library. + Contributed by Philip Blundell , 1997. + +- This program is free software; you can redistribute it and/or modify +- it under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License +- along with this program; if not, see . */ ++ along with this program. If not, see . */ + + #ifndef _LIBC + # include +diff --git a/lib/getaddrinfo.c b/lib/getaddrinfo.c +index 05fc59e..0c42d1b 100644 +--- a/lib/getaddrinfo.c ++++ b/lib/getaddrinfo.c +@@ -2,18 +2,18 @@ + Copyright (C) 1997, 2001-2002, 2004-2021 Free Software Foundation, Inc. + Contributed by Simon Josefsson . + +- This program is free software; you can redistribute it and/or modify +- it under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License +- along with this program; if not, see . */ ++ along with this program. If not, see . */ + + /* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc + optimizes away the sa == NULL test below. */ +diff --git a/lib/getdtablesize.c b/lib/getdtablesize.c +index 918db9d..5006c2d 100644 +--- a/lib/getdtablesize.c ++++ b/lib/getdtablesize.c +@@ -2,12 +2,12 @@ + Copyright (C) 2008-2021 Free Software Foundation, Inc. + Written by Bruno Haible , 2008. + +- This program is free software: you can redistribute it and/or modify +- it under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/getlogin.c b/lib/getlogin.c +index 4a70994..7b78c67 100644 +--- a/lib/getlogin.c ++++ b/lib/getlogin.c +@@ -2,12 +2,12 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/getpeername.c b/lib/getpeername.c +index 5d9cf79..468bb3d 100644 +--- a/lib/getpeername.c ++++ b/lib/getpeername.c +@@ -2,12 +2,12 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/getrandom.c b/lib/getrandom.c +index b467caa..a186c4d 100644 +--- a/lib/getrandom.c ++++ b/lib/getrandom.c +@@ -2,12 +2,12 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +@@ -178,7 +178,11 @@ getrandom (void *buffer, size_t length, unsigned int flags) + + (flags & GRND_NONBLOCK ? O_NONBLOCK : 0)); + fd = open (randdevice[devrandom], oflags); + if (fd < 0) +- return fd; ++ { ++ if (errno == ENOENT || errno == ENOTDIR) ++ errno = ENOSYS; ++ return -1; ++ } + randfd[devrandom] = fd; + } + +diff --git a/lib/getsockname.c b/lib/getsockname.c +index 83c1b7d..d1f17b3 100644 +--- a/lib/getsockname.c ++++ b/lib/getsockname.c +@@ -2,12 +2,12 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/getsockopt.c b/lib/getsockopt.c +index cec4933..b92d034 100644 +--- a/lib/getsockopt.c ++++ b/lib/getsockopt.c +@@ -2,12 +2,12 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/gettext.h b/lib/gettext.h +index dd05cda..f1c7a24 100644 +--- a/lib/gettext.h ++++ b/lib/gettext.h +@@ -2,18 +2,18 @@ + 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 +- it under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + +- You should have received a copy of the GNU Lesser General Public License along +- with this program; if not, see . */ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ + + #ifndef _LIBGETTEXT_H + #define _LIBGETTEXT_H 1 +diff --git a/lib/hard-locale.c b/lib/hard-locale.c +index ab3610d..8b6802d 100644 +--- a/lib/hard-locale.c ++++ b/lib/hard-locale.c +@@ -3,12 +3,12 @@ + 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 +- it under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/hard-locale.h b/lib/hard-locale.h +index c4449f9..eba6601 100644 +--- a/lib/hard-locale.h ++++ b/lib/hard-locale.h +@@ -2,12 +2,12 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/iconv.c b/lib/iconv.c +index f3480aa..bf51493 100644 +--- a/lib/iconv.c ++++ b/lib/iconv.c +@@ -1,18 +1,18 @@ + /* Character set conversion. + Copyright (C) 1999-2001, 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + +- You should have received a copy of the GNU Lesser General Public License along +- with this program; if not, see . */ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ + + #include + +diff --git a/lib/iconv.in.h b/lib/iconv.in.h +index 0fc0fa7..3a2f94e 100644 +--- a/lib/iconv.in.h ++++ b/lib/iconv.in.h +@@ -2,18 +2,18 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License +- along with this program; if not, see . */ ++ along with this program. If not, see . */ + + #ifndef _@GUARD_PREFIX@_ICONV_H + +diff --git a/lib/iconv_close.c b/lib/iconv_close.c +index bc40fec..7429b92 100644 +--- a/lib/iconv_close.c ++++ b/lib/iconv_close.c +@@ -1,18 +1,18 @@ + /* Character set conversion. + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + +- You should have received a copy of the GNU Lesser General Public License along +- with this program; if not, see . */ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ + + #include + +diff --git a/lib/iconv_open-aix.gperf b/lib/iconv_open-aix.gperf +index 20ce70a..d073759 100644 +--- a/lib/iconv_open-aix.gperf ++++ b/lib/iconv_open-aix.gperf +@@ -1,18 +1,18 @@ + /* Character set conversion. + Copyright (C) 2007, 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + +- You should have received a copy of the GNU Lesser General Public License along +- with this program; if not, see . */ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ + + struct mapping { int standard_name; const char vendor_name[10 + 1]; }; + %struct-type +diff --git a/lib/iconv_open-hpux.gperf b/lib/iconv_open-hpux.gperf +index 921c722..f4664d6 100644 +--- a/lib/iconv_open-hpux.gperf ++++ b/lib/iconv_open-hpux.gperf +@@ -1,18 +1,18 @@ + /* Character set conversion. + Copyright (C) 2007, 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + +- You should have received a copy of the GNU Lesser General Public License along +- with this program; if not, see . */ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ + + struct mapping { int standard_name; const char vendor_name[9 + 1]; }; + %struct-type +diff --git a/lib/iconv_open-irix.gperf b/lib/iconv_open-irix.gperf +index 6241de6..9885d92 100644 +--- a/lib/iconv_open-irix.gperf ++++ b/lib/iconv_open-irix.gperf +@@ -1,18 +1,18 @@ + /* Character set conversion. + Copyright (C) 2007, 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + +- You should have received a copy of the GNU Lesser General Public License along +- with this program; if not, see . */ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ + + struct mapping { int standard_name; const char vendor_name[10 + 1]; }; + %struct-type +diff --git a/lib/iconv_open-osf.gperf b/lib/iconv_open-osf.gperf +index 97d570c..d818d79 100644 +--- a/lib/iconv_open-osf.gperf ++++ b/lib/iconv_open-osf.gperf +@@ -1,18 +1,18 @@ + /* Character set conversion. + Copyright (C) 2007, 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + +- You should have received a copy of the GNU Lesser General Public License along +- with this program; if not, see . */ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ + + struct mapping { int standard_name; const char vendor_name[10 + 1]; }; + %struct-type +diff --git a/lib/iconv_open-solaris.gperf b/lib/iconv_open-solaris.gperf +index 0283aba..648dd3a 100644 +--- a/lib/iconv_open-solaris.gperf ++++ b/lib/iconv_open-solaris.gperf +@@ -1,18 +1,18 @@ + /* Character set conversion. + Copyright (C) 2007, 2009, 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + +- You should have received a copy of the GNU Lesser General Public License along +- with this program; if not, see . */ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ + + struct mapping { int standard_name; const char vendor_name[10 + 1]; }; + %struct-type +diff --git a/lib/iconv_open-zos.gperf b/lib/iconv_open-zos.gperf +index faf5d65..1c3552e 100644 +--- a/lib/iconv_open-zos.gperf ++++ b/lib/iconv_open-zos.gperf +@@ -1,18 +1,18 @@ + /* Character set conversion. + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + +- You should have received a copy of the GNU Lesser General Public License along +- with this program; if not, see . */ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ + + struct mapping { int standard_name; const char vendor_name[10 + 1]; }; + %struct-type +diff --git a/lib/iconv_open.c b/lib/iconv_open.c +index 304592e..e573556 100644 +--- a/lib/iconv_open.c ++++ b/lib/iconv_open.c +@@ -1,18 +1,18 @@ + /* Character set conversion. + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + +- You should have received a copy of the GNU Lesser General Public License along +- with this program; if not, see . */ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ + + #include + +diff --git a/lib/iconveh.h b/lib/iconveh.h +index b2be8fa..cbf692e 100644 +--- a/lib/iconveh.h ++++ b/lib/iconveh.h +@@ -2,12 +2,12 @@ + Copyright (C) 2001-2007, 2009-2021 Free Software Foundation, Inc. + Written by Bruno Haible. + +- This program is free software: you can redistribute it and/or modify +- it under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/inet_ntop.c b/lib/inet_ntop.c +index 5b9ea11..409e88c 100644 +--- a/lib/inet_ntop.c ++++ b/lib/inet_ntop.c +@@ -2,18 +2,18 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License +- along with this program; if not, see . */ ++ along with this program. If not, see . */ + + /* + * Copyright (c) 1996-1999 by Internet Software Consortium. +diff --git a/lib/inet_pton.c b/lib/inet_pton.c +index 57dc7dc..14e8b0a 100644 +--- a/lib/inet_pton.c ++++ b/lib/inet_pton.c +@@ -2,12 +2,12 @@ + + Copyright (C) 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/inttypes.in.h b/lib/inttypes.in.h +index fe0af82..41cb422 100644 +--- a/lib/inttypes.in.h ++++ b/lib/inttypes.in.h +@@ -2,12 +2,12 @@ + Written by Paul Eggert, Bruno Haible, Derek Price. + This file is part of gnulib. + +- This program is free software: you can redistribute it and/or modify +- it under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/isfinite.c b/lib/isfinite.c +index cfd2d33..f1373b9 100644 +--- a/lib/isfinite.c ++++ b/lib/isfinite.c +@@ -1,18 +1,18 @@ + /* Test for finite value (zero, subnormal, or normal, and not infinite or NaN). + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser 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, ++ This file 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 Lesser General Public License for more details. + +- You should have received a copy of the GNU Lesser General Public License along +- with this program; if not, see . */ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ + + /* Written by Ben Pfaff , 2007. */ + +diff --git a/lib/isinf.c b/lib/isinf.c +index 6d4dfc0..62becf2 100644 +--- a/lib/isinf.c ++++ b/lib/isinf.c +@@ -1,18 +1,18 @@ + /* Test for positive or negative infinity. + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser 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, ++ This file 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 Lesser General Public License for more details. + +- You should have received a copy of the GNU Lesser General Public License along +- with this program; if not, see . */ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ + + /* Written by Ben Pfaff , 2008. */ + +diff --git a/lib/isnan.c b/lib/isnan.c +index 2282269..ed3452f 100644 +--- a/lib/isnan.c ++++ b/lib/isnan.c +@@ -1,12 +1,12 @@ + /* Test for NaN that does not need libm. + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/isnand-nolibm.h b/lib/isnand-nolibm.h +index fbed474..df64f4e 100644 +--- a/lib/isnand-nolibm.h ++++ b/lib/isnand-nolibm.h +@@ -1,12 +1,12 @@ + /* Test for NaN that does not need libm. + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/isnand.c b/lib/isnand.c +index f359130..7c5df90 100644 +--- a/lib/isnand.c ++++ b/lib/isnand.c +@@ -1,12 +1,12 @@ + /* Test for NaN that does not need libm. + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/isnanf-nolibm.h b/lib/isnanf-nolibm.h +index ba609d5..bd85811 100644 +--- a/lib/isnanf-nolibm.h ++++ b/lib/isnanf-nolibm.h +@@ -1,12 +1,12 @@ + /* Test for NaN that does not need libm. + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/isnanf.c b/lib/isnanf.c +index 94a32e5..3b60340 100644 +--- a/lib/isnanf.c ++++ b/lib/isnanf.c +@@ -1,12 +1,12 @@ + /* Test for NaN that does not need libm. + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/isnanl-nolibm.h b/lib/isnanl-nolibm.h +index 797c06b..41fe156 100644 +--- a/lib/isnanl-nolibm.h ++++ b/lib/isnanl-nolibm.h +@@ -1,12 +1,12 @@ + /* Test for NaN that does not need libm. + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/isnanl.c b/lib/isnanl.c +index b459560..e8dedf0 100644 +--- a/lib/isnanl.c ++++ b/lib/isnanl.c +@@ -1,12 +1,12 @@ + /* Test for NaN that does not need libm. + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/itold.c b/lib/itold.c +index f52216a..7984866 100644 +--- a/lib/itold.c ++++ b/lib/itold.c +@@ -2,12 +2,12 @@ + Copyright (C) 2011-2021 Free Software Foundation, Inc. + Written by Bruno Haible , 2011. + +- This program is free software: you can redistribute it and/or modify +- it under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/langinfo.in.h b/lib/langinfo.in.h +index e8ac12c..4873899 100644 +--- a/lib/langinfo.in.h ++++ b/lib/langinfo.in.h +@@ -1,18 +1,18 @@ + /* Substitute for and wrapper around . + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License +- along with this program; if not, see . */ ++ along with this program. If not, see . */ + + /* + * POSIX for platforms that lack it or have an incomplete one. +diff --git a/lib/lc-charset-dispatch.c b/lib/lc-charset-dispatch.c +index 98c6e9d..88a0bd3 100644 +--- a/lib/lc-charset-dispatch.c ++++ b/lib/lc-charset-dispatch.c +@@ -1,12 +1,12 @@ + /* Dispatching based on the current locale's character encoding. + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/lc-charset-dispatch.h b/lib/lc-charset-dispatch.h +index d9d1ac1..59b485d 100644 +--- a/lib/lc-charset-dispatch.h ++++ b/lib/lc-charset-dispatch.h +@@ -1,12 +1,12 @@ + /* Dispatching based on the current locale's character encoding. + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/libc-config.h b/lib/libc-config.h +index f14013f..886c11f 100644 +--- a/lib/libc-config.h ++++ b/lib/libc-config.h +@@ -28,7 +28,10 @@ + + When compiled as part of glibc this is a no-op; when compiled as + part of Gnulib this includes Gnulib's and defines macros +- that glibc library code would normally assume. */ ++ that glibc library code would normally assume. ++ ++ Note: This header file MUST NOT be included by public header files ++ of Gnulib. */ + + #include + +@@ -71,7 +74,7 @@ + # endif + #endif + +-#ifndef __attribute_maybe_unused__ ++#ifndef __attribute_nonnull__ + /* either does not exist, or is too old for Gnulib. + Prepare to include , which is Gnulib's version of a + more-recent glibc . */ +@@ -80,13 +83,9 @@ + # ifndef _FEATURES_H + # define _FEATURES_H 1 + # endif +-/* Define __WORDSIZE so that 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 ++/* Define __GNULIB_CDEFS so that does not attempt to include ++ nonexistent files. */ ++# define __GNULIB_CDEFS + /* Undef the macros unconditionally defined by our copy of glibc + , so that they do not clash with any system-defined + versions. */ +@@ -118,6 +117,9 @@ + # undef __THROW + # undef __THROWNL + # undef __attr_access ++# undef __attr_access_none ++# undef __attr_dealloc ++# undef __attr_dealloc_free + # undef __attribute__ + # undef __attribute_alloc_size__ + # undef __attribute_artificial__ +diff --git a/lib/libunistring.valgrind b/lib/libunistring.valgrind +index 712c39a..9eee19a 100644 +--- a/lib/libunistring.valgrind ++++ b/lib/libunistring.valgrind +@@ -2,18 +2,26 @@ + + # 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 Lesser General Public License as published +-# by the Free Software Foundation; either version 2 of the License, or +-# (at your option) any later version. ++# This file is free software. ++# It is dual-licensed under "the GNU LGPLv3+ or the GNU GPLv2+". ++# You can redistribute it and/or modify it under either ++# - the terms of the GNU Lesser General Public License as published ++# by the Free Software Foundation; either version 3, or (at your ++# option) any later version, or ++# - the terms of the GNU General Public License as published by the ++# Free Software Foundation; either version 2, or (at your option) ++# any later version, or ++# - the same dual license "the GNU LGPLv3+ or the GNU GPLv2+". + # + # 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 +-# Lesser General Public License for more details. ++# Lesser General Public License and the GNU General Public License ++# for more details. + # +-# You should have received a copy of the GNU Lesser General Public License +-# along with this program. If not, see . ++# You should have received a copy of the GNU Lesser General Public ++# License and of the GNU General Public License along with this ++# program. If not, see . + + # Suppress a valgrind message about use of uninitialized memory in freea(). + # This use is OK because it provides only a speedup. +diff --git a/lib/limits.in.h b/lib/limits.in.h +index 4675ba4..2ecafeb 100644 +--- a/lib/limits.in.h ++++ b/lib/limits.in.h +@@ -2,18 +2,18 @@ + + 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 Lesser General Public License +- as published by the Free Software Foundation; either version 2, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License +- along with this program; if not, see . */ ++ along with this program. If not, see . */ + + #if __GNUC__ >= 3 + @PRAGMA_SYSTEM_HEADER@ +@@ -99,10 +99,11 @@ + # endif + #endif + +-/* Macros specified by ISO/IEC TS 18661-1:2014. */ ++/* Macros specified by C2x and by ISO/IEC TS 18661-1:2014. */ + + #if (! defined ULLONG_WIDTH \ +- && (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__)) ++ && (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__ \ ++ || (defined __STDC_VERSION__ && 201710 < __STDC_VERSION__))) + # define CHAR_WIDTH _GL_INTEGER_WIDTH (CHAR_MIN, CHAR_MAX) + # define SCHAR_WIDTH _GL_INTEGER_WIDTH (SCHAR_MIN, SCHAR_MAX) + # define UCHAR_WIDTH _GL_INTEGER_WIDTH (0, UCHAR_MAX) +@@ -114,7 +115,16 @@ + # define ULONG_WIDTH _GL_INTEGER_WIDTH (0, ULONG_MAX) + # define LLONG_WIDTH _GL_INTEGER_WIDTH (LLONG_MIN, LLONG_MAX) + # define ULLONG_WIDTH _GL_INTEGER_WIDTH (0, ULLONG_MAX) +-#endif /* !ULLONG_WIDTH && (_GNU_SOURCE || __STDC_WANT_IEC_60559_BFP_EXT__) */ ++#endif ++ ++/* Macros specified by C2x. */ ++ ++#if (! defined BOOL_WIDTH \ ++ && (defined _GNU_SOURCE \ ++ || (defined __STDC_VERSION__ && 201710 < __STDC_VERSION__))) ++# define BOOL_MAX 1 ++# define BOOL_WIDTH 1 ++#endif + + #endif /* _@GUARD_PREFIX@_LIMITS_H */ + #endif /* _@GUARD_PREFIX@_LIMITS_H */ +diff --git a/lib/link.c b/lib/link.c +index 3ba897a..bd4bef9 100644 +--- a/lib/link.c ++++ b/lib/link.c +@@ -2,18 +2,18 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License +- along with this program; if not, see . */ ++ along with this program. If not, see . */ + + #include + +diff --git a/lib/listen.c b/lib/listen.c +index ccf881c..a145f82 100644 +--- a/lib/listen.c ++++ b/lib/listen.c +@@ -2,12 +2,12 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/localcharset.c b/lib/localcharset.c +index 87a5979..9c22050 100644 +--- a/lib/localcharset.c ++++ b/lib/localcharset.c +@@ -2,18 +2,18 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + +- You should have received a copy of the GNU Lesser General Public License along +- with this program; if not, see . */ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ + + /* Written by Bruno Haible . */ + +diff --git a/lib/localcharset.h b/lib/localcharset.h +index c2c1c67..27c3ab6 100644 +--- a/lib/localcharset.h ++++ b/lib/localcharset.h +@@ -2,18 +2,18 @@ + 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 +- it under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + +- You should have received a copy of the GNU Lesser General Public License along +- with this program; if not, see . */ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ + + #ifndef _LOCALCHARSET_H + #define _LOCALCHARSET_H +diff --git a/lib/locale.in.h b/lib/locale.in.h +index 4eb3c80..1063070 100644 +--- a/lib/locale.in.h ++++ b/lib/locale.in.h +@@ -1,12 +1,12 @@ + /* A POSIX . + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/localeconv.c b/lib/localeconv.c +index cdcaf86..25e95a1 100644 +--- a/lib/localeconv.c ++++ b/lib/localeconv.c +@@ -1,12 +1,12 @@ + /* Query locale dependent information for formatting numbers. + Copyright (C) 2012-2021 Free Software Foundation, Inc. + +- This program is free software: you can redistribute it and/or modify +- it under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/log.c b/lib/log.c +index 03e9ac9..3f142e8 100644 +--- a/lib/log.c ++++ b/lib/log.c +@@ -1,12 +1,12 @@ + /* Logarithm. + Copyright (C) 2012-2021 Free Software Foundation, Inc. + +- This program is free software: you can redistribute it and/or modify +- it under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser 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, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/log1p.c b/lib/log1p.c +index 0e51498..c45c6ff 100644 +--- a/lib/log1p.c ++++ b/lib/log1p.c +@@ -1,12 +1,12 @@ + /* Natural logarithm of 1 plus argument. + Copyright (C) 2012-2021 Free Software Foundation, Inc. + +- This program is free software: you can redistribute it and/or modify +- it under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser 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, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/lstat.c b/lib/lstat.c +index d414d3a..7de0bf1 100644 +--- a/lib/lstat.c ++++ b/lib/lstat.c +@@ -2,12 +2,12 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/malloc.c b/lib/malloc.c +index 6bbb97d..0d8b359 100644 +--- a/lib/malloc.c ++++ b/lib/malloc.c +@@ -2,61 +2,50 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License +- along with this program; if not, see . */ ++ along with this program. If not, see . */ + + /* written by Jim Meyering and Bruno Haible */ + + #define _GL_USE_STDLIB_ALLOC 1 + #include +-/* Only the AC_FUNC_MALLOC macro defines 'malloc' already in config.h. */ +-#ifdef malloc +-# define NEED_MALLOC_GNU 1 +-# undef malloc +-/* Whereas the gnulib module 'malloc-gnu' defines HAVE_MALLOC_GNU. */ +-#elif GNULIB_MALLOC_GNU && !HAVE_MALLOC_GNU +-# define NEED_MALLOC_GNU 1 +-#endif + + #include + +-/* A function definition is only needed if NEED_MALLOC_GNU is defined above +- or if the module 'malloc-posix' requests it. */ +-#if NEED_MALLOC_GNU || (GNULIB_MALLOC_POSIX && !HAVE_MALLOC_POSIX) ++#include + +-# include ++#include "xalloc-oversized.h" + +-/* Allocate an N-byte block of memory from the heap. +- If N is zero, allocate a 1-byte block. */ ++/* Allocate an N-byte block of memory from the heap, even if N is 0. */ + + void * + rpl_malloc (size_t n) + { +- void *result; +- +-# if NEED_MALLOC_GNU + if (n == 0) + n = 1; +-# endif + +- result = malloc (n); ++ if (xalloc_oversized (n, 1)) ++ { ++ errno = ENOMEM; ++ return NULL; ++ } ++ ++ void *result = malloc (n); + +-# if !HAVE_MALLOC_POSIX ++#if !HAVE_MALLOC_POSIX + if (result == NULL) + errno = ENOMEM; +-# endif ++#endif + + return result; + } +- +-#endif +diff --git a/lib/malloc/dynarray_at_failure.c b/lib/malloc/dynarray_at_failure.c +index 4f840db..8dd6850 100644 +--- a/lib/malloc/dynarray_at_failure.c ++++ b/lib/malloc/dynarray_at_failure.c +@@ -18,11 +18,11 @@ + + #ifndef _LIBC + # include ++# include + #endif + + #include + #include +-#include + + void + __libc_dynarray_at_failure (size_t size, size_t index) +@@ -32,6 +32,7 @@ __libc_dynarray_at_failure (size_t size, size_t index) + __snprintf (buf, sizeof (buf), "Fatal glibc error: " + "array index %zu not less than array length %zu\n", + index, size); ++ __libc_fatal (buf); + #else + abort (); + #endif +diff --git a/lib/malloca.c b/lib/malloca.c +index a546b30..b488423 100644 +--- a/lib/malloca.c ++++ b/lib/malloca.c +@@ -2,18 +2,18 @@ + Copyright (C) 2003, 2006-2007, 2009-2021 Free Software Foundation, Inc. + Written by Bruno Haible , 2003, 2018. + +- This program is free software; you can redistribute it and/or modify +- it under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License +- along with this program; if not, see . */ ++ along with this program. If not, see . */ + + #define _GL_USE_STDLIB_ALLOC 1 + #include +@@ -21,6 +21,8 @@ + /* Specification. */ + #include "malloca.h" + ++#include "idx.h" ++#include "intprops.h" + #include "verify.h" + + /* The speed critical point in this file is freea() applied to an alloca() +@@ -45,24 +47,30 @@ mmalloca (size_t n) + #if HAVE_ALLOCA + /* Allocate one more word, used to determine the address to pass to freea(), + and room for the alignment ≡ sa_alignment_max mod 2*sa_alignment_max. */ +- size_t nplus = n + sizeof (small_t) + 2 * sa_alignment_max - 1; +- +- if (nplus >= n) ++ uintptr_t alignment2_mask = 2 * sa_alignment_max - 1; ++ int plus = sizeof (small_t) + alignment2_mask; ++ idx_t nplus; ++ if (!INT_ADD_WRAPV (n, plus, &nplus) && !xalloc_oversized (nplus, 1)) + { + char *mem = (char *) malloc (nplus); + + if (mem != NULL) + { +- char *p = +- (char *)((((uintptr_t)mem + sizeof (small_t) + sa_alignment_max - 1) +- & ~(uintptr_t)(2 * sa_alignment_max - 1)) +- + sa_alignment_max); ++ uintptr_t umem = (uintptr_t)mem, umemplus; ++ /* The INT_ADD_WRAPV avoids signed integer overflow on ++ theoretical platforms where UINTPTR_MAX <= INT_MAX. */ ++ INT_ADD_WRAPV (umem, sizeof (small_t) + sa_alignment_max - 1, ++ &umemplus); ++ idx_t offset = ((umemplus & ~alignment2_mask) ++ + sa_alignment_max - umem); ++ void *vp = mem + offset; ++ small_t *p = vp; + /* Here p >= mem + sizeof (small_t), + and p <= mem + sizeof (small_t) + 2 * sa_alignment_max - 1 + hence p + n <= mem + nplus. + So, the memory range [p, p+n) lies in the allocated memory range + [mem, mem + nplus). */ +- ((small_t *) p)[-1] = p - mem; ++ p[-1] = offset; + /* p ≡ sa_alignment_max mod 2*sa_alignment_max. */ + return p; + } +diff --git a/lib/malloca.h b/lib/malloca.h +index 9cf7fbb..7eb63d2 100644 +--- a/lib/malloca.h ++++ b/lib/malloca.h +@@ -2,18 +2,18 @@ + Copyright (C) 2003-2007, 2009-2021 Free Software Foundation, Inc. + Written by Bruno Haible , 2003. + +- This program is free software; you can redistribute it and/or modify +- it under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License +- along with this program; if not, see . */ ++ along with this program. If not, see . */ + + #ifndef _MALLOCA_H + #define _MALLOCA_H +@@ -51,6 +51,13 @@ extern "C" { + # define safe_alloca(N) ((void) (N), NULL) + #endif + ++/* Free a block of memory allocated through malloca(). */ ++#if HAVE_ALLOCA ++extern void freea (void *p); ++#else ++# define freea free ++#endif ++ + /* malloca(N) is a safe variant of alloca(N). It allocates N bytes of + memory allocated on the stack, that must be freed using freea() before + the function returns. Upon failure, it returns NULL. */ +@@ -65,21 +72,16 @@ extern "C" { + # define malloca(N) \ + mmalloca (N) + #endif +-extern void * mmalloca (size_t n); +- +-/* Free a block of memory allocated through malloca(). */ +-#if HAVE_ALLOCA +-extern void freea (void *p); +-#else +-# define freea free +-#endif ++extern void *mmalloca (size_t n) ++ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC (freea, 1) ++ _GL_ATTRIBUTE_ALLOC_SIZE ((1)); + + /* nmalloca(N,S) is an overflow-safe variant of malloca (N * S). + It allocates an array of N objects, each with S bytes of memory, +- on the stack. S must be positive and N must be nonnegative. +- Either N or S should be of type ptrdiff_t or size_t or wider. ++ on the stack. N and S should be nonnegative and free of side effects. + The array must be freed using freea() before the function returns. */ +-#define nmalloca(n, s) (xalloc_oversized (n, s) ? NULL : malloca ((n) * (s))) ++#define nmalloca(n, s) \ ++ (xalloc_oversized (n, s) ? NULL : malloca ((n) * (size_t) (s))) + + + #ifdef __cplusplus +diff --git a/lib/math.c b/lib/math.c +index ba2a6ab..3ffd1d7 100644 +--- a/lib/math.c ++++ b/lib/math.c +@@ -1,4 +1,22 @@ ++/* Inline functions for . ++ ++ Copyright (C) 2012-2021 Free Software Foundation, Inc. ++ ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. ++ ++ This file 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 Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ ++ + #include ++ + #define _GL_MATH_INLINE _GL_EXTERN_INLINE + #include "math.h" + typedef int dummy; +diff --git a/lib/math.in.h b/lib/math.in.h +index d80047c..6a055fb 100644 +--- a/lib/math.in.h ++++ b/lib/math.in.h +@@ -2,12 +2,12 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/mbrtowc-impl-utf8.h b/lib/mbrtowc-impl-utf8.h +index ea5ef1f..330fb10 100644 +--- a/lib/mbrtowc-impl-utf8.h ++++ b/lib/mbrtowc-impl-utf8.h +@@ -1,12 +1,12 @@ + /* Convert multibyte character to wide character. + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/mbrtowc-impl.h b/lib/mbrtowc-impl.h +index f7e28fc..bc3e688 100644 +--- a/lib/mbrtowc-impl.h ++++ b/lib/mbrtowc-impl.h +@@ -1,12 +1,12 @@ + /* Convert multibyte character to wide character. + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/mbrtowc.c b/lib/mbrtowc.c +index 0db5104..8832f6e 100644 +--- a/lib/mbrtowc.c ++++ b/lib/mbrtowc.c +@@ -2,12 +2,12 @@ + Copyright (C) 1999-2002, 2005-2021 Free Software Foundation, Inc. + Written by Bruno Haible , 2008. + +- This program is free software: you can redistribute it and/or modify +- it under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/mbsinit.c b/lib/mbsinit.c +index 7ca8df7..f440155 100644 +--- a/lib/mbsinit.c ++++ b/lib/mbsinit.c +@@ -2,12 +2,12 @@ + Copyright (C) 2008-2021 Free Software Foundation, Inc. + Written by Bruno Haible , 2008. + +- This program is free software: you can redistribute it and/or modify +- it under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/mbtowc-impl.h b/lib/mbtowc-impl.h +index 01342af..30d715d 100644 +--- a/lib/mbtowc-impl.h ++++ b/lib/mbtowc-impl.h +@@ -2,12 +2,12 @@ + Copyright (C) 2011-2021 Free Software Foundation, Inc. + Written by Bruno Haible , 2011. + +- This program is free software: you can redistribute it and/or modify +- it under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/mbtowc-lock.c b/lib/mbtowc-lock.c +index ce74793..0f7ae6c 100644 +--- a/lib/mbtowc-lock.c ++++ b/lib/mbtowc-lock.c +@@ -1,12 +1,12 @@ + /* Return the internal lock used by mbrtowc and mbrtoc32. + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/mbtowc-lock.h b/lib/mbtowc-lock.h +index 0939517..d31b0b6 100644 +--- a/lib/mbtowc-lock.h ++++ b/lib/mbtowc-lock.h +@@ -1,12 +1,12 @@ + /* Use the internal lock used by mbrtowc and mbrtoc32. + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/mbtowc.c b/lib/mbtowc.c +index 2711194..47b431a 100644 +--- a/lib/mbtowc.c ++++ b/lib/mbtowc.c +@@ -2,12 +2,12 @@ + Copyright (C) 2011-2021 Free Software Foundation, Inc. + Written by Bruno Haible , 2011. + +- This program is free software: you can redistribute it and/or modify +- it under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/memchr.c b/lib/memchr.c +index d8feb19..56fd59d 100644 +--- a/lib/memchr.c ++++ b/lib/memchr.c +@@ -7,21 +7,21 @@ + adaptation to memchr suggested by Dick Karpinski (dick@cca.ucsf.edu), + and implemented by Roland McGrath (roland@ai.mit.edu). + +-NOTE: The canonical source of this file is maintained with the GNU C Library. +-Bugs can be reported to bug-glibc@prep.ai.mit.edu. ++ NOTE: The canonical source of this file is maintained with the GNU C Library. ++ Bugs can be reported to bug-glibc@prep.ai.mit.edu. + +-This program is free software: you can redistribute it and/or modify it +-under the terms of the GNU Lesser General Public License as published by the +-Free Software Foundation; either version 3 of the License, or any +-later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details. ++ This file 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 Lesser General Public License for more details. + +-You should have received a copy of the GNU Lesser General Public License +-along with this program. If not, see . */ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ + + #ifndef _LIBC + # include +diff --git a/lib/memchr.valgrind b/lib/memchr.valgrind +index 034d1ee..4f16481 100644 +--- a/lib/memchr.valgrind ++++ b/lib/memchr.valgrind +@@ -2,12 +2,12 @@ + + # 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 Lesser General Public License as published by +-# the Free Software Foundation; either version 3 of the License, or +-# (at your option) any later version. ++# This file is free software: you can redistribute it and/or modify ++# it under the terms of the GNU Lesser General Public License as ++# published by the Free Software Foundation; either version 2.1 of the ++# License, or (at your option) any later version. + # +-# This program is distributed in the hope that it will be useful, ++# This file 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 Lesser General Public License for more details. +diff --git a/lib/mempcpy.c b/lib/mempcpy.c +index c80e119..cacacdb 100644 +--- a/lib/mempcpy.c ++++ b/lib/mempcpy.c +@@ -1,18 +1,18 @@ + /* Copy memory area and return pointer after last written byte. + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License +- along with this program; if not, see . */ ++ along with this program. If not, see . */ + + #include + +diff --git a/lib/minmax.h b/lib/minmax.h +index 7d0b672..a03361b 100644 +--- a/lib/minmax.h ++++ b/lib/minmax.h +@@ -2,18 +2,18 @@ + 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 +- it under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License +- along with this program; if not, see . */ ++ along with this program. If not, see . */ + + #ifndef _MINMAX_H + #define _MINMAX_H +diff --git a/lib/mkdir.c b/lib/mkdir.c +index 453e428..2766cc7 100644 +--- a/lib/mkdir.c ++++ b/lib/mkdir.c +@@ -3,12 +3,12 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/mkostemp.c b/lib/mkostemp.c +index cfab635..285f1ba 100644 +--- a/lib/mkostemp.c ++++ b/lib/mkostemp.c +@@ -2,12 +2,12 @@ + Foundation, Inc. + This file is derived from the one in the GNU C Library. + +- This program is free software: you can redistribute it and/or modify +- it under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/msvc-inval.c b/lib/msvc-inval.c +index de6ebee..a23dac9 100644 +--- a/lib/msvc-inval.c ++++ b/lib/msvc-inval.c +@@ -1,18 +1,18 @@ + /* Invalid parameter handler for MSVC runtime libraries. + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + +- You should have received a copy of the GNU Lesser General Public License along +- with this program; if not, see . */ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ + + #include + +diff --git a/lib/msvc-inval.h b/lib/msvc-inval.h +index 0d418e1..e115a35 100644 +--- a/lib/msvc-inval.h ++++ b/lib/msvc-inval.h +@@ -1,18 +1,18 @@ + /* Invalid parameter handler for MSVC runtime libraries. + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + +- You should have received a copy of the GNU Lesser General Public License along +- with this program; if not, see . */ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ + + #ifndef _MSVC_INVAL_H + #define _MSVC_INVAL_H +diff --git a/lib/msvc-nothrow.c b/lib/msvc-nothrow.c +index e72dabe..d3c1f54 100644 +--- a/lib/msvc-nothrow.c ++++ b/lib/msvc-nothrow.c +@@ -2,18 +2,18 @@ + with MSVC runtime libraries. + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + +- You should have received a copy of the GNU Lesser General Public License along +- with this program; if not, see . */ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ + + #include + +diff --git a/lib/msvc-nothrow.h b/lib/msvc-nothrow.h +index a56cd4e..057b5dd 100644 +--- a/lib/msvc-nothrow.h ++++ b/lib/msvc-nothrow.h +@@ -2,18 +2,18 @@ + with MSVC runtime libraries. + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + +- You should have received a copy of the GNU Lesser General Public License along +- with this program; if not, see . */ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ + + #ifndef _MSVC_NOTHROW_H + #define _MSVC_NOTHROW_H +diff --git a/lib/netdb.in.h b/lib/netdb.in.h +index 6bcaf1a..eb5c960 100644 +--- a/lib/netdb.in.h ++++ b/lib/netdb.in.h +@@ -2,18 +2,18 @@ + Copyright (C) 2008-2021 Free Software Foundation, Inc. + Written by Simon Josefsson. + +- This program is free software; you can redistribute it and/or modify +- it under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License +- along with this program; if not, see . */ ++ along with this program. If not, see . */ + + /* This file is supposed to be used on platforms that lack . + It is intended to provide definitions and prototypes needed by an +diff --git a/lib/netinet_in.in.h b/lib/netinet_in.in.h +index 3c1cad6..21f3a64 100644 +--- a/lib/netinet_in.in.h ++++ b/lib/netinet_in.in.h +@@ -1,18 +1,18 @@ + /* Substitute for . + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License +- along with this program; if not, see . */ ++ along with this program. If not, see . */ + + #ifndef _@GUARD_PREFIX@_NETINET_IN_H + +diff --git a/lib/nl_langinfo-lock.c b/lib/nl_langinfo-lock.c +index 915c38b..fcdf56d 100644 +--- a/lib/nl_langinfo-lock.c ++++ b/lib/nl_langinfo-lock.c +@@ -1,12 +1,12 @@ + /* Return the internal lock used by nl_langinfo. + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/nl_langinfo.c b/lib/nl_langinfo.c +index e8f3cef..b481f20 100644 +--- a/lib/nl_langinfo.c ++++ b/lib/nl_langinfo.c +@@ -2,12 +2,12 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/nproc.c b/lib/nproc.c +index fef1f8b..e3ddb92 100644 +--- a/lib/nproc.c ++++ b/lib/nproc.c +@@ -2,18 +2,18 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License +- along with this program; if not, see . */ ++ along with this program. If not, see . */ + + /* Written by Glen Lenker and Bruno Haible. */ + +diff --git a/lib/nproc.h b/lib/nproc.h +index cd3ed36..d7659a5 100644 +--- a/lib/nproc.h ++++ b/lib/nproc.h +@@ -2,18 +2,18 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License +- along with this program; if not, see . */ ++ along with this program. If not, see . */ + + /* Written by Glen Lenker and Bruno Haible. */ + +diff --git a/lib/nstrftime.c b/lib/nstrftime.c +index 7ef7529..7f258e8 100644 +--- a/lib/nstrftime.c ++++ b/lib/nstrftime.c +@@ -1,19 +1,18 @@ + /* 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 +- modify it under the terms of the GNU Lesser General Public +- License as published by the Free Software Foundation; either +- version 2.1 of the License, or (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser 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, ++ This file 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 +- Lesser General Public License for more details. ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU Lesser General Public License for more details. + +- You should have received a copy of the GNU Lesser General Public +- License along with the GNU C Library; if not, see +- . */ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ + + #ifdef _LIBC + # define USE_IN_EXTENDED_LOCALE_MODEL 1 +diff --git a/lib/open.c b/lib/open.c +index 5dc117e..372cda8 100644 +--- a/lib/open.c ++++ b/lib/open.c +@@ -1,12 +1,12 @@ + /* Open a descriptor to a file. + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/pathmax.h b/lib/pathmax.h +index 4af7802..716f4a9 100644 +--- a/lib/pathmax.h ++++ b/lib/pathmax.h +@@ -2,18 +2,18 @@ + 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 +- it under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License +- along with this program; if not, see . */ ++ along with this program. If not, see . */ + + #ifndef _PATHMAX_H + # define _PATHMAX_H +diff --git a/lib/pipe.c b/lib/pipe.c +index 3316ceb..fc978f2 100644 +--- a/lib/pipe.c ++++ b/lib/pipe.c +@@ -1,18 +1,18 @@ + /* 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + +- You should have received a copy of the GNU Lesser General Public License along +- with this program; if not, see . */ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ + + #include + +diff --git a/lib/pipe2.c b/lib/pipe2.c +index 25bce6f..9ba8c3b 100644 +--- a/lib/pipe2.c ++++ b/lib/pipe2.c +@@ -1,18 +1,18 @@ + /* Create a pipe, with specific opening flags. + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + +- You should have received a copy of the GNU Lesser General Public License along +- with this program; if not, see . */ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ + + #include + +diff --git a/lib/poll.c b/lib/poll.c +index d787676..8d5ba96 100644 +--- a/lib/poll.c ++++ b/lib/poll.c +@@ -5,18 +5,18 @@ + + This file is part of gnulib. + +- This program is free software; you can redistribute it and/or modify +- it under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + +- You should have received a copy of the GNU Lesser General Public License along +- with this program; if not, see . */ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ + + /* Tell gcc not to warn about the (nfd < 0) tests, below. */ + #if (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) || 4 < __GNUC__ +diff --git a/lib/poll.in.h b/lib/poll.in.h +index 1fe8370..e94cd31 100644 +--- a/lib/poll.in.h ++++ b/lib/poll.in.h +@@ -5,18 +5,18 @@ + + This file is part of gnulib. + +- This program is free software; you can redistribute it and/or modify +- it under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + +- You should have received a copy of the GNU Lesser General Public License along +- with this program; if not, see . */ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ + + #ifndef _@GUARD_PREFIX@_POLL_H + +diff --git a/lib/printf-args.c b/lib/printf-args.c +index 22e44ef..b822682 100644 +--- a/lib/printf-args.c ++++ b/lib/printf-args.c +@@ -2,18 +2,18 @@ + Copyright (C) 1999, 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + +- You should have received a copy of the GNU Lesser General Public License along +- with this program; if not, see . */ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ + + /* This file can be parametrized with the following macros: + ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. +diff --git a/lib/printf-args.h b/lib/printf-args.h +index d15b12d..c8d9174 100644 +--- a/lib/printf-args.h ++++ b/lib/printf-args.h +@@ -2,18 +2,18 @@ + Copyright (C) 1999, 2002-2003, 2006-2007, 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + +- You should have received a copy of the GNU Lesser General Public License along +- with this program; if not, see . */ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ + + #ifndef _PRINTF_ARGS_H + #define _PRINTF_ARGS_H +diff --git a/lib/printf-parse.c b/lib/printf-parse.c +index 9f97995..f21cc17 100644 +--- a/lib/printf-parse.c ++++ b/lib/printf-parse.c +@@ -1,18 +1,18 @@ + /* Formatted output to strings. + Copyright (C) 1999-2000, 2002-2003, 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + +- You should have received a copy of the GNU Lesser General Public License along +- with this program; if not, see . */ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ + + /* This file can be parametrized with the following macros: + CHAR_T The element type of the format string. +@@ -48,16 +48,7 @@ + #include + + /* Get intmax_t. */ +-#if defined IN_LIBINTL || defined IN_LIBASPRINTF +-# if HAVE_STDINT_H_WITH_UINTMAX +-# include +-# endif +-# if HAVE_INTTYPES_H_WITH_UINTMAX +-# include +-# endif +-#else +-# include +-#endif ++#include + + /* malloc(), realloc(), free(). */ + #include +diff --git a/lib/printf-parse.h b/lib/printf-parse.h +index e05ac8f..77b7409 100644 +--- a/lib/printf-parse.h ++++ b/lib/printf-parse.h +@@ -2,18 +2,18 @@ + Copyright (C) 1999, 2002-2003, 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + +- You should have received a copy of the GNU Lesser General Public License along +- with this program; if not, see . */ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ + + #ifndef _PRINTF_PARSE_H + #define _PRINTF_PARSE_H +diff --git a/lib/putenv.c b/lib/putenv.c +index d342b81..435d10f 100644 +--- a/lib/putenv.c ++++ b/lib/putenv.c +@@ -4,12 +4,12 @@ + NOTE: The canonical source of this file is maintained with the GNU C + Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu. + +- This program is free software: you can redistribute it and/or modify it +- under the terms of the GNU Lesser General Public License as published by the +- Free Software Foundation; either version 3 of the License, or any +- later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser 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, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/raise.c b/lib/raise.c +index eda9126..37c100d 100644 +--- a/lib/raise.c ++++ b/lib/raise.c +@@ -2,12 +2,12 @@ + + Copyright (C) 2002-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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/rawmemchr.c b/lib/rawmemchr.c +index ef35689..896d435 100644 +--- a/lib/rawmemchr.c ++++ b/lib/rawmemchr.c +@@ -1,12 +1,12 @@ + /* Searching in a string. + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/rawmemchr.valgrind b/lib/rawmemchr.valgrind +index 90ed95e..d489c32 100644 +--- a/lib/rawmemchr.valgrind ++++ b/lib/rawmemchr.valgrind +@@ -2,12 +2,12 @@ + + # 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 Lesser General Public License as published by +-# the Free Software Foundation; either version 3 of the License, or +-# (at your option) any later version. ++# This file is free software: you can redistribute it and/or modify ++# it under the terms of the GNU Lesser General Public License as ++# published by the Free Software Foundation; either version 2.1 of the ++# License, or (at your option) any later version. + # +-# This program is distributed in the hope that it will be useful, ++# This file 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 Lesser General Public License for more details. +diff --git a/lib/read.c b/lib/read.c +index 125e738..840d9ed 100644 +--- a/lib/read.c ++++ b/lib/read.c +@@ -2,12 +2,12 @@ + Copyright (C) 2008-2021 Free Software Foundation, Inc. + Written by Bruno Haible , 2011. + +- This program is free software: you can redistribute it and/or modify +- it under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/readlink.c b/lib/readlink.c +index 38d9e0c..d4f4b08 100644 +--- a/lib/readlink.c ++++ b/lib/readlink.c +@@ -1,12 +1,12 @@ + /* 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/realloc.c b/lib/realloc.c +index 1145514..af03f0c 100644 +--- a/lib/realloc.c ++++ b/lib/realloc.c +@@ -3,12 +3,12 @@ + 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 +- it under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +@@ -18,68 +18,46 @@ + + /* written by Jim Meyering and Bruno Haible */ + +-#define _GL_USE_STDLIB_ALLOC 1 + #include + +-/* Only the AC_FUNC_REALLOC macro defines 'realloc' already in config.h. */ +-#ifdef realloc +-# define NEED_REALLOC_GNU 1 +-/* Whereas the gnulib module 'realloc-gnu' defines HAVE_REALLOC_GNU. */ +-#elif GNULIB_REALLOC_GNU && !HAVE_REALLOC_GNU +-# define NEED_REALLOC_GNU 1 +-#endif +- +-/* Infer the properties of the system's malloc function. +- The gnulib module 'malloc-gnu' defines HAVE_MALLOC_GNU. */ +-#if GNULIB_MALLOC_GNU && HAVE_MALLOC_GNU +-# define SYSTEM_MALLOC_GLIBC_COMPATIBLE 1 +-#endif +- + #include + +-/* A function definition is only needed if NEED_REALLOC_GNU is defined above +- or if the module 'realloc-posix' requests it. */ +-#if NEED_REALLOC_GNU || (GNULIB_REALLOC_POSIX && !HAVE_REALLOC_POSIX) ++#include ++ ++#include "xalloc-oversized.h" + +-# include ++/* Call the system's realloc below. This file does not define ++ _GL_USE_STDLIB_ALLOC because it needs Gnulib's malloc if present. */ ++#undef realloc + + /* Change the size of an allocated block of memory P to N bytes, +- with error checking. If N is zero, change it to 1. If P is NULL, +- use malloc. */ ++ with error checking. If P is NULL, use malloc. Otherwise if N is zero, ++ free P and return NULL. */ + + void * + rpl_realloc (void *p, size_t n) + { +- void *result; ++ if (p == NULL) ++ return malloc (n); + +-# if NEED_REALLOC_GNU + if (n == 0) + { +- n = 1; +- +- /* In theory realloc might fail, so don't rely on it to free. */ + free (p); +- p = NULL; ++ return NULL; + } +-# endif + +- if (p == NULL) ++ if (xalloc_oversized (n, 1)) + { +-# if GNULIB_REALLOC_GNU && !NEED_REALLOC_GNU && !SYSTEM_MALLOC_GLIBC_COMPATIBLE +- if (n == 0) +- n = 1; +-# endif +- result = malloc (n); ++ errno = ENOMEM; ++ return NULL; + } +- else +- result = realloc (p, n); + +-# if !HAVE_REALLOC_POSIX ++ void *result = realloc (p, n); ++ ++#if !HAVE_MALLOC_POSIX + if (result == NULL) + errno = ENOMEM; +-# endif ++#endif + + return result; + } +- +-#endif +diff --git a/lib/recv.c b/lib/recv.c +index f2a342f..3eb2b4d 100644 +--- a/lib/recv.c ++++ b/lib/recv.c +@@ -2,12 +2,12 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/recvfrom.c b/lib/recvfrom.c +index 8abda0c..25231ff 100644 +--- a/lib/recvfrom.c ++++ b/lib/recvfrom.c +@@ -2,12 +2,12 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/regex_internal.c b/lib/regex_internal.c +index 55f6b66..aefcfa2 100644 +--- a/lib/regex_internal.c ++++ b/lib/regex_internal.c +@@ -1211,6 +1211,10 @@ re_node_set_merge (re_node_set *dest, const re_node_set *src) + + if (__glibc_unlikely (dest->nelem == 0)) + { ++ /* Although we already guaranteed above that dest->alloc != 0 and ++ therefore dest->elems != NULL, add a debug assertion to pacify ++ GCC 11.2.1's -fanalyzer. */ ++ DEBUG_ASSERT (dest->elems); + dest->nelem = src->nelem; + memcpy (dest->elems, src->elems, src->nelem * sizeof (Idx)); + return REG_NOERROR; +@@ -1286,7 +1290,10 @@ re_node_set_insert (re_node_set *set, Idx elem) + + if (__glibc_unlikely (set->nelem) == 0) + { +- /* We already guaranteed above that set->alloc != 0. */ ++ /* Although we already guaranteed above that set->alloc != 0 and ++ therefore set->elems != NULL, add a debug assertion to pacify ++ GCC 11.2 -fanalyzer. */ ++ DEBUG_ASSERT (set->elems); + set->elems[0] = elem; + ++set->nelem; + return true; +diff --git a/lib/regexec.c b/lib/regexec.c +index 6309dea..5e4eb49 100644 +--- a/lib/regexec.c ++++ b/lib/regexec.c +@@ -1220,9 +1220,13 @@ proceed_next_node (const re_match_context_t *mctx, Idx nregs, regmatch_t *regs, + { + re_node_set *cur_nodes = &mctx->state_log[*pidx]->nodes; + re_node_set *edests = &dfa->edests[node]; +- bool ok = re_node_set_insert (eps_via_nodes, node); +- if (__glibc_unlikely (! ok)) +- return -2; ++ ++ if (! re_node_set_contains (eps_via_nodes, node)) ++ { ++ bool ok = re_node_set_insert (eps_via_nodes, node); ++ if (__glibc_unlikely (! ok)) ++ return -2; ++ } + + /* Pick a valid destination, or return -1 if none is found. */ + Idx dest_node = -1; +@@ -1414,7 +1418,7 @@ set_regs (const regex_t *preg, const re_match_context_t *mctx, size_t nmatch, + update_regs (dfa, pmatch, prev_idx_match, cur_node, idx, nmatch); + + if ((idx == pmatch[0].rm_eo && cur_node == mctx->last_node) +- || re_node_set_contains (&eps_via_nodes, cur_node)) ++ || (fs && re_node_set_contains (&eps_via_nodes, cur_node))) + { + Idx reg_idx; + cur_node = -1; +diff --git a/lib/rename.c b/lib/rename.c +index 4873025..a3b7dc6 100644 +--- a/lib/rename.c ++++ b/lib/rename.c +@@ -2,12 +2,12 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/rmdir.c b/lib/rmdir.c +index a99fb1e..6295e41 100644 +--- a/lib/rmdir.c ++++ b/lib/rmdir.c +@@ -3,12 +3,12 @@ + 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 +- it under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/round.c b/lib/round.c +index 47a3936..5525050 100644 +--- a/lib/round.c ++++ b/lib/round.c +@@ -1,18 +1,18 @@ + /* Round toward nearest, breaking ties away from zero. + Copyright (C) 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser 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, ++ This file 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 Lesser General Public License for more details. + +- You should have received a copy of the GNU Lesser General Public License along +- with this program; if not, see . */ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ + + /* Written by Ben Pfaff , 2007. + Based heavily on code by Bruno Haible. */ +diff --git a/lib/safe-read.c b/lib/safe-read.c +index a4a1b08..e187b12 100644 +--- a/lib/safe-read.c ++++ b/lib/safe-read.c +@@ -3,12 +3,12 @@ + Copyright (C) 1993-1994, 1998, 2002-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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/safe-read.h b/lib/safe-read.h +index 5050124..111aff5 100644 +--- a/lib/safe-read.h ++++ b/lib/safe-read.h +@@ -1,12 +1,12 @@ + /* An interface to read() that retries after interrupts. + Copyright (C) 2002, 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/safe-write.c b/lib/safe-write.c +index f8b3b8b..494de14 100644 +--- a/lib/safe-write.c ++++ b/lib/safe-write.c +@@ -1,12 +1,12 @@ + /* An interface to write that retries after interrupts. + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/safe-write.h b/lib/safe-write.h +index 459629e..25d8c71 100644 +--- a/lib/safe-write.h ++++ b/lib/safe-write.h +@@ -1,12 +1,12 @@ + /* An interface to write() that retries after interrupts. + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/same-inode.h b/lib/same-inode.h +index 45e322a8..c727777 100644 +--- a/lib/same-inode.h ++++ b/lib/same-inode.h +@@ -2,12 +2,12 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/scratch_buffer.h b/lib/scratch_buffer.h +index 4b17f72..8873577 100644 +--- a/lib/scratch_buffer.h ++++ b/lib/scratch_buffer.h +@@ -1,12 +1,12 @@ + /* 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +@@ -110,14 +110,18 @@ extern void *scratch_buffer_dupfree (struct scratch_buffer *buffer, + + /* The implementation is imported from glibc. */ + +-#include +- + /* Avoid possible conflicts with symbols exported by the GNU libc. */ + #define __libc_scratch_buffer_dupfree gl_scratch_buffer_dupfree + #define __libc_scratch_buffer_grow gl_scratch_buffer_grow + #define __libc_scratch_buffer_grow_preserve gl_scratch_buffer_grow_preserve + #define __libc_scratch_buffer_set_array_size gl_scratch_buffer_set_array_size + +-#include ++#ifndef _GL_LIKELY ++/* Rely on __builtin_expect, as provided by the module 'builtin-expect'. */ ++# define _GL_LIKELY(cond) __builtin_expect ((cond), 1) ++# define _GL_UNLIKELY(cond) __builtin_expect ((cond), 0) ++#endif ++ ++#include + + #endif /* _GL_SCRATCH_BUFFER_H */ +diff --git a/lib/select.c b/lib/select.c +index 9a6fc28..eddac4b 100644 +--- a/lib/select.c ++++ b/lib/select.c +@@ -5,18 +5,18 @@ + + This file is part of gnulib. + +- This program is free software; you can redistribute it and/or modify +- it under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + +- You should have received a copy of the GNU Lesser General Public License along +- with this program; if not, see . */ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ + + #include + +@@ -530,12 +530,13 @@ restart: + if (h != handle_array[nhandles]) + { + /* Perform handle->descriptor mapping. */ +- WSAEventSelect ((SOCKET) h, NULL, 0); +- if (FD_ISSET (h, &handle_rfds)) ++ SOCKET s = (SOCKET) h; ++ WSAEventSelect (s, NULL, 0); ++ if (FD_ISSET (s, &handle_rfds)) + FD_SET (i, rfds); +- if (FD_ISSET (h, &handle_wfds)) ++ if (FD_ISSET (s, &handle_wfds)) + FD_SET (i, wfds); +- if (FD_ISSET (h, &handle_xfds)) ++ if (FD_ISSET (s, &handle_xfds)) + FD_SET (i, xfds); + } + else +diff --git a/lib/send.c b/lib/send.c +index 3625864..58cb70b 100644 +--- a/lib/send.c ++++ b/lib/send.c +@@ -2,12 +2,12 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/sendto.c b/lib/sendto.c +index 5372a66..029ccd6 100644 +--- a/lib/sendto.c ++++ b/lib/sendto.c +@@ -2,12 +2,12 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/setenv.c b/lib/setenv.c +index 5374044..3ad3477 100644 +--- a/lib/setenv.c ++++ b/lib/setenv.c +@@ -1,12 +1,12 @@ + /* 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 +- it under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/setlocale-lock.c b/lib/setlocale-lock.c +index 3cb5d47..53e231c 100644 +--- a/lib/setlocale-lock.c ++++ b/lib/setlocale-lock.c +@@ -1,12 +1,12 @@ + /* Return the internal lock used by setlocale_null_r. + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/setlocale_null.c b/lib/setlocale_null.c +index 4c50472..dbfda25 100644 +--- a/lib/setlocale_null.c ++++ b/lib/setlocale_null.c +@@ -1,12 +1,12 @@ + /* Query the name of the current global locale. + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/setlocale_null.h b/lib/setlocale_null.h +index bf96fa4..00c42e2 100644 +--- a/lib/setlocale_null.h ++++ b/lib/setlocale_null.h +@@ -1,12 +1,12 @@ + /* Query the name of the current global locale. + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/setsockopt.c b/lib/setsockopt.c +index db32996..10b1e90 100644 +--- a/lib/setsockopt.c ++++ b/lib/setsockopt.c +@@ -2,12 +2,12 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/shutdown.c b/lib/shutdown.c +index c5527cd..70c927c 100644 +--- a/lib/shutdown.c ++++ b/lib/shutdown.c +@@ -2,12 +2,12 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/signal.in.h b/lib/signal.in.h +index b211137..275da8c 100644 +--- a/lib/signal.in.h ++++ b/lib/signal.in.h +@@ -2,12 +2,12 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/signbitd.c b/lib/signbitd.c +index 2992dd4..2259771 100644 +--- a/lib/signbitd.c ++++ b/lib/signbitd.c +@@ -1,12 +1,12 @@ + /* signbit() macro: Determine the sign bit of a floating-point number. + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/signbitf.c b/lib/signbitf.c +index 01be49a..b196d9a 100644 +--- a/lib/signbitf.c ++++ b/lib/signbitf.c +@@ -1,12 +1,12 @@ + /* signbit() macro: Determine the sign bit of a floating-point number. + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/signbitl.c b/lib/signbitl.c +index 6e0f64e..f73802d 100644 +--- a/lib/signbitl.c ++++ b/lib/signbitl.c +@@ -1,12 +1,12 @@ + /* signbit() macro: Determine the sign bit of a floating-point number. + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/size_max.h b/lib/size_max.h +index c6d4a18..1186ba9 100644 +--- a/lib/size_max.h ++++ b/lib/size_max.h +@@ -2,18 +2,18 @@ + Copyright (C) 2005-2006, 2009-2021 Free Software Foundation, Inc. + Written by Simon Josefsson. + +- This program is free software; you can redistribute it and/or modify +- it under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License +- along with this program; if not, see . */ ++ along with this program. If not, see . */ + + #ifndef GNULIB_SIZE_MAX_H + #define GNULIB_SIZE_MAX_H +diff --git a/lib/snprintf.c b/lib/snprintf.c +index 357f287..a589cf1 100644 +--- a/lib/snprintf.c ++++ b/lib/snprintf.c +@@ -2,18 +2,18 @@ + Copyright (C) 2004, 2006-2021 Free Software Foundation, Inc. + Written by Simon Josefsson and Paul Eggert. + +- This program is free software; you can redistribute it and/or modify +- it under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + +- You should have received a copy of the GNU Lesser General Public License along +- with this program; if not, see . */ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ + + #include + +diff --git a/lib/socket.c b/lib/socket.c +index 8525260..0f2e6ff 100644 +--- a/lib/socket.c ++++ b/lib/socket.c +@@ -2,12 +2,12 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/sockets.c b/lib/sockets.c +index 394b01e..934da73 100644 +--- a/lib/sockets.c ++++ b/lib/sockets.c +@@ -2,12 +2,12 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/sockets.h b/lib/sockets.h +index a13b0cb..e70c2bb 100644 +--- a/lib/sockets.h ++++ b/lib/sockets.h +@@ -2,12 +2,12 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/stat-time.c b/lib/stat-time.c +index 81b83dd..7b92792 100644 +--- a/lib/stat-time.c ++++ b/lib/stat-time.c +@@ -1,3 +1,21 @@ ++/* stat-related time functions. ++ ++ Copyright (C) 2012-2021 Free Software Foundation, Inc. ++ ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. ++ ++ This file 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 Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ ++ + #include ++ + #define _GL_STAT_TIME_INLINE _GL_EXTERN_INLINE + #include "stat-time.h" +diff --git a/lib/stat-time.h b/lib/stat-time.h +index 00c9329..fe3483d 100644 +--- a/lib/stat-time.h ++++ b/lib/stat-time.h +@@ -2,12 +2,12 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/stat-w32.c b/lib/stat-w32.c +index fe505cb..4164199 100644 +--- a/lib/stat-w32.c ++++ b/lib/stat-w32.c +@@ -1,12 +1,12 @@ + /* Core of implementation of fstat and stat for native Windows. + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/stat-w32.h b/lib/stat-w32.h +index 05c9b0f..5b56c09 100644 +--- a/lib/stat-w32.h ++++ b/lib/stat-w32.h +@@ -1,12 +1,12 @@ + /* Core of implementation of fstat and stat for native Windows. + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/stat.c b/lib/stat.c +index 39a1269..bc9a767 100644 +--- a/lib/stat.c ++++ b/lib/stat.c +@@ -1,12 +1,12 @@ + /* Work around platform bugs in stat. + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/stdalign.in.h b/lib/stdalign.in.h +index 7b51043..592d58e 100644 +--- a/lib/stdalign.in.h ++++ b/lib/stdalign.in.h +@@ -2,18 +2,18 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License +- along with this program; if not, see . */ ++ along with this program. If not, see . */ + + /* Written by Paul Eggert and Bruno Haible. */ + +diff --git a/lib/stdbool.in.h b/lib/stdbool.in.h +index c404f8d..2a1992d 100644 +--- a/lib/stdbool.in.h ++++ b/lib/stdbool.in.h +@@ -1,18 +1,18 @@ + /* Copyright (C) 2001-2003, 2006-2021 Free Software Foundation, Inc. + Written by Bruno Haible , 2001. + +- This program is free software; you can redistribute it and/or modify +- it under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License +- along with this program; if not, see . */ ++ along with this program. If not, see . */ + + #ifndef _GL_STDBOOL_H + #define _GL_STDBOOL_H +diff --git a/lib/stddef.in.h b/lib/stddef.in.h +index 4c53e64..42290d4 100644 +--- a/lib/stddef.in.h ++++ b/lib/stddef.in.h +@@ -2,18 +2,18 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License +- along with this program; if not, see . */ ++ along with this program. If not, see . */ + + /* Written by Eric Blake. */ + +diff --git a/lib/stdint.in.h b/lib/stdint.in.h +index a98f1c8..85c5418 100644 +--- a/lib/stdint.in.h ++++ b/lib/stdint.in.h +@@ -2,18 +2,18 @@ + Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. + This file is part of gnulib. + +- This program is free software; you can redistribute it and/or modify +- it under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License +- along with this program; if not, see . */ ++ along with this program. If not, see . */ + + /* + * ISO C 99 for platforms that lack it. +@@ -85,7 +85,7 @@ + + /* Override WINT_MIN and WINT_MAX if gnulib's or overrides + wint_t. */ +-#if @GNULIB_OVERRIDES_WINT_T@ ++#if @GNULIBHEADERS_OVERRIDE_WINT_T@ + # undef WINT_MIN + # undef WINT_MAX + # define WINT_MIN 0x0U +@@ -598,7 +598,7 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) + /* wint_t limits */ + /* If gnulib's or overrides wint_t, @WINT_T_SUFFIX@ is not + accurate, therefore use the definitions from above. */ +-# if !@GNULIB_OVERRIDES_WINT_T@ ++# if !@GNULIBHEADERS_OVERRIDE_WINT_T@ + # undef WINT_MIN + # undef WINT_MAX + # if @HAVE_SIGNED_WINT_T@ +diff --git a/lib/stdio.in.h b/lib/stdio.in.h +index 6e10c74..f1bf817 100644 +--- a/lib/stdio.in.h ++++ b/lib/stdio.in.h +@@ -2,18 +2,18 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License +- along with this program; if not, see . */ ++ along with this program. If not, see . */ + + #if __GNUC__ >= 3 + @PRAGMA_SYSTEM_HEADER@ +@@ -242,7 +242,7 @@ _GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - " + _GL_CXXALIAS_MDA (fcloseall, int, (void)); + # else + # if @HAVE_DECL_FCLOSEALL@ +-# if defined __FreeBSD__ ++# if defined __FreeBSD__ || defined __DragonFly__ + _GL_CXXALIAS_SYS (fcloseall, void, (void)); + # else + _GL_CXXALIAS_SYS (fcloseall, int, (void)); +@@ -260,8 +260,9 @@ _GL_CXXALIASWARN (fcloseall); + # undef fdopen + # define fdopen rpl_fdopen + # endif +-_GL_FUNCDECL_RPL (fdopen, FILE *, (int fd, const char *mode) +- _GL_ARG_NONNULL ((2))); ++_GL_FUNCDECL_RPL (fdopen, FILE *, ++ (int fd, const char *mode) ++ _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1)); + _GL_CXXALIAS_RPL (fdopen, FILE *, (int fd, const char *mode)); + # elif defined _WIN32 && !defined __CYGWIN__ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) +@@ -270,28 +271,42 @@ _GL_CXXALIAS_RPL (fdopen, FILE *, (int fd, const char *mode)); + # endif + _GL_CXXALIAS_MDA (fdopen, FILE *, (int fd, const char *mode)); + # else ++# if __GNUC__ >= 11 ++/* For -Wmismatched-dealloc: Associate fdopen with fclose or rpl_fclose. */ ++_GL_FUNCDECL_SYS (fdopen, FILE *, ++ (int fd, const char *mode) ++ _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1)); ++# endif + _GL_CXXALIAS_SYS (fdopen, FILE *, (int fd, const char *mode)); + # endif + _GL_CXXALIASWARN (fdopen); +-#elif defined GNULIB_POSIXCHECK +-# undef fdopen ++#else ++# if @GNULIB_FCLOSE@ && __GNUC__ >= 11 && !defined fdopen ++/* For -Wmismatched-dealloc: Associate fdopen with fclose or rpl_fclose. */ ++_GL_FUNCDECL_SYS (fdopen, FILE *, ++ (int fd, const char *mode) ++ _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1)); ++# endif ++# if defined GNULIB_POSIXCHECK ++# undef 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@ ++# 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 ++# 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 ++# else + _GL_CXXALIAS_SYS (fdopen, FILE *, (int fd, const char *mode)); +-# endif ++# endif + _GL_CXXALIASWARN (fdopen); ++# endif + #endif + + #if @GNULIB_FFLUSH@ +@@ -380,21 +395,35 @@ _GL_CXXALIASWARN (fileno); + # endif + _GL_FUNCDECL_RPL (fopen, FILE *, + (const char *restrict filename, const char *restrict mode) +- _GL_ARG_NONNULL ((1, 2))); ++ _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1)); + _GL_CXXALIAS_RPL (fopen, FILE *, + (const char *restrict filename, const char *restrict mode)); + # else ++# if __GNUC__ >= 11 ++/* For -Wmismatched-dealloc: Associate fopen with fclose or rpl_fclose. */ ++_GL_FUNCDECL_SYS (fopen, FILE *, ++ (const char *restrict filename, const char *restrict mode) ++ _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1)); ++# endif + _GL_CXXALIAS_SYS (fopen, FILE *, + (const char *restrict filename, const char *restrict mode)); + # endif + # if __GLIBC__ >= 2 + _GL_CXXALIASWARN (fopen); + # endif +-#elif defined GNULIB_POSIXCHECK +-# undef fopen ++#else ++# if @GNULIB_FCLOSE@ && __GNUC__ >= 11 && !defined fopen ++/* For -Wmismatched-dealloc: Associate fopen with fclose or rpl_fclose. */ ++_GL_FUNCDECL_SYS (fopen, FILE *, ++ (const char *restrict filename, const char *restrict mode) ++ _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1)); ++# endif ++# if defined GNULIB_POSIXCHECK ++# undef fopen + /* Assume fopen is always declared. */ + _GL_WARN_ON_USE (fopen, "fopen on native Windows platforms is not POSIX compliant - " + "use gnulib module fopen for portability"); ++# endif + #endif + + #if @GNULIB_FPRINTF_POSIX@ || @GNULIB_FPRINTF@ +@@ -1009,22 +1038,32 @@ _GL_WARN_ON_USE (perror, "perror is not always POSIX compliant - " + # undef popen + # define popen rpl_popen + # endif +-_GL_FUNCDECL_RPL (popen, FILE *, (const char *cmd, const char *mode) +- _GL_ARG_NONNULL ((1, 2))); ++_GL_FUNCDECL_RPL (popen, FILE *, ++ (const char *cmd, const char *mode) ++ _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (pclose, 1)); + _GL_CXXALIAS_RPL (popen, FILE *, (const char *cmd, const char *mode)); + # else +-# if !@HAVE_POPEN@ +-_GL_FUNCDECL_SYS (popen, FILE *, (const char *cmd, const char *mode) +- _GL_ARG_NONNULL ((1, 2))); ++# if !@HAVE_POPEN@ || __GNUC__ >= 11 ++_GL_FUNCDECL_SYS (popen, FILE *, ++ (const char *cmd, const char *mode) ++ _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (pclose, 1)); + # endif + _GL_CXXALIAS_SYS (popen, FILE *, (const char *cmd, const char *mode)); + # endif + _GL_CXXALIASWARN (popen); +-#elif defined GNULIB_POSIXCHECK +-# undef popen +-# if HAVE_RAW_DECL_POPEN ++#else ++# if @GNULIB_PCLOSE@ && __GNUC__ >= 11 && !defined popen ++/* For -Wmismatched-dealloc: Associate popen with pclose or rpl_pclose. */ ++_GL_FUNCDECL_SYS (popen, FILE *, ++ (const char *cmd, const char *mode) ++ _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (pclose, 1)); ++# endif ++# if defined GNULIB_POSIXCHECK ++# undef popen ++# if HAVE_RAW_DECL_POPEN + _GL_WARN_ON_USE (popen, "popen is buggy on some platforms - " + "use gnulib module popen or pipe for more portability"); ++# endif + # endif + #endif + +@@ -1257,6 +1296,7 @@ _GL_CXXALIASWARN (scanf); + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # define snprintf rpl_snprintf + # endif ++# define GNULIB_overrides_snprintf 1 + _GL_FUNCDECL_RPL (snprintf, int, + (char *restrict str, size_t size, + const char *restrict format, ...) +@@ -1302,6 +1342,7 @@ _GL_WARN_ON_USE (snprintf, "snprintf is unportable - " + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # define sprintf rpl_sprintf + # endif ++# define GNULIB_overrides_sprintf 1 + _GL_FUNCDECL_RPL (sprintf, int, + (char *restrict str, const char *restrict format, ...) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) +@@ -1344,19 +1385,32 @@ _GL_CXXALIASWARN (tempnam); + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # define tmpfile rpl_tmpfile + # endif +-_GL_FUNCDECL_RPL (tmpfile, FILE *, (void)); ++_GL_FUNCDECL_RPL (tmpfile, FILE *, (void) ++ _GL_ATTRIBUTE_DEALLOC (fclose, 1)); + _GL_CXXALIAS_RPL (tmpfile, FILE *, (void)); + # else ++# if __GNUC__ >= 11 ++/* For -Wmismatched-dealloc: Associate tmpfile with fclose or rpl_fclose. */ ++_GL_FUNCDECL_SYS (tmpfile, FILE *, (void) ++ _GL_ATTRIBUTE_DEALLOC (fclose, 1)); ++# endif + _GL_CXXALIAS_SYS (tmpfile, FILE *, (void)); + # endif + # if __GLIBC__ >= 2 + _GL_CXXALIASWARN (tmpfile); + # endif +-#elif defined GNULIB_POSIXCHECK +-# undef tmpfile +-# if HAVE_RAW_DECL_TMPFILE ++#else ++# if @GNULIB_FCLOSE@ && __GNUC__ >= 11 && !defined tmpfile ++/* For -Wmismatched-dealloc: Associate tmpfile with fclose or rpl_fclose. */ ++_GL_FUNCDECL_SYS (tmpfile, FILE *, (void) ++ _GL_ATTRIBUTE_DEALLOC (fclose, 1)); ++# endif ++# if defined GNULIB_POSIXCHECK ++# undef tmpfile ++# if HAVE_RAW_DECL_TMPFILE + _GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - " + "use gnulib module tmpfile for portability"); ++# endif + # endif + #endif + +@@ -1369,6 +1423,7 @@ _GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - " + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # define asprintf rpl_asprintf + # endif ++# define GNULIB_overrides_asprintf + _GL_FUNCDECL_RPL (asprintf, int, + (char **result, const char *format, ...) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) +@@ -1390,6 +1445,7 @@ _GL_CXXALIASWARN (asprintf); + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # define vasprintf rpl_vasprintf + # endif ++# define GNULIB_overrides_vasprintf 1 + _GL_FUNCDECL_RPL (vasprintf, int, + (char **result, const char *format, va_list args) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) +@@ -1573,6 +1629,7 @@ _GL_CXXALIASWARN (vscanf); + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # define vsnprintf rpl_vsnprintf + # endif ++# define GNULIB_overrides_vsnprintf 1 + _GL_FUNCDECL_RPL (vsnprintf, int, + (char *restrict str, size_t size, + const char *restrict format, va_list args) +@@ -1609,6 +1666,7 @@ _GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - " + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # define vsprintf rpl_vsprintf + # endif ++# define GNULIB_overrides_vsprintf 1 + _GL_FUNCDECL_RPL (vsprintf, int, + (char *restrict str, + const char *restrict format, va_list args) +diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h +index 7e01262..d86a880 100644 +--- a/lib/stdlib.in.h ++++ b/lib/stdlib.in.h +@@ -2,12 +2,12 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +@@ -149,6 +149,28 @@ _GL_WARN_ON_USE (_Exit, "_Exit is unportable - " + #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 ++ ++ + /* Allocate memory with indefinite extent and specified alignment. */ + #if @GNULIB_ALIGNED_ALLOC@ + # if @REPLACE_ALIGNED_ALLOC@ +@@ -156,21 +178,37 @@ _GL_WARN_ON_USE (_Exit, "_Exit is unportable - " + # undef aligned_alloc + # define aligned_alloc rpl_aligned_alloc + # endif +-_GL_FUNCDECL_RPL (aligned_alloc, void *, (size_t alignment, size_t size)); ++_GL_FUNCDECL_RPL (aligned_alloc, void *, ++ (size_t alignment, size_t size) ++ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); + _GL_CXXALIAS_RPL (aligned_alloc, void *, (size_t alignment, size_t size)); + # else + # if @HAVE_ALIGNED_ALLOC@ ++# if __GNUC__ >= 11 ++/* For -Wmismatched-dealloc: Associate aligned_alloc with free or rpl_free. */ ++_GL_FUNCDECL_SYS (aligned_alloc, void *, ++ (size_t alignment, size_t size) ++ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); ++# endif + _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 ++#else ++# if @GNULIB_FREE_POSIX@ && __GNUC__ >= 11 && !defined aligned_alloc ++/* For -Wmismatched-dealloc: Associate aligned_alloc with free or rpl_free. */ ++_GL_FUNCDECL_SYS (aligned_alloc, void *, ++ (size_t alignment, size_t size) ++ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); ++# endif ++# if 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 + #endif + +@@ -198,19 +236,35 @@ _GL_WARN_ON_USE (atoll, "atoll is unportable - " + # undef calloc + # define calloc rpl_calloc + # endif +-_GL_FUNCDECL_RPL (calloc, void *, (size_t nmemb, size_t size)); ++_GL_FUNCDECL_RPL (calloc, void *, ++ (size_t nmemb, size_t size) ++ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); + _GL_CXXALIAS_RPL (calloc, void *, (size_t nmemb, size_t size)); + # else ++# if __GNUC__ >= 11 ++/* For -Wmismatched-dealloc: Associate calloc with free or rpl_free. */ ++_GL_FUNCDECL_SYS (calloc, void *, ++ (size_t nmemb, size_t size) ++ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); ++# endif + _GL_CXXALIAS_SYS (calloc, void *, (size_t nmemb, size_t size)); + # endif + # if __GLIBC__ >= 2 + _GL_CXXALIASWARN (calloc); + # endif +-#elif defined GNULIB_POSIXCHECK +-# undef calloc ++#else ++# if @GNULIB_FREE_POSIX@ && __GNUC__ >= 11 && !defined calloc ++/* For -Wmismatched-dealloc: Associate calloc with free or rpl_free. */ ++_GL_FUNCDECL_SYS (calloc, void *, ++ (size_t nmemb, size_t size) ++ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); ++# endif ++# if defined GNULIB_POSIXCHECK ++# undef calloc + /* Assume calloc is always declared. */ + _GL_WARN_ON_USE (calloc, "calloc is not POSIX compliant everywhere - " + "use gnulib module calloc-posix for portability"); ++# endif + #endif + + #if @GNULIB_CANONICALIZE_FILE_NAME@ +@@ -218,13 +272,17 @@ _GL_WARN_ON_USE (calloc, "calloc is not POSIX compliant everywhere - " + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # define canonicalize_file_name rpl_canonicalize_file_name + # endif +-_GL_FUNCDECL_RPL (canonicalize_file_name, char *, (const char *name) +- _GL_ARG_NONNULL ((1))); ++_GL_FUNCDECL_RPL (canonicalize_file_name, char *, ++ (const char *name) ++ _GL_ARG_NONNULL ((1)) ++ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); + _GL_CXXALIAS_RPL (canonicalize_file_name, char *, (const char *name)); + # else +-# if !@HAVE_CANONICALIZE_FILE_NAME@ +-_GL_FUNCDECL_SYS (canonicalize_file_name, char *, (const char *name) +- _GL_ARG_NONNULL ((1))); ++# if !@HAVE_CANONICALIZE_FILE_NAME@ || __GNUC__ >= 11 ++_GL_FUNCDECL_SYS (canonicalize_file_name, char *, ++ (const char *name) ++ _GL_ARG_NONNULL ((1)) ++ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); + # endif + _GL_CXXALIAS_SYS (canonicalize_file_name, char *, (const char *name)); + # endif +@@ -233,12 +291,22 @@ _GL_CXXALIAS_SYS (canonicalize_file_name, char *, (const char *name)); + (!@HAVE_CANONICALIZE_FILE_NAME@ || @REPLACE_CANONICALIZE_FILE_NAME@) + # endif + _GL_CXXALIASWARN (canonicalize_file_name); +-#elif defined GNULIB_POSIXCHECK +-# undef canonicalize_file_name +-# if HAVE_RAW_DECL_CANONICALIZE_FILE_NAME ++#else ++# if @GNULIB_FREE_POSIX@ && __GNUC__ >= 11 && !defined canonicalize_file_name ++/* For -Wmismatched-dealloc: Associate canonicalize_file_name with free or ++ rpl_free. */ ++_GL_FUNCDECL_SYS (canonicalize_file_name, char *, ++ (const char *name) ++ _GL_ARG_NONNULL ((1)) ++ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); ++# endif ++# if defined GNULIB_POSIXCHECK ++# undef canonicalize_file_name ++# if HAVE_RAW_DECL_CANONICALIZE_FILE_NAME + _GL_WARN_ON_USE (canonicalize_file_name, + "canonicalize_file_name is unportable - " + "use gnulib module canonicalize-lgpl for portability"); ++# endif + # endif + #endif + +@@ -288,27 +356,6 @@ _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 +@@ -404,19 +451,35 @@ _GL_WARN_ON_USE (grantpt, "grantpt is not portable - " + # undef malloc + # define malloc rpl_malloc + # endif +-_GL_FUNCDECL_RPL (malloc, void *, (size_t size)); ++_GL_FUNCDECL_RPL (malloc, void *, ++ (size_t size) ++ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); + _GL_CXXALIAS_RPL (malloc, void *, (size_t size)); + # else ++# if __GNUC__ >= 11 ++/* For -Wmismatched-dealloc: Associate malloc with free or rpl_free. */ ++_GL_FUNCDECL_SYS (malloc, void *, ++ (size_t size) ++ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); ++# endif + _GL_CXXALIAS_SYS (malloc, void *, (size_t size)); + # endif + # if __GLIBC__ >= 2 + _GL_CXXALIASWARN (malloc); + # endif +-#elif defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC +-# undef malloc ++#else ++# if @GNULIB_FREE_POSIX@ && __GNUC__ >= 11 && !defined malloc ++/* For -Wmismatched-dealloc: Associate malloc with free or rpl_free. */ ++_GL_FUNCDECL_SYS (malloc, void *, ++ (size_t size) ++ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); ++# endif ++# if defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC ++# undef malloc + /* Assume malloc is always declared. */ + _GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - " + "use gnulib module malloc-posix for portability"); ++# endif + #endif + + /* Convert a multibyte character to a wide character. */ +@@ -1015,29 +1078,53 @@ _GL_WARN_ON_USE (setstate_r, "setstate_r is unportable - " + # undef realloc + # define realloc rpl_realloc + # endif +-_GL_FUNCDECL_RPL (realloc, void *, (void *ptr, size_t size)); ++_GL_FUNCDECL_RPL (realloc, void *, (void *ptr, size_t size) ++ _GL_ATTRIBUTE_DEALLOC_FREE); + _GL_CXXALIAS_RPL (realloc, void *, (void *ptr, size_t size)); + # else ++# if __GNUC__ >= 11 ++/* For -Wmismatched-dealloc: Associate realloc with free or rpl_free. */ ++_GL_FUNCDECL_SYS (realloc, void *, (void *ptr, size_t size) ++ _GL_ATTRIBUTE_DEALLOC_FREE); ++# endif + _GL_CXXALIAS_SYS (realloc, void *, (void *ptr, size_t size)); + # endif + # if __GLIBC__ >= 2 + _GL_CXXALIASWARN (realloc); + # endif +-#elif defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC +-# undef realloc ++#else ++# if @GNULIB_FREE_POSIX@ && __GNUC__ >= 11 && !defined realloc ++/* For -Wmismatched-dealloc: Associate realloc with free or rpl_free. */ ++_GL_FUNCDECL_SYS (realloc, void *, (void *ptr, size_t size) ++ _GL_ATTRIBUTE_DEALLOC_FREE); ++# endif ++# if defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC ++# undef realloc + /* Assume realloc is always declared. */ + _GL_WARN_ON_USE (realloc, "realloc is not POSIX compliant everywhere - " + "use gnulib module realloc-posix for portability"); ++# endif + #endif + + + #if @GNULIB_REALLOCARRAY@ +-# if ! @HAVE_REALLOCARRAY@ ++# if @REPLACE_REALLOCARRAY@ ++# if !(defined __cplusplus && defined GNULIB_NAMESPACE) ++# undef reallocarray ++# define reallocarray rpl_reallocarray ++# endif ++_GL_FUNCDECL_RPL (reallocarray, void *, ++ (void *ptr, size_t nmemb, size_t size)); ++_GL_CXXALIAS_RPL (reallocarray, void *, ++ (void *ptr, size_t nmemb, size_t size)); ++# else ++# if ! @HAVE_REALLOCARRAY@ + _GL_FUNCDECL_SYS (reallocarray, void *, + (void *ptr, size_t nmemb, size_t size)); +-# endif ++# endif + _GL_CXXALIAS_SYS (reallocarray, void *, + (void *ptr, size_t nmemb, size_t size)); ++# endif + _GL_CXXALIASWARN (reallocarray); + #elif defined GNULIB_POSIXCHECK + # undef reallocarray +diff --git a/lib/strdup.c b/lib/strdup.c +index 2a37049..e5d4d75 100644 +--- a/lib/strdup.c ++++ b/lib/strdup.c +@@ -3,18 +3,18 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + +- You should have received a copy of the GNU Lesser General Public License along +- with this program; if not, see . */ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ + + #ifndef _LIBC + # include +diff --git a/lib/streq.h b/lib/streq.h +index 2d9d4c2..adabd15 100644 +--- a/lib/streq.h ++++ b/lib/streq.h +@@ -1,15 +1,15 @@ + /* Optimized string comparison. + 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 Lesser General Public License as published +- by the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 +- Lesser General Public License for more details. ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ +diff --git a/lib/strftime.h b/lib/strftime.h +index 645e8c7..790a80e 100644 +--- a/lib/strftime.h ++++ b/lib/strftime.h +@@ -2,12 +2,12 @@ + + Copyright (C) 2002, 2004, 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser 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, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/striconveh.c b/lib/striconveh.c +index 82f6467..78a5e02 100644 +--- a/lib/striconveh.c ++++ b/lib/striconveh.c +@@ -2,12 +2,12 @@ + Copyright (C) 2001-2021 Free Software Foundation, Inc. + Written by Bruno Haible and Simon Josefsson. + +- This program is free software: you can redistribute it and/or modify +- it under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/striconveh.h b/lib/striconveh.h +index c9dff1e..60c6329 100644 +--- a/lib/striconveh.h ++++ b/lib/striconveh.h +@@ -2,12 +2,12 @@ + Copyright (C) 2001-2007, 2009-2021 Free Software Foundation, Inc. + Written by Bruno Haible and Simon Josefsson. + +- This program is free software: you can redistribute it and/or modify +- it under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +@@ -18,7 +18,7 @@ + #ifndef _STRICONVEH_H + #define _STRICONVEH_H + +-#include ++#include + #if HAVE_ICONV + #include + #endif +@@ -95,7 +95,8 @@ extern int + extern char * + str_cd_iconveh (const char *src, + const iconveh_t *cd, +- enum iconv_ilseq_handler handler); ++ enum iconv_ilseq_handler handler) ++ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE; + + #endif + +@@ -129,7 +130,8 @@ extern int + extern char * + str_iconveh (const char *src, + const char *from_codeset, const char *to_codeset, +- enum iconv_ilseq_handler handler); ++ enum iconv_ilseq_handler handler) ++ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE; + + + #ifdef __cplusplus +diff --git a/lib/string.in.h b/lib/string.in.h +index 1292e29..b043c75 100644 +--- a/lib/string.in.h ++++ b/lib/string.in.h +@@ -2,18 +2,18 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License +- along with this program; if not, see . */ ++ along with this program. If not, see . */ + + #if __GNUC__ >= 3 + @PRAGMA_SYSTEM_HEADER@ +@@ -47,6 +47,9 @@ + /* NetBSD 5.0 mis-defines NULL. */ + #include + ++/* Get free(). */ ++#include ++ + /* MirBSD defines mbslen as a macro. */ + #if @GNULIB_MBSLEN@ && defined __MirBSD__ + # include +@@ -418,7 +421,10 @@ _GL_WARN_ON_USE (strchrnul, "strchrnul is unportable - " + # undef strdup + # define strdup rpl_strdup + # endif +-_GL_FUNCDECL_RPL (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1))); ++_GL_FUNCDECL_RPL (strdup, char *, ++ (char const *__s) ++ _GL_ARG_NONNULL ((1)) ++ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); + _GL_CXXALIAS_RPL (strdup, char *, (char const *__s)); + # elif defined _WIN32 && !defined __CYGWIN__ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) +@@ -431,35 +437,47 @@ _GL_CXXALIAS_MDA (strdup, char *, (char const *__s)); + /* strdup exists as a function and as a macro. Get rid of the macro. */ + # undef strdup + # endif +-# if !(@HAVE_DECL_STRDUP@ || defined strdup) +-_GL_FUNCDECL_SYS (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1))); ++# if (!@HAVE_DECL_STRDUP@ || __GNUC__ >= 11) && !defined strdup ++_GL_FUNCDECL_SYS (strdup, char *, ++ (char const *__s) ++ _GL_ARG_NONNULL ((1)) ++ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); + # endif + _GL_CXXALIAS_SYS (strdup, char *, (char const *__s)); + # endif + _GL_CXXALIASWARN (strdup); +-#elif defined GNULIB_POSIXCHECK +-# undef strdup +-# if HAVE_RAW_DECL_STRDUP ++#else ++# if __GNUC__ >= 11 && !defined strdup ++/* For -Wmismatched-dealloc: Associate strdup with free or rpl_free. */ ++_GL_FUNCDECL_SYS (strdup, char *, ++ (char const *__s) ++ _GL_ARG_NONNULL ((1)) ++ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); ++# endif ++# if defined GNULIB_POSIXCHECK ++# undef strdup ++# if HAVE_RAW_DECL_STRDUP + _GL_WARN_ON_USE (strdup, "strdup is unportable - " + "use gnulib module strdup for portability"); +-# endif +-#elif @GNULIB_MDA_STRDUP@ ++# 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 ++ platforms by defining GNULIB_NAMESPACE::strdup 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 ++# else ++# if defined __cplusplus && defined GNULIB_NAMESPACE && defined strdup ++# undef strdup ++# endif + _GL_CXXALIAS_SYS (strdup, char *, (char const *__s)); +-# endif ++# endif + _GL_CXXALIASWARN (strdup); ++# endif + #endif + + /* Append no more than N characters from SRC onto DEST. */ +diff --git a/lib/stripslash.c b/lib/stripslash.c +index b079795..99bfbe6 100644 +--- a/lib/stripslash.c ++++ b/lib/stripslash.c +@@ -3,12 +3,12 @@ + Copyright (C) 1990, 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/sys-limits.h b/lib/sys-limits.h +index 1856e7f..2d9784d 100644 +--- a/lib/sys-limits.h ++++ b/lib/sys-limits.h +@@ -2,18 +2,18 @@ + + Copyright 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License +- along with this program; if not, see . */ ++ along with this program. If not, see . */ + + #ifndef _GL_SYS_LIMITS_H + #define _GL_SYS_LIMITS_H +diff --git a/lib/sys_file.in.h b/lib/sys_file.in.h +index e18594f..4166082 100644 +--- a/lib/sys_file.in.h ++++ b/lib/sys_file.in.h +@@ -2,18 +2,18 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License +- along with this program; if not, see . */ ++ along with this program. If not, see . */ + + /* Written by Richard W.M. Jones. */ + +diff --git a/lib/sys_random.in.h b/lib/sys_random.in.h +index 1a479e9..1abd6c5 100644 +--- a/lib/sys_random.in.h ++++ b/lib/sys_random.in.h +@@ -1,18 +1,18 @@ + /* Substitute for . + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License +- along with this program; if not, see . */ ++ along with this program. If not, see . */ + + # if __GNUC__ >= 3 + @PRAGMA_SYSTEM_HEADER@ +diff --git a/lib/sys_select.in.h b/lib/sys_select.in.h +index d82c5d1..f8ef648 100644 +--- a/lib/sys_select.in.h ++++ b/lib/sys_select.in.h +@@ -1,18 +1,18 @@ + /* Substitute for . + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License +- along with this program; if not, see . */ ++ along with this program. If not, see . */ + + # if __GNUC__ >= 3 + @PRAGMA_SYSTEM_HEADER@ +diff --git a/lib/sys_socket.c b/lib/sys_socket.c +index 3b261da..d90b32c 100644 +--- a/lib/sys_socket.c ++++ b/lib/sys_socket.c +@@ -1,4 +1,22 @@ ++/* Inline functions for . ++ ++ Copyright (C) 2012-2021 Free Software Foundation, Inc. ++ ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. ++ ++ This file 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 Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ ++ + #include ++ + #define _GL_SYS_SOCKET_INLINE _GL_EXTERN_INLINE + #include "sys/socket.h" + typedef int dummy; +diff --git a/lib/sys_socket.in.h b/lib/sys_socket.in.h +index c0baa71..0a2c57d 100644 +--- a/lib/sys_socket.in.h ++++ b/lib/sys_socket.in.h +@@ -3,18 +3,18 @@ + Copyright (C) 2005-2021 Free Software Foundation, Inc. + Written by Simon Josefsson. + +- This program is free software; you can redistribute it and/or modify +- it under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License +- along with this program; if not, see . */ ++ along with this program. If not, see . */ + + /* This file is supposed to be used on platforms that lack , + on platforms where cannot be included standalone, and on +diff --git a/lib/sys_stat.in.h b/lib/sys_stat.in.h +index 125aca0..babe3db 100644 +--- a/lib/sys_stat.in.h ++++ b/lib/sys_stat.in.h +@@ -1,18 +1,18 @@ + /* Provide a more complete sys/stat.h header file. + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License +- along with this program; if not, see . */ ++ along with this program. If not, see . */ + + /* Written by Eric Blake, Paul Eggert, and Jim Meyering. */ + +diff --git a/lib/sys_time.in.h b/lib/sys_time.in.h +index f310ca5..8035fbe 100644 +--- a/lib/sys_time.in.h ++++ b/lib/sys_time.in.h +@@ -2,18 +2,18 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License +- along with this program; if not, see . */ ++ along with this program. If not, see . */ + + /* Written by Paul Eggert. */ + +diff --git a/lib/sys_times.in.h b/lib/sys_times.in.h +index 3d96200..85b728f 100644 +--- a/lib/sys_times.in.h ++++ b/lib/sys_times.in.h +@@ -1,18 +1,18 @@ + /* Provide a sys/times.h header file. + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License +- along with this program; if not, see . */ ++ along with this program. If not, see . */ + + /* Written by Simon Josefsson , 2008. */ + +diff --git a/lib/sys_types.in.h b/lib/sys_types.in.h +index 26e7db7..2079d72 100644 +--- a/lib/sys_types.in.h ++++ b/lib/sys_types.in.h +@@ -2,18 +2,18 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License +- along with this program; if not, see . */ ++ along with this program. If not, see . */ + + #if __GNUC__ >= 3 + @PRAGMA_SYSTEM_HEADER@ +diff --git a/lib/sys_uio.in.h b/lib/sys_uio.in.h +index 1941360..507ab01 100644 +--- a/lib/sys_uio.in.h ++++ b/lib/sys_uio.in.h +@@ -1,18 +1,18 @@ + /* Substitute for . + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License +- along with this program; if not, see . */ ++ along with this program. If not, see . */ + + # if __GNUC__ >= 3 + @PRAGMA_SYSTEM_HEADER@ +diff --git a/lib/tempname.h b/lib/tempname.h +index c91a58d..795bb49 100644 +--- a/lib/tempname.h ++++ b/lib/tempname.h +@@ -2,12 +2,12 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/time-internal.h b/lib/time-internal.h +index b86b7a0..6bbd0a7 100644 +--- a/lib/time-internal.h ++++ b/lib/time-internal.h +@@ -2,18 +2,18 @@ + + Copyright 2015-2021 Free Software Foundation, Inc. + +- This program is free software; you can redistribute it and/or modify +- it under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser 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, ++ This file 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 Lesser General Public License for more details. + +- You should have received a copy of the GNU Lesser General Public License along +- with this program; if not, see . */ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ + + /* Written by Paul Eggert. */ + +diff --git a/lib/time.in.h b/lib/time.in.h +index cbd2bba..a73fe59 100644 +--- a/lib/time.in.h ++++ b/lib/time.in.h +@@ -2,18 +2,18 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License +- along with this program; if not, see . */ ++ along with this program. If not, see . */ + + #if __GNUC__ >= 3 + @PRAGMA_SYSTEM_HEADER@ +diff --git a/lib/time_r.c b/lib/time_r.c +index 2510c4e..88d3c1c 100644 +--- a/lib/time_r.c ++++ b/lib/time_r.c +@@ -2,18 +2,18 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + +- You should have received a copy of the GNU Lesser General Public License along +- with this program; if not, see . */ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ + + /* Written by Paul Eggert. */ + +diff --git a/lib/time_rz.c b/lib/time_rz.c +index d32cce7..e772244 100644 +--- a/lib/time_rz.c ++++ b/lib/time_rz.c +@@ -2,18 +2,18 @@ + + Copyright 2015-2021 Free Software Foundation, Inc. + +- This program is free software; you can redistribute it and/or modify +- it under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser 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, ++ This file 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 Lesser General Public License for more details. + +- You should have received a copy of the GNU Lesser General Public License along +- with this program; if not, see . */ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ + + /* Written by Paul Eggert. */ + +diff --git a/lib/times.c b/lib/times.c +index b8afa60..72b852e 100644 +--- a/lib/times.c ++++ b/lib/times.c +@@ -2,18 +2,18 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License +- along with this program; if not, see . */ ++ along with this program. If not, see . */ + + /* Written by Simon Josefsson , 2008. */ + +diff --git a/lib/trunc.c b/lib/trunc.c +index cf2adac..1c9c420 100644 +--- a/lib/trunc.c ++++ b/lib/trunc.c +@@ -1,12 +1,12 @@ + /* Round towards zero. + Copyright (C) 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser 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, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/tzset.c b/lib/tzset.c +index 1f423c4..7fd4936 100644 +--- a/lib/tzset.c ++++ b/lib/tzset.c +@@ -2,18 +2,18 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser 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, ++ This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License +- along with this program; if not, see . */ ++ along with this program. If not, see . */ + + /* written by Jim Meyering */ + +diff --git a/lib/unistd.c b/lib/unistd.c +index 72bad1c..0763456 100644 +--- a/lib/unistd.c ++++ b/lib/unistd.c +@@ -1,4 +1,22 @@ ++/* Inline functions for . ++ ++ Copyright (C) 2012-2021 Free Software Foundation, Inc. ++ ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. ++ ++ This file 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 Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ ++ + #include ++ + #define _GL_UNISTD_INLINE _GL_EXTERN_INLINE + #include "unistd.h" + typedef int dummy; +diff --git a/lib/unistd.in.h b/lib/unistd.in.h +index 5914fd5..73c882f 100644 +--- a/lib/unistd.in.h ++++ b/lib/unistd.in.h +@@ -1,18 +1,18 @@ + /* Substitute for and wrapper around . + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License +- along with this program; if not, see . */ ++ along with this program. If not, see . */ + + #ifndef _@GUARD_PREFIX@_UNISTD_H + +@@ -1521,6 +1521,7 @@ _GL_WARN_ON_USE (group_member, "group_member is unportable - " + # undef isatty + # define isatty rpl_isatty + # endif ++# define GNULIB_defined_isatty 1 + _GL_FUNCDECL_RPL (isatty, int, (int fd)); + _GL_CXXALIAS_RPL (isatty, int, (int fd)); + # elif defined _WIN32 && !defined __CYGWIN__ +@@ -2027,15 +2028,23 @@ _GL_WARN_ON_USE (sleep, "sleep is unportable - " + #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. */ ++ platforms by defining GNULIB_NAMESPACE::swab 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)); ++/* Need to cast, because in old mingw the arguments are ++ (const char *from, char *to, size_t n). */ ++_GL_CXXALIAS_MDA_CAST (swab, void, (char *from, char *to, int n)); + # else ++# if defined __hpux /* HP-UX */ ++_GL_CXXALIAS_SYS (swab, void, (const char *from, char *to, int n)); ++# elif defined __sun && !defined _XPG4 /* Solaris */ ++_GL_CXXALIAS_SYS (swab, void, (const char *from, char *to, ssize_t n)); ++# else + _GL_CXXALIAS_SYS (swab, void, (const void *from, void *to, ssize_t n)); ++# endif + # endif + _GL_CXXALIASWARN (swab); + #endif +diff --git a/lib/unsetenv.c b/lib/unsetenv.c +index 005fb1f..b2e910e 100644 +--- a/lib/unsetenv.c ++++ b/lib/unsetenv.c +@@ -1,12 +1,12 @@ + /* 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 +- it under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/vasnprintf.c b/lib/vasnprintf.c +index 8d51006..d9b669d 100644 +--- a/lib/vasnprintf.c ++++ b/lib/vasnprintf.c +@@ -1,18 +1,18 @@ + /* vsprintf with automatic memory allocation. + Copyright (C) 1999, 2002-2021 Free Software Foundation, Inc. + +- This program is free software; you can redistribute it and/or modify +- it under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + +- You should have received a copy of the GNU Lesser General Public License along +- with this program; if not, see . */ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ + + /* This file can be parametrized with the following macros: + VASNPRINTF The name of the function being defined. +@@ -60,10 +60,16 @@ + #ifndef VASNPRINTF + # include + #endif +-#ifndef IN_LIBINTL +-# include ++ ++/* As of GCC 11.2.1, gcc -Wanalyzer-too-complex reports that main's ++ use of CHECK macros expands to code that is too complicated for gcc ++ -fanalyzer. Suppress the resulting bogus warnings. */ ++#if 10 <= __GNUC__ ++# pragma GCC diagnostic ignored "-Wanalyzer-null-argument" + #endif + ++#include ++ + /* Specification. */ + #ifndef VASNPRINTF + # if WIDE_CHAR_VERSION +@@ -1924,7 +1930,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, + + /* Ensures that allocated >= needed. Aborts through a jump to + out_of_memory if needed is SIZE_MAX or otherwise too big. */ +-#define ENSURE_ALLOCATION(needed) \ ++#define ENSURE_ALLOCATION_ELSE(needed, oom_statement) \ + if ((needed) > allocated) \ + { \ + size_t memory_size; \ +@@ -1935,17 +1941,19 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, + allocated = (needed); \ + memory_size = xtimes (allocated, sizeof (DCHAR_T)); \ + if (size_overflow_p (memory_size)) \ +- goto out_of_memory; \ ++ oom_statement \ + if (result == resultbuf || result == NULL) \ + memory = (DCHAR_T *) malloc (memory_size); \ + else \ + memory = (DCHAR_T *) realloc (result, memory_size); \ + if (memory == NULL) \ +- goto out_of_memory; \ ++ oom_statement \ + if (result == resultbuf && length > 0) \ + DCHAR_CPY (memory, result, length); \ + result = memory; \ + } ++#define ENSURE_ALLOCATION(needed) \ ++ ENSURE_ALLOCATION_ELSE((needed), goto out_of_memory; ) + + for (cp = format, i = 0, dp = &d.dir[0]; ; cp = dp->dir_end, i++, dp++) + { +@@ -2193,7 +2201,8 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, + } + if (converted != result + length) + { +- ENSURE_ALLOCATION (xsum (length, converted_len)); ++ ENSURE_ALLOCATION_ELSE (xsum (length, converted_len), ++ { free (converted); goto out_of_memory; }); + DCHAR_CPY (result + length, converted, converted_len); + free (converted); + } +@@ -2317,7 +2326,8 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, + } + if (converted != result + length) + { +- ENSURE_ALLOCATION (xsum (length, converted_len)); ++ ENSURE_ALLOCATION_ELSE (xsum (length, converted_len), ++ { free (converted); goto out_of_memory; }); + DCHAR_CPY (result + length, converted, converted_len); + free (converted); + } +@@ -2441,7 +2451,8 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, + } + if (converted != result + length) + { +- ENSURE_ALLOCATION (xsum (length, converted_len)); ++ ENSURE_ALLOCATION_ELSE (xsum (length, converted_len), ++ { free (converted); goto out_of_memory; }); + DCHAR_CPY (result + length, converted, converted_len); + free (converted); + } +@@ -2944,7 +2955,8 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, + } + } + # else +- ENSURE_ALLOCATION (xsum (length, tmpdst_len)); ++ ENSURE_ALLOCATION_ELSE (xsum (length, tmpdst_len), ++ { free (tmpdst); goto out_of_memory; }); + DCHAR_CPY (result + length, tmpdst, tmpdst_len); + free (tmpdst); + length += tmpdst_len; +@@ -3147,7 +3159,8 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, + } + } + # else +- ENSURE_ALLOCATION (xsum (length, tmpdst_len)); ++ ENSURE_ALLOCATION_ELSE (xsum (length, tmpdst_len), ++ { free (tmpdst); goto out_of_memory; }); + DCHAR_CPY (result + length, tmpdst, tmpdst_len); + free (tmpdst); + length += tmpdst_len; +@@ -5598,7 +5611,8 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, + CLEANUP (); + return NULL; + } +- ENSURE_ALLOCATION (xsum (length, tmpdst_len)); ++ ENSURE_ALLOCATION_ELSE (xsum (length, tmpdst_len), ++ { free (tmpdst); goto out_of_memory; }); + DCHAR_CPY (result + length, tmpdst, tmpdst_len); + free (tmpdst); + count = tmpdst_len; +diff --git a/lib/vasnprintf.h b/lib/vasnprintf.h +index aaed859..9b02cdf 100644 +--- a/lib/vasnprintf.h ++++ b/lib/vasnprintf.h +@@ -1,18 +1,18 @@ + /* vsprintf with automatic memory allocation. + Copyright (C) 2002-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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + +- You should have received a copy of the GNU Lesser General Public License along +- with this program; if not, see . */ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ + + #ifndef _VASNPRINTF_H + #define _VASNPRINTF_H +diff --git a/lib/verify.h b/lib/verify.h +index d1b4995..a8ca59b 100644 +--- a/lib/verify.h ++++ b/lib/verify.h +@@ -2,12 +2,12 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +@@ -25,7 +25,7 @@ + works as per C11. This is supported by GCC 4.6.0+ and by clang 4+. + + Define _GL_HAVE__STATIC_ASSERT1 to 1 if _Static_assert (R) works as +- per C2X. This is supported by GCC 9.1+. ++ per C2x. This is supported by GCC 9.1+. + + Support compilers claiming conformance to the relevant standard, + and also support GCC when not pedantic. If we were willing to slow +@@ -202,7 +202,7 @@ template + + This macro requires three or more arguments but uses at most the first + two, so that the _Static_assert macro optionally defined below supports +- both the C11 two-argument syntax and the C2X one-argument syntax. ++ both the C11 two-argument syntax and the C2x one-argument syntax. + + Unfortunately, unlike C11, this implementation must appear as an + ordinary declaration, and cannot appear inside struct { ... }. */ +diff --git a/lib/vsnprintf.c b/lib/vsnprintf.c +index c94c5cb..4a0a3dc 100644 +--- a/lib/vsnprintf.c ++++ b/lib/vsnprintf.c +@@ -2,18 +2,18 @@ + Copyright (C) 2004, 2006-2021 Free Software Foundation, Inc. + Written by Simon Josefsson and Yoann Vandoorselaere . + +- This program is free software; you can redistribute it and/or modify +- it under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + +- You should have received a copy of the GNU Lesser General Public License along +- with this program; if not, see . */ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ + + #ifdef HAVE_CONFIG_H + # include +diff --git a/lib/w32sock.h b/lib/w32sock.h +index 9b6a231..635a1b2 100644 +--- a/lib/w32sock.h ++++ b/lib/w32sock.h +@@ -2,12 +2,12 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/wchar.in.h b/lib/wchar.in.h +index fe4171c..be5d36c 100644 +--- a/lib/wchar.in.h ++++ b/lib/wchar.in.h +@@ -2,18 +2,18 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License +- along with this program; if not, see . */ ++ along with this program. If not, see . */ + + /* Written by Eric Blake. */ + +@@ -72,6 +72,9 @@ + # include + #endif + ++/* Get free(). */ ++#include ++ + /* Include the original if it exists. + Some builds of uClibc lack it. */ + /* The include_next requires a split double-inclusion guard. */ +@@ -111,7 +114,7 @@ + /* mingw and MSVC define wint_t as 'unsigned short' in or + . This is too small: ISO C 99 section 7.24.1.(2) says that + wint_t must be "unchanged by default argument promotions". Override it. */ +-# if @GNULIB_OVERRIDES_WINT_T@ ++# if @GNULIBHEADERS_OVERRIDE_WINT_T@ + # if !GNULIB_defined_wint_t + # if @HAVE_CRTDEFS_H@ + # include +@@ -941,36 +944,48 @@ _GL_WARN_ON_USE (wcsxfrm, "wcsxfrm is unportable - " + # 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)); ++# if !@HAVE_WCSDUP@ || __GNUC__ >= 11 ++_GL_FUNCDECL_SYS (wcsdup, wchar_t *, ++ (const wchar_t *s) ++ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); + # endif + _GL_CXXALIAS_SYS (wcsdup, wchar_t *, (const wchar_t *s)); + # endif + _GL_CXXALIASWARN (wcsdup); +-#elif defined GNULIB_POSIXCHECK +-# undef wcsdup +-# if HAVE_RAW_DECL_WCSDUP ++#else ++# if __GNUC__ >= 11 && !defined wcsdup ++/* For -Wmismatched-dealloc: Associate wcsdup with free or rpl_free. */ ++_GL_FUNCDECL_SYS (wcsdup, wchar_t *, ++ (const wchar_t *s) ++ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); ++# endif ++# if defined GNULIB_POSIXCHECK ++# undef wcsdup ++# if HAVE_RAW_DECL_WCSDUP + _GL_WARN_ON_USE (wcsdup, "wcsdup is unportable - " + "use gnulib module wcsdup for portability"); +-# endif +-#elif @GNULIB_MDA_WCSDUP@ ++# 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 ++# 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@ ++# else ++_GL_FUNCDECL_SYS (wcsdup, wchar_t *, ++ (const wchar_t *s) ++ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); ++# if @HAVE_DECL_WCSDUP@ + _GL_CXXALIAS_SYS (wcsdup, wchar_t *, (const wchar_t *s)); ++# endif + # endif +-# endif +-# if (defined _WIN32 && !defined __CYGWIN__) || @HAVE_DECL_WCSDUP@ ++# if (defined _WIN32 && !defined __CYGWIN__) || @HAVE_DECL_WCSDUP@ + _GL_CXXALIASWARN (wcsdup); ++# endif + # endif + #endif + +diff --git a/lib/wcrtomb.c b/lib/wcrtomb.c +index 76d21ae..5c9fd79 100644 +--- a/lib/wcrtomb.c ++++ b/lib/wcrtomb.c +@@ -2,12 +2,12 @@ + Copyright (C) 2008-2021 Free Software Foundation, Inc. + Written by Bruno Haible , 2008. + +- This program is free software: you can redistribute it and/or modify +- it under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/wctype-h.c b/lib/wctype-h.c +index bb5f847..150221d 100644 +--- a/lib/wctype-h.c ++++ b/lib/wctype-h.c +@@ -1,4 +1,23 @@ ++/* Inline functions for . ++ ++ Copyright (C) 2012-2021 Free Software Foundation, Inc. ++ ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. ++ ++ This file 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 Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ ++ + /* Normally this would be wctype.c, but that name's already taken. */ ++ + #include ++ + #define _GL_WCTYPE_INLINE _GL_EXTERN_INLINE + #include "wctype.h" +diff --git a/lib/wctype.in.h b/lib/wctype.in.h +index 6f0cd21..652d811 100644 +--- a/lib/wctype.in.h ++++ b/lib/wctype.in.h +@@ -2,18 +2,18 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License +- along with this program; if not, see . */ ++ along with this program. If not, see . */ + + /* Written by Bruno Haible and Paul Eggert. */ + +@@ -103,7 +103,7 @@ _GL_INLINE_HEADER_BEGIN + /* mingw and MSVC define wint_t as 'unsigned short' in or + . This is too small: ISO C 99 section 7.24.1.(2) says that + wint_t must be "unchanged by default argument promotions". Override it. */ +-# if @GNULIB_OVERRIDES_WINT_T@ ++# if @GNULIBHEADERS_OVERRIDE_WINT_T@ + # if !GNULIB_defined_wint_t + # if @HAVE_CRTDEFS_H@ + # include +@@ -132,7 +132,7 @@ typedef unsigned int rpl_wint_t; + same way, or not at all. */ + # if ! @HAVE_ISWCNTRL@ || @REPLACE_ISWCNTRL@ + +-# if @GNULIB_OVERRIDES_WINT_T@ /* implies @REPLACE_ISWCNTRL@ */ ++# if @GNULIBHEADERS_OVERRIDE_WINT_T@ /* implies @REPLACE_ISWCNTRL@ */ + + _GL_WCTYPE_INLINE int + rpl_iswalnum (wint_t wc) +@@ -496,7 +496,7 @@ _GL_FUNCDECL_RPL (iswxdigit, int, (wint_t wc)); + + # endif + +-# if defined __MINGW32__ && !@GNULIB_OVERRIDES_WINT_T@ ++# if defined __MINGW32__ && !@GNULIBHEADERS_OVERRIDE_WINT_T@ + + /* On native Windows, wchar_t is uint16_t, and wint_t is uint32_t. + The functions towlower and towupper are implemented in the MSVCRT library +@@ -529,7 +529,7 @@ rpl_towupper (wint_t wc) + # define towupper rpl_towupper + # endif + +-# endif /* __MINGW32__ && !@GNULIB_OVERRIDES_WINT_T@ */ ++# endif /* __MINGW32__ && !@GNULIBHEADERS_OVERRIDE_WINT_T@ */ + + # define GNULIB_defined_wctype_functions 1 + #endif +@@ -646,7 +646,7 @@ _GL_WARN_ON_USE (wctype, "wctype is unportable - " + The argument WC must be either a wchar_t value or WEOF. + The argument DESC must have been returned by the wctype() function. */ + #if @GNULIB_ISWCTYPE@ +-# if @GNULIB_OVERRIDES_WINT_T@ ++# if @GNULIBHEADERS_OVERRIDE_WINT_T@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef iswctype + # define iswctype rpl_iswctype +diff --git a/lib/windows-initguard.h b/lib/windows-initguard.h +index e84051e..7999b23 100644 +--- a/lib/windows-initguard.h ++++ b/lib/windows-initguard.h +@@ -1,18 +1,18 @@ + /* Init guards, somewhat like spinlocks (native Windows implementation). + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License +- along with this program; if not, see . */ ++ along with this program. If not, see . */ + + /* Written by Bruno Haible , 2005. + Based on GCC's gthr-win32.h. */ +diff --git a/lib/write.c b/lib/write.c +index bc53d4d..614cdc6 100644 +--- a/lib/write.c ++++ b/lib/write.c +@@ -2,12 +2,12 @@ + Copyright (C) 2008-2021 Free Software Foundation, Inc. + Written by Bruno Haible , 2008. + +- This program is free software: you can redistribute it and/or modify +- it under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +diff --git a/lib/xalloc-oversized.h b/lib/xalloc-oversized.h +index d255969..4184f33 100644 +--- a/lib/xalloc-oversized.h ++++ b/lib/xalloc-oversized.h +@@ -2,12 +2,12 @@ + + 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 Lesser General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. +@@ -22,33 +22,38 @@ + #include + + /* True if N * S does not fit into both ptrdiff_t and size_t. +- S must be positive and N must be nonnegative. ++ N and S should be nonnegative and free of side effects. + This expands to a constant expression if N and S are both constants. + By gnulib convention, SIZE_MAX represents overflow in size_t + calculations, so the conservative size_t-based dividend to use here + is SIZE_MAX - 1. */ + #define __xalloc_oversized(n, s) \ +- ((size_t) (PTRDIFF_MAX < SIZE_MAX ? PTRDIFF_MAX : SIZE_MAX - 1) / (s) < (n)) ++ ((s) != 0 \ ++ && ((size_t) (PTRDIFF_MAX < SIZE_MAX ? PTRDIFF_MAX : SIZE_MAX - 1) / (s) \ ++ < (n))) + +-#if PTRDIFF_MAX < SIZE_MAX +-typedef ptrdiff_t xalloc_count_t; +-#else +-typedef size_t xalloc_count_t; +-#endif ++/* Return 1 if and only if an array of N objects, each of size S, ++ cannot exist reliably because its total size in bytes would exceed ++ MIN (PTRDIFF_MAX, SIZE_MAX - 1). ++ ++ N and S should be nonnegative and free of side effects. ++ ++ Warning: (xalloc_oversized (N, S) ? NULL : malloc (N * S)) can ++ misbehave if N and S are both narrower than ptrdiff_t and size_t, ++ and can be rewritten as (xalloc_oversized (N, S) ? NULL ++ : malloc (N * (size_t) S)). + +-/* Return 1 if an array of N objects, each of size S, cannot exist reliably +- because its total size in bytes exceeds MIN (PTRDIFF_MAX, SIZE_MAX). +- N must be nonnegative, S must be positive, and either N or S should be +- of type ptrdiff_t or size_t or wider. This is a macro, not a function, +- so that it works even if an argument exceeds MAX (PTRDIFF_MAX, SIZE_MAX). */ +-#if 7 <= __GNUC__ && !defined __clang__ ++ This is a macro, not a function, so that it works even if an ++ argument exceeds MAX (PTRDIFF_MAX, SIZE_MAX). */ ++#if 7 <= __GNUC__ && !defined __clang__ && PTRDIFF_MAX < SIZE_MAX + # define xalloc_oversized(n, s) \ +- __builtin_mul_overflow_p (n, s, (xalloc_count_t) 1) +-#elif 5 <= __GNUC__ && !defined __ICC && !__STRICT_ANSI__ ++ __builtin_mul_overflow_p (n, s, (ptrdiff_t) 1) ++#elif (5 <= __GNUC__ && !defined __ICC && !__STRICT_ANSI__ \ ++ && PTRDIFF_MAX < SIZE_MAX) + # define xalloc_oversized(n, s) \ + (__builtin_constant_p (n) && __builtin_constant_p (s) \ + ? __xalloc_oversized (n, s) \ +- : ({ xalloc_count_t __xalloc_count; \ ++ : ({ ptrdiff_t __xalloc_count; \ + __builtin_mul_overflow (n, s, &__xalloc_count); })) + + /* Other compilers use integer division; this may be slower but is +diff --git a/lib/xsize.c b/lib/xsize.c +index 4b4914c..b3d73a2 100644 +--- a/lib/xsize.c ++++ b/lib/xsize.c +@@ -1,3 +1,21 @@ ++/* Checked size_t computations. ++ ++ Copyright (C) 2012-2021 Free Software Foundation, Inc. ++ ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. ++ ++ This file 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 Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ ++ + #include ++ + #define XSIZE_INLINE _GL_EXTERN_INLINE + #include "xsize.h" +diff --git a/lib/xsize.h b/lib/xsize.h +index d4d7b1c..91fa877 100644 +--- a/lib/xsize.h ++++ b/lib/xsize.h +@@ -2,18 +2,18 @@ + + Copyright (C) 2003, 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 Lesser General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. + +- This program is distributed in the hope that it will be useful, ++ This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License +- along with this program; if not, see . */ ++ along with this program. If not, see . */ + + #ifndef _XSIZE_H + #define _XSIZE_H +diff --git a/m4/arpa_inet_h.m4 b/m4/arpa_inet_h.m4 +index c4e386d..a3ba256 100644 +--- a/m4/arpa_inet_h.m4 ++++ b/m4/arpa_inet_h.m4 +@@ -1,4 +1,4 @@ +-# arpa_inet_h.m4 serial 14 ++# arpa_inet_h.m4 serial 17 + 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, +@@ -6,10 +6,10 @@ dnl with or without modifications, as long as this notice is preserved. + + dnl Written by Simon Josefsson and Bruno Haible + +-AC_DEFUN([gl_HEADER_ARPA_INET], ++AC_DEFUN_ONCE([gl_ARPA_INET_H], + [ +- dnl Use AC_REQUIRE here, so that the default behavior below is expanded +- dnl once only, before all statements that occur in other macros. ++ dnl Ensure to expand the default settings once only, before all statements ++ dnl that occur in other macros. + AC_REQUIRE([gl_ARPA_INET_H_DEFAULTS]) + + AC_CHECK_HEADERS_ONCE([arpa/inet.h]) +@@ -40,17 +40,32 @@ AC_DEFUN([gl_HEADER_ARPA_INET], + ]], [inet_ntop inet_pton]) + ]) + ++# gl_ARPA_INET_MODULE_INDICATOR([modulename]) ++# sets the shell variable that indicates the presence of the given module ++# to a C preprocessor expression that will evaluate to 1. ++# This macro invocation must not occur in macros that are AC_REQUIREd. + AC_DEFUN([gl_ARPA_INET_MODULE_INDICATOR], + [ +- dnl Use AC_REQUIRE here, so that the default settings are expanded once only. +- AC_REQUIRE([gl_ARPA_INET_H_DEFAULTS]) ++ dnl Ensure to expand the default settings once only. ++ gl_ARPA_INET_H_REQUIRE_DEFAULTS + gl_MODULE_INDICATOR_SET_VARIABLE([$1]) + ]) + ++# Initializes the default values for AC_SUBSTed shell variables. ++# This macro must not be AC_REQUIREd. It must only be invoked, and only ++# outside of macros or in macros that are not AC_REQUIREd. ++AC_DEFUN([gl_ARPA_INET_H_REQUIRE_DEFAULTS], ++[ ++ m4_defun(GL_MODULE_INDICATOR_PREFIX[_ARPA_INET_H_MODULE_INDICATOR_DEFAULTS], [ ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_INET_NTOP]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_INET_PTON]) ++ ]) ++ m4_require(GL_MODULE_INDICATOR_PREFIX[_ARPA_INET_H_MODULE_INDICATOR_DEFAULTS]) ++ AC_REQUIRE([gl_ARPA_INET_H_DEFAULTS]) ++]) ++ + AC_DEFUN([gl_ARPA_INET_H_DEFAULTS], + [ +- GNULIB_INET_NTOP=0; AC_SUBST([GNULIB_INET_NTOP]) +- GNULIB_INET_PTON=0; AC_SUBST([GNULIB_INET_PTON]) + dnl Assume proper GNU behavior unless another module says otherwise. + HAVE_DECL_INET_NTOP=1; AC_SUBST([HAVE_DECL_INET_NTOP]) + HAVE_DECL_INET_PTON=1; AC_SUBST([HAVE_DECL_INET_PTON]) +diff --git a/m4/dirent_h.m4 b/m4/dirent_h.m4 +index 6d86142..17e2a20 100644 +--- a/m4/dirent_h.m4 ++++ b/m4/dirent_h.m4 +@@ -1,4 +1,4 @@ +-# dirent_h.m4 serial 16 ++# dirent_h.m4 serial 19 + 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, +@@ -6,10 +6,10 @@ dnl with or without modifications, as long as this notice is preserved. + + dnl Written by Bruno Haible. + +-AC_DEFUN([gl_DIRENT_H], ++AC_DEFUN_ONCE([gl_DIRENT_H], + [ +- dnl Use AC_REQUIRE here, so that the default behavior below is expanded +- dnl once only, before all statements that occur in other macros. ++ dnl Ensure to expand the default settings once only, before all statements ++ dnl that occur in other macros. + AC_REQUIRE([gl_DIRENT_H_DEFAULTS]) + + dnl is always overridden, because of GNULIB_POSIXCHECK. +@@ -27,26 +27,41 @@ AC_DEFUN([gl_DIRENT_H], + ]], [alphasort closedir dirfd fdopendir opendir readdir rewinddir scandir]) + ]) + ++# gl_DIRENT_MODULE_INDICATOR([modulename]) ++# sets the shell variable that indicates the presence of the given module ++# to a C preprocessor expression that will evaluate to 1. ++# This macro invocation must not occur in macros that are AC_REQUIREd. + AC_DEFUN([gl_DIRENT_MODULE_INDICATOR], + [ +- dnl Use AC_REQUIRE here, so that the default settings are expanded once only. +- AC_REQUIRE([gl_DIRENT_H_DEFAULTS]) ++ dnl Ensure to expand the default settings once only. ++ gl_DIRENT_H_REQUIRE_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]) + ]) + ++# Initializes the default values for AC_SUBSTed shell variables. ++# This macro must not be AC_REQUIREd. It must only be invoked, and only ++# outside of macros or in macros that are not AC_REQUIREd. ++AC_DEFUN([gl_DIRENT_H_REQUIRE_DEFAULTS], ++[ ++ m4_defun(GL_MODULE_INDICATOR_PREFIX[_DIRENT_H_MODULE_INDICATOR_DEFAULTS], [ ++ gl_UNISTD_H_REQUIRE_DEFAULTS dnl for REPLACE_FCHDIR ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_OPENDIR]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_READDIR]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REWINDDIR]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CLOSEDIR]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_DIRFD]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FDOPENDIR]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SCANDIR]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ALPHASORT]) ++ ]) ++ m4_require(GL_MODULE_INDICATOR_PREFIX[_DIRENT_H_MODULE_INDICATOR_DEFAULTS]) ++ AC_REQUIRE([gl_DIRENT_H_DEFAULTS]) ++]) ++ + AC_DEFUN([gl_DIRENT_H_DEFAULTS], + [ +- AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) dnl for REPLACE_FCHDIR +- GNULIB_OPENDIR=0; AC_SUBST([GNULIB_OPENDIR]) +- GNULIB_READDIR=0; AC_SUBST([GNULIB_READDIR]) +- GNULIB_REWINDDIR=0; AC_SUBST([GNULIB_REWINDDIR]) +- GNULIB_CLOSEDIR=0; AC_SUBST([GNULIB_CLOSEDIR]) +- GNULIB_DIRFD=0; AC_SUBST([GNULIB_DIRFD]) +- GNULIB_FDOPENDIR=0; AC_SUBST([GNULIB_FDOPENDIR]) +- GNULIB_SCANDIR=0; AC_SUBST([GNULIB_SCANDIR]) +- GNULIB_ALPHASORT=0; AC_SUBST([GNULIB_ALPHASORT]) + dnl Assume proper GNU behavior unless another module says otherwise. + HAVE_OPENDIR=1; AC_SUBST([HAVE_OPENDIR]) + HAVE_READDIR=1; AC_SUBST([HAVE_READDIR]) +diff --git a/m4/environ.m4 b/m4/environ.m4 +index d971770..ae53291 100644 +--- a/m4/environ.m4 ++++ b/m4/environ.m4 +@@ -1,4 +1,4 @@ +-# environ.m4 serial 7 ++# environ.m4 serial 8 + 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, +@@ -33,7 +33,8 @@ AC_DEFUN([gt_CHECK_VAR_DECL], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[$1 +- extern struct { int foo; } $2;]], ++ typedef struct { int foo; } foo_t; ++ extern foo_t $2;]], + [[$2.foo = 1;]])], + [gt_cv_var=no], + [gt_cv_var=yes])]) +diff --git a/m4/fcntl_h.m4 b/m4/fcntl_h.m4 +index e63a82f..aba4473 100644 +--- a/m4/fcntl_h.m4 ++++ b/m4/fcntl_h.m4 +@@ -1,4 +1,4 @@ +-# serial 17 ++# serial 20 + # Configure fcntl.h. + dnl Copyright (C) 2006-2007, 2009-2021 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation +@@ -7,7 +7,7 @@ dnl with or without modifications, as long as this notice is preserved. + + dnl Written by Paul Eggert. + +-AC_DEFUN([gl_FCNTL_H], ++AC_DEFUN_ONCE([gl_FCNTL_H], + [ + AC_REQUIRE([gl_FCNTL_H_DEFAULTS]) + AC_REQUIRE([gl_FCNTL_O_FLAGS]) +@@ -26,25 +26,40 @@ AC_DEFUN([gl_FCNTL_H], + ]], [fcntl openat]) + ]) + ++# gl_FCNTL_MODULE_INDICATOR([modulename]) ++# sets the shell variable that indicates the presence of the given module ++# to a C preprocessor expression that will evaluate to 1. ++# This macro invocation must not occur in macros that are AC_REQUIREd. + AC_DEFUN([gl_FCNTL_MODULE_INDICATOR], + [ +- dnl Use AC_REQUIRE here, so that the default settings are expanded once only. +- AC_REQUIRE([gl_FCNTL_H_DEFAULTS]) ++ dnl Ensure to expand the default settings once only. ++ gl_FCNTL_H_REQUIRE_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]) + ]) + ++# Initializes the default values for AC_SUBSTed shell variables. ++# This macro must not be AC_REQUIREd. It must only be invoked, and only ++# outside of macros or in macros that are not AC_REQUIREd. ++AC_DEFUN([gl_FCNTL_H_REQUIRE_DEFAULTS], ++[ ++ m4_defun(GL_MODULE_INDICATOR_PREFIX[_FCNTL_H_MODULE_INDICATOR_DEFAULTS], [ ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CREAT]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FCNTL]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_NONBLOCKING]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_OPEN]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_OPENAT]) ++ dnl Support Microsoft deprecated alias function names by default. ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_CREAT], [1]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_OPEN], [1]) ++ ]) ++ m4_require(GL_MODULE_INDICATOR_PREFIX[_FCNTL_H_MODULE_INDICATOR_DEFAULTS]) ++ AC_REQUIRE([gl_FCNTL_H_DEFAULTS]) ++]) ++ + AC_DEFUN([gl_FCNTL_H_DEFAULTS], + [ +- GNULIB_CREAT=0; AC_SUBST([GNULIB_CREAT]) +- GNULIB_FCNTL=0; AC_SUBST([GNULIB_FCNTL]) +- GNULIB_NONBLOCKING=0; AC_SUBST([GNULIB_NONBLOCKING]) +- GNULIB_OPEN=0; AC_SUBST([GNULIB_OPEN]) +- 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]) +diff --git a/m4/flock.m4 b/m4/flock.m4 +index eb46642..e1e5fe0 100644 +--- a/m4/flock.m4 ++++ b/m4/flock.m4 +@@ -1,4 +1,4 @@ +-# flock.m4 serial 3 ++# flock.m4 serial 4 + 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, +@@ -6,7 +6,7 @@ dnl with or without modifications, as long as this notice is preserved. + + AC_DEFUN([gl_FUNC_FLOCK], + [ +- AC_REQUIRE([gl_HEADER_SYS_FILE_H_DEFAULTS]) ++ AC_REQUIRE([gl_SYS_FILE_H_DEFAULTS]) + AC_CHECK_FUNCS_ONCE([flock]) + if test $ac_cv_func_flock = no; then + HAVE_FLOCK=0 +diff --git a/m4/fstat.m4 b/m4/fstat.m4 +index 3b5b238..cdaca80 100644 +--- a/m4/fstat.m4 ++++ b/m4/fstat.m4 +@@ -1,4 +1,4 @@ +-# fstat.m4 serial 7 ++# fstat.m4 serial 8 + 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, +@@ -34,7 +34,7 @@ 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_SYS_STAT_H]) + AC_REQUIRE([gl_PREREQ_STAT_W32]) + : + ]) +diff --git a/m4/getaddrinfo.m4 b/m4/getaddrinfo.m4 +index 97889a8..3f8e04f 100644 +--- a/m4/getaddrinfo.m4 ++++ b/m4/getaddrinfo.m4 +@@ -1,4 +1,4 @@ +-# getaddrinfo.m4 serial 33 ++# getaddrinfo.m4 serial 34 + 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, +@@ -6,8 +6,8 @@ dnl with or without modifications, as long as this notice is preserved. + + AC_DEFUN([gl_GETADDRINFO], + [ +- AC_REQUIRE([gl_HEADER_SYS_SOCKET])dnl for HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H +- AC_REQUIRE([gl_HEADER_NETDB])dnl for HAVE_NETDB_H ++ AC_REQUIRE([gl_SYS_SOCKET_H])dnl for HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H ++ AC_REQUIRE([gl_NETDB_H])dnl for HAVE_NETDB_H + GETADDRINFO_LIB= + gai_saved_LIBS="$LIBS" + +@@ -156,13 +156,13 @@ const char *gai_strerror(int);]])], + # Prerequisites of lib/netdb.in.h and lib/getaddrinfo.c. + AC_DEFUN([gl_PREREQ_GETADDRINFO], [ + AC_REQUIRE([gl_NETDB_H_DEFAULTS]) +- AC_REQUIRE([gl_HEADER_SYS_SOCKET])dnl for HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H ++ AC_REQUIRE([gl_SYS_SOCKET_H])dnl for HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H + AC_REQUIRE([gl_HOSTENT]) dnl for HOSTENT_LIB + AC_REQUIRE([gl_SERVENT]) dnl for SERVENT_LIB + AC_REQUIRE([gl_FUNC_INET_NTOP]) dnl for INET_NTOP_LIB + AC_REQUIRE([AC_C_RESTRICT]) + AC_REQUIRE([gl_SOCKET_FAMILIES]) +- AC_REQUIRE([gl_HEADER_SYS_SOCKET]) ++ AC_REQUIRE([gl_SYS_SOCKET_H]) + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + + dnl Including sys/socket.h is wrong for Windows, but Windows does not +diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4 +index f2eff10..c801b3d 100644 +--- a/m4/gnulib-common.m4 ++++ b/m4/gnulib-common.m4 +@@ -1,4 +1,4 @@ +-# gnulib-common.m4 serial 63 ++# gnulib-common.m4 serial 67 + 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, +@@ -85,12 +85,12 @@ AC_DEFUN([gl_COMMON_BODY], [ + # 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) ++# define _GL_ATTR_malloc _GL_GNUC_PREREQ (3, 0) + # 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) +@@ -103,6 +103,12 @@ AC_DEFUN([gl_COMMON_BODY], [ + # define _GL_ATTR_warn_unused_result _GL_GNUC_PREREQ (3, 4) + #endif + ++#ifdef __has_c_attribute ++# define _GL_HAS_C_ATTRIBUTE(attr) __has_c_attribute (__##attr##__) ++#else ++# define _GL_HAS_C_ATTRIBUTE(attr) 0 ++#endif ++ + ]dnl There is no _GL_ATTRIBUTE_ALIGNED; use stdalign's _Alignas instead. + [ + #if _GL_HAS_ATTRIBUTE (alloc_size) +@@ -142,7 +148,20 @@ AC_DEFUN([gl_COMMON_BODY], [ + # define _GL_ATTRIBUTE_CONST + #endif + +-#if 201710L < __STDC_VERSION__ ++/* _GL_ATTRIBUTE_DEALLOC (F, I) is for functions returning pointers ++ that can be freed by passing them as the Ith argument to the ++ function F. _GL_ATTRIBUTE_DEALLOC_FREE is for functions that ++ return pointers that can be freed via 'free'; it can be used ++ only after including stdlib.h. These macros cannot be used on ++ inline functions. */ ++#if _GL_GNUC_PREREQ (11, 0) ++# define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i))) ++#else ++# define _GL_ATTRIBUTE_DEALLOC(f, i) ++#endif ++#define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (free, 1) ++ ++#if _GL_HAS_C_ATTRIBUTE (deprecated) + # define _GL_ATTRIBUTE_DEPRECATED [[__deprecated__]] + #elif _GL_HAS_ATTRIBUTE (deprecated) + # define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__)) +@@ -168,7 +187,7 @@ AC_DEFUN([gl_COMMON_BODY], [ + #endif + + /* FALLTHROUGH is special, because it always expands to something. */ +-#if 201710L < __STDC_VERSION__ ++#if _GL_HAS_C_ATTRIBUTE (fallthrough) + # define _GL_ATTRIBUTE_FALLTHROUGH [[__fallthrough__]] + #elif _GL_HAS_ATTRIBUTE (fallthrough) + # define _GL_ATTRIBUTE_FALLTHROUGH __attribute__ ((__fallthrough__)) +@@ -188,6 +207,12 @@ AC_DEFUN([gl_COMMON_BODY], [ + # define _GL_ATTRIBUTE_LEAF + #endif + ++#if _GL_HAS_ATTRIBUTE (malloc) ++# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) ++#else ++# define _GL_ATTRIBUTE_MALLOC ++#endif ++ + /* 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__)) +@@ -195,24 +220,15 @@ AC_DEFUN([gl_COMMON_BODY], [ + # define _GL_ATTRIBUTE_MAY_ALIAS + #endif + +-#if 201710L < __STDC_VERSION__ ++#if _GL_HAS_C_ATTRIBUTE (maybe_unused) + # 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 ++# define _GL_ATTRIBUTE_MAYBE_UNUSED _GL_ATTRIBUTE_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 +-#endif +- +-#if 201710L < __STDC_VERSION__ ++#if _GL_HAS_C_ATTRIBUTE (nodiscard) + # define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]] + #elif _GL_HAS_ATTRIBUTE (warn_unused_result) + # define _GL_ATTRIBUTE_NODISCARD __attribute__ ((__warn_unused_result__)) +@@ -270,11 +286,19 @@ AC_DEFUN([gl_COMMON_BODY], [ + # define _GL_ATTRIBUTE_SENTINEL(pos) + #endif + ++#if _GL_HAS_ATTRIBUTE (unused) ++# define _GL_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) ++#else ++# define _GL_ATTRIBUTE_UNUSED ++#endif ++/* Earlier spellings of this macro. */ ++#define _GL_UNUSED _GL_ATTRIBUTE_UNUSED ++ + ]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 ++# define _GL_UNUSED_LABEL _GL_ATTRIBUTE_UNUSED + #else + # define _GL_UNUSED_LABEL + #endif +@@ -357,6 +381,16 @@ AC_DEFUN([gl_COMMON_BODY], [ + export LIBC_FATAL_STDERR_ + ]) + ++# gl_MODULE_INDICATOR_INIT_VARIABLE([variablename]) ++# gl_MODULE_INDICATOR_INIT_VARIABLE([variablename], [initialvalue]) ++# initializes the shell variable that indicates the presence of the given module ++# as a C preprocessor expression. ++AC_DEFUN([gl_MODULE_INDICATOR_INIT_VARIABLE], ++[ ++ GL_MODULE_INDICATOR_PREFIX[]_[$1]=m4_if([$2], , [0], [$2]) ++ AC_SUBST(GL_MODULE_INDICATOR_PREFIX[]_[$1]) ++]) ++ + # gl_MODULE_INDICATOR_CONDITION + # expands to a C preprocessor expression that evaluates to 1 or 0, depending + # whether a gnulib module that has been requested shall be considered present +@@ -369,9 +403,9 @@ m4_define([gl_MODULE_INDICATOR_CONDITION], [1]) + AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE], + [ + gl_MODULE_INDICATOR_SET_VARIABLE_AUX( +- [GNULIB_[]m4_translit([[$1]], +- [abcdefghijklmnopqrstuvwxyz./-], +- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])], ++ [GL_MODULE_INDICATOR_PREFIX[]_GNULIB_[]m4_translit([[$1]], ++ [abcdefghijklmnopqrstuvwxyz./-], ++ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])], + [gl_MODULE_INDICATOR_CONDITION]) + ]) + +@@ -656,6 +690,72 @@ AC_DEFUN([gl_CACHE_VAL_SILENT], + ]) + ]) + ++# gl_CC_ALLOW_WARNINGS ++# sets and substitutes a variable GL_CFLAG_ALLOW_WARNINGS, to a $(CC) option ++# that reverts a preceding '-Werror' option, if available. ++# This is expected to be '-Wno-error' on gcc, clang (except clang/MSVC), xlclang ++# and empty otherwise. ++AC_DEFUN([gl_CC_ALLOW_WARNINGS], ++[ ++ AC_REQUIRE([AC_PROG_CC]) ++ AC_CACHE_CHECK([for C compiler option to allow warnings], ++ [gl_cv_cc_wallow], ++ [rm -f conftest* ++ echo 'int dummy;' > conftest.c ++ AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -c conftest.c 2>conftest1.err]) >/dev/null ++ AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -Wno-error -c conftest.c 2>conftest2.err]) >/dev/null ++ dnl Test the number of error output lines, because AIX xlc accepts the ++ dnl option '-Wno-error', just to produce a warning ++ dnl "Option -Wno-error was incorrectly specified. The option will be ignored." ++ dnl afterwards. ++ if test $? = 0 && test `wc -l < conftest1.err` = `wc -l < conftest2.err`; then ++ gl_cv_cc_wallow='-Wno-error' ++ else ++ gl_cv_cc_wallow=none ++ fi ++ rm -f conftest* ++ ]) ++ case "$gl_cv_cc_wallow" in ++ none) GL_CFLAG_ALLOW_WARNINGS='' ;; ++ *) GL_CFLAG_ALLOW_WARNINGS="$gl_cv_cc_wallow" ;; ++ esac ++ AC_SUBST([GL_CFLAG_ALLOW_WARNINGS]) ++]) ++ ++# gl_CXX_ALLOW_WARNINGS ++# sets and substitutes a variable GL_CXXFLAG_ALLOW_WARNINGS, to a $(CC) option ++# that reverts a preceding '-Werror' option, if available. ++AC_DEFUN([gl_CXX_ALLOW_WARNINGS], ++[ ++ dnl Requires AC_PROG_CXX or gl_PROG_ANSI_CXX. ++ if test -n "$CXX" && test "$CXX" != no; then ++ AC_CACHE_CHECK([for C++ compiler option to allow warnings], ++ [gl_cv_cxx_wallow], ++ [rm -f conftest* ++ echo 'int dummy;' > conftest.cc ++ AC_TRY_COMMAND([${CXX-c++} $CXXFLAGS $CPPFLAGS -c conftest.cc 2>conftest1.err]) >/dev/null ++ AC_TRY_COMMAND([${CXX-c++} $CXXFLAGS $CPPFLAGS -Wno-error -c conftest.cc 2>conftest2.err]) >/dev/null ++ dnl Test the number of error output lines, because AIX xlC accepts the ++ dnl option '-Wno-error', just to produce a warning ++ dnl "Option -Wno-error was incorrectly specified. The option will be ignored." ++ dnl afterwards. ++ if test $? = 0 && test `wc -l < conftest1.err` = `wc -l < conftest2.err`; then ++ gl_cv_cxx_wallow='-Wno-error' ++ else ++ gl_cv_cxx_wallow=none ++ fi ++ rm -f conftest* ++ ]) ++ case "$gl_cv_cxx_wallow" in ++ none) GL_CXXFLAG_ALLOW_WARNINGS='' ;; ++ *) GL_CXXFLAG_ALLOW_WARNINGS="$gl_cv_cxx_wallow" ;; ++ esac ++ else ++ GL_CXXFLAG_ALLOW_WARNINGS='' ++ fi ++ AC_SUBST([GL_CXXFLAG_ALLOW_WARNINGS]) ++]) ++ + 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 +diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4 +index 1290d75..0ae96ea 100644 +--- a/m4/gnulib-comp.m4 ++++ b/m4/gnulib-comp.m4 +@@ -142,6 +142,7 @@ AC_DEFUN([gl_EARLY], + # Code from module langinfo: + # Code from module largefile: + AC_REQUIRE([AC_SYS_LARGEFILE]) ++ AC_REQUIRE([gl_YEAR2038_EARLY]) + # Code from module ldexp: + # Code from module lib-symbol-versions: + # Code from module lib-symbol-visibility: +@@ -281,9 +282,11 @@ AC_DEFUN([gl_INIT], + m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES])) + m4_pushdef([gl_LIBSOURCES_LIST], []) + m4_pushdef([gl_LIBSOURCES_DIR], []) ++ m4_pushdef([GL_MACRO_PREFIX], [gl]) ++ m4_pushdef([GL_MODULE_INDICATOR_PREFIX], [GL]) + gl_COMMON + gl_source_base='lib' +- AC_REQUIRE([gl_HEADER_SYS_SOCKET]) ++ AC_REQUIRE([gl_SYS_SOCKET_H]) + if test "$ac_cv_header_winsock2_h" = yes; then + AC_LIBOBJ([accept]) + fi +@@ -291,9 +294,10 @@ AC_DEFUN([gl_INIT], + gl_FUNC_ACCEPT4 + gl_SYS_SOCKET_MODULE_INDICATOR([accept4]) + gl_FUNC_ALLOCA +- gl_HEADER_ARPA_INET ++ gl_ARPA_INET_H ++ gl_ARPA_INET_H_REQUIRE_DEFAULTS + AC_PROG_MKDIR_P +- AC_REQUIRE([gl_HEADER_SYS_SOCKET]) ++ AC_REQUIRE([gl_SYS_SOCKET_H]) + if test "$ac_cv_header_winsock2_h" = yes; then + AC_LIBOBJ([bind]) + fi +@@ -317,7 +321,7 @@ AC_DEFUN([gl_INIT], + AC_LIBOBJ([close]) + fi + gl_UNISTD_MODULE_INDICATOR([close]) +- AC_REQUIRE([gl_HEADER_SYS_SOCKET]) ++ AC_REQUIRE([gl_SYS_SOCKET_H]) + if test "$ac_cv_header_winsock2_h" = yes; then + AC_LIBOBJ([connect]) + fi +@@ -328,6 +332,7 @@ AC_DEFUN([gl_INIT], + fi + gl_MATH_MODULE_INDICATOR([copysign]) + gl_DIRENT_H ++ gl_DIRENT_H_REQUIRE_DEFAULTS + gl_FUNC_DIRFD + if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \ + || test $REPLACE_DIRFD = 1; then +@@ -347,6 +352,7 @@ AC_DEFUN([gl_INIT], + gl_HEADER_ERRNO_H + AC_REQUIRE([gl_EXTERN_INLINE]) + gl_FCNTL_H ++ gl_FCNTL_H_REQUIRE_DEFAULTS + AC_C_FLEXIBLE_ARRAY_MEMBER + gl_FLOAT_H + if test $REPLACE_FLOAT_LDBL = 1; then +@@ -360,7 +366,7 @@ AC_DEFUN([gl_INIT], + AC_LIBOBJ([flock]) + gl_PREREQ_FLOCK + fi +- gl_HEADER_SYS_FILE_MODULE_INDICATOR([flock]) ++ gl_SYS_FILE_MODULE_INDICATOR([flock]) + AC_REQUIRE([gl_FUNC_FLOOR]) + if test $REPLACE_FLOOR = 1; then + AC_LIBOBJ([floor]) +@@ -409,17 +415,17 @@ AC_DEFUN([gl_INIT], + fi + gl_UNISTD_MODULE_INDICATOR([getlogin]) + AC_REQUIRE([gl_LIB_GETLOGIN]) +- AC_REQUIRE([gl_HEADER_SYS_SOCKET]) ++ AC_REQUIRE([gl_SYS_SOCKET_H]) + if test "$ac_cv_header_winsock2_h" = yes; then + AC_LIBOBJ([getpeername]) + fi + gl_SYS_SOCKET_MODULE_INDICATOR([getpeername]) +- AC_REQUIRE([gl_HEADER_SYS_SOCKET]) ++ AC_REQUIRE([gl_SYS_SOCKET_H]) + if test "$ac_cv_header_winsock2_h" = yes; then + AC_LIBOBJ([getsockname]) + fi + gl_SYS_SOCKET_MODULE_INDICATOR([getsockname]) +- AC_REQUIRE([gl_HEADER_SYS_SOCKET]) ++ AC_REQUIRE([gl_SYS_SOCKET_H]) + if test "$ac_cv_header_winsock2_h" = yes; then + AC_LIBOBJ([getsockopt]) + fi +@@ -439,6 +445,7 @@ AC_DEFUN([gl_INIT], + m4_ifdef([gl_ICONV_MODULE_INDICATOR], + [gl_ICONV_MODULE_INDICATOR([iconv])]) + gl_ICONV_H ++ gl_ICONV_H_REQUIRE_DEFAULTS + gl_FUNC_ICONV_OPEN + if test $REPLACE_ICONV_OPEN = 1; then + AC_LIBOBJ([iconv_open]) +@@ -461,6 +468,7 @@ AC_DEFUN([gl_INIT], + fi + gl_ARPA_INET_MODULE_INDICATOR([inet_pton]) + gl_INTTYPES_INCOMPLETE ++ gl_INTTYPES_H_REQUIRE_DEFAULTS + gl_ISFINITE + if test $REPLACE_ISFINITE = 1; then + AC_LIBOBJ([isfinite]) +@@ -501,6 +509,7 @@ AC_DEFUN([gl_INIT], + fi + gl_MATH_MODULE_INDICATOR([isnanl]) + gl_LANGINFO_H ++ gl_LANGINFO_H_REQUIRE_DEFAULTS + AC_REQUIRE([gl_LARGEFILE]) + gl_FUNC_LDEXP + gl_LD_VERSION_SCRIPT +@@ -512,7 +521,7 @@ AC_DEFUN([gl_INIT], + AC_LIBOBJ([link]) + fi + gl_UNISTD_MODULE_INDICATOR([link]) +- AC_REQUIRE([gl_HEADER_SYS_SOCKET]) ++ AC_REQUIRE([gl_SYS_SOCKET_H]) + if test "$ac_cv_header_winsock2_h" = yes; then + AC_LIBOBJ([listen]) + fi +@@ -522,6 +531,7 @@ AC_DEFUN([gl_INIT], + LOCALCHARSET_TESTS_ENVIRONMENT= + AC_SUBST([LOCALCHARSET_TESTS_ENVIRONMENT]) + gl_LOCALE_H ++ gl_LOCALE_H_REQUIRE_DEFAULTS + gl_FUNC_LOG1P + if test $HAVE_LOG1P = 0 || test $REPLACE_LOG1P = 1; then + AC_LIBOBJ([log1p]) +@@ -541,15 +551,14 @@ AC_DEFUN([gl_INIT], + if test $REPLACE_MALLOC = 1; then + AC_LIBOBJ([malloc]) + fi +- gl_MODULE_INDICATOR([malloc-gnu]) +- gl_FUNC_MALLOC_POSIX ++ AC_REQUIRE([gl_FUNC_MALLOC_POSIX]) + if test $REPLACE_MALLOC = 1; then + AC_LIBOBJ([malloc]) + fi + gl_STDLIB_MODULE_INDICATOR([malloc-posix]) +- gl_MODULE_INDICATOR([malloc-posix]) + gl_MALLOCA + gl_MATH_H ++ gl_MATH_H_REQUIRE_DEFAULTS + gl_MINMAX + gl_FUNC_MKDIR + if test $REPLACE_MKDIR = 1; then +@@ -573,7 +582,8 @@ AC_DEFUN([gl_INIT], + fi + gl_MODULE_INDICATOR([msvc-nothrow]) + gl_MULTIARCH +- gl_HEADER_NETDB ++ gl_NETDB_H ++ gl_NETDB_H_REQUIRE_DEFAULTS + gl_HEADER_NETINET_IN + AC_PROG_MKDIR_P + gl_FUNC_NL_LANGINFO +@@ -607,6 +617,7 @@ AC_DEFUN([gl_INIT], + fi + gl_POLL_MODULE_INDICATOR([poll]) + gl_POLL_H ++ gl_POLL_H_REQUIRE_DEFAULTS + gl_FUNC_PUTENV + if test $REPLACE_PUTENV = 1; then + AC_LIBOBJ([putenv]) +@@ -625,12 +636,12 @@ AC_DEFUN([gl_INIT], + gl_PREREQ_READLINK + fi + gl_UNISTD_MODULE_INDICATOR([readlink]) +- AC_REQUIRE([gl_HEADER_SYS_SOCKET]) ++ AC_REQUIRE([gl_SYS_SOCKET_H]) + if test "$ac_cv_header_winsock2_h" = yes; then + AC_LIBOBJ([recv]) + fi + gl_SYS_SOCKET_MODULE_INDICATOR([recv]) +- AC_REQUIRE([gl_HEADER_SYS_SOCKET]) ++ AC_REQUIRE([gl_SYS_SOCKET_H]) + if test "$ac_cv_header_winsock2_h" = yes; then + AC_LIBOBJ([recvfrom]) + fi +@@ -657,12 +668,12 @@ AC_DEFUN([gl_INIT], + AC_LIBOBJ([select]) + fi + gl_SYS_SELECT_MODULE_INDICATOR([select]) +- AC_REQUIRE([gl_HEADER_SYS_SOCKET]) ++ AC_REQUIRE([gl_SYS_SOCKET_H]) + if test "$ac_cv_header_winsock2_h" = yes; then + AC_LIBOBJ([send]) + fi + gl_SYS_SOCKET_MODULE_INDICATOR([send]) +- AC_REQUIRE([gl_HEADER_SYS_SOCKET]) ++ AC_REQUIRE([gl_SYS_SOCKET_H]) + if test "$ac_cv_header_winsock2_h" = yes; then + AC_LIBOBJ([sendto]) + fi +@@ -672,25 +683,26 @@ AC_DEFUN([gl_INIT], + AC_LIBOBJ([setenv]) + fi + gl_STDLIB_MODULE_INDICATOR([setenv]) +- AC_REQUIRE([gl_HEADER_SYS_SOCKET]) ++ AC_REQUIRE([gl_SYS_SOCKET_H]) + if test "$ac_cv_header_winsock2_h" = yes; then + AC_LIBOBJ([setsockopt]) + fi + gl_SYS_SOCKET_MODULE_INDICATOR([setsockopt]) +- AC_REQUIRE([gl_HEADER_SYS_SOCKET]) ++ AC_REQUIRE([gl_SYS_SOCKET_H]) + if test "$ac_cv_header_winsock2_h" = yes; then + AC_LIBOBJ([shutdown]) + fi + gl_SYS_SOCKET_MODULE_INDICATOR([shutdown]) + gl_SIGNAL_H +- AC_REQUIRE([gl_HEADER_SYS_SOCKET]) ++ gl_SIGNAL_H_REQUIRE_DEFAULTS ++ AC_REQUIRE([gl_SYS_SOCKET_H]) + if test "$ac_cv_header_winsock2_h" = yes; then + AC_LIBOBJ([socket]) + fi + # When this module is used, sockets may actually occur as file descriptors, + # hence it is worth warning if the modules 'close' and 'ioctl' are not used. +- m4_ifdef([gl_UNISTD_H_DEFAULTS], [AC_REQUIRE([gl_UNISTD_H_DEFAULTS])]) +- m4_ifdef([gl_SYS_IOCTL_H_DEFAULTS], [AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS])]) ++ m4_ifdef([gl_UNISTD_H_DEFAULTS], [gl_UNISTD_H_REQUIRE_DEFAULTS]) ++ m4_ifdef([gl_SYS_IOCTL_H_DEFAULTS], [gl_SYS_IOCTL_H_REQUIRE_DEFAULTS]) + AC_REQUIRE([gl_PREREQ_SYS_H_WINSOCK2]) + if test "$ac_cv_header_winsock2_h" = yes; then + UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1 +@@ -705,31 +717,67 @@ AC_DEFUN([gl_INIT], + gl_STDALIGN_H + AM_STDBOOL_H + gl_STDDEF_H ++ gl_STDDEF_H_REQUIRE_DEFAULTS + gl_STDINT_H + gl_STDIO_H ++ gl_STDIO_H_REQUIRE_DEFAULTS ++ dnl No need to create extra modules for these functions. Everyone who uses ++ dnl likely needs them. ++ gl_STDIO_MODULE_INDICATOR([fscanf]) ++ gl_MODULE_INDICATOR([fscanf]) ++ gl_STDIO_MODULE_INDICATOR([scanf]) ++ gl_MODULE_INDICATOR([scanf]) ++ gl_STDIO_MODULE_INDICATOR([fgetc]) ++ gl_STDIO_MODULE_INDICATOR([getc]) ++ gl_STDIO_MODULE_INDICATOR([getchar]) ++ gl_STDIO_MODULE_INDICATOR([fgets]) ++ gl_STDIO_MODULE_INDICATOR([fread]) ++ dnl No need to create extra modules for these functions. Everyone who uses ++ dnl likely needs them. ++ gl_STDIO_MODULE_INDICATOR([fprintf]) ++ gl_STDIO_MODULE_INDICATOR([printf]) ++ gl_STDIO_MODULE_INDICATOR([vfprintf]) ++ gl_STDIO_MODULE_INDICATOR([vprintf]) ++ gl_STDIO_MODULE_INDICATOR([fputc]) ++ gl_STDIO_MODULE_INDICATOR([putc]) ++ gl_STDIO_MODULE_INDICATOR([putchar]) ++ gl_STDIO_MODULE_INDICATOR([fputs]) ++ gl_STDIO_MODULE_INDICATOR([puts]) ++ gl_STDIO_MODULE_INDICATOR([fwrite]) + gl_STDLIB_H ++ gl_STDLIB_H_REQUIRE_DEFAULTS + if test $gl_cond_libtool = false; then + gl_ltlibdeps="$gl_ltlibdeps $LTLIBICONV" + gl_libdeps="$gl_libdeps $LIBICONV" + fi +- gl_HEADER_STRING_H +- gl_HEADER_SYS_FILE_H ++ gl_STRING_H ++ gl_STRING_H_REQUIRE_DEFAULTS ++ gl_SYS_FILE_H ++ gl_SYS_FILE_H_REQUIRE_DEFAULTS + AC_PROG_MKDIR_P +- AC_REQUIRE([gl_HEADER_SYS_SELECT]) ++ gl_SYS_SELECT_H ++ gl_SYS_SELECT_H_REQUIRE_DEFAULTS + AC_PROG_MKDIR_P +- AC_REQUIRE([gl_HEADER_SYS_SOCKET]) ++ gl_SYS_SOCKET_H ++ gl_SYS_SOCKET_H_REQUIRE_DEFAULTS + AC_PROG_MKDIR_P +- gl_HEADER_SYS_STAT_H ++ gl_SYS_STAT_H ++ gl_SYS_STAT_H_REQUIRE_DEFAULTS + AC_PROG_MKDIR_P +- gl_HEADER_SYS_TIME_H ++ gl_SYS_TIME_H ++ gl_SYS_TIME_H_REQUIRE_DEFAULTS + AC_PROG_MKDIR_P + gl_SYS_TIMES_H ++ gl_SYS_TIMES_H_REQUIRE_DEFAULTS + AC_PROG_MKDIR_P + gl_SYS_TYPES_H ++ gl_SYS_TYPES_H_REQUIRE_DEFAULTS + AC_PROG_MKDIR_P +- gl_HEADER_SYS_UIO ++ gl_SYS_UIO_H ++ gl_SYS_UIO_H_REQUIRE_DEFAULTS + AC_PROG_MKDIR_P +- gl_HEADER_TIME_H ++ gl_TIME_H ++ gl_TIME_H_REQUIRE_DEFAULTS + gl_TIME_RZ + if test $HAVE_TIMEZONE_T = 0; then + AC_LIBOBJ([time_rz]) +@@ -746,9 +794,11 @@ AC_DEFUN([gl_INIT], + fi + gl_MATH_MODULE_INDICATOR([trunc]) + gl_UNISTD_H ++ gl_UNISTD_H_REQUIRE_DEFAULTS + gl_FUNC_VSNPRINTF + gl_STDIO_MODULE_INDICATOR([vsnprintf]) + gl_WCHAR_H ++ gl_WCHAR_H_REQUIRE_DEFAULTS + gl_FUNC_WRITE + if test $REPLACE_WRITE = 1; then + AC_LIBOBJ([write]) +@@ -771,7 +821,6 @@ AC_DEFUN([gl_INIT], + gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false + gl_gnulib_enabled_30838f5439487421042f2225bed3af76=false + gl_gnulib_enabled_hostent=false +- gl_gnulib_enabled_idx=false + gl_gnulib_enabled_b1df7117b479d2da59d76deba468ee21=false + gl_gnulib_enabled_3f0e593033d1fc2c127581960f641b66=false + gl_gnulib_enabled_dbdf22868a5367f28bf18e0013ac6f8f=false +@@ -880,7 +929,9 @@ AC_SUBST([LTALLOCA]) + func_gl_gnulib_m4code_dynarray () + { + if ! $gl_gnulib_enabled_dynarray; then ++ AC_PROG_MKDIR_P + gl_gnulib_enabled_dynarray=true ++ func_gl_gnulib_m4code_37f71b604aa9c54446783d80f42fe547 + func_gl_gnulib_m4code_21ee726a3540c09237a8e70c0baf7467 + fi + } +@@ -963,12 +1014,6 @@ AC_SUBST([LTALLOCA]) + gl_gnulib_enabled_hostent=true + fi + } +- func_gl_gnulib_m4code_idx () +- { +- if ! $gl_gnulib_enabled_idx; then +- gl_gnulib_enabled_idx=true +- fi +- } + func_gl_gnulib_m4code_b1df7117b479d2da59d76deba468ee21 () + { + if ! $gl_gnulib_enabled_b1df7117b479d2da59d76deba468ee21; then +@@ -1181,7 +1226,6 @@ AC_SUBST([LTALLOCA]) + AC_LIBOBJ([realloc]) + fi + gl_STDLIB_MODULE_INDICATOR([realloc-posix]) +- gl_MODULE_INDICATOR([realloc-posix]) + gl_gnulib_enabled_61bcaca76b3e6f9ae55d57a1c3193bc4=true + fi + } +@@ -1205,7 +1249,9 @@ AC_SUBST([LTALLOCA]) + func_gl_gnulib_m4code_scratch_buffer () + { + if ! $gl_gnulib_enabled_scratch_buffer; then ++ AC_PROG_MKDIR_P + gl_gnulib_enabled_scratch_buffer=true ++ func_gl_gnulib_m4code_37f71b604aa9c54446783d80f42fe547 + func_gl_gnulib_m4code_21ee726a3540c09237a8e70c0baf7467 + func_gl_gnulib_m4code_61bcaca76b3e6f9ae55d57a1c3193bc4 + fi +@@ -1319,7 +1365,8 @@ AC_SUBST([LTALLOCA]) + func_gl_gnulib_m4code_sys_random () + { + if ! $gl_gnulib_enabled_sys_random; then +- gl_HEADER_SYS_RANDOM ++ gl_SYS_RANDOM_H ++ gl_SYS_RANDOM_H_REQUIRE_DEFAULTS + AC_PROG_MKDIR_P + gl_gnulib_enabled_sys_random=true + fi +@@ -1416,6 +1463,7 @@ AC_SUBST([LTALLOCA]) + { + if ! $gl_gnulib_enabled_3dcce957eadc896e63ab5f137947b410; then + gl_WCTYPE_H ++ gl_WCTYPE_H_REQUIRE_DEFAULTS + gl_gnulib_enabled_3dcce957eadc896e63ab5f137947b410=true + fi + } +@@ -1431,9 +1479,6 @@ AC_SUBST([LTALLOCA]) + func_gl_gnulib_m4code_925677f0343de64b89a9f0c790b4104c + fi + if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then +- func_gl_gnulib_m4code_idx +- fi +- if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then + func_gl_gnulib_m4code_21ee726a3540c09237a8e70c0baf7467 + fi + if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then +@@ -1584,9 +1629,6 @@ AC_SUBST([LTALLOCA]) + func_gl_gnulib_m4code_sockets + fi + if test $HAVE_TIMEZONE_T = 0; then +- func_gl_gnulib_m4code_idx +- fi +- if test $HAVE_TIMEZONE_T = 0; then + func_gl_gnulib_m4code_time_r + fi + if test $HAVE_TIMEZONE_T = 0; then +@@ -1621,7 +1663,6 @@ AC_SUBST([LTALLOCA]) + AM_CONDITIONAL([gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36], [$gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36]) + AM_CONDITIONAL([gl_GNULIB_ENABLED_30838f5439487421042f2225bed3af76], [$gl_gnulib_enabled_30838f5439487421042f2225bed3af76]) + AM_CONDITIONAL([gl_GNULIB_ENABLED_hostent], [$gl_gnulib_enabled_hostent]) +- AM_CONDITIONAL([gl_GNULIB_ENABLED_idx], [$gl_gnulib_enabled_idx]) + AM_CONDITIONAL([gl_GNULIB_ENABLED_b1df7117b479d2da59d76deba468ee21], [$gl_gnulib_enabled_b1df7117b479d2da59d76deba468ee21]) + AM_CONDITIONAL([gl_GNULIB_ENABLED_3f0e593033d1fc2c127581960f641b66], [$gl_gnulib_enabled_3f0e593033d1fc2c127581960f641b66]) + AM_CONDITIONAL([gl_GNULIB_ENABLED_dbdf22868a5367f28bf18e0013ac6f8f], [$gl_gnulib_enabled_dbdf22868a5367f28bf18e0013ac6f8f]) +@@ -1673,6 +1714,8 @@ AC_SUBST([LTALLOCA]) + m4_if(m4_sysval, [0], [], + [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])]) + ]) ++ m4_popdef([GL_MODULE_INDICATOR_PREFIX]) ++ m4_popdef([GL_MACRO_PREFIX]) + m4_popdef([gl_LIBSOURCES_DIR]) + m4_popdef([gl_LIBSOURCES_LIST]) + m4_popdef([AC_LIBSOURCES]) +@@ -1699,6 +1742,8 @@ AC_SUBST([LTALLOCA]) + m4_pushdef([AC_LIBSOURCES], m4_defn([gltests_LIBSOURCES])) + m4_pushdef([gltests_LIBSOURCES_LIST], []) + m4_pushdef([gltests_LIBSOURCES_DIR], []) ++ m4_pushdef([GL_MACRO_PREFIX], [gltests]) ++ m4_pushdef([GL_MODULE_INDICATOR_PREFIX], [GL]) + gl_COMMON + gl_source_base='tests' + changequote(,)dnl +@@ -1720,6 +1765,8 @@ changequote([, ])dnl + m4_if(m4_sysval, [0], [], + [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])]) + ]) ++ m4_popdef([GL_MODULE_INDICATOR_PREFIX]) ++ m4_popdef([GL_MACRO_PREFIX]) + m4_popdef([gltests_LIBSOURCES_DIR]) + m4_popdef([gltests_LIBSOURCES_LIST]) + m4_popdef([AC_LIBSOURCES]) +@@ -2265,6 +2312,7 @@ AC_DEFUN([gl_FILE_LIST], [ + m4/wint_t.m4 + m4/write.m4 + m4/xsize.m4 ++ m4/year2038.m4 + m4/zzgnulib.m4 + top/GNUmakefile + top/maint.mk +diff --git a/m4/hostent.m4 b/m4/hostent.m4 +index 641d72f..f1390a3 100644 +--- a/m4/hostent.m4 ++++ b/m4/hostent.m4 +@@ -1,4 +1,4 @@ +-# hostent.m4 serial 3 ++# hostent.m4 serial 4 + 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, +@@ -13,7 +13,7 @@ AC_DEFUN([gl_HOSTENT], + dnl - On BeOS, they are in libnet. + dnl - On native Windows, they are in ws2_32.dll. + dnl - Otherwise they are in libc. +- AC_REQUIRE([gl_HEADER_SYS_SOCKET])dnl for HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H ++ AC_REQUIRE([gl_SYS_SOCKET_H])dnl for HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H + HOSTENT_LIB= + gl_saved_libs="$LIBS" + AC_SEARCH_LIBS([gethostbyname], [nsl network net], +diff --git a/m4/iconv_h.m4 b/m4/iconv_h.m4 +index ab8e283..2940988 100644 +--- a/m4/iconv_h.m4 ++++ b/m4/iconv_h.m4 +@@ -1,10 +1,10 @@ +-# iconv_h.m4 serial 12 ++# iconv_h.m4 serial 15 + 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. + +-AC_DEFUN([gl_ICONV_H], ++AC_DEFUN_ONCE([gl_ICONV_H], + [ + AC_REQUIRE([gl_ICONV_H_DEFAULTS]) + +@@ -24,22 +24,37 @@ AC_DEFUN([gl_ICONV_H], + dnl Unconditionally enables the replacement of . + AC_DEFUN([gl_REPLACE_ICONV_H], + [ +- AC_REQUIRE([gl_ICONV_H_DEFAULTS]) ++ gl_ICONV_H_REQUIRE_DEFAULTS + ICONV_H='iconv.h' + AM_CONDITIONAL([GL_GENERATE_ICONV_H], [test -n "$ICONV_H"]) + ]) + ++# gl_ICONV_MODULE_INDICATOR([modulename]) ++# sets the shell variable that indicates the presence of the given module ++# to a C preprocessor expression that will evaluate to 1. ++# This macro invocation must not occur in macros that are AC_REQUIREd. + AC_DEFUN([gl_ICONV_MODULE_INDICATOR], + [ +- dnl Use AC_REQUIRE here, so that the default settings are expanded once only. +- AC_REQUIRE([gl_ICONV_H_DEFAULTS]) ++ dnl Ensure to expand the default settings once only. ++ gl_ICONV_H_REQUIRE_DEFAULTS + gl_MODULE_INDICATOR_SET_VARIABLE([$1]) + ]) + ++# Initializes the default values for AC_SUBSTed shell variables. ++# This macro must not be AC_REQUIREd. It must only be invoked, and only ++# outside of macros or in macros that are not AC_REQUIREd. ++AC_DEFUN([gl_ICONV_H_REQUIRE_DEFAULTS], ++[ ++ m4_defun(GL_MODULE_INDICATOR_PREFIX[_ICONV_H_MODULE_INDICATOR_DEFAULTS], [ ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ICONV]) ++ ]) ++ m4_require(GL_MODULE_INDICATOR_PREFIX[_ICONV_H_MODULE_INDICATOR_DEFAULTS]) ++ AC_REQUIRE([gl_ICONV_H_DEFAULTS]) ++]) ++ + AC_DEFUN([gl_ICONV_H_DEFAULTS], + [ + m4_ifdef([gl_ANSI_CXX], [AC_REQUIRE([gl_ANSI_CXX])]) +- GNULIB_ICONV=0; AC_SUBST([GNULIB_ICONV]) + dnl Assume proper GNU behavior unless another module says otherwise. + ICONV_CONST=; AC_SUBST([ICONV_CONST]) + REPLACE_ICONV=0; AC_SUBST([REPLACE_ICONV]) +diff --git a/m4/inttypes.m4 b/m4/inttypes.m4 +index f56e94a..64b1de5 100644 +--- a/m4/inttypes.m4 ++++ b/m4/inttypes.m4 +@@ -1,4 +1,4 @@ +-# inttypes.m4 serial 32 ++# inttypes.m4 serial 35 + 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, +@@ -7,7 +7,7 @@ dnl with or without modifications, as long as this notice is preserved. + dnl From Derek Price, Bruno Haible. + dnl Test whether is supported or must be substituted. + +-AC_DEFUN([gl_INTTYPES_H], ++AC_DEFUN_ONCE([gl_INTTYPES_H], + [ + AC_REQUIRE([gl_INTTYPES_INCOMPLETE]) + gl_INTTYPES_PRI_SCN +@@ -136,19 +136,34 @@ AC_DEFUN([gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION], + AC_SUBST([$1]) + ]) + ++# gl_INTTYPES_MODULE_INDICATOR([modulename]) ++# sets the shell variable that indicates the presence of the given module ++# to a C preprocessor expression that will evaluate to 1. ++# This macro invocation must not occur in macros that are AC_REQUIREd. + AC_DEFUN([gl_INTTYPES_MODULE_INDICATOR], + [ +- dnl Use AC_REQUIRE here, so that the default settings are expanded once only. +- AC_REQUIRE([gl_INTTYPES_H_DEFAULTS]) ++ dnl Ensure to expand the default settings once only. ++ gl_INTTYPES_H_REQUIRE_DEFAULTS + gl_MODULE_INDICATOR_SET_VARIABLE([$1]) + ]) + ++# Initializes the default values for AC_SUBSTed shell variables. ++# This macro must not be AC_REQUIREd. It must only be invoked, and only ++# outside of macros or in macros that are not AC_REQUIREd. ++AC_DEFUN([gl_INTTYPES_H_REQUIRE_DEFAULTS], ++[ ++ m4_defun(GL_MODULE_INDICATOR_PREFIX[_INTTYPES_H_MODULE_INDICATOR_DEFAULTS], [ ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_IMAXABS]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_IMAXDIV]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOIMAX]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOUMAX]) ++ ]) ++ m4_require(GL_MODULE_INDICATOR_PREFIX[_INTTYPES_H_MODULE_INDICATOR_DEFAULTS]) ++ AC_REQUIRE([gl_INTTYPES_H_DEFAULTS]) ++]) ++ + AC_DEFUN([gl_INTTYPES_H_DEFAULTS], + [ +- GNULIB_IMAXABS=0; AC_SUBST([GNULIB_IMAXABS]) +- GNULIB_IMAXDIV=0; AC_SUBST([GNULIB_IMAXDIV]) +- GNULIB_STRTOIMAX=0; AC_SUBST([GNULIB_STRTOIMAX]) +- GNULIB_STRTOUMAX=0; AC_SUBST([GNULIB_STRTOUMAX]) + dnl Assume proper GNU behavior unless another module says otherwise. + HAVE_DECL_IMAXABS=1; AC_SUBST([HAVE_DECL_IMAXABS]) + HAVE_DECL_IMAXDIV=1; AC_SUBST([HAVE_DECL_IMAXDIV]) +diff --git a/m4/langinfo_h.m4 b/m4/langinfo_h.m4 +index 950fe20..87959f7 100644 +--- a/m4/langinfo_h.m4 ++++ b/m4/langinfo_h.m4 +@@ -1,10 +1,10 @@ +-# langinfo_h.m4 serial 9 ++# langinfo_h.m4 serial 12 + 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. + +-AC_DEFUN([gl_LANGINFO_H], ++AC_DEFUN_ONCE([gl_LANGINFO_H], + [ + AC_REQUIRE([gl_LANGINFO_H_DEFAULTS]) + +@@ -104,18 +104,33 @@ int a = YESEXPR; + ]], [nl_langinfo]) + ]) + ++# gl_LANGINFO_MODULE_INDICATOR([modulename]) ++# sets the shell variable that indicates the presence of the given module ++# to a C preprocessor expression that will evaluate to 1. ++# This macro invocation must not occur in macros that are AC_REQUIREd. + AC_DEFUN([gl_LANGINFO_MODULE_INDICATOR], + [ +- dnl Use AC_REQUIRE here, so that the default settings are expanded once only. +- AC_REQUIRE([gl_LANGINFO_H_DEFAULTS]) ++ dnl Ensure to expand the default settings once only. ++ gl_LANGINFO_H_REQUIRE_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]) + ]) + ++# Initializes the default values for AC_SUBSTed shell variables. ++# This macro must not be AC_REQUIREd. It must only be invoked, and only ++# outside of macros or in macros that are not AC_REQUIREd. ++AC_DEFUN([gl_LANGINFO_H_REQUIRE_DEFAULTS], ++[ ++ m4_defun(GL_MODULE_INDICATOR_PREFIX[_LANGINFO_H_MODULE_INDICATOR_DEFAULTS], [ ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_NL_LANGINFO]) ++ ]) ++ m4_require(GL_MODULE_INDICATOR_PREFIX[_LANGINFO_H_MODULE_INDICATOR_DEFAULTS]) ++ AC_REQUIRE([gl_LANGINFO_H_DEFAULTS]) ++]) ++ + AC_DEFUN([gl_LANGINFO_H_DEFAULTS], + [ +- GNULIB_NL_LANGINFO=0; AC_SUBST([GNULIB_NL_LANGINFO]) + dnl Assume proper GNU behavior unless another module says otherwise. + HAVE_NL_LANGINFO=1; AC_SUBST([HAVE_NL_LANGINFO]) + REPLACE_NL_LANGINFO=0; AC_SUBST([REPLACE_NL_LANGINFO]) +diff --git a/m4/largefile.m4 b/m4/largefile.m4 +index cadb16d..fbde5e6 100644 +--- a/m4/largefile.m4 ++++ b/m4/largefile.m4 +@@ -22,7 +22,8 @@ AC_DEFUN([gl_SET_LARGEFILE_SOURCE], + esac + ]) + +-# The following implementation works around a problem in autoconf <= 2.69; ++# Work around a problem in Autoconf through at least 2.71 on glibc 2.34+ ++# with _TIME_BITS. Also, work 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], [], [ +@@ -40,6 +41,7 @@ m4_define([_AC_SYS_LARGEFILE_TEST_INCLUDES], + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]];[]dnl + ]) ++])# m4_version_prereq 2.70 + + + # _AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, VALUE, +@@ -54,7 +56,8 @@ 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([#undef $1 ++#define $1 $2 + $5], [$6])], + [$3=$2; break]) + $3=unknown +@@ -80,9 +83,8 @@ rm -rf conftest*[]dnl + AC_DEFUN([AC_SYS_LARGEFILE], + [AC_ARG_ENABLE(largefile, + [ --disable-largefile omit support for large files]) +-if test "$enable_largefile" != no; then +- +- AC_CACHE_CHECK([for special C compiler options needed for large files], ++AS_IF([test "$enable_largefile" != no], ++ [AC_CACHE_CHECK([for special C compiler options needed for large files], + ac_cv_sys_largefile_CC, + [ac_cv_sys_largefile_CC=no + if test "$GCC" != yes; then +@@ -107,15 +109,15 @@ if test "$enable_largefile" != no; then + ac_cv_sys_file_offset_bits, + [Number of bits in a file offset, on hosts where this is settable.], + [_AC_SYS_LARGEFILE_TEST_INCLUDES]) +- if test $ac_cv_sys_file_offset_bits = unknown; then +- _AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES, 1, +- ac_cv_sys_large_files, +- [Define for large files, on AIX-style hosts.], +- [_AC_SYS_LARGEFILE_TEST_INCLUDES]) +- fi +-fi ++ AS_CASE([$ac_cv_sys_file_offset_bits], ++ [unknown], ++ [_AC_SYS_LARGEFILE_MACRO_VALUE([_LARGE_FILES], [1], ++ [ac_cv_sys_large_files], ++ [Define for large files, on AIX-style hosts.], ++ [_AC_SYS_LARGEFILE_TEST_INCLUDES])], ++ [64], ++ [gl_YEAR2038_BODY([])])]) + ])# AC_SYS_LARGEFILE +-])# m4_version_prereq 2.70 + + # Enable large files on systems where this is implemented by Gnulib, not by the + # system headers. +diff --git a/m4/limits-h.m4 b/m4/limits-h.m4 +index 70dbb7d..00c9fe9 100644 +--- a/m4/limits-h.m4 ++++ b/m4/limits-h.m4 +@@ -11,7 +11,7 @@ AC_DEFUN_ONCE([gl_LIMITS_H], + [ + gl_CHECK_NEXT_HEADERS([limits.h]) + +- AC_CACHE_CHECK([whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc.], ++ AC_CACHE_CHECK([whether limits.h has WORD_BIT, BOOL_WIDTH etc.], + [gl_cv_header_limits_width], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( +@@ -22,6 +22,7 @@ AC_DEFUN_ONCE([gl_LIMITS_H], + long long llm = LLONG_MAX; + int wb = WORD_BIT; + int ullw = ULLONG_WIDTH; ++ int bw = BOOL_WIDTH; + ]])], + [gl_cv_header_limits_width=yes], + [gl_cv_header_limits_width=no])]) +diff --git a/m4/locale_h.m4 b/m4/locale_h.m4 +index 7b50aa7..444a381 100644 +--- a/m4/locale_h.m4 ++++ b/m4/locale_h.m4 +@@ -1,13 +1,13 @@ +-# locale_h.m4 serial 25 ++# locale_h.m4 serial 28 + 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. + +-AC_DEFUN([gl_LOCALE_H], ++AC_DEFUN_ONCE([gl_LOCALE_H], + [ +- dnl Use AC_REQUIRE here, so that the default behavior below is expanded +- dnl once only, before all statements that occur in other macros. ++ dnl Ensure to expand the default settings once only, before all statements ++ dnl that occur in other macros. + AC_REQUIRE([gl_LOCALE_H_DEFAULTS]) + + dnl Persuade glibc to define locale_t and the int_p_*, int_n_* +@@ -129,22 +129,37 @@ AC_DEFUN([gl_LOCALE_T], + AC_SUBST([HAVE_XLOCALE_H]) + ]) + ++# gl_LOCALE_MODULE_INDICATOR([modulename]) ++# sets the shell variable that indicates the presence of the given module ++# to a C preprocessor expression that will evaluate to 1. ++# This macro invocation must not occur in macros that are AC_REQUIREd. + AC_DEFUN([gl_LOCALE_MODULE_INDICATOR], + [ +- dnl Use AC_REQUIRE here, so that the default settings are expanded once only. +- AC_REQUIRE([gl_LOCALE_H_DEFAULTS]) ++ dnl Ensure to expand the default settings once only. ++ gl_LOCALE_H_REQUIRE_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]) + ]) + ++# Initializes the default values for AC_SUBSTed shell variables. ++# This macro must not be AC_REQUIREd. It must only be invoked, and only ++# outside of macros or in macros that are not AC_REQUIREd. ++AC_DEFUN([gl_LOCALE_H_REQUIRE_DEFAULTS], ++[ ++ m4_defun(GL_MODULE_INDICATOR_PREFIX[_LOCALE_H_MODULE_INDICATOR_DEFAULTS], [ ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LOCALECONV]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SETLOCALE]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SETLOCALE_NULL]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_DUPLOCALE]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LOCALENAME]) ++ ]) ++ m4_require(GL_MODULE_INDICATOR_PREFIX[_LOCALE_H_MODULE_INDICATOR_DEFAULTS]) ++ AC_REQUIRE([gl_LOCALE_H_DEFAULTS]) ++]) ++ + AC_DEFUN([gl_LOCALE_H_DEFAULTS], + [ +- GNULIB_LOCALECONV=0; AC_SUBST([GNULIB_LOCALECONV]) +- GNULIB_SETLOCALE=0; AC_SUBST([GNULIB_SETLOCALE]) +- GNULIB_SETLOCALE_NULL=0; AC_SUBST([GNULIB_SETLOCALE_NULL]) +- GNULIB_DUPLOCALE=0; AC_SUBST([GNULIB_DUPLOCALE]) +- GNULIB_LOCALENAME=0; AC_SUBST([GNULIB_LOCALENAME]) + dnl Assume proper GNU behavior unless another module says otherwise. + HAVE_NEWLOCALE=1; AC_SUBST([HAVE_NEWLOCALE]) + HAVE_DUPLOCALE=1; AC_SUBST([HAVE_DUPLOCALE]) +diff --git a/m4/malloc.m4 b/m4/malloc.m4 +index 32ab42e..972e808 100644 +--- a/m4/malloc.m4 ++++ b/m4/malloc.m4 +@@ -1,21 +1,21 @@ +-# malloc.m4 serial 22 ++# malloc.m4 serial 27 + 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. + + # This is adapted with modifications from upstream Autoconf here: +-# https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=04be2b7a29d65d9a08e64e8e56e594c91749598c ++# https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/functions.m4?id=v2.70#n949 + AC_DEFUN([_AC_FUNC_MALLOC_IF], + [ + AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles +- AC_CACHE_CHECK([for GNU libc compatible malloc], ++ AC_CACHE_CHECK([whether malloc (0) returns nonnull], + [ac_cv_func_malloc_0_nonnull], + [AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[#include + ]], +- [[char *p = malloc (0); ++ [[void *p = malloc (0); + int result = !p; + free (p); + return result;]]) +@@ -24,75 +24,151 @@ AC_DEFUN([_AC_FUNC_MALLOC_IF], + [ac_cv_func_malloc_0_nonnull=no], + [case "$host_os" in + # Guess yes on platforms where we know the result. +- *-gnu* | gnu* | *-musl* | freebsd* | midnightbsd* | netbsd* | openbsd* \ +- | hpux* | solaris* | cygwin* | mingw*) ++ *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \ ++ | gnu* | *-musl* | midnightbsd* \ ++ | hpux* | solaris* | cygwin* | mingw* | msys* ) + ac_cv_func_malloc_0_nonnull="guessing yes" ;; + # If we don't know, obey --enable-cross-guesses. + *) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;; + esac + ]) + ]) +- case "$ac_cv_func_malloc_0_nonnull" in +- *yes) +- $1 +- ;; +- *) +- $2 +- ;; +- esac ++ AS_CASE([$ac_cv_func_malloc_0_nonnull], [*yes], [$1], [$2]) + ])# _AC_FUNC_MALLOC_IF + + # gl_FUNC_MALLOC_GNU + # ------------------ +-# Test whether 'malloc (0)' is handled like in GNU libc, and replace malloc if +-# it is not. ++# Replace malloc if it is not compatible with GNU libc. + AC_DEFUN([gl_FUNC_MALLOC_GNU], + [ + AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) +- dnl _AC_FUNC_MALLOC_IF is defined in Autoconf. +- _AC_FUNC_MALLOC_IF( +- [AC_DEFINE([HAVE_MALLOC_GNU], [1], +- [Define to 1 if your system has a GNU libc compatible 'malloc' +- function, and to 0 otherwise.])], +- [AC_DEFINE([HAVE_MALLOC_GNU], [0]) +- REPLACE_MALLOC=1 ++ AC_REQUIRE([gl_FUNC_MALLOC_POSIX]) ++ if test $REPLACE_MALLOC = 0; then ++ _AC_FUNC_MALLOC_IF([], [REPLACE_MALLOC=1]) ++ fi ++]) ++ ++# gl_FUNC_MALLOC_PTRDIFF ++# ---------------------- ++# Test whether malloc (N) reliably fails when N exceeds PTRDIFF_MAX, ++# and replace malloc otherwise. ++AC_DEFUN([gl_FUNC_MALLOC_PTRDIFF], ++[ ++ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) ++ AC_REQUIRE([gl_CHECK_MALLOC_PTRDIFF]) ++ test "$gl_cv_malloc_ptrdiff" = yes || REPLACE_MALLOC=1 ++]) ++ ++# Test whether malloc, realloc, calloc refuse to create objects ++# larger than what can be expressed in ptrdiff_t. ++# Set gl_cv_func_malloc_gnu to yes or no accordingly. ++AC_DEFUN([gl_CHECK_MALLOC_PTRDIFF], ++[ ++ AC_CACHE_CHECK([whether malloc is ptrdiff_t safe], ++ [gl_cv_malloc_ptrdiff], ++ [AC_COMPILE_IFELSE( ++ [AC_LANG_PROGRAM( ++ [[#include ++ ]], ++ [[/* 64-bit ptrdiff_t is so wide that no practical platform ++ can exceed it. */ ++ #define WIDE_PTRDIFF (PTRDIFF_MAX >> 31 >> 31 != 0) ++ ++ /* On rare machines where size_t fits in ptrdiff_t there ++ is no problem. */ ++ #define NARROW_SIZE (SIZE_MAX <= PTRDIFF_MAX) ++ ++ /* glibc 2.30 and later malloc refuses to exceed ptrdiff_t ++ bounds even on 32-bit platforms. We don't know which ++ non-glibc systems are safe. */ ++ #define KNOWN_SAFE (2 < __GLIBC__ + (30 <= __GLIBC_MINOR__)) ++ ++ #if WIDE_PTRDIFF || NARROW_SIZE || KNOWN_SAFE ++ return 0; ++ #else ++ #error "malloc might not be ptrdiff_t safe" ++ syntax error ++ #endif ++ ]])], ++ [gl_cv_malloc_ptrdiff=yes], ++ [gl_cv_malloc_ptrdiff=no]) + ]) + ]) + + # gl_FUNC_MALLOC_POSIX + # -------------------- + # Test whether 'malloc' is POSIX compliant (sets errno to ENOMEM when it +-# fails), and replace malloc if it is not. ++# fails, and doesn't mess up with ptrdiff_t overflow), and replace ++# malloc if it is not. + AC_DEFUN([gl_FUNC_MALLOC_POSIX], + [ + AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) ++ AC_REQUIRE([gl_FUNC_MALLOC_PTRDIFF]) + AC_REQUIRE([gl_CHECK_MALLOC_POSIX]) +- if test $gl_cv_func_malloc_posix = yes; then ++ if test "$gl_cv_func_malloc_posix" = yes; then + AC_DEFINE([HAVE_MALLOC_POSIX], [1], +- [Define if the 'malloc' function is POSIX compliant.]) ++ [Define if malloc, realloc, and calloc set errno on allocation failure.]) + else + REPLACE_MALLOC=1 + fi + ]) + +-# Test whether malloc, realloc, calloc are POSIX compliant, ++# Test whether malloc, realloc, calloc set errno to ENOMEM on failure. + # Set gl_cv_func_malloc_posix to yes or no accordingly. + AC_DEFUN([gl_CHECK_MALLOC_POSIX], + [ +- AC_CACHE_CHECK([whether malloc, realloc, calloc are POSIX compliant], ++ AC_REQUIRE([AC_CANONICAL_HOST]) ++ AC_CACHE_CHECK([whether malloc, realloc, calloc set errno on failure], + [gl_cv_func_malloc_posix], + [ + dnl It is too dangerous to try to allocate a large amount of memory: + dnl some systems go to their knees when you do that. So assume that +- dnl all Unix implementations of the function are POSIX compliant. +- AC_COMPILE_IFELSE( +- [AC_LANG_PROGRAM( +- [[]], +- [[#if defined _WIN32 && ! defined __CYGWIN__ +- choke me +- #endif +- ]])], +- [gl_cv_func_malloc_posix=yes], +- [gl_cv_func_malloc_posix=no]) ++ dnl all Unix implementations of the function set errno on failure, ++ dnl except on those platforms where we have seen 'test-malloc-gnu', ++ dnl 'test-realloc-gnu', 'test-calloc-gnu' fail. ++ case "$host_os" in ++ mingw*) ++ gl_cv_func_malloc_posix=no ;; ++ irix* | solaris*) ++ dnl On IRIX 6.5, the three functions return NULL with errno unset ++ dnl when the argument is larger than PTRDIFF_MAX. ++ dnl On Solaris 11.3, the three functions return NULL with errno set ++ dnl to EAGAIN, not ENOMEM, when the argument is larger than ++ dnl PTRDIFF_MAX. ++ dnl Here is a test program: ++m4_divert_push([KILL]) ++#include ++#include ++#include ++#define ptrdiff_t long ++#ifndef PTRDIFF_MAX ++# define PTRDIFF_MAX ((ptrdiff_t) ((1UL << (8 * sizeof (ptrdiff_t) - 1)) - 1)) ++#endif ++ ++int main () ++{ ++ void *p; ++ ++ fprintf (stderr, "PTRDIFF_MAX = %lu\n", (unsigned long) PTRDIFF_MAX); ++ ++ errno = 0; ++ p = malloc ((unsigned long) PTRDIFF_MAX + 1); ++ fprintf (stderr, "p=%p errno=%d\n", p, errno); ++ ++ errno = 0; ++ p = calloc (PTRDIFF_MAX / 2 + 1, 2); ++ fprintf (stderr, "p=%p errno=%d\n", p, errno); ++ ++ errno = 0; ++ p = realloc (NULL, (unsigned long) PTRDIFF_MAX + 1); ++ fprintf (stderr, "p=%p errno=%d\n", p, errno); ++ ++ return 0; ++} ++m4_divert_pop([KILL]) ++ gl_cv_func_malloc_posix=no ;; ++ *) ++ gl_cv_func_malloc_posix=yes ;; ++ esac + ]) + ]) +diff --git a/m4/math_h.m4 b/m4/math_h.m4 +index a9ba5e6..b3a10c3 100644 +--- a/m4/math_h.m4 ++++ b/m4/math_h.m4 +@@ -1,10 +1,10 @@ +-# math_h.m4 serial 122 ++# math_h.m4 serial 125 + 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. + +-AC_DEFUN([gl_MATH_H], ++AC_DEFUN_ONCE([gl_MATH_H], + [ + AC_REQUIRE([gl_MATH_H_DEFAULTS]) + gl_CHECK_NEXT_HEADERS([math.h]) +@@ -53,119 +53,134 @@ AC_DEFUN([gl_MATH_H], + tanf tanl tanhf trunc truncf truncl]) + ]) + ++# gl_MATH_MODULE_INDICATOR([modulename]) ++# sets the shell variable that indicates the presence of the given module ++# to a C preprocessor expression that will evaluate to 1. ++# This macro invocation must not occur in macros that are AC_REQUIREd. + AC_DEFUN([gl_MATH_MODULE_INDICATOR], + [ +- dnl Use AC_REQUIRE here, so that the default settings are expanded once only. +- AC_REQUIRE([gl_MATH_H_DEFAULTS]) ++ dnl Ensure to expand the default settings once only. ++ gl_MATH_H_REQUIRE_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]) + ]) + ++# Initializes the default values for AC_SUBSTed shell variables. ++# This macro must not be AC_REQUIREd. It must only be invoked, and only ++# outside of macros or in macros that are not AC_REQUIREd. ++AC_DEFUN([gl_MATH_H_REQUIRE_DEFAULTS], ++[ ++ m4_defun(GL_MODULE_INDICATOR_PREFIX[_MATH_H_MODULE_INDICATOR_DEFAULTS], [ ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ACOSF]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ACOSL]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ASINF]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ASINL]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ATANF]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ATANL]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ATAN2F]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CBRT]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CBRTF]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CBRTL]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CEIL]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CEILF]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CEILL]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_COPYSIGN]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_COPYSIGNF]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_COPYSIGNL]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_COSF]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_COSL]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_COSHF]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXPF]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXPL]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXP2]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXP2F]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXP2L]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXPM1]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXPM1F]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXPM1L]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FABSF]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FABSL]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FLOOR]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FLOORF]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FLOORL]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FMA]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FMAF]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FMAL]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FMOD]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FMODF]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FMODL]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FREXPF]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FREXP]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FREXPL]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_HYPOT]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_HYPOTF]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_HYPOTL]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ILOGB]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ILOGBF]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ILOGBL]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISFINITE]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISINF]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISNAN]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISNANF]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISNAND]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISNANL]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LDEXPF]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LDEXPL]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LOG]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LOGF]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LOGL]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LOG10]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LOG10F]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LOG10L]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LOG1P]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LOG1PF]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LOG1PL]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LOG2]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LOG2F]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LOG2L]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LOGB]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LOGBF]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LOGBL]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MODF]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MODFF]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MODFL]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_POWF]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REMAINDER]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REMAINDERF]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REMAINDERL]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RINT]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RINTF]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RINTL]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ROUND]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ROUNDF]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ROUNDL]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SIGNBIT]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SINF]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SINL]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SINHF]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SQRTF]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SQRTL]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TANF]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TANL]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TANHF]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TRUNC]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TRUNCF]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TRUNCL]) ++ dnl Support Microsoft deprecated alias function names by default. ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_J0], [1]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_J1], [1]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_JN], [1]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_Y0], [1]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_Y1], [1]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_YN], [1]) ++ ]) ++ m4_require(GL_MODULE_INDICATOR_PREFIX[_MATH_H_MODULE_INDICATOR_DEFAULTS]) ++ AC_REQUIRE([gl_MATH_H_DEFAULTS]) ++]) ++ + AC_DEFUN([gl_MATH_H_DEFAULTS], + [ +- GNULIB_ACOSF=0; AC_SUBST([GNULIB_ACOSF]) +- GNULIB_ACOSL=0; AC_SUBST([GNULIB_ACOSL]) +- GNULIB_ASINF=0; AC_SUBST([GNULIB_ASINF]) +- GNULIB_ASINL=0; AC_SUBST([GNULIB_ASINL]) +- GNULIB_ATANF=0; AC_SUBST([GNULIB_ATANF]) +- GNULIB_ATANL=0; AC_SUBST([GNULIB_ATANL]) +- GNULIB_ATAN2F=0; AC_SUBST([GNULIB_ATAN2F]) +- GNULIB_CBRT=0; AC_SUBST([GNULIB_CBRT]) +- GNULIB_CBRTF=0; AC_SUBST([GNULIB_CBRTF]) +- GNULIB_CBRTL=0; AC_SUBST([GNULIB_CBRTL]) +- GNULIB_CEIL=0; AC_SUBST([GNULIB_CEIL]) +- GNULIB_CEILF=0; AC_SUBST([GNULIB_CEILF]) +- GNULIB_CEILL=0; AC_SUBST([GNULIB_CEILL]) +- GNULIB_COPYSIGN=0; AC_SUBST([GNULIB_COPYSIGN]) +- GNULIB_COPYSIGNF=0; AC_SUBST([GNULIB_COPYSIGNF]) +- GNULIB_COPYSIGNL=0; AC_SUBST([GNULIB_COPYSIGNL]) +- GNULIB_COSF=0; AC_SUBST([GNULIB_COSF]) +- GNULIB_COSL=0; AC_SUBST([GNULIB_COSL]) +- GNULIB_COSHF=0; AC_SUBST([GNULIB_COSHF]) +- GNULIB_EXPF=0; AC_SUBST([GNULIB_EXPF]) +- GNULIB_EXPL=0; AC_SUBST([GNULIB_EXPL]) +- GNULIB_EXP2=0; AC_SUBST([GNULIB_EXP2]) +- GNULIB_EXP2F=0; AC_SUBST([GNULIB_EXP2F]) +- GNULIB_EXP2L=0; AC_SUBST([GNULIB_EXP2L]) +- GNULIB_EXPM1=0; AC_SUBST([GNULIB_EXPM1]) +- GNULIB_EXPM1F=0; AC_SUBST([GNULIB_EXPM1F]) +- GNULIB_EXPM1L=0; AC_SUBST([GNULIB_EXPM1L]) +- GNULIB_FABSF=0; AC_SUBST([GNULIB_FABSF]) +- GNULIB_FABSL=0; AC_SUBST([GNULIB_FABSL]) +- GNULIB_FLOOR=0; AC_SUBST([GNULIB_FLOOR]) +- GNULIB_FLOORF=0; AC_SUBST([GNULIB_FLOORF]) +- GNULIB_FLOORL=0; AC_SUBST([GNULIB_FLOORL]) +- GNULIB_FMA=0; AC_SUBST([GNULIB_FMA]) +- GNULIB_FMAF=0; AC_SUBST([GNULIB_FMAF]) +- GNULIB_FMAL=0; AC_SUBST([GNULIB_FMAL]) +- GNULIB_FMOD=0; AC_SUBST([GNULIB_FMOD]) +- GNULIB_FMODF=0; AC_SUBST([GNULIB_FMODF]) +- GNULIB_FMODL=0; AC_SUBST([GNULIB_FMODL]) +- GNULIB_FREXPF=0; AC_SUBST([GNULIB_FREXPF]) +- GNULIB_FREXP=0; AC_SUBST([GNULIB_FREXP]) +- GNULIB_FREXPL=0; AC_SUBST([GNULIB_FREXPL]) +- GNULIB_HYPOT=0; AC_SUBST([GNULIB_HYPOT]) +- GNULIB_HYPOTF=0; AC_SUBST([GNULIB_HYPOTF]) +- GNULIB_HYPOTL=0; AC_SUBST([GNULIB_HYPOTL]) +- GNULIB_ILOGB=0; AC_SUBST([GNULIB_ILOGB]) +- GNULIB_ILOGBF=0; AC_SUBST([GNULIB_ILOGBF]) +- GNULIB_ILOGBL=0; AC_SUBST([GNULIB_ILOGBL]) +- GNULIB_ISFINITE=0; AC_SUBST([GNULIB_ISFINITE]) +- GNULIB_ISINF=0; AC_SUBST([GNULIB_ISINF]) +- GNULIB_ISNAN=0; AC_SUBST([GNULIB_ISNAN]) +- GNULIB_ISNANF=0; AC_SUBST([GNULIB_ISNANF]) +- GNULIB_ISNAND=0; AC_SUBST([GNULIB_ISNAND]) +- GNULIB_ISNANL=0; AC_SUBST([GNULIB_ISNANL]) +- GNULIB_LDEXPF=0; AC_SUBST([GNULIB_LDEXPF]) +- GNULIB_LDEXPL=0; AC_SUBST([GNULIB_LDEXPL]) +- GNULIB_LOG=0; AC_SUBST([GNULIB_LOG]) +- GNULIB_LOGF=0; AC_SUBST([GNULIB_LOGF]) +- GNULIB_LOGL=0; AC_SUBST([GNULIB_LOGL]) +- GNULIB_LOG10=0; AC_SUBST([GNULIB_LOG10]) +- GNULIB_LOG10F=0; AC_SUBST([GNULIB_LOG10F]) +- GNULIB_LOG10L=0; AC_SUBST([GNULIB_LOG10L]) +- GNULIB_LOG1P=0; AC_SUBST([GNULIB_LOG1P]) +- GNULIB_LOG1PF=0; AC_SUBST([GNULIB_LOG1PF]) +- GNULIB_LOG1PL=0; AC_SUBST([GNULIB_LOG1PL]) +- GNULIB_LOG2=0; AC_SUBST([GNULIB_LOG2]) +- GNULIB_LOG2F=0; AC_SUBST([GNULIB_LOG2F]) +- GNULIB_LOG2L=0; AC_SUBST([GNULIB_LOG2L]) +- GNULIB_LOGB=0; AC_SUBST([GNULIB_LOGB]) +- GNULIB_LOGBF=0; AC_SUBST([GNULIB_LOGBF]) +- GNULIB_LOGBL=0; AC_SUBST([GNULIB_LOGBL]) +- GNULIB_MODF=0; AC_SUBST([GNULIB_MODF]) +- GNULIB_MODFF=0; AC_SUBST([GNULIB_MODFF]) +- GNULIB_MODFL=0; AC_SUBST([GNULIB_MODFL]) +- GNULIB_POWF=0; AC_SUBST([GNULIB_POWF]) +- GNULIB_REMAINDER=0; AC_SUBST([GNULIB_REMAINDER]) +- GNULIB_REMAINDERF=0; AC_SUBST([GNULIB_REMAINDERF]) +- GNULIB_REMAINDERL=0; AC_SUBST([GNULIB_REMAINDERL]) +- GNULIB_RINT=0; AC_SUBST([GNULIB_RINT]) +- GNULIB_RINTF=0; AC_SUBST([GNULIB_RINTF]) +- GNULIB_RINTL=0; AC_SUBST([GNULIB_RINTL]) +- GNULIB_ROUND=0; AC_SUBST([GNULIB_ROUND]) +- GNULIB_ROUNDF=0; AC_SUBST([GNULIB_ROUNDF]) +- GNULIB_ROUNDL=0; AC_SUBST([GNULIB_ROUNDL]) +- GNULIB_SIGNBIT=0; AC_SUBST([GNULIB_SIGNBIT]) +- GNULIB_SINF=0; AC_SUBST([GNULIB_SINF]) +- GNULIB_SINL=0; AC_SUBST([GNULIB_SINL]) +- GNULIB_SINHF=0; AC_SUBST([GNULIB_SINHF]) +- GNULIB_SQRTF=0; AC_SUBST([GNULIB_SQRTF]) +- GNULIB_SQRTL=0; AC_SUBST([GNULIB_SQRTL]) +- GNULIB_TANF=0; AC_SUBST([GNULIB_TANF]) +- GNULIB_TANL=0; AC_SUBST([GNULIB_TANL]) +- GNULIB_TANHF=0; AC_SUBST([GNULIB_TANHF]) +- 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]) +diff --git a/m4/memchr.m4 b/m4/memchr.m4 +index 64470de..ca08192 100644 +--- a/m4/memchr.m4 ++++ b/m4/memchr.m4 +@@ -1,4 +1,4 @@ +-# memchr.m4 serial 17 ++# memchr.m4 serial 18 + 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, +@@ -13,7 +13,7 @@ AC_DEFUN_ONCE([gl_FUNC_MEMCHR], + AC_CHECK_HEADERS_ONCE([sys/mman.h]) + AC_CHECK_FUNCS_ONCE([mprotect]) + +- AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) ++ AC_REQUIRE([gl_STRING_H_DEFAULTS]) + # 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 +diff --git a/m4/mempcpy.m4 b/m4/mempcpy.m4 +index c5ee2af..f9d9ec8 100644 +--- a/m4/mempcpy.m4 ++++ b/m4/mempcpy.m4 +@@ -1,4 +1,4 @@ +-# mempcpy.m4 serial 11 ++# mempcpy.m4 serial 12 + dnl Copyright (C) 2003-2004, 2006-2007, 2009-2021 Free Software Foundation, + dnl Inc. + dnl This file is free software; the Free Software Foundation +@@ -13,7 +13,7 @@ AC_DEFUN([gl_FUNC_MEMPCPY], + dnl The mempcpy() declaration in lib/string.in.h uses 'restrict'. + AC_REQUIRE([AC_C_RESTRICT]) + +- AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) ++ AC_REQUIRE([gl_STRING_H_DEFAULTS]) + AC_CHECK_FUNCS([mempcpy]) + if test $ac_cv_func_mempcpy = no; then + HAVE_MEMPCPY=0 +diff --git a/m4/mktime.m4 b/m4/mktime.m4 +index 245649e..721189a 100644 +--- a/m4/mktime.m4 ++++ b/m4/mktime.m4 +@@ -1,4 +1,4 @@ +-# serial 35 ++# serial 36 + dnl Copyright (C) 2002-2003, 2005-2007, 2009-2021 Free Software Foundation, + dnl Inc. + dnl This file is free software; the Free Software Foundation +@@ -255,7 +255,7 @@ main () + dnl Main macro of module 'mktime'. + AC_DEFUN([gl_FUNC_MKTIME], + [ +- AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) ++ AC_REQUIRE([gl_TIME_H_DEFAULTS]) + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([gl_FUNC_MKTIME_WORKS]) + +diff --git a/m4/netdb_h.m4 b/m4/netdb_h.m4 +index db84c78..eb7c3b8 100644 +--- a/m4/netdb_h.m4 ++++ b/m4/netdb_h.m4 +@@ -1,10 +1,10 @@ +-# netdb_h.m4 serial 12 ++# netdb_h.m4 serial 15 + 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. + +-AC_DEFUN([gl_HEADER_NETDB], ++AC_DEFUN_ONCE([gl_NETDB_H], + [ + AC_REQUIRE([gl_NETDB_H_DEFAULTS]) + gl_CHECK_NEXT_HEADERS([netdb.h]) +@@ -21,18 +21,33 @@ AC_DEFUN([gl_HEADER_NETDB], + [getaddrinfo freeaddrinfo gai_strerror getnameinfo]) + ]) + ++# gl_NETDB_MODULE_INDICATOR([modulename]) ++# sets the shell variable that indicates the presence of the given module ++# to a C preprocessor expression that will evaluate to 1. ++# This macro invocation must not occur in macros that are AC_REQUIREd. + AC_DEFUN([gl_NETDB_MODULE_INDICATOR], + [ +- dnl Use AC_REQUIRE here, so that the default settings are expanded once only. +- AC_REQUIRE([gl_NETDB_H_DEFAULTS]) ++ dnl Ensure to expand the default settings once only. ++ gl_NETDB_H_REQUIRE_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]) + ]) + ++# Initializes the default values for AC_SUBSTed shell variables. ++# This macro must not be AC_REQUIREd. It must only be invoked, and only ++# outside of macros or in macros that are not AC_REQUIREd. ++AC_DEFUN([gl_NETDB_H_REQUIRE_DEFAULTS], ++[ ++ m4_defun(GL_MODULE_INDICATOR_PREFIX[_NETDB_H_MODULE_INDICATOR_DEFAULTS], [ ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETADDRINFO]) ++ ]) ++ m4_require(GL_MODULE_INDICATOR_PREFIX[_NETDB_H_MODULE_INDICATOR_DEFAULTS]) ++ AC_REQUIRE([gl_NETDB_H_DEFAULTS]) ++]) ++ + AC_DEFUN([gl_NETDB_H_DEFAULTS], + [ +- GNULIB_GETADDRINFO=0; AC_SUBST([GNULIB_GETADDRINFO]) + dnl Assume proper GNU behavior unless another module says otherwise. + HAVE_STRUCT_ADDRINFO=1; AC_SUBST([HAVE_STRUCT_ADDRINFO]) + HAVE_DECL_FREEADDRINFO=1; AC_SUBST([HAVE_DECL_FREEADDRINFO]) +diff --git a/m4/poll_h.m4 b/m4/poll_h.m4 +index 20692d8..1f0d796 100644 +--- a/m4/poll_h.m4 ++++ b/m4/poll_h.m4 +@@ -1,4 +1,4 @@ +-# poll_h.m4 serial 3 ++# poll_h.m4 serial 6 + 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, +@@ -6,10 +6,10 @@ dnl with or without modifications, as long as this notice is preserved. + + dnl Written by Bruno Haible. + +-AC_DEFUN([gl_POLL_H], ++AC_DEFUN_ONCE([gl_POLL_H], + [ +- dnl Use AC_REQUIRE here, so that the default behavior below is expanded +- dnl once only, before all statements that occur in other macros. ++ dnl Ensure to expand the default settings once only, before all statements ++ dnl that occur in other macros. + AC_REQUIRE([gl_POLL_H_DEFAULTS]) + + AC_CHECK_HEADERS_ONCE([poll.h]) +@@ -31,18 +31,33 @@ AC_DEFUN([gl_POLL_H], + [poll]) + ]) + ++# gl_POLL_MODULE_INDICATOR([modulename]) ++# sets the shell variable that indicates the presence of the given module ++# to a C preprocessor expression that will evaluate to 1. ++# This macro invocation must not occur in macros that are AC_REQUIREd. + AC_DEFUN([gl_POLL_MODULE_INDICATOR], + [ +- dnl Use AC_REQUIRE here, so that the default settings are expanded once only. +- AC_REQUIRE([gl_POLL_H_DEFAULTS]) ++ dnl Ensure to expand the default settings once only. ++ gl_POLL_H_REQUIRE_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]) + ]) + ++# Initializes the default values for AC_SUBSTed shell variables. ++# This macro must not be AC_REQUIREd. It must only be invoked, and only ++# outside of macros or in macros that are not AC_REQUIREd. ++AC_DEFUN([gl_POLL_H_REQUIRE_DEFAULTS], ++[ ++ m4_defun(GL_MODULE_INDICATOR_PREFIX[_POLL_H_MODULE_INDICATOR_DEFAULTS], [ ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_POLL]) ++ ]) ++ m4_require(GL_MODULE_INDICATOR_PREFIX[_POLL_H_MODULE_INDICATOR_DEFAULTS]) ++ AC_REQUIRE([gl_POLL_H_DEFAULTS]) ++]) ++ + AC_DEFUN([gl_POLL_H_DEFAULTS], + [ +- GNULIB_POLL=0; AC_SUBST([GNULIB_POLL]) + dnl Assume proper GNU behavior unless another module says otherwise. + HAVE_POLL=1; AC_SUBST([HAVE_POLL]) + REPLACE_POLL=0; AC_SUBST([REPLACE_POLL]) +diff --git a/m4/printf.m4 b/m4/printf.m4 +index d8b3521..284c7c5 100644 +--- a/m4/printf.m4 ++++ b/m4/printf.m4 +@@ -1,4 +1,4 @@ +-# printf.m4 serial 72 ++# printf.m4 serial 73 + 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, +@@ -537,7 +537,7 @@ int main () + && strcmp (buf, "-0X6.488P-1 33") != 0 + && strcmp (buf, "-0XC.91P-2 33") != 0)) + result |= 2; +- /* This catches a FreeBSD 6.1 bug: it doesn't round. */ ++ /* This catches a FreeBSD 13.0 bug: it doesn't round. */ + if (sprintf (buf, "%.2a %d", 1.51, 33, 44, 55) < 0 + || (strcmp (buf, "0x1.83p+0 33") != 0 + && strcmp (buf, "0x3.05p-1 33") != 0 +@@ -1690,6 +1690,7 @@ dnl + dnl 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 + dnl glibc 2.5 . . . . . . . . . . . . . . . . . . . . + dnl glibc 2.3.6 . . . . # . . . . . . . . . . . . . . . ++dnl FreeBSD 13.0 . . . . # . . . . . . . . # . . . . . . + dnl FreeBSD 5.4, 6.1 . . . . # . . . . . . # . # . . . . . . + dnl Mac OS X 10.13.5 . . . # # . # . . . . . . . . . . # . . + dnl Mac OS X 10.5.8 . . . # # . . . . . . # . . . . . . . . +diff --git a/m4/rawmemchr.m4 b/m4/rawmemchr.m4 +index f928465..452fab1 100644 +--- a/m4/rawmemchr.m4 ++++ b/m4/rawmemchr.m4 +@@ -1,4 +1,4 @@ +-# rawmemchr.m4 serial 2 ++# rawmemchr.m4 serial 3 + 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, +@@ -9,7 +9,7 @@ AC_DEFUN([gl_FUNC_RAWMEMCHR], + dnl Persuade glibc to declare rawmemchr(). + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + +- AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) ++ AC_REQUIRE([gl_STRING_H_DEFAULTS]) + AC_CHECK_FUNCS([rawmemchr]) + if test $ac_cv_func_rawmemchr = no; then + HAVE_RAWMEMCHR=0 +diff --git a/m4/realloc.m4 b/m4/realloc.m4 +index a80a02a..0abc418 100644 +--- a/m4/realloc.m4 ++++ b/m4/realloc.m4 +@@ -1,21 +1,21 @@ +-# realloc.m4 serial 20 ++# realloc.m4 serial 24 + 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. + + # This is adapted with modifications from upstream Autoconf here: +-# https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=04be2b7a29d65d9a08e64e8e56e594c91749598c ++# https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/functions.m4?id=v2.70#n1455 + AC_DEFUN([_AC_FUNC_REALLOC_IF], + [ + AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles +- AC_CACHE_CHECK([for GNU libc compatible realloc], ++ AC_CACHE_CHECK([whether realloc (0, 0) returns nonnull], + [ac_cv_func_realloc_0_nonnull], + [AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[#include + ]], +- [[char *p = realloc (0, 0); ++ [[void *p = realloc (0, 0); + int result = !p; + free (p); + return result;]]) +@@ -24,53 +24,40 @@ AC_DEFUN([_AC_FUNC_REALLOC_IF], + [ac_cv_func_realloc_0_nonnull=no], + [case "$host_os" in + # Guess yes on platforms where we know the result. +- *-gnu* | gnu* | *-musl* | freebsd* | midnightbsd* | netbsd* | openbsd* \ +- | hpux* | solaris* | cygwin* | mingw*) ++ *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \ ++ | gnu* | *-musl* | midnightbsd* \ ++ | hpux* | solaris* | cygwin* | mingw* | msys* ) + ac_cv_func_realloc_0_nonnull="guessing yes" ;; + # If we don't know, obey --enable-cross-guesses. + *) ac_cv_func_realloc_0_nonnull="$gl_cross_guess_normal" ;; + esac + ]) + ]) +- case "$ac_cv_func_realloc_0_nonnull" in +- *yes) +- $1 +- ;; +- *) +- $2 +- ;; +- esac ++ AS_CASE([$ac_cv_func_realloc_0_nonnull], [*yes], [$1], [$2]) + ])# AC_FUNC_REALLOC + + # gl_FUNC_REALLOC_GNU + # ------------------- +-# Test whether 'realloc (0, 0)' is handled like in GNU libc, and replace +-# realloc if it is not. ++# Replace realloc if it is not compatible with GNU libc. + AC_DEFUN([gl_FUNC_REALLOC_GNU], + [ + AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) +- dnl _AC_FUNC_REALLOC_IF is defined in Autoconf. +- _AC_FUNC_REALLOC_IF( +- [AC_DEFINE([HAVE_REALLOC_GNU], [1], +- [Define to 1 if your system has a GNU libc compatible 'realloc' +- function, and to 0 otherwise.])], +- [AC_DEFINE([HAVE_REALLOC_GNU], [0]) +- REPLACE_REALLOC=1 +- ]) ++ AC_REQUIRE([gl_FUNC_REALLOC_POSIX]) ++ if test $REPLACE_REALLOC = 0; then ++ _AC_FUNC_REALLOC_IF([], [REPLACE_REALLOC=1]) ++ fi + ])# gl_FUNC_REALLOC_GNU + + # gl_FUNC_REALLOC_POSIX + # --------------------- + # Test whether 'realloc' is POSIX compliant (sets errno to ENOMEM when it +-# fails), and replace realloc if it is not. ++# fails, and doesn't mess up with ptrdiff_t overflow), ++# and replace realloc if it is not. + AC_DEFUN([gl_FUNC_REALLOC_POSIX], + [ + AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) +- AC_REQUIRE([gl_CHECK_MALLOC_POSIX]) +- if test $gl_cv_func_malloc_posix = yes; then +- AC_DEFINE([HAVE_REALLOC_POSIX], [1], +- [Define if the 'realloc' function is POSIX compliant.]) +- else ++ AC_REQUIRE([gl_FUNC_MALLOC_POSIX]) ++ if test $REPLACE_MALLOC = 1; then + REPLACE_REALLOC=1 + fi + ]) +diff --git a/m4/regex.m4 b/m4/regex.m4 +index 850c572..1c7e562 100644 +--- a/m4/regex.m4 ++++ b/m4/regex.m4 +@@ -1,4 +1,4 @@ +-# serial 71 ++# serial 73 + + # Copyright (C) 1996-2001, 2003-2021 Free Software Foundation, Inc. + # +@@ -246,7 +246,7 @@ AC_DEFUN([gl_REGEX], + & ~RE_CONTEXT_INVALID_DUP + & ~RE_NO_EMPTY_RANGES); + memset (®ex, 0, sizeof regex); +- s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, ®ex); ++ s = re_compile_pattern ("[[:alnum:]_-]\\\\+\$", 16, ®ex); + if (s) + result |= 32; + else +@@ -264,14 +264,50 @@ AC_DEFUN([gl_REGEX], + back reference. */ + re_set_syntax (RE_SYNTAX_POSIX_EGREP); + memset (®ex, 0, sizeof regex); +- s = re_compile_pattern ("0|()0|\\1|0", 10, ®ex); ++ s = re_compile_pattern ("0|()0|\\\\1|0", 10, ®ex); + if (!s) +- result |= 64; ++ { ++ memset (®s, 0, sizeof regs); ++ i = re_search (®ex, "x", 1, 0, 1, ®s); ++ if (i != -1) ++ result |= 64; ++ if (0 <= i) ++ { ++ free (regs.start); ++ free (regs.end); ++ } ++ regfree (®ex); ++ } + else + { + if (strcmp (s, "Invalid back reference")) + result |= 64; ++ } ++ ++ /* glibc bug 11053. */ ++ re_set_syntax (RE_SYNTAX_POSIX_BASIC); ++ memset (®ex, 0, sizeof regex); ++ static char const pat_sub2[] = "\\\\(a*\\\\)*a*\\\\1"; ++ s = re_compile_pattern (pat_sub2, sizeof pat_sub2 - 1, ®ex); ++ if (s) ++ result |= 64; ++ else ++ { ++ memset (®s, 0, sizeof regs); ++ static char const data[] = "a"; ++ int datalen = sizeof data - 1; ++ i = re_search (®ex, data, datalen, 0, datalen, ®s); ++ if (i != 0) ++ result |= 64; ++ else if (regs.num_regs < 2) ++ result |= 64; ++ else if (! (regs.start[0] == 0 && regs.end[0] == 1)) ++ result |= 64; ++ else if (! (regs.start[1] == 0 && regs.end[1] == 0)) ++ result |= 64; + regfree (®ex); ++ free (regs.start); ++ free (regs.end); + } + + #if 0 +diff --git a/m4/select.m4 b/m4/select.m4 +index c7409d2..72c068f 100644 +--- a/m4/select.m4 ++++ b/m4/select.m4 +@@ -1,4 +1,4 @@ +-# select.m4 serial 12 ++# select.m4 serial 13 + 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, +@@ -6,7 +6,7 @@ dnl with or without modifications, as long as this notice is preserved. + + AC_DEFUN([gl_FUNC_SELECT], + [ +- AC_REQUIRE([gl_HEADER_SYS_SELECT]) ++ AC_REQUIRE([gl_SYS_SELECT_H]) + AC_REQUIRE([AC_C_RESTRICT]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_REQUIRE([gl_SOCKETS]) +diff --git a/m4/servent.m4 b/m4/servent.m4 +index 2dda177..9bc3bcd 100644 +--- a/m4/servent.m4 ++++ b/m4/servent.m4 +@@ -1,4 +1,4 @@ +-# servent.m4 serial 3 ++# servent.m4 serial 4 + 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, +@@ -15,7 +15,7 @@ AC_DEFUN([gl_SERVENT], + dnl - On BeOS, they are in libnet. + dnl - On native Windows, they are in ws2_32.dll. + dnl - Otherwise they are in libc. +- AC_REQUIRE([gl_HEADER_SYS_SOCKET])dnl for HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H ++ AC_REQUIRE([gl_SYS_SOCKET_H])dnl for HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H + SERVENT_LIB= + gl_saved_libs="$LIBS" + AC_SEARCH_LIBS([getservbyname], [socket network net], +diff --git a/m4/signal_h.m4 b/m4/signal_h.m4 +index ff9f025..8b93880 100644 +--- a/m4/signal_h.m4 ++++ b/m4/signal_h.m4 +@@ -1,10 +1,10 @@ +-# signal_h.m4 serial 19 ++# signal_h.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. + +-AC_DEFUN([gl_SIGNAL_H], ++AC_DEFUN_ONCE([gl_SIGNAL_H], + [ + AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) + AC_REQUIRE([gl_CHECK_TYPE_SIGSET_T]) +@@ -52,22 +52,37 @@ AC_DEFUN([gl_CHECK_TYPE_SIGSET_T], + fi + ]) + ++# gl_SIGNAL_MODULE_INDICATOR([modulename]) ++# sets the shell variable that indicates the presence of the given module ++# to a C preprocessor expression that will evaluate to 1. ++# This macro invocation must not occur in macros that are AC_REQUIREd. + AC_DEFUN([gl_SIGNAL_MODULE_INDICATOR], + [ +- dnl Use AC_REQUIRE here, so that the default settings are expanded once only. +- AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) ++ dnl Ensure to expand the default settings once only. ++ gl_SIGNAL_H_REQUIRE_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]) + ]) + ++# Initializes the default values for AC_SUBSTed shell variables. ++# This macro must not be AC_REQUIREd. It must only be invoked, and only ++# outside of macros or in macros that are not AC_REQUIREd. ++AC_DEFUN([gl_SIGNAL_H_REQUIRE_DEFAULTS], ++[ ++ m4_defun(GL_MODULE_INDICATOR_PREFIX[_SIGNAL_H_MODULE_INDICATOR_DEFAULTS], [ ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PTHREAD_SIGMASK]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RAISE]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SIGNAL_H_SIGPIPE]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SIGPROCMASK]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SIGACTION]) ++ ]) ++ m4_require(GL_MODULE_INDICATOR_PREFIX[_SIGNAL_H_MODULE_INDICATOR_DEFAULTS]) ++ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) ++]) ++ + AC_DEFUN([gl_SIGNAL_H_DEFAULTS], + [ +- GNULIB_PTHREAD_SIGMASK=0; AC_SUBST([GNULIB_PTHREAD_SIGMASK]) +- GNULIB_RAISE=0; AC_SUBST([GNULIB_RAISE]) +- GNULIB_SIGNAL_H_SIGPIPE=0; AC_SUBST([GNULIB_SIGNAL_H_SIGPIPE]) +- GNULIB_SIGPROCMASK=0; AC_SUBST([GNULIB_SIGPROCMASK]) +- GNULIB_SIGACTION=0; AC_SUBST([GNULIB_SIGACTION]) + dnl Assume proper GNU behavior unless another module says otherwise. + HAVE_POSIX_SIGNALBLOCKING=1; AC_SUBST([HAVE_POSIX_SIGNALBLOCKING]) + HAVE_PTHREAD_SIGMASK=1; AC_SUBST([HAVE_PTHREAD_SIGMASK]) +diff --git a/m4/sockpfaf.m4 b/m4/sockpfaf.m4 +index edae5d8..17e14c7 100644 +--- a/m4/sockpfaf.m4 ++++ b/m4/sockpfaf.m4 +@@ -1,4 +1,4 @@ +-# sockpfaf.m4 serial 9 ++# sockpfaf.m4 serial 10 + 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, +@@ -13,7 +13,7 @@ dnl From Bruno Haible. + + AC_DEFUN([gl_SOCKET_FAMILIES], + [ +- AC_REQUIRE([gl_HEADER_SYS_SOCKET]) ++ AC_REQUIRE([gl_SYS_SOCKET_H]) + AC_CHECK_HEADERS_ONCE([netinet/in.h]) + + AC_CACHE_CHECK([for IPv4 sockets], +@@ -60,7 +60,7 @@ AC_DEFUN([gl_SOCKET_FAMILIES], + + AC_DEFUN([gl_SOCKET_FAMILY_UNIX], + [ +- AC_REQUIRE([gl_HEADER_SYS_SOCKET]) ++ AC_REQUIRE([gl_SYS_SOCKET_H]) + AC_CHECK_HEADERS_ONCE([sys/un.h]) + + AC_CACHE_CHECK([for UNIX domain sockets], +diff --git a/m4/stat.m4 b/m4/stat.m4 +index 66f6c8c..9bcdb72 100644 +--- a/m4/stat.m4 ++++ b/m4/stat.m4 +@@ -1,4 +1,4 @@ +-# serial 17 ++# serial 18 + + # Copyright (C) 2009-2021 Free Software Foundation, Inc. + # +@@ -69,7 +69,7 @@ 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_SYS_STAT_H]) + AC_REQUIRE([gl_PREREQ_STAT_W32]) + : + ]) +diff --git a/m4/stddef_h.m4 b/m4/stddef_h.m4 +index cd666c4..1303d2e 100644 +--- a/m4/stddef_h.m4 ++++ b/m4/stddef_h.m4 +@@ -1,4 +1,4 @@ +-# stddef_h.m4 serial 9 ++# stddef_h.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, +@@ -6,7 +6,7 @@ dnl with or without modifications, as long as this notice is preserved. + + dnl A placeholder for , for platforms that have issues. + +-AC_DEFUN([gl_STDDEF_H], ++AC_DEFUN_ONCE([gl_STDDEF_H], + [ + AC_REQUIRE([gl_STDDEF_H_DEFAULTS]) + AC_REQUIRE([gt_TYPE_WCHAR_T]) +@@ -68,13 +68,28 @@ AC_DEFUN([gl_STDDEF_H], + fi + ]) + ++# gl_STDDEF_MODULE_INDICATOR([modulename]) ++# sets the shell variable that indicates the presence of the given module ++# to a C preprocessor expression that will evaluate to 1. ++# This macro invocation must not occur in macros that are AC_REQUIREd. + AC_DEFUN([gl_STDDEF_MODULE_INDICATOR], + [ +- dnl Use AC_REQUIRE here, so that the default settings are expanded once only. +- AC_REQUIRE([gl_STDDEF_H_DEFAULTS]) ++ dnl Ensure to expand the default settings once only. ++ gl_STDDEF_H_REQUIRE_DEFAULTS + gl_MODULE_INDICATOR_SET_VARIABLE([$1]) + ]) + ++# Initializes the default values for AC_SUBSTed shell variables. ++# This macro must not be AC_REQUIREd. It must only be invoked, and only ++# outside of macros or in macros that are not AC_REQUIREd. ++AC_DEFUN([gl_STDDEF_H_REQUIRE_DEFAULTS], ++[ ++ m4_defun(GL_MODULE_INDICATOR_PREFIX[_STDDEF_H_MODULE_INDICATOR_DEFAULTS], [ ++ ]) ++ m4_require(GL_MODULE_INDICATOR_PREFIX[_STDDEF_H_MODULE_INDICATOR_DEFAULTS]) ++ AC_REQUIRE([gl_STDDEF_H_DEFAULTS]) ++]) ++ + AC_DEFUN([gl_STDDEF_H_DEFAULTS], + [ + dnl Assume proper GNU behavior unless another module says otherwise. +diff --git a/m4/stdint.m4 b/m4/stdint.m4 +index a785b44..2eb1652 100644 +--- a/m4/stdint.m4 ++++ b/m4/stdint.m4 +@@ -1,4 +1,4 @@ +-# stdint.m4 serial 58 ++# stdint.m4 serial 60 + 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, +@@ -170,7 +170,7 @@ struct s { + PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t) + && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t) + ? 1 : -1; +- /* Detect bug in FreeBSD 6.0 / ia64. */ ++ /* Detect bug in FreeBSD 6.0/ia64 and FreeBSD 13.0/arm64. */ + int check_SIG_ATOMIC: + SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t) + && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t) +@@ -527,7 +527,7 @@ AC_DEFUN([gl_STDINT_TYPE_PROPERTIES], + dnl requirement that wint_t is "unchanged by default argument promotions". + dnl In this case gnulib's and override wint_t. + dnl Set the variable BITSIZEOF_WINT_T accordingly. +- if test $GNULIB_OVERRIDES_WINT_T = 1; then ++ if test $GNULIBHEADERS_OVERRIDE_WINT_T = 1; then + BITSIZEOF_WINT_T=32 + fi + ]) +diff --git a/m4/stdio_h.m4 b/m4/stdio_h.m4 +index 4c3f24a..e704383 100644 +--- a/m4/stdio_h.m4 ++++ b/m4/stdio_h.m4 +@@ -1,11 +1,12 @@ +-# stdio_h.m4 serial 52 ++# stdio_h.m4 serial 56 + 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. + +-AC_DEFUN([gl_STDIO_H], ++AC_DEFUN_ONCE([gl_STDIO_H], + [ ++ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) + AH_VERBATIM([MINGW_ANSI_STDIO], + [/* Use GNU style printf and scanf. */ + #ifndef __USE_MINGW_ANSI_STDIO +@@ -13,7 +14,6 @@ AC_DEFUN([gl_STDIO_H], + #endif + ]) + AC_DEFINE([__USE_MINGW_ANSI_STDIO]) +- AC_REQUIRE([gl_STDIO_H_DEFAULTS]) + gl_NEXT_HEADERS([stdio.h]) + + dnl Determine whether __USE_MINGW_ANSI_STDIO makes printf and +@@ -40,17 +40,6 @@ AC_DEFUN([gl_STDIO_H], + attribute "__gnu_printf__" instead of "__printf__"]) + fi + +- dnl No need to create extra modules for these functions. Everyone who uses +- dnl likely needs them. +- GNULIB_FSCANF=1 +- gl_MODULE_INDICATOR([fscanf]) +- GNULIB_SCANF=1 +- gl_MODULE_INDICATOR([scanf]) +- GNULIB_FGETC=1 +- GNULIB_GETC=1 +- GNULIB_GETCHAR=1 +- GNULIB_FGETS=1 +- GNULIB_FREAD=1 + dnl This ifdef is necessary to avoid an error "missing file lib/stdio-read.c" + dnl "expected source file, required through AC_LIBSOURCES, not found". It is + dnl also an optimization, to avoid performing a configure check whose result +@@ -64,18 +53,6 @@ AC_DEFUN([gl_STDIO_H], + fi + ]) + +- dnl No need to create extra modules for these functions. Everyone who uses +- dnl likely needs them. +- GNULIB_FPRINTF=1 +- GNULIB_PRINTF=1 +- GNULIB_VFPRINTF=1 +- GNULIB_VPRINTF=1 +- GNULIB_FPUTC=1 +- GNULIB_PUTC=1 +- GNULIB_PUTCHAR=1 +- GNULIB_FPUTS=1 +- GNULIB_PUTS=1 +- GNULIB_FWRITE=1 + dnl This ifdef is necessary to avoid an error "missing file lib/stdio-write.c" + dnl "expected source file, required through AC_LIBSOURCES, not found". It is + dnl also an optimization, to avoid performing a configure check whose result +@@ -116,77 +93,92 @@ AC_DEFUN([gl_STDIO_H], + fi + ]) + ++# gl_STDIO_MODULE_INDICATOR([modulename]) ++# sets the shell variable that indicates the presence of the given module ++# to a C preprocessor expression that will evaluate to 1. ++# This macro invocation must not occur in macros that are AC_REQUIREd. + AC_DEFUN([gl_STDIO_MODULE_INDICATOR], + [ +- dnl Use AC_REQUIRE here, so that the default settings are expanded once only. +- AC_REQUIRE([gl_STDIO_H_DEFAULTS]) ++ dnl Ensure to expand the default settings once only. ++ gl_STDIO_H_REQUIRE_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]) + ]) + ++# Initializes the default values for AC_SUBSTed shell variables. ++# This macro must not be AC_REQUIREd. It must only be invoked, and only ++# outside of macros or in macros that are not AC_REQUIREd. ++AC_DEFUN([gl_STDIO_H_REQUIRE_DEFAULTS], ++[ ++ m4_defun(GL_MODULE_INDICATOR_PREFIX[_STDIO_H_MODULE_INDICATOR_DEFAULTS], [ ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_DPRINTF]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FCLOSE]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FDOPEN]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FFLUSH]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FGETC]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FGETS]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FOPEN]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FPRINTF]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FPRINTF_POSIX]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FPURGE]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FPUTC]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FPUTS]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FREAD]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FREOPEN]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FSCANF]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FSEEK]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FSEEKO]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FTELL]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FTELLO]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FWRITE]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETC]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETCHAR]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETDELIM]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETLINE]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_OBSTACK_PRINTF]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_OBSTACK_PRINTF_POSIX]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PCLOSE]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PERROR]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_POPEN]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PRINTF]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PRINTF_POSIX]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PUTC]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PUTCHAR]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PUTS]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REMOVE]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RENAME]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RENAMEAT]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SCANF]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SNPRINTF]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SPRINTF_POSIX]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STDIO_H_NONBLOCKING]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STDIO_H_SIGPIPE]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TMPFILE]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VASPRINTF]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VFSCANF]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VSCANF]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VDPRINTF]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VFPRINTF]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VFPRINTF_POSIX]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VPRINTF]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VPRINTF_POSIX]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VSNPRINTF]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VSPRINTF_POSIX]) ++ dnl Support Microsoft deprecated alias function names by default. ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_FCLOSEALL], [1]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_FDOPEN], [1]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_FILENO], [1]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_GETW], [1]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_PUTW], [1]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_TEMPNAM], [1]) ++ ]) ++ m4_require(GL_MODULE_INDICATOR_PREFIX[_STDIO_H_MODULE_INDICATOR_DEFAULTS]) ++ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) ++]) ++ + AC_DEFUN([gl_STDIO_H_DEFAULTS], + [ +- GNULIB_DPRINTF=0; AC_SUBST([GNULIB_DPRINTF]) +- GNULIB_FCLOSE=0; AC_SUBST([GNULIB_FCLOSE]) +- GNULIB_FDOPEN=0; AC_SUBST([GNULIB_FDOPEN]) +- GNULIB_FFLUSH=0; AC_SUBST([GNULIB_FFLUSH]) +- GNULIB_FGETC=0; AC_SUBST([GNULIB_FGETC]) +- GNULIB_FGETS=0; AC_SUBST([GNULIB_FGETS]) +- GNULIB_FOPEN=0; AC_SUBST([GNULIB_FOPEN]) +- GNULIB_FPRINTF=0; AC_SUBST([GNULIB_FPRINTF]) +- GNULIB_FPRINTF_POSIX=0; AC_SUBST([GNULIB_FPRINTF_POSIX]) +- GNULIB_FPURGE=0; AC_SUBST([GNULIB_FPURGE]) +- GNULIB_FPUTC=0; AC_SUBST([GNULIB_FPUTC]) +- GNULIB_FPUTS=0; AC_SUBST([GNULIB_FPUTS]) +- GNULIB_FREAD=0; AC_SUBST([GNULIB_FREAD]) +- GNULIB_FREOPEN=0; AC_SUBST([GNULIB_FREOPEN]) +- GNULIB_FSCANF=0; AC_SUBST([GNULIB_FSCANF]) +- GNULIB_FSEEK=0; AC_SUBST([GNULIB_FSEEK]) +- GNULIB_FSEEKO=0; AC_SUBST([GNULIB_FSEEKO]) +- GNULIB_FTELL=0; AC_SUBST([GNULIB_FTELL]) +- GNULIB_FTELLO=0; AC_SUBST([GNULIB_FTELLO]) +- GNULIB_FWRITE=0; AC_SUBST([GNULIB_FWRITE]) +- GNULIB_GETC=0; AC_SUBST([GNULIB_GETC]) +- GNULIB_GETCHAR=0; AC_SUBST([GNULIB_GETCHAR]) +- GNULIB_GETDELIM=0; AC_SUBST([GNULIB_GETDELIM]) +- GNULIB_GETLINE=0; AC_SUBST([GNULIB_GETLINE]) +- GNULIB_OBSTACK_PRINTF=0; AC_SUBST([GNULIB_OBSTACK_PRINTF]) +- GNULIB_OBSTACK_PRINTF_POSIX=0; AC_SUBST([GNULIB_OBSTACK_PRINTF_POSIX]) +- GNULIB_PCLOSE=0; AC_SUBST([GNULIB_PCLOSE]) +- GNULIB_PERROR=0; AC_SUBST([GNULIB_PERROR]) +- GNULIB_POPEN=0; AC_SUBST([GNULIB_POPEN]) +- GNULIB_PRINTF=0; AC_SUBST([GNULIB_PRINTF]) +- GNULIB_PRINTF_POSIX=0; AC_SUBST([GNULIB_PRINTF_POSIX]) +- GNULIB_PUTC=0; AC_SUBST([GNULIB_PUTC]) +- GNULIB_PUTCHAR=0; AC_SUBST([GNULIB_PUTCHAR]) +- GNULIB_PUTS=0; AC_SUBST([GNULIB_PUTS]) +- GNULIB_REMOVE=0; AC_SUBST([GNULIB_REMOVE]) +- GNULIB_RENAME=0; AC_SUBST([GNULIB_RENAME]) +- GNULIB_RENAMEAT=0; AC_SUBST([GNULIB_RENAMEAT]) +- GNULIB_SCANF=0; AC_SUBST([GNULIB_SCANF]) +- GNULIB_SNPRINTF=0; AC_SUBST([GNULIB_SNPRINTF]) +- GNULIB_SPRINTF_POSIX=0; AC_SUBST([GNULIB_SPRINTF_POSIX]) +- GNULIB_STDIO_H_NONBLOCKING=0; AC_SUBST([GNULIB_STDIO_H_NONBLOCKING]) +- GNULIB_STDIO_H_SIGPIPE=0; AC_SUBST([GNULIB_STDIO_H_SIGPIPE]) +- GNULIB_TMPFILE=0; AC_SUBST([GNULIB_TMPFILE]) +- GNULIB_VASPRINTF=0; AC_SUBST([GNULIB_VASPRINTF]) +- GNULIB_VFSCANF=0; AC_SUBST([GNULIB_VFSCANF]) +- GNULIB_VSCANF=0; AC_SUBST([GNULIB_VSCANF]) +- GNULIB_VDPRINTF=0; AC_SUBST([GNULIB_VDPRINTF]) +- GNULIB_VFPRINTF=0; AC_SUBST([GNULIB_VFPRINTF]) +- GNULIB_VFPRINTF_POSIX=0; AC_SUBST([GNULIB_VFPRINTF_POSIX]) +- GNULIB_VPRINTF=0; AC_SUBST([GNULIB_VPRINTF]) +- 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]) +diff --git a/m4/stdlib_h.m4 b/m4/stdlib_h.m4 +index 5fdb0a7..9c1d1c7 100644 +--- a/m4/stdlib_h.m4 ++++ b/m4/stdlib_h.m4 +@@ -1,10 +1,10 @@ +-# stdlib_h.m4 serial 59 ++# stdlib_h.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. + +-AC_DEFUN([gl_STDLIB_H], ++AC_DEFUN_ONCE([gl_STDLIB_H], + [ + AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) + gl_NEXT_HEADERS([stdlib.h]) +@@ -46,63 +46,78 @@ AC_DEFUN([gl_STDLIB_H], + fi + ]) + ++# gl_STDLIB_MODULE_INDICATOR([modulename]) ++# sets the shell variable that indicates the presence of the given module ++# to a C preprocessor expression that will evaluate to 1. ++# This macro invocation must not occur in macros that are AC_REQUIREd. + AC_DEFUN([gl_STDLIB_MODULE_INDICATOR], + [ +- dnl Use AC_REQUIRE here, so that the default settings are expanded once only. +- AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) ++ dnl Ensure to expand the default settings once only. ++ gl_STDLIB_H_REQUIRE_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]) + ]) + ++# Initializes the default values for AC_SUBSTed shell variables. ++# This macro must not be AC_REQUIREd. It must only be invoked, and only ++# outside of macros or in macros that are not AC_REQUIREd. ++AC_DEFUN([gl_STDLIB_H_REQUIRE_DEFAULTS], ++[ ++ m4_defun(GL_MODULE_INDICATOR_PREFIX[_STDLIB_H_MODULE_INDICATOR_DEFAULTS], [ ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB__EXIT]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ALIGNED_ALLOC]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ATOLL]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CALLOC_POSIX]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CANONICALIZE_FILE_NAME]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FREE_POSIX]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETLOADAVG]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETSUBOPT]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GRANTPT]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MALLOC_POSIX]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBTOWC]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKDTEMP]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKOSTEMP]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKOSTEMPS]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKSTEMP]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKSTEMPS]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_POSIX_MEMALIGN]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_POSIX_OPENPT]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PTSNAME]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PTSNAME_R]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PUTENV]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_QSORT_R]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RANDOM]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RANDOM_R]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REALLOCARRAY]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REALLOC_POSIX]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REALPATH]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RPMATCH]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SECURE_GETENV]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SETENV]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOD]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOL]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOLD]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOLL]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOUL]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOULL]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SYSTEM_POSIX]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNLOCKPT]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNSETENV]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCTOMB]) ++ dnl Support Microsoft deprecated alias function names by default. ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_ECVT], [1]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_FCVT], [1]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_GCVT], [1]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_MKTEMP], [1]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_PUTENV], [1]) ++ ]) ++ m4_require(GL_MODULE_INDICATOR_PREFIX[_STDLIB_H_MODULE_INDICATOR_DEFAULTS]) ++ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) ++]) ++ + 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]) +- GNULIB_MALLOC_POSIX=0; AC_SUBST([GNULIB_MALLOC_POSIX]) +- GNULIB_MBTOWC=0; AC_SUBST([GNULIB_MBTOWC]) +- GNULIB_MKDTEMP=0; AC_SUBST([GNULIB_MKDTEMP]) +- GNULIB_MKOSTEMP=0; AC_SUBST([GNULIB_MKOSTEMP]) +- 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]) +- GNULIB_PUTENV=0; AC_SUBST([GNULIB_PUTENV]) +- GNULIB_QSORT_R=0; AC_SUBST([GNULIB_QSORT_R]) +- GNULIB_RANDOM=0; AC_SUBST([GNULIB_RANDOM]) +- GNULIB_RANDOM_R=0; AC_SUBST([GNULIB_RANDOM_R]) +- GNULIB_REALLOCARRAY=0; AC_SUBST([GNULIB_REALLOCARRAY]) +- GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX]) +- GNULIB_REALPATH=0; AC_SUBST([GNULIB_REALPATH]) +- GNULIB_RPMATCH=0; AC_SUBST([GNULIB_RPMATCH]) +- GNULIB_SECURE_GETENV=0; AC_SUBST([GNULIB_SECURE_GETENV]) +- GNULIB_SETENV=0; AC_SUBST([GNULIB_SETENV]) +- GNULIB_STRTOD=0; AC_SUBST([GNULIB_STRTOD]) +- GNULIB_STRTOL=0; AC_SUBST([GNULIB_STRTOL]) +- GNULIB_STRTOLD=0; AC_SUBST([GNULIB_STRTOLD]) +- GNULIB_STRTOLL=0; AC_SUBST([GNULIB_STRTOLL]) +- GNULIB_STRTOUL=0; AC_SUBST([GNULIB_STRTOUL]) +- GNULIB_STRTOULL=0; AC_SUBST([GNULIB_STRTOULL]) +- GNULIB_SYSTEM_POSIX=0; AC_SUBST([GNULIB_SYSTEM_POSIX]) +- 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]) +@@ -164,6 +179,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS], + REPLACE_RANDOM=0; AC_SUBST([REPLACE_RANDOM]) + REPLACE_RANDOM_R=0; AC_SUBST([REPLACE_RANDOM_R]) + REPLACE_REALLOC=0; AC_SUBST([REPLACE_REALLOC]) ++ REPLACE_REALLOCARRAY=0; AC_SUBST([REPLACE_REALLOCARRAY]) + REPLACE_REALPATH=0; AC_SUBST([REPLACE_REALPATH]) + REPLACE_SETENV=0; AC_SUBST([REPLACE_SETENV]) + REPLACE_SETSTATE=0; AC_SUBST([REPLACE_SETSTATE]) +diff --git a/m4/strdup.m4 b/m4/strdup.m4 +index f6f421d..5b6018f 100644 +--- a/m4/strdup.m4 ++++ b/m4/strdup.m4 +@@ -1,4 +1,4 @@ +-# strdup.m4 serial 14 ++# strdup.m4 serial 15 + + dnl Copyright (C) 2002-2021 Free Software Foundation, Inc. + +@@ -8,7 +8,7 @@ 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_REQUIRE([gl_STRING_H_DEFAULTS]) + AC_CHECK_DECLS_ONCE([strdup]) + if test $ac_cv_have_decl_strdup = no; then + HAVE_DECL_STRDUP=0 +@@ -17,7 +17,7 @@ AC_DEFUN([gl_FUNC_STRDUP], + + AC_DEFUN([gl_FUNC_STRDUP_POSIX], + [ +- AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) ++ AC_REQUIRE([gl_STRING_H_DEFAULTS]) + AC_REQUIRE([gl_CHECK_MALLOC_POSIX]) + if test $gl_cv_func_malloc_posix != yes; then + REPLACE_STRDUP=1 +diff --git a/m4/string_h.m4 b/m4/string_h.m4 +index a4cc5b4..80d1e58 100644 +--- a/m4/string_h.m4 ++++ b/m4/string_h.m4 +@@ -5,20 +5,15 @@ + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. + +-# serial 29 ++# serial 32 + + # Written by Paul Eggert. + +-AC_DEFUN([gl_HEADER_STRING_H], ++AC_DEFUN_ONCE([gl_STRING_H], + [ +- dnl Use AC_REQUIRE here, so that the default behavior below is expanded +- dnl once only, before all statements that occur in other macros. +- AC_REQUIRE([gl_HEADER_STRING_H_BODY]) +-]) +- +-AC_DEFUN([gl_HEADER_STRING_H_BODY], +-[ +- AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) ++ dnl Ensure to expand the default settings once only, before all statements ++ dnl that occur in other macros. ++ AC_REQUIRE([gl_STRING_H_DEFAULTS]) + gl_NEXT_HEADERS([string.h]) + + dnl Check for declarations of anything we want to poison if the +@@ -33,62 +28,77 @@ AC_DEFUN([gl_HEADER_STRING_H_BODY], + AC_REQUIRE([AC_C_RESTRICT]) + ]) + ++# gl_STRING_MODULE_INDICATOR([modulename]) ++# sets the shell variable that indicates the presence of the given module ++# to a C preprocessor expression that will evaluate to 1. ++# This macro invocation must not occur in macros that are AC_REQUIREd. + AC_DEFUN([gl_STRING_MODULE_INDICATOR], + [ +- dnl Use AC_REQUIRE here, so that the default settings are expanded once only. +- AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) ++ dnl Ensure to expand the default settings once only. ++ gl_STRING_H_REQUIRE_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_HEADER_STRING_H_DEFAULTS], ++# Initializes the default values for AC_SUBSTed shell variables. ++# This macro must not be AC_REQUIREd. It must only be invoked, and only ++# outside of macros or in macros that are not AC_REQUIREd. ++AC_DEFUN([gl_STRING_H_REQUIRE_DEFAULTS], ++[ ++ m4_defun(GL_MODULE_INDICATOR_PREFIX[_STRING_H_MODULE_INDICATOR_DEFAULTS], [ ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXPLICIT_BZERO]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FFSL]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FFSLL]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MEMCHR]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MEMMEM]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MEMPCPY]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MEMRCHR]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RAWMEMCHR]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STPCPY]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STPNCPY]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRCHRNUL]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRDUP]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRNCAT]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRNDUP]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRNLEN]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRPBRK]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRSEP]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRSTR]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRCASESTR]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOK_R]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSLEN]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSNLEN]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSCHR]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSRCHR]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSSTR]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSCASECMP]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSNCASECMP]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSPCASECMP]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSCASESTR]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSCSPN]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSPBRK]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSSPN]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSSEP]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSTOK_R]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRERROR]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRERROR_R]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRERRORNAME_NP]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SIGABBREV_NP]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SIGDESCR_NP]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRSIGNAL]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRVERSCMP]) ++ dnl Support Microsoft deprecated alias function names by default. ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_MEMCCPY], [1]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_STRDUP], [1]) ++ ]) ++ m4_require(GL_MODULE_INDICATOR_PREFIX[_STRING_H_MODULE_INDICATOR_DEFAULTS]) ++ AC_REQUIRE([gl_STRING_H_DEFAULTS]) ++]) ++ ++AC_DEFUN([gl_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_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]) +diff --git a/m4/sys_file_h.m4 b/m4/sys_file_h.m4 +index 99c2285..bcde4d7 100644 +--- a/m4/sys_file_h.m4 ++++ b/m4/sys_file_h.m4 +@@ -1,5 +1,5 @@ + # Configure a replacement for . +-# serial 6 ++# serial 9 + + # Copyright (C) 2008-2021 Free Software Foundation, Inc. + # This file is free software; the Free Software Foundation +@@ -8,9 +8,9 @@ + + # Written by Richard W.M. Jones. + +-AC_DEFUN([gl_HEADER_SYS_FILE_H], ++AC_DEFUN_ONCE([gl_SYS_FILE_H], + [ +- AC_REQUIRE([gl_HEADER_SYS_FILE_H_DEFAULTS]) ++ AC_REQUIRE([gl_SYS_FILE_H_DEFAULTS]) + + dnl is always overridden, because of GNULIB_POSIXCHECK. + gl_CHECK_NEXT_HEADERS([sys/file.h]) +@@ -28,14 +28,29 @@ AC_DEFUN([gl_HEADER_SYS_FILE_H], + ]], [flock]) + ]) + +-AC_DEFUN([gl_HEADER_SYS_FILE_MODULE_INDICATOR], ++# gl_SYS_FILE_MODULE_INDICATOR([modulename]) ++# sets the shell variable that indicates the presence of the given module ++# to a C preprocessor expression that will evaluate to 1. ++# This macro invocation must not occur in macros that are AC_REQUIREd. ++AC_DEFUN([gl_SYS_FILE_MODULE_INDICATOR], + [ +- AC_REQUIRE([gl_HEADER_SYS_FILE_H_DEFAULTS]) ++ gl_SYS_FILE_H_REQUIRE_DEFAULTS + gl_MODULE_INDICATOR_SET_VARIABLE([$1]) + ]) + +-AC_DEFUN([gl_HEADER_SYS_FILE_H_DEFAULTS], ++# Initializes the default values for AC_SUBSTed shell variables. ++# This macro must not be AC_REQUIREd. It must only be invoked, and only ++# outside of macros or in macros that are not AC_REQUIREd. ++AC_DEFUN([gl_SYS_FILE_H_REQUIRE_DEFAULTS], ++[ ++ m4_defun(GL_MODULE_INDICATOR_PREFIX[_SYS_FILE_H_MODULE_INDICATOR_DEFAULTS], [ ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FLOCK]) ++ ]) ++ m4_require(GL_MODULE_INDICATOR_PREFIX[_SYS_FILE_H_MODULE_INDICATOR_DEFAULTS]) ++ AC_REQUIRE([gl_SYS_FILE_H_DEFAULTS]) ++]) ++ ++AC_DEFUN([gl_SYS_FILE_H_DEFAULTS], + [ +- GNULIB_FLOCK=0; AC_SUBST([GNULIB_FLOCK]) + HAVE_FLOCK=1; AC_SUBST([HAVE_FLOCK]) + ]) +diff --git a/m4/sys_random_h.m4 b/m4/sys_random_h.m4 +index 45e0469..37bc316 100644 +--- a/m4/sys_random_h.m4 ++++ b/m4/sys_random_h.m4 +@@ -1,10 +1,10 @@ +-# sys_random_h.m4 serial 5 ++# sys_random_h.m4 serial 8 + 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. + +-AC_DEFUN([gl_HEADER_SYS_RANDOM], ++AC_DEFUN_ONCE([gl_SYS_RANDOM_H], + [ + AC_REQUIRE([gl_SYS_RANDOM_H_DEFAULTS]) + dnl is always overridden, because of GNULIB_POSIXCHECK. +@@ -35,18 +35,33 @@ AC_DEFUN([gl_HEADER_SYS_RANDOM], + [getrandom]) + ]) + ++# gl_SYS_RANDOM_MODULE_INDICATOR([modulename]) ++# sets the shell variable that indicates the presence of the given module ++# to a C preprocessor expression that will evaluate to 1. ++# This macro invocation must not occur in macros that are AC_REQUIREd. + 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]) ++ dnl Ensure to expand the default settings once only. ++ gl_SYS_RANDOM_H_REQUIRE_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]) + ]) + ++# Initializes the default values for AC_SUBSTed shell variables. ++# This macro must not be AC_REQUIREd. It must only be invoked, and only ++# outside of macros or in macros that are not AC_REQUIREd. ++AC_DEFUN([gl_SYS_RANDOM_H_REQUIRE_DEFAULTS], ++[ ++ m4_defun(GL_MODULE_INDICATOR_PREFIX[_SYS_RANDOM_H_MODULE_INDICATOR_DEFAULTS], [ ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETRANDOM]) ++ ]) ++ m4_require(GL_MODULE_INDICATOR_PREFIX[_SYS_RANDOM_H_MODULE_INDICATOR_DEFAULTS]) ++ AC_REQUIRE([gl_SYS_RANDOM_H_DEFAULTS]) ++]) ++ + 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/m4/sys_select_h.m4 b/m4/sys_select_h.m4 +index 4b33d31..2e7d140 100644 +--- a/m4/sys_select_h.m4 ++++ b/m4/sys_select_h.m4 +@@ -1,13 +1,13 @@ +-# sys_select_h.m4 serial 20 ++# sys_select_h.m4 serial 23 + 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. + +-AC_DEFUN([gl_HEADER_SYS_SELECT], ++AC_DEFUN_ONCE([gl_SYS_SELECT_H], + [ +- AC_REQUIRE([AC_C_RESTRICT]) + AC_REQUIRE([gl_SYS_SELECT_H_DEFAULTS]) ++ AC_REQUIRE([AC_C_RESTRICT]) + AC_CACHE_CHECK([whether is self-contained], + [gl_cv_header_sys_select_h_selfcontained], + [ +@@ -75,19 +75,34 @@ AC_DEFUN([gl_HEADER_SYS_SELECT], + ]], [pselect select]) + ]) + ++# gl_SYS_SELECT_MODULE_INDICATOR([modulename]) ++# sets the shell variable that indicates the presence of the given module ++# to a C preprocessor expression that will evaluate to 1. ++# This macro invocation must not occur in macros that are AC_REQUIREd. + AC_DEFUN([gl_SYS_SELECT_MODULE_INDICATOR], + [ +- dnl Use AC_REQUIRE here, so that the default settings are expanded once only. +- AC_REQUIRE([gl_SYS_SELECT_H_DEFAULTS]) ++ dnl Ensure to expand the default settings once only. ++ gl_SYS_SELECT_H_REQUIRE_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]) + ]) + ++# Initializes the default values for AC_SUBSTed shell variables. ++# This macro must not be AC_REQUIREd. It must only be invoked, and only ++# outside of macros or in macros that are not AC_REQUIREd. ++AC_DEFUN([gl_SYS_SELECT_H_REQUIRE_DEFAULTS], ++[ ++ m4_defun(GL_MODULE_INDICATOR_PREFIX[_SYS_SELECT_H_MODULE_INDICATOR_DEFAULTS], [ ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PSELECT]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SELECT]) ++ ]) ++ m4_require(GL_MODULE_INDICATOR_PREFIX[_SYS_SELECT_H_MODULE_INDICATOR_DEFAULTS]) ++ AC_REQUIRE([gl_SYS_SELECT_H_DEFAULTS]) ++]) ++ + AC_DEFUN([gl_SYS_SELECT_H_DEFAULTS], + [ +- GNULIB_PSELECT=0; AC_SUBST([GNULIB_PSELECT]) +- GNULIB_SELECT=0; AC_SUBST([GNULIB_SELECT]) + dnl Assume proper GNU behavior unless another module says otherwise. + HAVE_PSELECT=1; AC_SUBST([HAVE_PSELECT]) + REPLACE_PSELECT=0; AC_SUBST([REPLACE_PSELECT]) +diff --git a/m4/sys_socket_h.m4 b/m4/sys_socket_h.m4 +index 503cb96..5676a0d 100644 +--- a/m4/sys_socket_h.m4 ++++ b/m4/sys_socket_h.m4 +@@ -1,4 +1,4 @@ +-# sys_socket_h.m4 serial 25 ++# sys_socket_h.m4 serial 28 + 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, +@@ -6,7 +6,7 @@ dnl with or without modifications, as long as this notice is preserved. + + dnl From Simon Josefsson. + +-AC_DEFUN([gl_HEADER_SYS_SOCKET], ++AC_DEFUN_ONCE([gl_SYS_SOCKET_H], + [ + AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS]) + AC_REQUIRE([AC_CANONICAL_HOST]) +@@ -156,32 +156,47 @@ AC_DEFUN([gl_PREREQ_SYS_H_WS2TCPIP], + AC_SUBST([HAVE_WS2TCPIP_H]) + ]) + ++# gl_SYS_SOCKET_MODULE_INDICATOR([modulename]) ++# sets the shell variable that indicates the presence of the given module ++# to a C preprocessor expression that will evaluate to 1. ++# This macro invocation must not occur in macros that are AC_REQUIREd. + AC_DEFUN([gl_SYS_SOCKET_MODULE_INDICATOR], + [ +- dnl Use AC_REQUIRE here, so that the default settings are expanded once only. +- AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS]) ++ dnl Ensure to expand the default settings once only. ++ gl_SYS_SOCKET_H_REQUIRE_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]) + ]) + ++# Initializes the default values for AC_SUBSTed shell variables. ++# This macro must not be AC_REQUIREd. It must only be invoked, and only ++# outside of macros or in macros that are not AC_REQUIREd. ++AC_DEFUN([gl_SYS_SOCKET_H_REQUIRE_DEFAULTS], ++[ ++ m4_defun(GL_MODULE_INDICATOR_PREFIX[_SYS_SOCKET_H_MODULE_INDICATOR_DEFAULTS], [ ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SOCKET]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CONNECT]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ACCEPT]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_BIND]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETPEERNAME]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETSOCKNAME]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETSOCKOPT]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LISTEN]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RECV]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SEND]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RECVFROM]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SENDTO]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SETSOCKOPT]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SHUTDOWN]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ACCEPT4]) ++ ]) ++ m4_require(GL_MODULE_INDICATOR_PREFIX[_SYS_SOCKET_H_MODULE_INDICATOR_DEFAULTS]) ++ AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS]) ++]) ++ + AC_DEFUN([gl_SYS_SOCKET_H_DEFAULTS], + [ +- GNULIB_SOCKET=0; AC_SUBST([GNULIB_SOCKET]) +- GNULIB_CONNECT=0; AC_SUBST([GNULIB_CONNECT]) +- GNULIB_ACCEPT=0; AC_SUBST([GNULIB_ACCEPT]) +- GNULIB_BIND=0; AC_SUBST([GNULIB_BIND]) +- GNULIB_GETPEERNAME=0; AC_SUBST([GNULIB_GETPEERNAME]) +- GNULIB_GETSOCKNAME=0; AC_SUBST([GNULIB_GETSOCKNAME]) +- GNULIB_GETSOCKOPT=0; AC_SUBST([GNULIB_GETSOCKOPT]) +- GNULIB_LISTEN=0; AC_SUBST([GNULIB_LISTEN]) +- GNULIB_RECV=0; AC_SUBST([GNULIB_RECV]) +- GNULIB_SEND=0; AC_SUBST([GNULIB_SEND]) +- GNULIB_RECVFROM=0; AC_SUBST([GNULIB_RECVFROM]) +- GNULIB_SENDTO=0; AC_SUBST([GNULIB_SENDTO]) +- GNULIB_SETSOCKOPT=0; AC_SUBST([GNULIB_SETSOCKOPT]) +- GNULIB_SHUTDOWN=0; AC_SUBST([GNULIB_SHUTDOWN]) +- GNULIB_ACCEPT4=0; AC_SUBST([GNULIB_ACCEPT4]) + HAVE_STRUCT_SOCKADDR_STORAGE=1; AC_SUBST([HAVE_STRUCT_SOCKADDR_STORAGE]) + HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1; + AC_SUBST([HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY]) +diff --git a/m4/sys_stat_h.m4 b/m4/sys_stat_h.m4 +index 23cbdd2..ac91d42 100644 +--- a/m4/sys_stat_h.m4 ++++ b/m4/sys_stat_h.m4 +@@ -1,4 +1,4 @@ +-# sys_stat_h.m4 serial 38 -*- Autoconf -*- ++# sys_stat_h.m4 serial 41 -*- 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, +@@ -7,7 +7,7 @@ dnl with or without modifications, as long as this notice is preserved. + dnl From Eric Blake. + dnl Provide a GNU-like . + +-AC_DEFUN([gl_HEADER_SYS_STAT_H], ++AC_DEFUN_ONCE([gl_SYS_STAT_H], + [ + AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) + +@@ -52,38 +52,53 @@ AC_DEFUN([gl_HEADER_SYS_STAT_H], + AC_REQUIRE([AC_C_RESTRICT]) + ]) + ++# gl_SYS_STAT_MODULE_INDICATOR([modulename]) ++# sets the shell variable that indicates the presence of the given module ++# to a C preprocessor expression that will evaluate to 1. ++# This macro invocation must not occur in macros that are AC_REQUIREd. + AC_DEFUN([gl_SYS_STAT_MODULE_INDICATOR], + [ +- dnl Use AC_REQUIRE here, so that the default settings are expanded once only. +- AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) ++ dnl Ensure to expand the default settings once only. ++ gl_SYS_STAT_H_REQUIRE_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]) + ]) + ++# Initializes the default values for AC_SUBSTed shell variables. ++# This macro must not be AC_REQUIREd. It must only be invoked, and only ++# outside of macros or in macros that are not AC_REQUIREd. ++AC_DEFUN([gl_SYS_STAT_H_REQUIRE_DEFAULTS], ++[ ++ m4_defun(GL_MODULE_INDICATOR_PREFIX[_SYS_STAT_H_MODULE_INDICATOR_DEFAULTS], [ ++ gl_UNISTD_H_REQUIRE_DEFAULTS dnl for REPLACE_FCHDIR ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FCHMODAT]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FSTAT]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FSTATAT]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FUTIMENS]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETUMASK]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LCHMOD]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LSTAT]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKDIR]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKDIRAT]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKFIFO]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKFIFOAT]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKNOD]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKNODAT]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STAT]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UTIMENSAT]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_OVERRIDES_STRUCT_STAT]) ++ dnl Support Microsoft deprecated alias function names by default. ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_CHMOD], [1]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_MKDIR], [1]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_UMASK], [1]) ++ ]) ++ m4_require(GL_MODULE_INDICATOR_PREFIX[_SYS_STAT_H_MODULE_INDICATOR_DEFAULTS]) ++ AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) ++]) ++ + AC_DEFUN([gl_SYS_STAT_H_DEFAULTS], + [ +- AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) dnl for REPLACE_FCHDIR +- GNULIB_FCHMODAT=0; AC_SUBST([GNULIB_FCHMODAT]) +- 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]) +- GNULIB_MKNOD=0; AC_SUBST([GNULIB_MKNOD]) +- GNULIB_MKNODAT=0; AC_SUBST([GNULIB_MKNODAT]) +- 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]) +diff --git a/m4/sys_time_h.m4 b/m4/sys_time_h.m4 +index 64f133d..c425a96 100644 +--- a/m4/sys_time_h.m4 ++++ b/m4/sys_time_h.m4 +@@ -1,5 +1,5 @@ + # Configure a replacement for . +-# serial 9 ++# serial 12 + + # Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc. + # This file is free software; the Free Software Foundation +@@ -8,18 +8,13 @@ + + # Written by Paul Eggert and Martin Lambers. + +-AC_DEFUN([gl_HEADER_SYS_TIME_H], ++AC_DEFUN_ONCE([gl_SYS_TIME_H], + [ + dnl Use AC_REQUIRE here, so that the REPLACE_GETTIMEOFDAY=0 statement + dnl below is expanded once only, before all REPLACE_GETTIMEOFDAY=1 + dnl statements that occur in other macros. +- AC_REQUIRE([gl_HEADER_SYS_TIME_H_BODY]) +-]) +- +-AC_DEFUN([gl_HEADER_SYS_TIME_H_BODY], +-[ ++ AC_REQUIRE([gl_SYS_TIME_H_DEFAULTS]) + AC_REQUIRE([AC_C_RESTRICT]) +- AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS]) + AC_CHECK_HEADERS_ONCE([sys/time.h]) + gl_CHECK_NEXT_HEADERS([sys/time.h]) + +@@ -89,18 +84,33 @@ AC_DEFUN([gl_HEADER_SYS_TIME_H_BODY], + ]], [gettimeofday]) + ]) + ++# gl_SYS_TIME_MODULE_INDICATOR([modulename]) ++# sets the shell variable that indicates the presence of the given module ++# to a C preprocessor expression that will evaluate to 1. ++# This macro invocation must not occur in macros that are AC_REQUIREd. + AC_DEFUN([gl_SYS_TIME_MODULE_INDICATOR], + [ +- dnl Use AC_REQUIRE here, so that the default settings are expanded once only. +- AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS]) ++ dnl Ensure to expand the default settings once only. ++ gl_SYS_TIME_H_REQUIRE_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_HEADER_SYS_TIME_H_DEFAULTS], ++# Initializes the default values for AC_SUBSTed shell variables. ++# This macro must not be AC_REQUIREd. It must only be invoked, and only ++# outside of macros or in macros that are not AC_REQUIREd. ++AC_DEFUN([gl_SYS_TIME_H_REQUIRE_DEFAULTS], ++[ ++ m4_defun(GL_MODULE_INDICATOR_PREFIX[_SYS_TIME_H_MODULE_INDICATOR_DEFAULTS], [ ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETTIMEOFDAY]) ++ ]) ++ m4_require(GL_MODULE_INDICATOR_PREFIX[_SYS_TIME_H_MODULE_INDICATOR_DEFAULTS]) ++ AC_REQUIRE([gl_SYS_TIME_H_DEFAULTS]) ++]) ++ ++AC_DEFUN([gl_SYS_TIME_H_DEFAULTS], + [ +- GNULIB_GETTIMEOFDAY=0; AC_SUBST([GNULIB_GETTIMEOFDAY]) + dnl Assume POSIX behavior unless another module says otherwise. + HAVE_GETTIMEOFDAY=1; AC_SUBST([HAVE_GETTIMEOFDAY]) + HAVE_STRUCT_TIMEVAL=1; AC_SUBST([HAVE_STRUCT_TIMEVAL]) +diff --git a/m4/sys_times_h.m4 b/m4/sys_times_h.m4 +index b9daaa7..577ead6 100644 +--- a/m4/sys_times_h.m4 ++++ b/m4/sys_times_h.m4 +@@ -1,5 +1,5 @@ + # Configure a replacement for . +-# serial 8 ++# serial 11 + + # Copyright (C) 2008-2021 Free Software Foundation, Inc. + # This file is free software; the Free Software Foundation +@@ -8,7 +8,7 @@ + + # Written by Simon Josefsson. + +-AC_DEFUN([gl_SYS_TIMES_H], ++AC_DEFUN_ONCE([gl_SYS_TIMES_H], + [ + AC_REQUIRE([gl_SYS_TIMES_H_DEFAULTS]) + +@@ -36,16 +36,31 @@ AC_DEFUN([gl_SYS_TIMES_H], + ]], [times]) + ]) + ++# gl_SYS_TIMES_MODULE_INDICATOR([modulename]) ++# sets the shell variable that indicates the presence of the given module ++# to a C preprocessor expression that will evaluate to 1. ++# This macro invocation must not occur in macros that are AC_REQUIREd. + AC_DEFUN([gl_SYS_TIMES_MODULE_INDICATOR], + [ +- dnl Use AC_REQUIRE here, so that the default settings are expanded once only. +- AC_REQUIRE([gl_SYS_TIMES_H_DEFAULTS]) ++ dnl Ensure to expand the default settings once only. ++ gl_SYS_TIMES_H_REQUIRE_DEFAULTS + gl_MODULE_INDICATOR_SET_VARIABLE([$1]) + ]) + ++# Initializes the default values for AC_SUBSTed shell variables. ++# This macro must not be AC_REQUIREd. It must only be invoked, and only ++# outside of macros or in macros that are not AC_REQUIREd. ++AC_DEFUN([gl_SYS_TIMES_H_REQUIRE_DEFAULTS], ++[ ++ m4_defun(GL_MODULE_INDICATOR_PREFIX[_SYS_TIMES_H_MODULE_INDICATOR_DEFAULTS], [ ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIMES]) ++ ]) ++ m4_require(GL_MODULE_INDICATOR_PREFIX[_SYS_TIMES_H_MODULE_INDICATOR_DEFAULTS]) ++ AC_REQUIRE([gl_SYS_TIMES_H_DEFAULTS]) ++]) ++ + AC_DEFUN([gl_SYS_TIMES_H_DEFAULTS], + [ +- GNULIB_TIMES=0; AC_SUBST([GNULIB_TIMES]) + HAVE_STRUCT_TMS=1; AC_SUBST([HAVE_STRUCT_TMS]) + HAVE_TIMES=1; AC_SUBST([HAVE_TIMES]) + ]) +diff --git a/m4/sys_types_h.m4 b/m4/sys_types_h.m4 +index 2172c83..6dd6fee 100644 +--- a/m4/sys_types_h.m4 ++++ b/m4/sys_types_h.m4 +@@ -1,4 +1,4 @@ +-# sys_types_h.m4 serial 11 ++# sys_types_h.m4 serial 13 + 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, +@@ -6,10 +6,11 @@ dnl with or without modifications, as long as this notice is preserved. + + AC_DEFUN_ONCE([gl_SYS_TYPES_H], + [ ++ AC_REQUIRE([gl_SYS_TYPES_H_DEFAULTS]) ++ + dnl Use sane struct stat types in OpenVMS 8.2 and later. + AC_DEFINE([_USE_STD_STAT], 1, [For standard stat data types on VMS.]) + +- AC_REQUIRE([gl_SYS_TYPES_H_DEFAULTS]) + gl_NEXT_HEADERS([sys/types.h]) + + dnl Ensure the type pid_t gets defined. +@@ -30,6 +31,17 @@ AC_DEFUN_ONCE([gl_SYS_TYPES_H], + AC_SUBST([WINDOWS_STAT_INODES]) + ]) + ++# Initializes the default values for AC_SUBSTed shell variables. ++# This macro must not be AC_REQUIREd. It must only be invoked, and only ++# outside of macros or in macros that are not AC_REQUIREd. ++AC_DEFUN([gl_SYS_TYPES_H_REQUIRE_DEFAULTS], ++[ ++ m4_defun(GL_MODULE_INDICATOR_PREFIX[_SYS_TYPE_H_MODULE_INDICATOR_DEFAULTS], [ ++ ]) ++ m4_require(GL_MODULE_INDICATOR_PREFIX[_SYS_TYPE_H_MODULE_INDICATOR_DEFAULTS]) ++ AC_REQUIRE([gl_SYS_TYPES_H_DEFAULTS]) ++]) ++ + AC_DEFUN([gl_SYS_TYPES_H_DEFAULTS], + [ + ]) +diff --git a/m4/sys_uio_h.m4 b/m4/sys_uio_h.m4 +index 503de4d..fa176e0 100644 +--- a/m4/sys_uio_h.m4 ++++ b/m4/sys_uio_h.m4 +@@ -1,10 +1,10 @@ +-# sys_uio_h.m4 serial 1 ++# sys_uio_h.m4 serial 3 + 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. + +-AC_DEFUN([gl_HEADER_SYS_UIO], ++AC_DEFUN_ONCE([gl_SYS_UIO_H], + [ + AC_REQUIRE([gl_SYS_UIO_H_DEFAULTS]) + dnl is always overridden, because of GNULIB_POSIXCHECK. +@@ -17,15 +17,30 @@ AC_DEFUN([gl_HEADER_SYS_UIO], + AC_SUBST([HAVE_SYS_UIO_H]) + ]) + ++# gl_SYS_UIO_MODULE_INDICATOR([modulename]) ++# sets the shell variable that indicates the presence of the given module ++# to a C preprocessor expression that will evaluate to 1. ++# This macro invocation must not occur in macros that are AC_REQUIREd. + AC_DEFUN([gl_SYS_UIO_MODULE_INDICATOR], + [ +- dnl Use AC_REQUIRE here, so that the default settings are expanded once only. +- AC_REQUIRE([gl_SYS_UIO_H_DEFAULTS]) ++ dnl Ensure to expand the default settings once only. ++ gl_SYS_UIO_H_REQUIRE_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]) + ]) + ++# Initializes the default values for AC_SUBSTed shell variables. ++# This macro must not be AC_REQUIREd. It must only be invoked, and only ++# outside of macros or in macros that are not AC_REQUIREd. ++AC_DEFUN([gl_SYS_UIO_H_REQUIRE_DEFAULTS], ++[ ++ m4_defun(GL_MODULE_INDICATOR_PREFIX[_SYS_UIO_H_MODULE_INDICATOR_DEFAULTS], [ ++ ]) ++ m4_require(GL_MODULE_INDICATOR_PREFIX[_SYS_UIO_H_MODULE_INDICATOR_DEFAULTS]) ++ AC_REQUIRE([gl_SYS_UIO_H_DEFAULTS]) ++]) ++ + AC_DEFUN([gl_SYS_UIO_H_DEFAULTS], + [ + ]) +diff --git a/m4/threadlib.m4 b/m4/threadlib.m4 +index 8fc3dfd..37b797c 100644 +--- a/m4/threadlib.m4 ++++ b/m4/threadlib.m4 +@@ -1,4 +1,4 @@ +-# threadlib.m4 serial 30 ++# threadlib.m4 serial 31 + 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, +@@ -212,6 +212,27 @@ AC_DEFUN([gl_PTHREADLIB_BODY], + LIBS=$save_LIBS + test $gl_pthread_api = yes && break + done ++ echo "$as_me:__oline__: gl_pthread_api=$gl_pthread_api" >&AS_MESSAGE_LOG_FD ++ echo "$as_me:__oline__: LIBPTHREAD=$LIBPTHREAD" >&AS_MESSAGE_LOG_FD ++ ++ gl_pthread_in_glibc=no ++ # On Linux with glibc >= 2.34, libc contains the fully functional ++ # pthread functions. ++ case "$host_os" in ++ linux*) ++ AC_EGREP_CPP([Lucky user], ++ [#include ++ #ifdef __GNU_LIBRARY__ ++ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 34) || (__GLIBC__ > 2) ++ Lucky user ++ #endif ++ #endif ++ ], ++ [gl_pthread_in_glibc=yes], ++ []) ++ ;; ++ esac ++ echo "$as_me:__oline__: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&AS_MESSAGE_LOG_FD + + # Test for libpthread by looking for pthread_kill. (Not pthread_self, + # since it is defined as a macro on OSF/1.) +@@ -219,18 +240,22 @@ AC_DEFUN([gl_PTHREADLIB_BODY], + # The program links fine without libpthread. But it may actually + # need to link with libpthread in order to create multiple threads. + AC_CHECK_LIB([pthread], [pthread_kill], +- [LIBPMULTITHREAD=-lpthread +- # On Solaris and HP-UX, most pthread functions exist also in libc. +- # Therefore pthread_in_use() needs to actually try to create a +- # thread: pthread_create from libc will fail, whereas +- # pthread_create will actually create a thread. +- # On Solaris 10 or newer, this test is no longer needed, because +- # libc contains the fully functional pthread functions. +- case "$host_os" in +- solaris | solaris2.[1-9] | solaris2.[1-9].* | hpux*) +- AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], [1], +- [Define if the pthread_in_use() detection is hard.]) +- esac ++ [if test $gl_pthread_in_glibc = yes; then ++ LIBPMULTITHREAD= ++ else ++ LIBPMULTITHREAD=-lpthread ++ # On Solaris and HP-UX, most pthread functions exist also in libc. ++ # Therefore pthread_in_use() needs to actually try to create a ++ # thread: pthread_create from libc will fail, whereas ++ # pthread_create will actually create a thread. ++ # On Solaris 10 or newer, this test is no longer needed, because ++ # libc contains the fully functional pthread functions. ++ case "$host_os" in ++ solaris | solaris2.[1-9] | solaris2.[1-9].* | hpux*) ++ AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], [1], ++ [Define if the pthread_in_use() detection is hard.]) ++ esac ++ fi + ]) + elif test $gl_pthread_api != yes; then + # Some library is needed. Try libpthread and libc_r. +@@ -246,6 +271,7 @@ AC_DEFUN([gl_PTHREADLIB_BODY], + LIBPMULTITHREAD=-lc_r]) + fi + fi ++ echo "$as_me:__oline__: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&AS_MESSAGE_LOG_FD + fi + AC_MSG_CHECKING([whether POSIX threads API is available]) + AC_MSG_RESULT([$gl_pthread_api]) +@@ -311,7 +337,8 @@ AC_DEFUN([gl_STDTHREADLIB_BODY], + dnl glibc >= 2.29 has thrd_create in libpthread. + dnl FreeBSD >= 10 has thrd_create in libstdthreads; this library depends + dnl on libpthread (for the symbol 'pthread_mutexattr_gettype'). +- dnl AIX >= 7.1 and Solaris >= 11.4 have thrd_create in libc. ++ dnl glibc >= 2.34, AIX >= 7.1, and Solaris >= 11.4 have thrd_create in ++ dnl libc. + AC_CHECK_FUNCS([thrd_create]) + if test $ac_cv_func_thrd_create = yes; then + LIBSTDTHREAD= +@@ -481,7 +508,10 @@ AC_DEFUN([gl_THREADLIB_BODY], + gl_threads_api=posix + AC_DEFINE([USE_POSIX_THREADS], [1], + [Define if the POSIX multithreading library can be used.]) +- if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then ++ if test -z "$LIBMULTITHREAD" && test -z "$LTLIBMULTITHREAD"; then ++ AC_DEFINE([USE_POSIX_THREADS_FROM_LIBC], [1], ++ [Define if references to the POSIX multithreading library are satisfied by libc.]) ++ else + if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then + AC_DEFINE([USE_POSIX_THREADS_WEAK], [1], + [Define if references to the POSIX multithreading library should be made weak.]) +@@ -576,7 +606,9 @@ dnl flavours option weak result + dnl --------------- --------- --------- -------- --------- + dnl Linux 2.4/glibc posix -lpthread Y OK + dnl +-dnl GNU Hurd/glibc posix ++dnl Linux/glibc 2.34 posix Y OK ++dnl ++dnl GNU Hurd/glibc posix -lpthread Y OK + dnl + dnl Ubuntu 14.04 posix -pthread Y OK + dnl +diff --git a/m4/time_h.m4 b/m4/time_h.m4 +index b6a1aa3..b57474b 100644 +--- a/m4/time_h.m4 ++++ b/m4/time_h.m4 +@@ -2,7 +2,7 @@ + + # Copyright (C) 2000-2001, 2003-2007, 2009-2021 Free Software Foundation, Inc. + +-# serial 15 ++# serial 18 + + # This file is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, +@@ -10,16 +10,11 @@ + + # Written by Paul Eggert and Jim Meyering. + +-AC_DEFUN([gl_HEADER_TIME_H], ++AC_DEFUN_ONCE([gl_TIME_H], + [ +- dnl Use AC_REQUIRE here, so that the default behavior below is expanded +- dnl once only, before all statements that occur in other macros. +- AC_REQUIRE([gl_HEADER_TIME_H_BODY]) +-]) +- +-AC_DEFUN([gl_HEADER_TIME_H_BODY], +-[ +- AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) ++ dnl Ensure to expand the default settings once only, before all statements ++ dnl that occur in other macros. ++ AC_REQUIRE([gl_TIME_H_DEFAULTS]) + + gl_NEXT_HEADERS([time.h]) + AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC]) +@@ -111,30 +106,45 @@ AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC], + AC_SUBST([UNISTD_H_DEFINES_STRUCT_TIMESPEC]) + ]) + ++# gl_TIME_MODULE_INDICATOR([modulename]) ++# sets the shell variable that indicates the presence of the given module ++# to a C preprocessor expression that will evaluate to 1. ++# This macro invocation must not occur in macros that are AC_REQUIREd. + AC_DEFUN([gl_TIME_MODULE_INDICATOR], + [ +- dnl Use AC_REQUIRE here, so that the default settings are expanded once only. +- AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) ++ dnl Ensure to expand the default settings once only. ++ gl_TIME_H_REQUIRE_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_HEADER_TIME_H_DEFAULTS], ++# Initializes the default values for AC_SUBSTed shell variables. ++# This macro must not be AC_REQUIREd. It must only be invoked, and only ++# outside of macros or in macros that are not AC_REQUIREd. ++AC_DEFUN([gl_TIME_H_REQUIRE_DEFAULTS], ++[ ++ m4_defun(GL_MODULE_INDICATOR_PREFIX[_TIME_H_MODULE_INDICATOR_DEFAULTS], [ ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CTIME]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKTIME]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LOCALTIME]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_NANOSLEEP]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRFTIME]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRPTIME]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIMEGM]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIMESPEC_GET]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIME_R]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIME_RZ]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TZSET]) ++ dnl Support Microsoft deprecated alias function names by default. ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_TZSET], [1]) ++ ]) ++ m4_require(GL_MODULE_INDICATOR_PREFIX[_TIME_H_MODULE_INDICATOR_DEFAULTS]) ++ AC_REQUIRE([gl_TIME_H_DEFAULTS]) ++]) ++ ++AC_DEFUN([gl_TIME_H_DEFAULTS], + [ +- GNULIB_CTIME=0; AC_SUBST([GNULIB_CTIME]) +- GNULIB_MKTIME=0; AC_SUBST([GNULIB_MKTIME]) +- GNULIB_LOCALTIME=0; AC_SUBST([GNULIB_LOCALTIME]) +- GNULIB_NANOSLEEP=0; AC_SUBST([GNULIB_NANOSLEEP]) +- 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]) +diff --git a/m4/time_r.m4 b/m4/time_r.m4 +index 713e93a..2d49b64 100644 +--- a/m4/time_r.m4 ++++ b/m4/time_r.m4 +@@ -12,7 +12,7 @@ AC_DEFUN([gl_TIME_R], + dnl Persuade glibc and Solaris to declare localtime_r. + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + +- AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) ++ AC_REQUIRE([gl_TIME_H_DEFAULTS]) + AC_REQUIRE([AC_C_RESTRICT]) + + dnl Some systems don't declare localtime_r() and gmtime_r() if _REENTRANT is +diff --git a/m4/time_rz.m4 b/m4/time_rz.m4 +index 34ef0ba..c5e85dc 100644 +--- a/m4/time_rz.m4 ++++ b/m4/time_rz.m4 +@@ -10,7 +10,7 @@ dnl Written by Paul Eggert. + AC_DEFUN([gl_TIME_RZ], + [ + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) +- AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) ++ AC_REQUIRE([gl_TIME_H_DEFAULTS]) + AC_REQUIRE([AC_STRUCT_TIMEZONE]) + + # On Mac OS X 10.6, localtime loops forever with some time_t values. +diff --git a/m4/timegm.m4 b/m4/timegm.m4 +index 098c857..58123be 100644 +--- a/m4/timegm.m4 ++++ b/m4/timegm.m4 +@@ -1,4 +1,4 @@ +-# timegm.m4 serial 12 ++# timegm.m4 serial 13 + 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, +@@ -6,7 +6,7 @@ dnl with or without modifications, as long as this notice is preserved. + + AC_DEFUN([gl_FUNC_TIMEGM], + [ +- AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) ++ AC_REQUIRE([gl_TIME_H_DEFAULTS]) + AC_REQUIRE([gl_FUNC_MKTIME_WORKS]) + REPLACE_TIMEGM=0 + AC_CHECK_FUNCS_ONCE([timegm]) +diff --git a/m4/tzset.m4 b/m4/tzset.m4 +index 8eaf41f..8a4f285 100644 +--- a/m4/tzset.m4 ++++ b/m4/tzset.m4 +@@ -1,4 +1,4 @@ +-# serial 15 ++# serial 16 + + # Copyright (C) 2003, 2007, 2009-2021 Free Software Foundation, Inc. + # This file is free software; the Free Software Foundation +@@ -9,7 +9,7 @@ + + AC_DEFUN([gl_FUNC_TZSET], + [ +- AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) ++ AC_REQUIRE([gl_TIME_H_DEFAULTS]) + AC_REQUIRE([AC_CANONICAL_HOST]) + REPLACE_TZSET=0 + case "$host_os" in +diff --git a/m4/unistd_h.m4 b/m4/unistd_h.m4 +index 0f26fb9..0ce4ea4 100644 +--- a/m4/unistd_h.m4 ++++ b/m4/unistd_h.m4 +@@ -1,4 +1,4 @@ +-# unistd_h.m4 serial 85 ++# unistd_h.m4 serial 89 + 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, +@@ -6,10 +6,10 @@ dnl with or without modifications, as long as this notice is preserved. + + dnl Written by Simon Josefsson, Bruno Haible. + +-AC_DEFUN([gl_UNISTD_H], ++AC_DEFUN_ONCE([gl_UNISTD_H], + [ +- dnl Use AC_REQUIRE here, so that the default behavior below is expanded +- dnl once only, before all statements that occur in other macros. ++ dnl Ensure to expand the default settings once only, before all statements ++ dnl that occur in other macros. + AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) + + gl_CHECK_NEXT_HEADERS([unistd.h]) +@@ -59,100 +59,116 @@ AC_DEFUN([gl_UNISTD_H], + fi + ]) + ++# gl_UNISTD_MODULE_INDICATOR([modulename]) ++# sets the shell variable that indicates the presence of the given module ++# to a C preprocessor expression that will evaluate to 1. ++# This macro invocation must not occur in macros that are AC_REQUIREd. + AC_DEFUN([gl_UNISTD_MODULE_INDICATOR], + [ +- dnl Use AC_REQUIRE here, so that the default settings are expanded once only. +- AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) ++ dnl Ensure to expand the default settings once only. ++ gl_UNISTD_H_REQUIRE_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]) + ]) + ++# Initializes the default values for AC_SUBSTed shell variables. ++# This macro must not be AC_REQUIREd. It must only be invoked, and only ++# outside of macros or in macros that are not AC_REQUIREd. ++AC_DEFUN([gl_UNISTD_H_REQUIRE_DEFAULTS], ++[ ++ m4_defun(GL_MODULE_INDICATOR_PREFIX[_UNISTD_H_MODULE_INDICATOR_DEFAULTS], [ ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ACCESS]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CHDIR]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CHOWN]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CLOSE]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_COPY_FILE_RANGE]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_DUP]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_DUP2]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_DUP3]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ENVIRON]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EUIDACCESS]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXECL]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXECLE]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXECLP]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXECV]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXECVE]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXECVP]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXECVPE]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FACCESSAT]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FCHDIR]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FCHOWNAT]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FDATASYNC]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FSYNC]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FTRUNCATE]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETCWD]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETDOMAINNAME]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETDTABLESIZE]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETENTROPY]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETGROUPS]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETHOSTNAME]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETLOGIN]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETLOGIN_R]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETOPT_POSIX]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETPAGESIZE]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETPASS]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETUSERSHELL]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GROUP_MEMBER]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISATTY]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LCHOWN]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LINK]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LINKAT]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LSEEK]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PIPE]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PIPE2]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PREAD]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PWRITE]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_READ]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_READLINK]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_READLINKAT]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RMDIR]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SETHOSTNAME]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SLEEP]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SYMLINK]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SYMLINKAT]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TRUNCATE]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TTYNAME_R]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNISTD_H_GETOPT]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNISTD_H_NONBLOCKING]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNISTD_H_SIGPIPE]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNLINK]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNLINKAT]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_USLEEP]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WRITE]) ++ dnl Support Microsoft deprecated alias function names by default. ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_ACCESS], [1]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_CHDIR], [1]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_CLOSE], [1]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_DUP], [1]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_DUP2], [1]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_EXECL], [1]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_EXECLE], [1]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_EXECLP], [1]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_EXECV], [1]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_EXECVE], [1]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_EXECVP], [1]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_EXECVPE], [1]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_GETCWD], [1]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_GETPID], [1]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_ISATTY], [1]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_LSEEK], [1]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_READ], [1]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_RMDIR], [1]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_SWAB], [1]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_UNLINK], [1]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_WRITE], [1]) ++ ]) ++ m4_require(GL_MODULE_INDICATOR_PREFIX[_UNISTD_H_MODULE_INDICATOR_DEFAULTS]) ++ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) ++]) ++ + AC_DEFUN([gl_UNISTD_H_DEFAULTS], + [ +- GNULIB_ACCESS=0; AC_SUBST([GNULIB_ACCESS]) +- GNULIB_CHDIR=0; AC_SUBST([GNULIB_CHDIR]) +- GNULIB_CHOWN=0; AC_SUBST([GNULIB_CHOWN]) +- GNULIB_CLOSE=0; AC_SUBST([GNULIB_CLOSE]) +- GNULIB_COPY_FILE_RANGE=0; AC_SUBST([GNULIB_COPY_FILE_RANGE]) +- GNULIB_DUP=0; AC_SUBST([GNULIB_DUP]) +- GNULIB_DUP2=0; AC_SUBST([GNULIB_DUP2]) +- 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]) +- GNULIB_FDATASYNC=0; AC_SUBST([GNULIB_FDATASYNC]) +- GNULIB_FSYNC=0; AC_SUBST([GNULIB_FSYNC]) +- GNULIB_FTRUNCATE=0; AC_SUBST([GNULIB_FTRUNCATE]) +- 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]) +- GNULIB_GETLOGIN_R=0; AC_SUBST([GNULIB_GETLOGIN_R]) +- GNULIB_GETOPT_POSIX=0; AC_SUBST([GNULIB_GETOPT_POSIX]) +- GNULIB_GETPAGESIZE=0; AC_SUBST([GNULIB_GETPAGESIZE]) +- GNULIB_GETPASS=0; AC_SUBST([GNULIB_GETPASS]) +- GNULIB_GETUSERSHELL=0; AC_SUBST([GNULIB_GETUSERSHELL]) +- GNULIB_GROUP_MEMBER=0; AC_SUBST([GNULIB_GROUP_MEMBER]) +- GNULIB_ISATTY=0; AC_SUBST([GNULIB_ISATTY]) +- GNULIB_LCHOWN=0; AC_SUBST([GNULIB_LCHOWN]) +- GNULIB_LINK=0; AC_SUBST([GNULIB_LINK]) +- GNULIB_LINKAT=0; AC_SUBST([GNULIB_LINKAT]) +- GNULIB_LSEEK=0; AC_SUBST([GNULIB_LSEEK]) +- GNULIB_PIPE=0; AC_SUBST([GNULIB_PIPE]) +- GNULIB_PIPE2=0; AC_SUBST([GNULIB_PIPE2]) +- GNULIB_PREAD=0; AC_SUBST([GNULIB_PREAD]) +- GNULIB_PWRITE=0; AC_SUBST([GNULIB_PWRITE]) +- GNULIB_READ=0; AC_SUBST([GNULIB_READ]) +- GNULIB_READLINK=0; AC_SUBST([GNULIB_READLINK]) +- GNULIB_READLINKAT=0; AC_SUBST([GNULIB_READLINKAT]) +- GNULIB_RMDIR=0; AC_SUBST([GNULIB_RMDIR]) +- GNULIB_SETHOSTNAME=0; AC_SUBST([GNULIB_SETHOSTNAME]) +- GNULIB_SLEEP=0; AC_SUBST([GNULIB_SLEEP]) +- GNULIB_SYMLINK=0; AC_SUBST([GNULIB_SYMLINK]) +- GNULIB_SYMLINKAT=0; AC_SUBST([GNULIB_SYMLINKAT]) +- GNULIB_TRUNCATE=0; AC_SUBST([GNULIB_TRUNCATE]) +- GNULIB_TTYNAME_R=0; AC_SUBST([GNULIB_TTYNAME_R]) +- GNULIB_UNISTD_H_NONBLOCKING=0; AC_SUBST([GNULIB_UNISTD_H_NONBLOCKING]) +- GNULIB_UNISTD_H_SIGPIPE=0; AC_SUBST([GNULIB_UNISTD_H_SIGPIPE]) +- GNULIB_UNLINK=0; AC_SUBST([GNULIB_UNLINK]) +- 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]) +diff --git a/m4/visibility.m4 b/m4/visibility.m4 +index 8f27a12..d161bd7 100644 +--- a/m4/visibility.m4 ++++ b/m4/visibility.m4 +@@ -1,4 +1,4 @@ +-# visibility.m4 serial 7 ++# visibility.m4 serial 8 + 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, +@@ -59,6 +59,10 @@ AC_DEFUN([gl_VISIBILITY], + extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); + extern __attribute__((__visibility__("default"))) int exportedfunc (void); + void dummyfunc (void); ++ int hiddenvar; ++ int exportedvar; ++ int hiddenfunc (void) { return 51; } ++ int exportedfunc (void) { return 1225736919; } + void dummyfunc (void) {} + ]], + [[]])], +diff --git a/m4/wchar_h.m4 b/m4/wchar_h.m4 +index 59c55fc..818b319 100644 +--- a/m4/wchar_h.m4 ++++ b/m4/wchar_h.m4 +@@ -7,9 +7,9 @@ dnl with or without modifications, as long as this notice is preserved. + + dnl Written by Eric Blake. + +-# wchar_h.m4 serial 50 ++# wchar_h.m4 serial 53 + +-AC_DEFUN([gl_WCHAR_H], ++AC_DEFUN_ONCE([gl_WCHAR_H], + [ + AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) + AC_REQUIRE([gl_WCHAR_H_INLINE_OK]) +@@ -125,60 +125,75 @@ Configuration aborted.]) + fi + ]) + ++# gl_WCHAR_MODULE_INDICATOR([modulename]) ++# sets the shell variable that indicates the presence of the given module ++# to a C preprocessor expression that will evaluate to 1. ++# This macro invocation must not occur in macros that are AC_REQUIREd. + AC_DEFUN([gl_WCHAR_MODULE_INDICATOR], + [ +- dnl Use AC_REQUIRE here, so that the default settings are expanded once only. +- AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) ++ dnl Ensure to expand the default settings once only. ++ gl_WCHAR_H_REQUIRE_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]) + ]) + ++# Initializes the default values for AC_SUBSTed shell variables. ++# This macro must not be AC_REQUIREd. It must only be invoked, and only ++# outside of macros or in macros that are not AC_REQUIREd. ++AC_DEFUN([gl_WCHAR_H_REQUIRE_DEFAULTS], ++[ ++ m4_defun(GL_MODULE_INDICATOR_PREFIX[_WCHAR_H_MODULE_INDICATOR_DEFAULTS], [ ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_BTOWC]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCTOB]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSINIT]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBRTOWC]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBRLEN]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSRTOWCS]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSNRTOWCS]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCRTOMB]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSRTOMBS]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSNRTOMBS]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCWIDTH]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WMEMCHR]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WMEMCMP]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WMEMCPY]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WMEMMOVE]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WMEMPCPY]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WMEMSET]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSLEN]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSNLEN]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSCPY]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCPCPY]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSNCPY]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCPNCPY]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSCAT]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSNCAT]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSCMP]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSNCMP]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSCASECMP]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSNCASECMP]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSCOLL]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSXFRM]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSDUP]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSCHR]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSRCHR]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSCSPN]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSSPN]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSPBRK]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSSTR]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSTOK]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSWIDTH]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSFTIME]) ++ dnl Support Microsoft deprecated alias function names by default. ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_WCSDUP], [1]) ++ ]) ++ m4_require(GL_MODULE_INDICATOR_PREFIX[_WCHAR_H_MODULE_INDICATOR_DEFAULTS]) ++ AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) ++]) ++ + AC_DEFUN([gl_WCHAR_H_DEFAULTS], + [ +- GNULIB_BTOWC=0; AC_SUBST([GNULIB_BTOWC]) +- GNULIB_WCTOB=0; AC_SUBST([GNULIB_WCTOB]) +- GNULIB_MBSINIT=0; AC_SUBST([GNULIB_MBSINIT]) +- GNULIB_MBRTOWC=0; AC_SUBST([GNULIB_MBRTOWC]) +- GNULIB_MBRLEN=0; AC_SUBST([GNULIB_MBRLEN]) +- GNULIB_MBSRTOWCS=0; AC_SUBST([GNULIB_MBSRTOWCS]) +- GNULIB_MBSNRTOWCS=0; AC_SUBST([GNULIB_MBSNRTOWCS]) +- GNULIB_WCRTOMB=0; AC_SUBST([GNULIB_WCRTOMB]) +- GNULIB_WCSRTOMBS=0; AC_SUBST([GNULIB_WCSRTOMBS]) +- GNULIB_WCSNRTOMBS=0; AC_SUBST([GNULIB_WCSNRTOMBS]) +- GNULIB_WCWIDTH=0; AC_SUBST([GNULIB_WCWIDTH]) +- GNULIB_WMEMCHR=0; AC_SUBST([GNULIB_WMEMCHR]) +- 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]) +- GNULIB_WCSCPY=0; AC_SUBST([GNULIB_WCSCPY]) +- GNULIB_WCPCPY=0; AC_SUBST([GNULIB_WCPCPY]) +- GNULIB_WCSNCPY=0; AC_SUBST([GNULIB_WCSNCPY]) +- GNULIB_WCPNCPY=0; AC_SUBST([GNULIB_WCPNCPY]) +- GNULIB_WCSCAT=0; AC_SUBST([GNULIB_WCSCAT]) +- GNULIB_WCSNCAT=0; AC_SUBST([GNULIB_WCSNCAT]) +- GNULIB_WCSCMP=0; AC_SUBST([GNULIB_WCSCMP]) +- GNULIB_WCSNCMP=0; AC_SUBST([GNULIB_WCSNCMP]) +- GNULIB_WCSCASECMP=0; AC_SUBST([GNULIB_WCSCASECMP]) +- GNULIB_WCSNCASECMP=0; AC_SUBST([GNULIB_WCSNCASECMP]) +- GNULIB_WCSCOLL=0; AC_SUBST([GNULIB_WCSCOLL]) +- GNULIB_WCSXFRM=0; AC_SUBST([GNULIB_WCSXFRM]) +- GNULIB_WCSDUP=0; AC_SUBST([GNULIB_WCSDUP]) +- GNULIB_WCSCHR=0; AC_SUBST([GNULIB_WCSCHR]) +- GNULIB_WCSRCHR=0; AC_SUBST([GNULIB_WCSRCHR]) +- GNULIB_WCSCSPN=0; AC_SUBST([GNULIB_WCSCSPN]) +- GNULIB_WCSSPN=0; AC_SUBST([GNULIB_WCSSPN]) +- GNULIB_WCSPBRK=0; AC_SUBST([GNULIB_WCSPBRK]) +- GNULIB_WCSSTR=0; AC_SUBST([GNULIB_WCSSTR]) +- 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]) +diff --git a/m4/wctype_h.m4 b/m4/wctype_h.m4 +index 1ab0bc9..7d74212 100644 +--- a/m4/wctype_h.m4 ++++ b/m4/wctype_h.m4 +@@ -1,4 +1,4 @@ +-# wctype_h.m4 serial 26 ++# wctype_h.m4 serial 30 + + dnl A placeholder for ISO C99 , for platforms that lack it. + +@@ -9,7 +9,7 @@ dnl with or without modifications, as long as this notice is preserved. + + dnl Written by Paul Eggert. + +-AC_DEFUN([gl_WCTYPE_H], ++AC_DEFUN_ONCE([gl_WCTYPE_H], + [ + AC_REQUIRE([gl_WCTYPE_H_DEFAULTS]) + AC_REQUIRE([AC_PROG_CC]) +@@ -62,7 +62,7 @@ AC_DEFUN([gl_WCTYPE_H], + fi + AC_SUBST([HAVE_WCTYPE_H]) + +- if test $GNULIB_OVERRIDES_WINT_T = 1; then ++ if test $GNULIBHEADERS_OVERRIDE_WINT_T = 1; then + REPLACE_ISWCNTRL=1 + else + case "$gl_cv_func_iswcntrl_works" in +@@ -157,24 +157,39 @@ AC_DEFUN([gl_WCTYPE_H], + ]) + ]) + ++# gl_WCTYPE_MODULE_INDICATOR([modulename]) ++# sets the shell variable that indicates the presence of the given module ++# to a C preprocessor expression that will evaluate to 1. ++# This macro invocation must not occur in macros that are AC_REQUIREd. + AC_DEFUN([gl_WCTYPE_MODULE_INDICATOR], + [ +- dnl Use AC_REQUIRE here, so that the default settings are expanded once only. +- AC_REQUIRE([gl_WCTYPE_H_DEFAULTS]) ++ dnl Ensure to expand the default settings once only. ++ gl_WCTYPE_H_REQUIRE_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]) + ]) + ++# Initializes the default values for AC_SUBSTed shell variables. ++# This macro must not be AC_REQUIREd. It must only be invoked, and only ++# outside of macros or in macros that are not AC_REQUIREd. ++AC_DEFUN([gl_WCTYPE_H_REQUIRE_DEFAULTS], ++[ ++ m4_defun(GL_MODULE_INDICATOR_PREFIX[_WCTYPE_H_MODULE_INDICATOR_DEFAULTS], [ ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISWBLANK]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISWDIGIT]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISWXDIGIT]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCTYPE]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISWCTYPE]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCTRANS]) ++ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TOWCTRANS]) ++ ]) ++ m4_require(GL_MODULE_INDICATOR_PREFIX[_WCTYPE_H_MODULE_INDICATOR_DEFAULTS]) ++ AC_REQUIRE([gl_WCTYPE_H_DEFAULTS]) ++]) ++ + AC_DEFUN([gl_WCTYPE_H_DEFAULTS], + [ +- GNULIB_ISWBLANK=0; AC_SUBST([GNULIB_ISWBLANK]) +- GNULIB_ISWDIGIT=0; AC_SUBST([GNULIB_ISWDIGIT]) +- GNULIB_ISWXDIGIT=0; AC_SUBST([GNULIB_ISWXDIGIT]) +- GNULIB_WCTYPE=0; AC_SUBST([GNULIB_WCTYPE]) +- GNULIB_ISWCTYPE=0; AC_SUBST([GNULIB_ISWCTYPE]) +- GNULIB_WCTRANS=0; AC_SUBST([GNULIB_WCTRANS]) +- GNULIB_TOWCTRANS=0; AC_SUBST([GNULIB_TOWCTRANS]) + dnl Assume proper GNU behavior unless another module says otherwise. + HAVE_ISWBLANK=1; AC_SUBST([HAVE_ISWBLANK]) + HAVE_WCTYPE_T=1; AC_SUBST([HAVE_WCTYPE_T]) +diff --git a/m4/wint_t.m4 b/m4/wint_t.m4 +index 2fc7467..a49c508 100644 +--- a/m4/wint_t.m4 ++++ b/m4/wint_t.m4 +@@ -1,4 +1,4 @@ +-# wint_t.m4 serial 10 ++# wint_t.m4 serial 11 + 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, +@@ -34,14 +34,14 @@ AC_DEFUN([gt_TYPE_WINT_T], + [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 ++ GNULIBHEADERS_OVERRIDE_WINT_T=1 + else +- GNULIB_OVERRIDES_WINT_T=0 ++ GNULIBHEADERS_OVERRIDE_WINT_T=0 + fi + else +- GNULIB_OVERRIDES_WINT_T=0 ++ GNULIBHEADERS_OVERRIDE_WINT_T=0 + fi +- AC_SUBST([GNULIB_OVERRIDES_WINT_T]) ++ AC_SUBST([GNULIBHEADERS_OVERRIDE_WINT_T]) + ]) + + dnl Prerequisites of the 'wint_t' override. +diff --git a/m4/year2038.m4 b/m4/year2038.m4 +new file mode 100644 +index 0000000..da0f8d7 +--- /dev/null ++++ b/m4/year2038.m4 +@@ -0,0 +1,124 @@ ++# year2038.m4 serial 7 ++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. ++ ++dnl Attempt to ensure that 'time_t' can go past the year 2038 and that ++dnl the functions 'time', 'stat', etc. work with post-2038 timestamps. ++ ++AC_DEFUN([gl_YEAR2038_EARLY], ++[ ++ AC_REQUIRE([AC_CANONICAL_HOST]) ++ case "$host_os" in ++ mingw*) ++ AC_DEFINE([__MINGW_USE_VC2005_COMPAT], [1], ++ [For 64-bit time_t on 32-bit mingw.]) ++ ;; ++ esac ++]) ++ ++# gl_YEAR2038_TEST_INCLUDES ++# ------------------------- ++AC_DEFUN([gl_YEAR2038_TEST_INCLUDES], ++[[ ++ #include ++ /* Check that time_t can represent 2**32 - 1 correctly. */ ++ #define LARGE_TIME_T \\ ++ ((time_t) (((time_t) 1 << 30) - 1 + 3 * ((time_t) 1 << 30))) ++ int verify_time_t_range[(LARGE_TIME_T / 65537 == 65535 ++ && LARGE_TIME_T % 65537 == 0) ++ ? 1 : -1]; ++]]) ++ ++# gl_YEAR2038_BODY(REQUIRE-YEAR2038-SAFE) ++----------------------------------------- ++AC_DEFUN([gl_YEAR2038_BODY], ++[ ++ AC_ARG_ENABLE([year2038], ++ [ --disable-year2038 omit support for timestamps past the year 2038]) ++ AS_IF([test "$enable_year2038" != no], ++ [ ++ dnl On many systems, time_t is already a 64-bit type. ++ dnl On those systems where time_t is still 32-bit, it requires kernel ++ dnl and libc support to make it 64-bit. For glibc 2.34 and later on Linux, ++ dnl defining _TIME_BITS=64 and _FILE_OFFSET_BITS=64 is needed on x86 and ARM. ++ dnl ++ dnl On native Windows, the system include files define types __time32_t ++ dnl and __time64_t. By default, time_t is an alias of ++ dnl - __time32_t on 32-bit mingw, ++ dnl - __time64_t on 64-bit mingw and on MSVC (since MSVC 8). ++ dnl But when compiling with -D__MINGW_USE_VC2005_COMPAT, time_t is an ++ dnl alias of __time64_t. ++ dnl And when compiling with -D_USE_32BIT_TIME_T, time_t is an alias of ++ dnl __time32_t. ++ AC_CACHE_CHECK([for time_t past the year 2038], [gl_cv_type_time_t_y2038], ++ [AC_COMPILE_IFELSE( ++ [AC_LANG_SOURCE([gl_YEAR2038_TEST_INCLUDES])], ++ [gl_cv_type_time_t_y2038=yes], [gl_cv_type_time_t_y2038=no]) ++ ]) ++ if test "$gl_cv_type_time_t_y2038" = no; then ++ AC_CACHE_CHECK([for 64-bit time_t with _TIME_BITS=64], ++ [gl_cv_type_time_t_bits_macro], ++ [AC_COMPILE_IFELSE( ++ [AC_LANG_SOURCE([[#define _TIME_BITS 64 ++ #define _FILE_OFFSET_BITS 64 ++ ]gl_YEAR2038_TEST_INCLUDES])], ++ [gl_cv_type_time_t_bits_macro=yes], ++ [gl_cv_type_time_t_bits_macro=no]) ++ ]) ++ if test "$gl_cv_type_time_t_bits_macro" = yes; then ++ AC_DEFINE([_TIME_BITS], [64], ++ [Number of bits in a timestamp, on hosts where this is settable.]) ++ dnl AC_SYS_LARGFILE also defines this; it's OK if we do too. ++ AC_DEFINE([_FILE_OFFSET_BITS], [64], ++ [Number of bits in a file offset, on hosts where this is settable.]) ++ gl_cv_type_time_t_y2038=yes ++ fi ++ fi ++ if test $gl_cv_type_time_t_y2038 = no; then ++ AC_COMPILE_IFELSE( ++ [AC_LANG_SOURCE( ++ [[#ifdef _USE_32BIT_TIME_T ++ int ok; ++ #else ++ error fail ++ #endif ++ ]])], ++ [AC_MSG_FAILURE( ++ [The 'time_t' type stops working after January 2038. ++ Remove _USE_32BIT_TIME_T from the compiler flags.])], ++ [# If not cross-compiling and $1 says we should check, ++ # and 'touch' works with a large timestamp, then evidently wider time_t ++ # is desired and supported, so fail and ask the builder to fix the ++ # problem. Otherwise, just warn the builder. ++ m4_ifval([$1], ++ [if test $cross_compiling = no \ ++ && TZ=UTC0 touch -t 210602070628.15 conftest.time 2>/dev/null; then ++ case `TZ=UTC0 LC_ALL=C ls -l conftest.time 2>/dev/null` in ++ *'Feb 7 2106'* | *'Feb 7 17:10'*) ++ AC_MSG_FAILURE( ++ [The 'time_t' type stops working after January 2038, ++ and your system appears to support a wider 'time_t'. ++ Try configuring with 'CC="${CC} -m64"'. ++ To build with a 32-bit time_t anyway (not recommended), ++ configure with '--disable-year2038'.]);; ++ esac ++ rm -f conftest.time ++ fi]) ++ if test "$gl_warned_about_y2038" != yes; then ++ AC_MSG_WARN( ++ [The 'time_t' type stops working after January 2038, ++ and this package needs a wider 'time_t' type ++ if there is any way to access timestamps after that. ++ Configure with 'CC="${CC} -m64"' perhaps?]) ++ gl_warned_about_y2038=yes ++ fi ++ ]) ++ fi]) ++]) ++ ++AC_DEFUN([gl_YEAR2038], ++[ ++ gl_YEAR2038_BODY([require-year2038-safe]) ++]) +diff --git a/maint.mk b/maint.mk +index ae3a817..6a3ea96 100644 +--- a/maint.mk ++++ b/maint.mk +@@ -1409,7 +1409,7 @@ announcement_mail_headers_alpha = \ + announcement_mail_Cc_beta = $(announcement_mail_Cc_alpha) + announcement_mail_headers_beta = $(announcement_mail_headers_alpha) + +-announcement_mail_Cc_ ?= $(announcement_mail_Cc_$(release-type)) ++announcement_Cc_ ?= $(announcement_Cc_$(release-type)) + announcement_mail_headers_ ?= $(announcement_mail_headers_$(release-type)) + announcement: NEWS ChangeLog $(rel-files) + # Not $(AM_V_GEN) since the output of this command serves as +@@ -1426,7 +1426,6 @@ announcement: NEWS ChangeLog $(rel-files) + --bootstrap-tools=$(bootstrap-tools) \ + $$(case ,$(bootstrap-tools), in (*,gnulib,*) \ + echo --gnulib-version=$(gnulib-version);; esac) \ +- --no-print-checksums \ + $(addprefix --url-dir=, $(url_dir_list)) + + .PHONY: release-commit +-- +cgit v1.1 + diff --git a/package/guile/guile.mk b/package/guile/guile.mk index 03420407f8..859d7ec96f 100644 --- a/package/guile/guile.mk +++ b/package/guile/guile.mk @@ -9,14 +9,17 @@ GUILE_SOURCE = guile-$(GUILE_VERSION).tar.xz GUILE_SITE = $(BR2_GNU_MIRROR)/guile GUILE_INSTALL_STAGING = YES # For 0002-calculate-csqrt_manually.patch and -# 0003-Makefile.am-fix-build-without-makeinfo.patch +# 0003-Makefile.am-fix-build-without-makeinfo.patch and +# 0004-Update-gnulib-to-8f4538a53d64054ae2fc8b86c0f87c418c6176e6.patch GUILE_AUTORECONF = YES GUILE_LICENSE = LGPL-3.0+ GUILE_LICENSE_FILES = LICENSE COPYING COPYING.LESSER GUILE_CPE_ID_VENDOR = gnu GUILE_DEPENDENCIES = host-guile libunistring libffi gmp bdwgc host-pkgconf -HOST_GUILE_DEPENDENCIES = host-libunistring host-libffi host-gmp host-bdwgc host-flex host-pkgconf host-gettext +HOST_GUILE_DEPENDENCIES = \ + host-libunistring host-libffi host-gmp host-bdwgc host-flex \ + host-pkgconf host-gettext host-gperf ifeq ($(BR2_ENABLE_LOCALE),) GUILE_DEPENDENCIES += libiconv