New Upstream Release - grep

Ready changes

Summary

Merged new upstream version: 3.11 (was: 3.8).

Diff

diff --git a/.tarball-version b/.tarball-version
index cc1923a4..2c073331 100644
--- a/.tarball-version
+++ b/.tarball-version
@@ -1 +1 @@
-3.8
+3.11
diff --git a/AUTHORS b/AUTHORS
index bdb35214..ce932f55 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,4 +1,4 @@
-  Copyright (C) 1992, 1997-2002, 2004-2022 Free Software Foundation, Inc.
+  Copyright (C) 1992, 1997-2002, 2004-2023 Free Software Foundation, Inc.
 
   Copying and distribution of this file, with or without modification,
   are permitted in any medium without royalty provided the copyright
diff --git a/ChangeLog b/ChangeLog
index 9bfc1a5e..800481fc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,465 @@
+2023-05-13  Jim Meyering  <meyering@meta.com>
+
+	version 3.11
+	* NEWS: Record release date.
+
+2023-05-10  Josh Soref  <jsoref@gmail.com>
+
+	doc: spelling fixes in doc/, comments and old ChangeLog
+	* ChangeLog-2009: Fix spelling errors.
+	* bootstrap: Likewise.
+	* doc/grep.texi: Likewise.
+
+2023-05-04  Jim Meyering  <meyering@fb.com>
+
+	tests: reenable gnulib's strtoll and strtoull tests
+	* bootstrap.conf (avoided_gnulib_modules): Restore those tests.
+	The failures I saw must have been due to a stale config.cache.
+
+2023-04-30  Jim Meyering  <meyering@fb.com>
+
+	tests: temporarily omit gnulib's strtoll and strtoull tests
+	* bootstrap.conf (avoided_gnulib_modules): Omit strtoll and strtoull
+	tests, because the edge-case 0[bx] tests fail on recent systems.
+
+2023-04-30  Jim Meyering  <meyering@meta.com>
+
+	build: update gnulib to latest
+
+2023-04-30  Carlo Marcelo Arenas Belón  <carenas@gmail.com>
+
+	pcre: work around a PCRE2_MATCH_INVALID_UTF bug
+	PCRE2 has a bug when using PCRE2_MATCH_INVALID_UTF: it would
+	sometimes fail to match patterns using negative classes
+	like \W and \D.
+
+	* NEWS (Bug fixes): Mention it.
+	* src/pcre2search.c: Restrict impact of the bug.
+	Do not use the problematic flag with broken versions of PCRE2.
+	Also, generate locale tables only for single-byte locales,
+	as the PCRE2 documentation recommends this.
+	* tests/Makefile.am (TESTS): Add the file name
+	* tests/pcre-utf8-bug224: New file, to test for this.
+
+2023-04-29  Paul Eggert  <eggert@cs.ucla.edu>
+
+	doc: improve doc for -P '\d'
+	This follows up to Carlo Marcelo Arenas Belón’s email
+	<https://lists.gnu.org/r/grep-devel/2023-04/msg00017.html>
+	that proposed changing the code too.  These patches change
+	only the documentation since we’re so near a release.
+	* NEWS: Be less optimistic about the fix for -P '\d',
+	and warn that behavior is likely to change again.
+	* doc/grep.texi (grep Programs): Be less specific about -P \d
+	behavior, since it’s still in flux.  Warn about mismatching
+	Unicode versions, or disagreements about obscure constructs.
+
+	build: support explicit ‘PCRE_CFLAGS= PCRE_LIBS=’
+	* m4/pcre.m4 (gl_FUNC_PCRE): Check whether PCRE_CFLAGS and
+	PCRE_LIBS are set, not whether they are set to a nonempty value.
+
+2023-04-29  Jim Meyering  <meyering@fb.com>
+
+	doc: say that `-f -` reads patterns from stdin
+	* doc/grep.texi (Matching Control): Mention that when -f's FILE is -,
+	grep reads patterns from stdin.
+	* doc/grep.in.1: Likewise.
+	* THANKS.in: Add the name.
+	Suggested by Sebastian Carlos in https://bugs.gnu.org/63146
+
+2023-04-22  Carlo Marcelo Arenas Belón  <carenas@gmail.com>
+
+	build: prevent pkg-config from overriding PCRE_* settings
+	The use of PCRE_CFLAGS and PCRE_LIBS, as documented in the output of
+	`--help`, is meant to override those settings from pkg-config.
+
+	* NEWS: mention this
+	* m4/pcre.m4: avoid overriding user provided settings
+
+2023-04-20  Jim Meyering  <meyering@fb.com>
+
+	doc: note when a bug was introduced
+	* NEWS: say that the \d bug was introduced in 3.10.
+
+2023-04-20  Jim Meyering  <meyering@meta.com>
+
+	build: update gnulib to latest
+
+2023-04-13  Paul Eggert  <eggert@cs.ucla.edu>
+
+	grep: make -P survive JIT compilation failure
+	* src/pcresearch.c (Pcompile): Ignore failure returns
+	from pcre2_jit_compile.
+
+2023-04-10  Paul Eggert  <eggert@cs.ucla.edu>
+
+	grep: improve PCRE2 version output
+	* src/grep.c: No need to include pcre2.h.
+	(main) [HAVE_LIBPCRE]: Call Pprint_version instead of
+	doing it ourselves.
+	* src/pcresearch.c (Pprint_version): New function.
+	It also checks belatedly for buffer overflow, and
+	says "grep -P uses PCRE2" instead of "Built with PCRE".
+	* tests/version-pcre: Adjust test to match.
+
+2023-04-10  Jim Meyering  <meyering@fb.com>
+
+	tests: skip y2038 test upon touch setup failure
+	* tests/y2038-vs-32-bit: Skip rather than fail, when
+	the touch -t 2039... setup fails.  That command failed
+	on a solaris10 sparc build farm host.
+
+2023-04-09  Jim Meyering  <meyering@meta.com>
+
+	build: update gnulib to latest
+
+2023-04-09  Jim Meyering  <meyering@fb.com>
+
+	tests: add a known-failing glibc-infloop test
+	* tests/glibc-infloop: New file.
+	Based on the command from Koen Claessen
+	reported in https://bugs.gnu.org/62483
+	* configure.ac (USE_INCLUDED_REGEX): define.
+	* tests/Makefile.am (TESTS): Add the file name
+	* THANKS.in: Add name of reporter.
+
+	grep: --version: print pcre version info
+	PCRE is integral to the functioning of grep's -P option, so it is in our
+	interest to make it easy to see which version of PCRE grep uses.
+	* src/grep.c [HAVE_LIBPCRE]: Include <pcre2.h>.
+	[HAVE_LIBPCRE] (main): Print pcre version info.
+	* tests/version-pcre: New test for this.
+	* tests/Makefile.am (TESTS): Add the file name.
+	* NEWS (Changes in behavior): Mention it.
+
+	tests: test for the year-2038 bug
+	* tests/y2038-vs-32-bit: New file.
+	* tests/Makefile.am (TESTS): Add the file name
+
+2023-04-03  Paul Eggert  <eggert@cs.ucla.edu>
+
+	grep: re-fix Y2038 bug on glibc 2.34+ x86, ARM
+	The meaning of AC_SYS_LARGEFILE has changed to no longer even try
+	to use wider time_t if available.  So use AC_SYS_YEAR2038 as well.
+	A more-aggressive change would be to use the next Autoconf’s
+	AC_SYS_YEAR2038_REQUIRED but at least let’s restore the grep 3.8
+	behavior.
+	* NEWS: Mention this.
+	* bootstrap.conf: Add year2038.
+
+2023-04-02  Paul Eggert  <eggert@cs.ucla.edu>
+
+	grep: fix -P [\d] by fixing \w only if PCRE2 10.43
+	Our prepass-based fixes for the -P \d bug have caused repeated
+	further bugs.  Avoid the need for a prepass, by using PCRE2_UCP
+	only if PCRE2_EXTRA_ASCII_BSD is also supported.  Since the -P \w
+	bug was present from grep 2.5 through 3.8 it’s OK if we wait a
+	little longer to fix it.
+	* NEWS: Mention this.
+	* src/pcresearch.c (pcre_pattern_expand_backslash_d}: Remove.
+	Remove its use.
+	(Pcompile): Use PCRE2_UCP only if PCRE2_EXTRA_ASCII_BSD.
+	* tests/pcre-ascii-digits, tests/pcre-utf8-w:
+	Skip tests on older PCRE2 implementations.
+
+2023-03-22  Jim Meyering  <meyering@meta.com>
+
+	maint: post-release administrivia
+	* NEWS: Add header line for next release.
+	* .prev-version: Record previous version.
+	* cfg.mk (old_NEWS_hash): Auto-update.
+
+	version 3.10
+	* NEWS: Record release date.
+
+2023-03-22  Paul Eggert  <eggert@cs.ucla.edu>
+
+	doc: avoid capital sharp S with TeX
+	Do not use “ẞ” (U+1E9E, LATIN CAPITAL LETTER SHARP S) in tex, as
+	texinfo version 2023-03-04.12 complains “Character missing, sorry:
+	LONG S.”
+
+2023-03-22  Jim Meyering  <meyering@meta.com>
+
+	build: update gnulib to latest
+
+2023-03-20  Jim Meyering  <meyering@meta.com>
+
+	build: update gnulib to latest
+
+2023-03-20  Paul Eggert  <eggert@cs.ucla.edu>
+
+	doc: clarify BRE vs ERE (bug#62272)
+
+2023-03-19  Jim Meyering  <meyering@fb.com>
+
+	grep: -P (--perl-regexp) \D once again works like [^0-9]
+	* NEWS: Mention \D, too.
+	* doc/grep.texi: Likewise
+	* src/pcresearch.c (pcre_pattern_expand_backslash_d): Handle \D.
+	Also, ifdef-out this new function and its call site when not needed.
+	* tests/pcre-ascii-digits: Test \D, too.
+	Tighten one test by using returns_ 1.
+	Add comments and tests that work only with 10.43 and newer.
+	Paul Eggert raised the issue of \D in https://bugs.gnu.org/62267#8
+
+2023-03-19  Paul Eggert  <eggert@cs.ucla.edu>
+
+	grep: forward port to PCRE2 10.43
+	* doc/grep.texi: Document this.
+	* src/grep.c: Move recent changes into pcresearch.c.
+	(P_MATCHER_INDEX): Remove.
+	(pcre_pattern_expand_backslash_d): Move from here ...
+	* src/pcresearch.c: ... to here.
+	(PCRE2_EXTRA_ASCII_BSD): Default to 0.
+	(Pcompile): Use PCRE2_EXTRA_ASCII_BSD if available,
+	and expand \d to [0-9] otherwise.
+
+	doc: distinguish Perl from PCRE
+	* doc/grep.texi: Mention that PCRE might not match Perl exactly.
+
+2023-03-18  Jim Meyering  <meyering@fb.com>
+
+	grep: -P (--perl-regexp) \d: match only ASCII digits
+	Prior to grep-3.9, the PCRE matcher had always treated \d just
+	like [0-9]. grep-3.9's fix for \w and \b mistakenly relaxed \d
+	to also match multibyte digits.
+	* src/grep.c (P_MATCHER_INDEX): Define enum.
+	(pcre_pattern_expand_backslash_d): New function.
+	(main): Call it for -P.
+	* NEWS (Bug fixes): Mention it.
+	* doc/grep.texi: Document it: with -P, \d matches only ASCII digits.
+	Provide a PCRE documentation URL and an example of how
+	to use (?s) with -z.
+	* tests/pcre-ascii-digits: New test.
+	* tests/Makefile.am (TESTS): Add that file name.
+	Reported as https://bugs.gnu.org/62267
+
+2023-03-18  Jim Meyering  <meyering@meta.com>
+
+	build: update gnulib to latest
+
+2023-03-09  Jim Meyering  <meyering@fb.com>
+
+	doc: remove mention of unused _N_GNU_nonoption_argv_flags_ envvar
+	* doc/grep.texi (Environment Variables): This environment variable
+	has not been usable for decades. Remove its documentation.
+	* doc/grep.in.1: Likewise.
+	Reported by Emanuele Torre torreemanuele6@gmail.com
+	in https://bugs.gnu.org/62052
+	* THANKS.in: Add the name.
+
+2023-03-05  Jim Meyering  <meyering@meta.com>
+
+	maint: post-release administrivia
+	* NEWS: Add header line for next release.
+	* .prev-version: Record previous version.
+	* cfg.mk (old_NEWS_hash): Auto-update.
+
+	version 3.9
+	* NEWS: Record release date.
+
+	build: update gnulib to latest
+
+2023-03-05  Bruno Haible  <bruno@clisp.org>
+
+	tests: avoid failure on Alpine Linux 3.17, due to non-POSIX compliant tr
+	* tests/fmbtest: Don't use [x*n] syntax in the tr options, since tr from
+	BusyBox 1.35 does not support it.
+
+2023-02-26  Jim Meyering  <meyering@meta.com>
+
+	build: update gnulib to latest
+
+2023-02-19  Jim Meyering  <meyering@fb.com>
+
+	build: avoid --enable-gcc-warnings clang-vs-sprintf build failure
+	* configure.ac (WERROR_CFLAGS): Disable -Wdeprecated-declarations
+	to accommodate Apple's clang 14 that's installed as "gcc".
+
+2023-02-04  Jim Meyering  <meyering@fb.com>
+
+	maint: remove stray character
+	* HACKING: Remove a stray "[" alone on a line.
+
+	maint: prefer https: to git:
+	The idea is to defend against some adversary-in-the-middle attacks.
+	Also prefer git.savannah.gnu.org over its shorter alias, git.sv.gnu.org
+	to avoid a warning e.g., from git clone.
+	Also, drop any final ".git" suffix on the resulting URIs.
+	Inspired by Paul Eggert's nearly identical changes to coreutils.
+	Induced by running these commands:
+	git grep -l 'git clone git:'|xargs perl -pi -e \
+	  's{(git clone) git://(\S+)/([^/]+)\b}{$1 https://$2/git/$3}'
+	git grep -l git.sv.gn \
+	  |xargs perl -pi -e 's{git\.sv\.gnu}{git\.savannah\.gnu}'
+	perl -pi -e \
+	  's{(url =) git://(\S+)/([^/.]+)(\.git)?\b}{$1 https://$2/git/$3}'\
+	  .gitmodules
+	* .gitmodules: As above.
+	* HACKING: Likewise.
+	* README-hacking: Likewise.
+	* src/grep.c (main): Likewise.
+
+2023-01-30  Bruno Haible  <bruno@clisp.org>
+
+	Don't require 'rsync' as a prerequisite. It is no longer needed since 2018.
+	* bootstrap.conf (buildreq): Remove rsync.
+	* README-prereq: Likewise.
+
+2023-01-21  Paul Eggert  <eggert@cs.ucla.edu>
+
+	build: update gnulib submodule to latest
+
+	maint: stop including getprogname.h
+	It’s obsolete in bleeding-edge Gnulib.
+	* src/grep.c, tests/get-mb-cur-max.c: Don’t include getprogname.h.
+	Instead, rely on stdlib.h to declare getprogname.
+
+	build: update gnulib submodule to latest
+
+2023-01-18  Paul Eggert  <eggert@cs.ucla.edu>
+
+	build: update gnulib submodule to latest
+
+2023-01-16  Paul Eggert  <eggert@cs.ucla.edu>
+
+	maint: spelling fixes
+
+2023-01-15  Paul Eggert  <eggert@cs.ucla.edu>
+
+	tests: fix test -eq problem
+	Do not use ‘test "" -eq 1’ when get-mb-cur-max fails,
+	as Bash complains about this.  Problem found on AIX.
+
+	build: update gnulib submodule to latest
+
+	tests: port U+10000+ to AIX 7.2
+	* tests/hangul-syllable, tests/surrogate-search:
+	32-bit AIX has WCHAR_MAX == 0xFFFF, and so cannot handle
+	U+10000 and greater.  Skip tests involving such chars
+	on this platform.
+
+	tests: update tests/init.sh
+	* tests/init.sh: Update from Gnulib.
+
+	grep: fix rawmemrchr etc. comments
+	* src/grep.c: Fix comments.
+
+2023-01-14  Paul Eggert  <eggert@cs.ucla.edu>
+
+	tests: omit duplicate tests
+	* tests/skip-read: Omit duplicates.  Reported by Bruno Haible in:
+	https://lists.gnu.org/r/grep-devel/2023-01/msg00003.html
+
+	build: update gnulib submodule to latest
+
+2023-01-12  Paul Eggert  <eggert@cs.ucla.edu>
+
+	tests: better diagnostic for -P sans Unicode
+	* tests/init.cfg (require_pcre_): When in a UTF-8 locale, test
+	also for Unicode support so that it can be diagnosed differently
+	(Bug#60708).
+
+	grep: diagnose no UTF-8 support (Bug#60708)
+	* src/pcresearch.c (Pcompile): Issue a diagnostic and exit instead
+	of misbehaving if libpcre2 does not support the requested locale.
+
+2023-01-11  Carlo Marcelo Arenas Belón  <carenas@gmail.com>
+
+	pcre: use UTF only when available in the library
+	Before this change, if linked with a PCRE library without unicode
+	any invocations of grep when using a UTF locale will error with:
+
+	  grep: this version of PCRE2 does not have Unicode support
+
+	* src/pcresearch.c: Check whether Unicode was compiled in.
+	* tests/pcre-utf8-w: Add check to skip test.
+	* tests/pcre-utf8: Update check.
+
+2023-01-07  Carlo Marcelo Arenas Belón  <carenas@gmail.com>
+
+	pcre: use UCP in UTF mode
+	This fixes a serious bug affecting word-boundary and word-constituent regular
+	expressions when the desired match involves non-ASCII UTF8 characters.
+	* src/pcresearch.c: Set PCRE2_UCP together with PCRE2_UTF
+	* tests/pcre-utf8-w: New file.
+	* tests/Makefile.am (TESTS): Add it.
+	* NEWS (Bug fixes): Mention this.
+	* THANKS.in: Add Gro-Tsen and Karl Petterson.
+	Reported by Gro-Tsen https://twitter.com/gro_tsen/status/1610972356972875777
+	via Karl Pettersson in https://github.com/PCRE2Project/pcre2/issues/185
+	This bug was present from grep-2.5, when --perl-regexp (-P) support was added.
+
+2023-01-01  Jim Meyering  <meyering@fb.com>
+
+	maint: update copyright dates
+
+	build: update gnulib to latest
+
+	maint: avoid warnings about unportable grep -q
+	* cfg.mk (local-checks-to-skip): This is grep itself,
+	so using grep -q is not a problem here, as long as it
+	is running the just-built grep.
+
+2022-12-10  Jim Meyering  <meyering@fb.com>
+
+	maint: src/dfasearch.c: remove unnecessary re_set_syntax call
+	* src/dfasearch.c (GEAcompile): Don't call "re_set_syntax (syntax_bits)"
+	just before regex_compile; that function does the same thing already.
+
+2022-12-05  Paul Eggert  <eggert@cs.ucla.edu>
+
+	grep: bug: backref in last of multiple patterns
+	* NEWS: Mention this.
+	* src/dfasearch.c (GEAcompile): Trim trailing newline from
+	the last pattern, even if it has back-references and follows
+	a pattern that lacks back-references.
+	* tests/backref: Add test for this bug.
+
+2022-10-11  Paul Eggert  <eggert@cs.ucla.edu>
+
+	maint: prefer stdckdint.h to intprops.h
+	Prefer the standard C23 ckd_* macros to Gnulib’s *_WRAPV macros.
+	* bootstrap.conf (gnulib_modules): Add stdckdint.
+	* src/grep.c, src/kwset.c, src/pcresearch.c:
+	Include stdckdint.h, and prefer ckd_* to *_WRAPV.
+	Include intprops.h only if needed.
+
+	maint: add missing include
+	* src/pcresearch.c: Include intprops.h.
+
+	maint: prefer C23 style for static_assert
+	* bootstrap.conf (gnulib_modules): Add assert-h,
+	for static_assert.
+	* src/dfasearch.c (regex_compile): Prefer static_assert to verify.
+
+	build: update gnulib submodule to latest
+
+2022-09-10  Paul Eggert  <eggert@cs.ucla.edu>
+
+	Assume C23-like bool
+	Gnulib’s stdbool module now provides C23-like semantics,
+	so there’s no longer any need to include stdbool.h.
+	* src/die.h, src/grep.h, src/kwset.h: Don’t include stdbool.h.
+
+	build: update gnulib submodule to latest
+
+2022-09-09  Paul Eggert  <eggert@cs.ucla.edu>
+
+	doc: improve GREP_COLORS doc (Bug#57696)
+
+2022-09-06  Paul Eggert  <eggert@cs.ucla.edu>
+
+	Fix obsolescence doc for egrep, fgrep
+
 2022-09-02  Jim Meyering  <meyering@fb.com>
 
+	maint: post-release administrivia
+	* NEWS: Add header line for next release.
+	* .prev-version: Record previous version.
+	* cfg.mk (old_NEWS_hash): Auto-update.
+
 	version 3.8
 	* NEWS: Record release date.
 
diff --git a/ChangeLog-2009 b/ChangeLog-2009
index ec2a1f4d..ac92c032 100644
--- a/ChangeLog-2009
+++ b/ChangeLog-2009
@@ -1407,7 +1407,7 @@
         is put in different compiled structure patterns[]. The patterns
         are given to dfacomp() and kwsmusts() as is.
         (Ecompile): Likewised.
-        (Fcompile): Reverse to the old behaviour of compiling the enire
+        (Fcompile): Reverse to the old behaviour of compiling the entire
         patterns in one shot.
         (EGexecute): If falling to GNU regex for the matching, loop in the
         array of compile patterns[] to find a match.
@@ -1457,7 +1457,7 @@
         (xrealloc): Removed using lib/xmalloc.c.
         (xmalloc): Removed using lib/xmalloc.c
         (main): Register with atexit() to check for error on stdout.
-        * configure.in: Check for atexit(), call jm_MALLOC, jm_RELLOC and
+        * configure.in: Check for atexit(), call jm_MALLOC, jm_REALLOC and
         jm_PREREQ_ERROR.
         * tests/bre.awk: Removed the hack to drain the buffer since we
         always fclose(stdout) atexit.
@@ -1541,7 +1541,7 @@
         * src/exclude.h: New file.
         * src/grep.c (main): Took the GNU tar code to handle
         the option --include, --exclude, --exclude-from.
-        Files are check for a match, with exlude_filename ().
+        Files are check for a match, with exclude_filename ().
         New option --exclude-from.
         * src/savedir.c: Call exclude_filename() to check for
         file pattern exclusion or inclusion.
@@ -1592,7 +1592,7 @@
 
         * m4/dosfile.m4 (AC_DOSFILE): Move AC_DEFINEs out of AC_CACHE_CHECK.
 
-2001-02-17  Alain Malgoire
+2001-02-17  Alain Magloire
 
         * doc/grep.texi: Document the new options and the new behaviour
         back-references are local.  Use excerpt from Karl Berry regex
@@ -1699,8 +1699,8 @@
         (color): Rename color variable to color_option.
         Removed 'always|never|auto' arguments, not necessary for grep.
         (exclude_pattern): new variable, holder for the file pattern.
-        (include_pattern): new variable, hoder for the file pattern.
-        * src/savedir.c: Signature change, take two new argmuments.
+        (include_pattern): new variable, holder for the file pattern.
+        * src/savedir.c: Signature change, take two new arguments.
         * doc/grep.texi: Document, new options.
         * doc/grep.man: Document, new options.
 
@@ -1712,7 +1712,7 @@
 
 2001-02-09  Alain Magloire
 
-        Patch from Ulrich Drepper to provide hilighting.
+        Patch from Ulrich Drepper to provide highlighting.
 
         * src/grep.c: New option --color.
         (color): New static var.
@@ -1722,7 +1722,7 @@
         to find the offset of the matching string.
         * src/savedir.c: Take advantage of _DIRENT_HAVE_TYPE if supported.
         * src/search.c (EGexecute, Fexecute, Pexecute): Take a new argument
-        when doing exact match for the color hiligting.
+        when doing exact match for the color highlighting.
 
 2000-09-01  Brian Youmans
 
@@ -1792,7 +1792,7 @@
 
 2000-06-02  Paul Eggert
 
-        Problen noted by Gerald Stoller <gerald_stoller@hotmail.com>
+        Problem noted by Gerald Stoller <gerald_stoller@hotmail.com>
 
         * src/grep.c (main): POSIX says that -q overrides -l, which
         in turn overrides the other output options.  Fix grep to
@@ -2208,7 +2208,7 @@
         on pre-OpenVMS 7.x systems; general overhaul.
         * src/getpagesize.h: Reinstate support for different pagesizes on
         VAX and Alpha. Work around problem with DEC C compiler.
-        * src/vms_fab.c: Cast to some assigments; fixed typo argcp vs. argp.
+        * src/vms_fab.c: Cast to some assignments; fixed typo argcp vs. argp.
         * src/vms_fab.h: Added new include files to avoid warnings about
         undefined function prototypes.
         Those patches were provided by Martin P.J. Zinser (zinser@decus.de).
@@ -2670,7 +2670,7 @@
 
 1999-03-16 Volker Borchert
 
-        * configure.in: Use case case ... esac for  checking Visual C++.
+        * configure.in: Use case ... esac for  checking Visual C++.
         When ${CC} contains options it was not recognize.
 
 1999-03-07 Paul Eggert
@@ -2764,7 +2764,7 @@
 
 1999-02-10 Alain Magloire
 
-        * bootstrap/{Makefile{try,am},REAMDE} : skeleton
+        * bootstrap/{Makefile{try,am},README} : skeleton
         provided for system lacking the tools to autoconfigure.
 
         * src/{e,f,}grepmat.c: added guard [HAVE_CONFIG_H]
@@ -2858,7 +2858,7 @@
         * doc/Makefile.am djgpp/Makefile.am m4/Makefile.am vms/Makefile.am:
         New files.
 
-        * m4/progtest.m4: proctect '[]' from m4.
+        * m4/progtest.m4: protect '[]' from m4.
         Noted by Eli Z.
 
         * PATCHES-AC: New file, add the patch for autoconf in the dist.
@@ -3333,7 +3333,7 @@
         Suggested by Harald Hanche-Olsen.
 
         * src/grep.c (main): '-f /dev/null' now specifies no patterns
-        and therfore matches nothing.
+        and therefore matches nothing.
         Reported by Jorge Stolfi.
         Patched by Paul Eggert.
 
@@ -3368,7 +3368,7 @@
         * src/grep.c: reverse back to greping directories,
         One could skip the error message by defining
         SKIP_DIR_ERROR. There is no clear way of doing
-        things, I hope to setle this on the next majore release
+        things, I hope to settle this on the next major release
         Thanks Paul Eggert, Eli Zaretskii and gnits for the
         exchange.
 
@@ -3427,7 +3427,7 @@
         (setmatcher) [HAVE_SETRLIMIT]: Set re_max_failures so that the
         matcher won't ever overflow the stack.
         (main) [__MSDOS__, _WIN32]: Handle backslashes and drive letters
-        in argv[0], remove the .exe suffix, and downcase the prgram name.
+        in argv[0], remove the .exe suffix, and downcase the program name.
         [O_BINARY]: Pass additional DOS-specific options to getopt_long
         and handle them.  Call stat before attempting to open the file, in
         case it is a directory (DOS will fail the open call for
@@ -3497,7 +3497,7 @@
         regex package. Change the way the tests were done to be more
         conformant to automake.
 
-        * configure.in: added --disable-regex for folks with their own fuctions.
+        * configure.in: added --disable-regex for folks with their own functions.
 
         * grep-20d : available for testing
 
@@ -3551,7 +3551,7 @@
 
         * check.sh, scriptgen.awk: fix grep paths.
 
-        * change the directory strucure: grep is now in src to comply with
+        * change the directory structure: grep is now in src to comply with
         gettext.m4.
 
         * grep.c version.c [VERSION]: got rid of version.c,
@@ -3648,6 +3648,6 @@
 
         * Version 2.0 released.
 
-Copyright (C) 1998-2022 Free Software Foundation, Inc.
+Copyright (C) 1998-2023 Free Software Foundation, Inc.
 Copying and distribution of this file, with or without modification,
   are permitted provided the copyright notice and this notice are preserved.
diff --git a/GNUmakefile b/GNUmakefile
index 7a08c9d5..07b331fe 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -5,7 +5,7 @@
 # It is necessary if you want to build targets usually of interest
 # only to the maintainer.
 
-# Copyright (C) 2001, 2003, 2006-2022 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2006-2023 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
@@ -26,7 +26,7 @@ _gl-Makefile := $(wildcard [M]akefile)
 ifneq ($(_gl-Makefile),)
 
 # Make tar archive easier to reproduce.
-export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner
+export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner --sort=name
 
 # Allow the user to add to this in the Makefile.
 ALL_RECURSIVE_TARGETS =
diff --git a/INSTALL b/INSTALL
index a093a364..6e3904aa 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,8 +1,8 @@
 Installation Instructions
 *************************
 
-   Copyright (C) 1994-1996, 1999-2002, 2004-2017, 2020-2022 Free
-Software Foundation, Inc.
+   Copyright © 1994–1996, 1999–2002, 2004–2017, 2020–2023 Free Software
+Foundation, Inc.
 
    Copying and distribution of this file, with or without modification,
 are permitted in any medium without royalty provided the copyright
@@ -12,94 +12,94 @@ without warranty of any kind.
 Basic Installation
 ==================
 
-   Briefly, the shell command './configure && make && make install'
+   Briefly, the shell command ‘./configure && make && make install’
 should configure, build, and install this package.  The following
-more-detailed instructions are generic; see the 'README' file for
+more-detailed instructions are generic; see the ‘README’ file for
 instructions specific to this package.  Some packages provide this
-'INSTALL' file but do not implement all of the features documented
+‘INSTALL’ file but do not implement all of the features documented
 below.  The lack of an optional feature in a given package is not
 necessarily a bug.  More recommendations for GNU packages can be found
 in *note Makefile Conventions: (standards)Makefile Conventions.
 
-   The 'configure' shell script attempts to guess correct values for
+   The ‘configure’ shell script attempts to guess correct values for
 various system-dependent variables used during compilation.  It uses
-those values to create a 'Makefile' in each directory of the package.
-It may also create one or more '.h' files containing system-dependent
-definitions.  Finally, it creates a shell script 'config.status' that
+those values to create a ‘Makefile’ in each directory of the package.
+It may also create one or more ‘.h’ files containing system-dependent
+definitions.  Finally, it creates a shell script ‘config.status’ that
 you can run in the future to recreate the current configuration, and a
-file 'config.log' containing compiler output (useful mainly for
-debugging 'configure').
+file ‘config.log’ containing compiler output (useful mainly for
+debugging ‘configure’).
 
-   It can also use an optional file (typically called 'config.cache' and
-enabled with '--cache-file=config.cache' or simply '-C') that saves the
+   It can also use an optional file (typically called ‘config.cache’ and
+enabled with ‘--cache-file=config.cache’ or simply ‘-C’) that saves the
 results of its tests to speed up reconfiguring.  Caching is disabled by
 default to prevent problems with accidental use of stale cache files.
 
    If you need to do unusual things to compile the package, please try
-to figure out how 'configure' could check whether to do them, and mail
-diffs or instructions to the address given in the 'README' so they can
+to figure out how ‘configure’ could check whether to do them, and mail
+diffs or instructions to the address given in the ‘README’ so they can
 be considered for the next release.  If you are using the cache, and at
-some point 'config.cache' contains results you don't want to keep, you
+some point ‘config.cache’ contains results you don’t want to keep, you
 may remove or edit it.
 
-   The file 'configure.ac' (or 'configure.in') is used to create
-'configure' by a program called 'autoconf'.  You need 'configure.ac' if
-you want to change it or regenerate 'configure' using a newer version of
-'autoconf'.
+   The file ‘configure.ac’ (or ‘configure.in’) is used to create
+‘configure’ by a program called ‘autoconf’.  You need ‘configure.ac’ if
+you want to change it or regenerate ‘configure’ using a newer version of
+‘autoconf’.
 
    The simplest way to compile this package is:
 
-  1. 'cd' to the directory containing the package's source code and type
-     './configure' to configure the package for your system.
+  1. ‘cd’ to the directory containing the package’s source code and type
+     ‘./configure’ to configure the package for your system.
 
-     Running 'configure' might take a while.  While running, it prints
+     Running ‘configure’ might take a while.  While running, it prints
      some messages telling which features it is checking for.
 
-  2. Type 'make' to compile the package.
+  2. Type ‘make’ to compile the package.
 
-  3. Optionally, type 'make check' to run any self-tests that come with
+  3. Optionally, type ‘make check’ to run any self-tests that come with
      the package, generally using the just-built uninstalled binaries.
 
-  4. Type 'make install' to install the programs and any data files and
+  4. Type ‘make install’ to install the programs and any data files and
      documentation.  When installing into a prefix owned by root, it is
      recommended that the package be configured and built as a regular
-     user, and only the 'make install' phase executed with root
+     user, and only the ‘make install’ phase executed with root
      privileges.
 
-  5. Optionally, type 'make installcheck' to repeat any self-tests, but
+  5. Optionally, type ‘make installcheck’ to repeat any self-tests, but
      this time using the binaries in their final installed location.
      This target does not install anything.  Running this target as a
-     regular user, particularly if the prior 'make install' required
+     regular user, particularly if the prior ‘make install’ required
      root privileges, verifies that the installation completed
      correctly.
 
   6. You can remove the program binaries and object files from the
-     source code directory by typing 'make clean'.  To also remove the
-     files that 'configure' created (so you can compile the package for
-     a different kind of computer), type 'make distclean'.  There is
-     also a 'make maintainer-clean' target, but that is intended mainly
-     for the package's developers.  If you use it, you may have to get
+     source code directory by typing ‘make clean’.  To also remove the
+     files that ‘configure’ created (so you can compile the package for
+     a different kind of computer), type ‘make distclean’.  There is
+     also a ‘make maintainer-clean’ target, but that is intended mainly
+     for the package’s developers.  If you use it, you may have to get
      all sorts of other programs in order to regenerate files that came
      with the distribution.
 
-  7. Often, you can also type 'make uninstall' to remove the installed
+  7. Often, you can also type ‘make uninstall’ to remove the installed
      files again.  In practice, not all packages have tested that
      uninstallation works correctly, even though it is required by the
      GNU Coding Standards.
 
-  8. Some packages, particularly those that use Automake, provide 'make
-     distcheck', which can by used by developers to test that all other
-     targets like 'make install' and 'make uninstall' work correctly.
+  8. Some packages, particularly those that use Automake, provide ‘make
+     distcheck’, which can by used by developers to test that all other
+     targets like ‘make install’ and ‘make uninstall’ work correctly.
      This target is generally not run by end users.
 
 Compilers and Options
 =====================
 
    Some systems require unusual options for compilation or linking that
-the 'configure' script does not know about.  Run './configure --help'
+the ‘configure’ script does not know about.  Run ‘./configure --help’
 for details on some of the pertinent environment variables.
 
-   You can give 'configure' initial values for configuration parameters
+   You can give ‘configure’ initial values for configuration parameters
 by setting variables in the command line or in the environment.  Here is
 an example:
 
@@ -112,21 +112,21 @@ Compiling For Multiple Architectures
 
    You can compile the package for more than one kind of computer at the
 same time, by placing the object files for each architecture in their
-own directory.  To do this, you can use GNU 'make'.  'cd' to the
+own directory.  To do this, you can use GNU ‘make’.  ‘cd’ to the
 directory where you want the object files and executables to go and run
-the 'configure' script.  'configure' automatically checks for the source
-code in the directory that 'configure' is in and in '..'.  This is known
-as a "VPATH" build.
+the ‘configure’ script.  ‘configure’ automatically checks for the source
+code in the directory that ‘configure’ is in and in ‘..’.  This is known
+as a “VPATH” build.
 
-   With a non-GNU 'make', it is safer to compile the package for one
+   With a non-GNU ‘make’, it is safer to compile the package for one
 architecture at a time in the source code directory.  After you have
-installed the package for one architecture, use 'make distclean' before
+installed the package for one architecture, use ‘make distclean’ before
 reconfiguring for another architecture.
 
    On MacOS X 10.5 and later systems, you can create libraries and
-executables that work on multiple system types--known as "fat" or
-"universal" binaries--by specifying multiple '-arch' options to the
-compiler but only a single '-arch' option to the preprocessor.  Like
+executables that work on multiple system types—known as “fat” or
+“universal” binaries—by specifying multiple ‘-arch’ options to the
+compiler but only a single ‘-arch’ option to the preprocessor.  Like
 this:
 
      ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
@@ -135,43 +135,43 @@ this:
 
    This is not guaranteed to produce working output in all cases, you
 may have to build one architecture at a time and combine the results
-using the 'lipo' tool if you have problems.
+using the ‘lipo’ tool if you have problems.
 
 Installation Names
 ==================
 
-   By default, 'make install' installs the package's commands under
-'/usr/local/bin', include files under '/usr/local/include', etc.  You
-can specify an installation prefix other than '/usr/local' by giving
-'configure' the option '--prefix=PREFIX', where PREFIX must be an
+   By default, ‘make install’ installs the package’s commands under
+‘/usr/local/bin’, include files under ‘/usr/local/include’, etc.  You
+can specify an installation prefix other than ‘/usr/local’ by giving
+‘configure’ the option ‘--prefix=PREFIX’, where PREFIX must be an
 absolute file name.
 
    You can specify separate installation prefixes for
 architecture-specific files and architecture-independent files.  If you
-pass the option '--exec-prefix=PREFIX' to 'configure', the package uses
+pass the option ‘--exec-prefix=PREFIX’ to ‘configure’, the package uses
 PREFIX as the prefix for installing programs and libraries.
 Documentation and other data files still use the regular prefix.
 
    In addition, if you use an unusual directory layout you can give
-options like '--bindir=DIR' to specify different values for particular
-kinds of files.  Run 'configure --help' for a list of the directories
+options like ‘--bindir=DIR’ to specify different values for particular
+kinds of files.  Run ‘configure --help’ for a list of the directories
 you can set and what kinds of files go in them.  In general, the default
-for these options is expressed in terms of '${prefix}', so that
-specifying just '--prefix' will affect all of the other directory
+for these options is expressed in terms of ‘${prefix}’, so that
+specifying just ‘--prefix’ will affect all of the other directory
 specifications that were not explicitly provided.
 
    The most portable way to affect installation locations is to pass the
-correct locations to 'configure'; however, many packages provide one or
+correct locations to ‘configure’; however, many packages provide one or
 both of the following shortcuts of passing variable assignments to the
-'make install' command line to change installation locations without
+‘make install’ command line to change installation locations without
 having to reconfigure or recompile.
 
    The first method involves providing an override variable for each
-affected directory.  For example, 'make install
-prefix=/alternate/directory' will choose an alternate location for all
+affected directory.  For example, ‘make install
+prefix=/alternate/directory’ will choose an alternate location for all
 directory configuration variables that were expressed in terms of
-'${prefix}'.  Any directories that were specified during 'configure',
-but not in terms of '${prefix}', must each be overridden at install time
+‘${prefix}’.  Any directories that were specified during ‘configure’,
+but not in terms of ‘${prefix}’, must each be overridden at install time
 for the entire installation to be relocated.  The approach of makefile
 variable overrides for each directory variable is required by the GNU
 Coding Standards, and ideally causes no recompilation.  However, some
@@ -179,40 +179,40 @@ platforms have known limitations with the semantics of shared libraries
 that end up requiring recompilation when using this method, particularly
 noticeable in packages that use GNU Libtool.
 
-   The second method involves providing the 'DESTDIR' variable.  For
-example, 'make install DESTDIR=/alternate/directory' will prepend
-'/alternate/directory' before all installation names.  The approach of
-'DESTDIR' overrides is not required by the GNU Coding Standards, and
+   The second method involves providing the ‘DESTDIR’ variable.  For
+example, ‘make install DESTDIR=/alternate/directory’ will prepend
+‘/alternate/directory’ before all installation names.  The approach of
+‘DESTDIR’ overrides is not required by the GNU Coding Standards, and
 does not work on platforms that have drive letters.  On the other hand,
 it does better at avoiding recompilation issues, and works well even
-when some directory options were not specified in terms of '${prefix}'
-at 'configure' time.
+when some directory options were not specified in terms of ‘${prefix}’
+at ‘configure’ time.
 
 Optional Features
 =================
 
    If the package supports it, you can cause programs to be installed
-with an extra prefix or suffix on their names by giving 'configure' the
-option '--program-prefix=PREFIX' or '--program-suffix=SUFFIX'.
-
-   Some packages pay attention to '--enable-FEATURE' options to
-'configure', where FEATURE indicates an optional part of the package.
-They may also pay attention to '--with-PACKAGE' options, where PACKAGE
-is something like 'gnu-as' or 'x' (for the X Window System).  The
-'README' should mention any '--enable-' and '--with-' options that the
+with an extra prefix or suffix on their names by giving ‘configure’ the
+option ‘--program-prefix=PREFIX’ or ‘--program-suffix=SUFFIX’.
+
+   Some packages pay attention to ‘--enable-FEATURE’ options to
+‘configure’, where FEATURE indicates an optional part of the package.
+They may also pay attention to ‘--with-PACKAGE’ options, where PACKAGE
+is something like ‘gnu-as’ or ‘x’ (for the X Window System).  The
+‘README’ should mention any ‘--enable-’ and ‘--with-’ options that the
 package recognizes.
 
-   For packages that use the X Window System, 'configure' can usually
-find the X include and library files automatically, but if it doesn't,
-you can use the 'configure' options '--x-includes=DIR' and
-'--x-libraries=DIR' to specify their locations.
+   For packages that use the X Window System, ‘configure’ can usually
+find the X include and library files automatically, but if it doesn’t,
+you can use the ‘configure’ options ‘--x-includes=DIR’ and
+‘--x-libraries=DIR’ to specify their locations.
 
    Some packages offer the ability to configure how verbose the
-execution of 'make' will be.  For these packages, running './configure
---enable-silent-rules' sets the default to minimal output, which can be
-overridden with 'make V=1'; while running './configure
---disable-silent-rules' sets the default to verbose, which can be
-overridden with 'make V=0'.
+execution of ‘make’ will be.  For these packages, running ‘./configure
+--enable-silent-rules’ sets the default to minimal output, which can be
+overridden with ‘make V=1’; while running ‘./configure
+--disable-silent-rules’ sets the default to verbose, which can be
+overridden with ‘make V=0’.
 
 Particular systems
 ==================
@@ -223,43 +223,43 @@ order to use an ANSI C compiler:
 
      ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
 
-and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+and if that doesn’t work, install pre-built binaries of GCC for HP-UX.
 
-   HP-UX 'make' updates targets which have the same timestamps as their
+   HP-UX ‘make’ updates targets which have the same timestamps as their
 prerequisites, which makes it generally unusable when shipped generated
-files such as 'configure' are involved.  Use GNU 'make' instead.
+files such as ‘configure’ are involved.  Use GNU ‘make’ instead.
 
    On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
-parse its '<wchar.h>' header file.  The option '-nodtk' can be used as a
+parse its ‘<wchar.h>’ header file.  The option ‘-nodtk’ can be used as a
 workaround.  If GNU CC is not installed, it is therefore recommended to
 try
 
      ./configure CC="cc"
 
-and if that doesn't work, try
+and if that doesn’t work, try
 
      ./configure CC="cc -nodtk"
 
-   On Solaris, don't put '/usr/ucb' early in your 'PATH'.  This
+   On Solaris, don’t put ‘/usr/ucb’ early in your ‘PATH’.  This
 directory contains several dysfunctional programs; working variants of
-these programs are available in '/usr/bin'.  So, if you need '/usr/ucb'
-in your 'PATH', put it _after_ '/usr/bin'.
+these programs are available in ‘/usr/bin’.  So, if you need ‘/usr/ucb’
+in your ‘PATH’, put it _after_ ‘/usr/bin’.
 
-   On Haiku, software installed for all users goes in '/boot/common',
-not '/usr/local'.  It is recommended to use the following options:
+   On Haiku, software installed for all users goes in ‘/boot/common’,
+not ‘/usr/local’.  It is recommended to use the following options:
 
      ./configure --prefix=/boot/common
 
 Specifying the System Type
 ==========================
 
-   There may be some features 'configure' cannot figure out
+   There may be some features ‘configure’ cannot figure out
 automatically, but needs to determine by the type of machine the package
 will run on.  Usually, assuming the package is built to be run on the
-_same_ architectures, 'configure' can figure that out, but if it prints
+_same_ architectures, ‘configure’ can figure that out, but if it prints
 a message saying it cannot guess the machine type, give it the
-'--build=TYPE' option.  TYPE can either be a short name for the system
-type, such as 'sun4', or a canonical name which has the form:
+‘--build=TYPE’ option.  TYPE can either be a short name for the system
+type, such as ‘sun4’, or a canonical name which has the form:
 
      CPU-COMPANY-SYSTEM
 
@@ -268,101 +268,101 @@ where SYSTEM can have one of these forms:
      OS
      KERNEL-OS
 
-   See the file 'config.sub' for the possible values of each field.  If
-'config.sub' isn't included in this package, then this package doesn't
+   See the file ‘config.sub’ for the possible values of each field.  If
+‘config.sub’ isn’t included in this package, then this package doesn’t
 need to know the machine type.
 
    If you are _building_ compiler tools for cross-compiling, you should
-use the option '--target=TYPE' to select the type of system they will
+use the option ‘--target=TYPE’ to select the type of system they will
 produce code for.
 
    If you want to _use_ a cross compiler, that generates code for a
 platform different from the build platform, you should specify the
-"host" platform (i.e., that on which the generated programs will
-eventually be run) with '--host=TYPE'.
+“host” platform (i.e., that on which the generated programs will
+eventually be run) with ‘--host=TYPE’.
 
 Sharing Defaults
 ================
 
-   If you want to set default values for 'configure' scripts to share,
-you can create a site shell script called 'config.site' that gives
-default values for variables like 'CC', 'cache_file', and 'prefix'.
-'configure' looks for 'PREFIX/share/config.site' if it exists, then
-'PREFIX/etc/config.site' if it exists.  Or, you can set the
-'CONFIG_SITE' environment variable to the location of the site script.
-A warning: not all 'configure' scripts look for a site script.
+   If you want to set default values for ‘configure’ scripts to share,
+you can create a site shell script called ‘config.site’ that gives
+default values for variables like ‘CC’, ‘cache_file’, and ‘prefix’.
+‘configure’ looks for ‘PREFIX/share/config.site’ if it exists, then
+‘PREFIX/etc/config.site’ if it exists.  Or, you can set the
+‘CONFIG_SITE’ environment variable to the location of the site script.
+A warning: not all ‘configure’ scripts look for a site script.
 
 Defining Variables
 ==================
 
    Variables not defined in a site shell script can be set in the
-environment passed to 'configure'.  However, some packages may run
+environment passed to ‘configure’.  However, some packages may run
 configure again during the build, and the customized values of these
 variables may be lost.  In order to avoid this problem, you should set
-them in the 'configure' command line, using 'VAR=value'.  For example:
+them in the ‘configure’ command line, using ‘VAR=value’.  For example:
 
      ./configure CC=/usr/local2/bin/gcc
 
-causes the specified 'gcc' to be used as the C compiler (unless it is
+causes the specified ‘gcc’ to be used as the C compiler (unless it is
 overridden in the site shell script).
 
-Unfortunately, this technique does not work for 'CONFIG_SHELL' due to an
+Unfortunately, this technique does not work for ‘CONFIG_SHELL’ due to an
 Autoconf limitation.  Until the limitation is lifted, you can use this
 workaround:
 
      CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
 
-'configure' Invocation
+‘configure’ Invocation
 ======================
 
-   'configure' recognizes the following options to control how it
+   ‘configure’ recognizes the following options to control how it
 operates.
 
-'--help'
-'-h'
-     Print a summary of all of the options to 'configure', and exit.
+‘--help’
+‘-h’
+     Print a summary of all of the options to ‘configure’, and exit.
 
-'--help=short'
-'--help=recursive'
-     Print a summary of the options unique to this package's
-     'configure', and exit.  The 'short' variant lists options used only
-     in the top level, while the 'recursive' variant lists options also
+‘--help=short’
+‘--help=recursive’
+     Print a summary of the options unique to this package’s
+     ‘configure’, and exit.  The ‘short’ variant lists options used only
+     in the top level, while the ‘recursive’ variant lists options also
      present in any nested packages.
 
-'--version'
-'-V'
-     Print the version of Autoconf used to generate the 'configure'
+‘--version’
+‘-V’
+     Print the version of Autoconf used to generate the ‘configure’
      script, and exit.
 
-'--cache-file=FILE'
+‘--cache-file=FILE’
      Enable the cache: use and save the results of the tests in FILE,
-     traditionally 'config.cache'.  FILE defaults to '/dev/null' to
+     traditionally ‘config.cache’.  FILE defaults to ‘/dev/null’ to
      disable caching.
 
-'--config-cache'
-'-C'
-     Alias for '--cache-file=config.cache'.
+‘--config-cache’
+‘-C’
+     Alias for ‘--cache-file=config.cache’.
 
-'--quiet'
-'--silent'
-'-q'
+‘--quiet’
+‘--silent’
+‘-q’
      Do not print messages saying which checks are being made.  To
-     suppress all normal output, redirect it to '/dev/null' (any error
+     suppress all normal output, redirect it to ‘/dev/null’ (any error
      messages will still be shown).
 
-'--srcdir=DIR'
-     Look for the package's source code in directory DIR.  Usually
-     'configure' can determine that directory automatically.
+‘--srcdir=DIR’
+     Look for the package’s source code in directory DIR.  Usually
+     ‘configure’ can determine that directory automatically.
 
-'--prefix=DIR'
+‘--prefix=DIR’
      Use DIR as the installation prefix.  *note Installation Names:: for
      more details, including other options available for fine-tuning the
      installation locations.
 
-'--no-create'
-'-n'
+‘--no-create’
+‘-n’
      Run the configure checks, but stop before creating any output
      files.
 
-'configure' also accepts some other, not widely useful, options.  Run
-'configure --help' for more details.
+‘configure’ also accepts some other, not widely useful, options.  Run
+‘configure --help’ for more details.
diff --git a/Makefile.am b/Makefile.am
index b739ce24..8771f888 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,6 @@
 # Process this file with automake to create Makefile.in
 #
-# Copyright 1997-1998, 2005-2022 Free Software Foundation, Inc.
+# Copyright 1997-1998, 2005-2023 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/Makefile.in b/Makefile.in
index 0042aecd..ed523972 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,7 +1,7 @@
 # Makefile.in generated by automake 1.16i from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2022 Free Software Foundation, Inc.
+# Copyright (C) 1994-2023 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -71,9 +71,6 @@ am__make_dryrun = (target_option=n; $(am__make_running_with_option))
 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 am__rm_f = rm -f $(am__rm_f_notfound)
 am__rm_rf = rm -rf $(am__rm_f_notfound)
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
@@ -95,7 +92,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
 	$(top_srcdir)/m4/absolute-header.m4 $(top_srcdir)/m4/alloca.m4 \
 	$(top_srcdir)/m4/arpa_inet_h.m4 \
 	$(top_srcdir)/m4/asm-underscore.m4 $(top_srcdir)/m4/assert.m4 \
-	$(top_srcdir)/m4/btowc.m4 $(top_srcdir)/m4/builtin-expect.m4 \
+	$(top_srcdir)/m4/assert_h.m4 $(top_srcdir)/m4/btowc.m4 \
+	$(top_srcdir)/m4/build-to-host.m4 \
+	$(top_srcdir)/m4/builtin-expect.m4 $(top_srcdir)/m4/c-bool.m4 \
 	$(top_srcdir)/m4/c-stack.m4 $(top_srcdir)/m4/calloc.m4 \
 	$(top_srcdir)/m4/chdir-long.m4 $(top_srcdir)/m4/close.m4 \
 	$(top_srcdir)/m4/closedir.m4 $(top_srcdir)/m4/codeset.m4 \
@@ -106,12 +105,13 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
 	$(top_srcdir)/m4/double-slash-root.m4 $(top_srcdir)/m4/dup.m4 \
 	$(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \
 	$(top_srcdir)/m4/environ.m4 $(top_srcdir)/m4/errno_h.m4 \
-	$(top_srcdir)/m4/error.m4 $(top_srcdir)/m4/exponentd.m4 \
-	$(top_srcdir)/m4/extensions.m4 \
+	$(top_srcdir)/m4/error.m4 $(top_srcdir)/m4/error_h.m4 \
+	$(top_srcdir)/m4/exponentd.m4 $(top_srcdir)/m4/extensions.m4 \
 	$(top_srcdir)/m4/extern-inline.m4 $(top_srcdir)/m4/fchdir.m4 \
-	$(top_srcdir)/m4/fcntl-o.m4 $(top_srcdir)/m4/fcntl-safer.m4 \
-	$(top_srcdir)/m4/fcntl.m4 $(top_srcdir)/m4/fcntl_h.m4 \
-	$(top_srcdir)/m4/fdopen.m4 $(top_srcdir)/m4/fdopendir.m4 \
+	$(top_srcdir)/m4/fclose.m4 $(top_srcdir)/m4/fcntl-o.m4 \
+	$(top_srcdir)/m4/fcntl-safer.m4 $(top_srcdir)/m4/fcntl.m4 \
+	$(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fdopen.m4 \
+	$(top_srcdir)/m4/fdopendir.m4 $(top_srcdir)/m4/fflush.m4 \
 	$(top_srcdir)/m4/filenamecat.m4 $(top_srcdir)/m4/flexmember.m4 \
 	$(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fnmatch.m4 \
 	$(top_srcdir)/m4/fnmatch_h.m4 $(top_srcdir)/m4/fopen.m4 \
@@ -192,35 +192,34 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
 	$(top_srcdir)/m4/stack-direction.m4 \
 	$(top_srcdir)/m4/stat-time.m4 $(top_srcdir)/m4/stat.m4 \
 	$(top_srcdir)/m4/stdalign.m4 $(top_srcdir)/m4/stdarg.m4 \
-	$(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stddef_h.m4 \
-	$(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/stdint_h.m4 \
-	$(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \
-	$(top_srcdir)/m4/stpcpy.m4 $(top_srcdir)/m4/strdup.m4 \
-	$(top_srcdir)/m4/strerror.m4 $(top_srcdir)/m4/strerror_r.m4 \
-	$(top_srcdir)/m4/string_h.m4 $(top_srcdir)/m4/strnlen.m4 \
-	$(top_srcdir)/m4/strstr.m4 $(top_srcdir)/m4/strtoimax.m4 \
-	$(top_srcdir)/m4/strtoll.m4 $(top_srcdir)/m4/strtoull.m4 \
-	$(top_srcdir)/m4/strtoumax.m4 $(top_srcdir)/m4/symlink.m4 \
-	$(top_srcdir)/m4/sys_ioctl_h.m4 \
+	$(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \
+	$(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/stdio_h.m4 \
+	$(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/stpcpy.m4 \
+	$(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \
+	$(top_srcdir)/m4/strerror_r.m4 $(top_srcdir)/m4/string_h.m4 \
+	$(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/strstr.m4 \
+	$(top_srcdir)/m4/strtoimax.m4 $(top_srcdir)/m4/strtoll.m4 \
+	$(top_srcdir)/m4/strtoull.m4 $(top_srcdir)/m4/strtoumax.m4 \
+	$(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_ioctl_h.m4 \
 	$(top_srcdir)/m4/sys_select_h.m4 \
 	$(top_srcdir)/m4/sys_socket_h.m4 \
 	$(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_time_h.m4 \
 	$(top_srcdir)/m4/sys_types_h.m4 $(top_srcdir)/m4/sys_uio_h.m4 \
 	$(top_srcdir)/m4/thread.m4 $(top_srcdir)/m4/threadlib.m4 \
-	$(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/unistd-safer.m4 \
-	$(top_srcdir)/m4/unistd_h.m4 $(top_srcdir)/m4/unlocked-io.m4 \
-	$(top_srcdir)/m4/vasnprintf.m4 $(top_srcdir)/m4/version-etc.m4 \
-	$(top_srcdir)/m4/visibility.m4 $(top_srcdir)/m4/warn-on-use.m4 \
-	$(top_srcdir)/m4/warnings.m4 $(top_srcdir)/m4/wchar_h.m4 \
-	$(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wcrtomb.m4 \
-	$(top_srcdir)/m4/wctob.m4 $(top_srcdir)/m4/wctomb.m4 \
-	$(top_srcdir)/m4/wctype_h.m4 $(top_srcdir)/m4/wcwidth.m4 \
+	$(top_srcdir)/m4/time.m4 $(top_srcdir)/m4/time_h.m4 \
+	$(top_srcdir)/m4/unistd-safer.m4 $(top_srcdir)/m4/unistd_h.m4 \
+	$(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/vasnprintf.m4 \
+	$(top_srcdir)/m4/version-etc.m4 $(top_srcdir)/m4/visibility.m4 \
+	$(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/warnings.m4 \
+	$(top_srcdir)/m4/wchar_h.m4 $(top_srcdir)/m4/wchar_t.m4 \
+	$(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wctob.m4 \
+	$(top_srcdir)/m4/wctomb.m4 $(top_srcdir)/m4/wctype_h.m4 \
+	$(top_srcdir)/m4/wcwidth.m4 \
 	$(top_srcdir)/m4/windows-stat-inodes.m4 \
 	$(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/wmemchr.m4 \
 	$(top_srcdir)/m4/wmempcpy.m4 $(top_srcdir)/m4/xalloc.m4 \
 	$(top_srcdir)/m4/xsize.m4 $(top_srcdir)/m4/xstrtol.m4 \
-	$(top_srcdir)/m4/year2038.m4 $(top_srcdir)/m4/zzgnulib.m4 \
-	$(top_srcdir)/configure.ac
+	$(top_srcdir)/m4/zzgnulib.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
@@ -340,7 +339,12 @@ AM_DISTCHECK_DVI_TARGET = dvi
 distuninstallcheck_listfiles = find . -type f -print
 am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
   | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
-distcleancheck_listfiles = find . -type f -print
+distcleancheck_listfiles = \
+  find . \( -type f -a \! \
+            \( -name .nfs* -o -name .smb* -o -name .__afs* \) \) -print
+pkgdatadir = @pkgdatadir@
+pkgincludedir = @pkgincludedir@
+pkglibdir = @pkglibdir@
 pkglibexecdir = @pkglibexecdir@
 ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
@@ -350,6 +354,7 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
 AR = @AR@
 ARFLAGS = @ARFLAGS@
+ASSERT_H = @ASSERT_H@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -372,6 +377,7 @@ CTAGS = @CTAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DIR_HAS_FD_MEMBER = @DIR_HAS_FD_MEMBER@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
@@ -382,6 +388,7 @@ ENOLINK_VALUE = @ENOLINK_VALUE@
 EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
 EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
 ERRNO_H = @ERRNO_H@
+ERROR_H = @ERROR_H@
 ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FLOAT_H = @FLOAT_H@
@@ -482,6 +489,7 @@ GL_GNULIB_GETPAGESIZE = @GL_GNULIB_GETPAGESIZE@
 GL_GNULIB_GETPASS = @GL_GNULIB_GETPASS@
 GL_GNULIB_GETPASS_GNU = @GL_GNULIB_GETPASS_GNU@
 GL_GNULIB_GETPEERNAME = @GL_GNULIB_GETPEERNAME@
+GL_GNULIB_GETPROGNAME = @GL_GNULIB_GETPROGNAME@
 GL_GNULIB_GETSOCKNAME = @GL_GNULIB_GETSOCKNAME@
 GL_GNULIB_GETSOCKOPT = @GL_GNULIB_GETSOCKOPT@
 GL_GNULIB_GETSUBOPT = @GL_GNULIB_GETSUBOPT@
@@ -533,6 +541,7 @@ GL_GNULIB_MBSSEP = @GL_GNULIB_MBSSEP@
 GL_GNULIB_MBSSPN = @GL_GNULIB_MBSSPN@
 GL_GNULIB_MBSSTR = @GL_GNULIB_MBSSTR@
 GL_GNULIB_MBSTOK_R = @GL_GNULIB_MBSTOK_R@
+GL_GNULIB_MBSTOWCS = @GL_GNULIB_MBSTOWCS@
 GL_GNULIB_MBTOWC = @GL_GNULIB_MBTOWC@
 GL_GNULIB_MDA_ACCESS = @GL_GNULIB_MDA_ACCESS@
 GL_GNULIB_MDA_CHDIR = @GL_GNULIB_MDA_CHDIR@
@@ -579,6 +588,7 @@ GL_GNULIB_MEMCHR = @GL_GNULIB_MEMCHR@
 GL_GNULIB_MEMMEM = @GL_GNULIB_MEMMEM@
 GL_GNULIB_MEMPCPY = @GL_GNULIB_MEMPCPY@
 GL_GNULIB_MEMRCHR = @GL_GNULIB_MEMRCHR@
+GL_GNULIB_MEMSET_EXPLICIT = @GL_GNULIB_MEMSET_EXPLICIT@
 GL_GNULIB_MKDIR = @GL_GNULIB_MKDIR@
 GL_GNULIB_MKDIRAT = @GL_GNULIB_MKDIRAT@
 GL_GNULIB_MKDTEMP = @GL_GNULIB_MKDTEMP@
@@ -703,6 +713,7 @@ GL_GNULIB_STRVERSCMP = @GL_GNULIB_STRVERSCMP@
 GL_GNULIB_SYMLINK = @GL_GNULIB_SYMLINK@
 GL_GNULIB_SYMLINKAT = @GL_GNULIB_SYMLINKAT@
 GL_GNULIB_SYSTEM_POSIX = @GL_GNULIB_SYSTEM_POSIX@
+GL_GNULIB_TIME = @GL_GNULIB_TIME@
 GL_GNULIB_TIMEGM = @GL_GNULIB_TIMEGM@
 GL_GNULIB_TIMESPEC_GET = @GL_GNULIB_TIMESPEC_GET@
 GL_GNULIB_TIMESPEC_GETRES = @GL_GNULIB_TIMESPEC_GETRES@
@@ -779,6 +790,7 @@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
 GNULIB_TEST_WARN_CFLAGS = @GNULIB_TEST_WARN_CFLAGS@
 GNULIB_WARN_CFLAGS = @GNULIB_WARN_CFLAGS@
 GREP = @GREP@
+HARD_LOCALE_LIB = @HARD_LOCALE_LIB@
 HAVE_ACCEPT4 = @HAVE_ACCEPT4@
 HAVE_ALIGNED_ALLOC = @HAVE_ALIGNED_ALLOC@
 HAVE_ALLOCA_H = @HAVE_ALLOCA_H@
@@ -813,6 +825,7 @@ HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@
 HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
 HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
 HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
+HAVE_DECL_GETW = @HAVE_DECL_GETW@
 HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@
 HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@
 HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@
@@ -822,6 +835,8 @@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@
 HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
 HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
 HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@
+HAVE_DECL_PROGRAM_INVOCATION_NAME = @HAVE_DECL_PROGRAM_INVOCATION_NAME@
+HAVE_DECL_PUTW = @HAVE_DECL_PUTW@
 HAVE_DECL_SETENV = @HAVE_DECL_SETENV@
 HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@
 HAVE_DECL_SETSTATE = @HAVE_DECL_SETSTATE@
@@ -845,6 +860,9 @@ HAVE_DIRENT_H = @HAVE_DIRENT_H@
 HAVE_DPRINTF = @HAVE_DPRINTF@
 HAVE_DUP3 = @HAVE_DUP3@
 HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
+HAVE_ERROR = @HAVE_ERROR@
+HAVE_ERROR_AT_LINE = @HAVE_ERROR_AT_LINE@
+HAVE_ERROR_H = @HAVE_ERROR_H@
 HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
 HAVE_EXECVPE = @HAVE_EXECVPE@
 HAVE_EXPLICIT_BZERO = @HAVE_EXPLICIT_BZERO@
@@ -875,11 +893,14 @@ HAVE_GETLOGIN = @HAVE_GETLOGIN@
 HAVE_GETOPT_H = @HAVE_GETOPT_H@
 HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
 HAVE_GETPASS = @HAVE_GETPASS@
+HAVE_GETPROGNAME = @HAVE_GETPROGNAME@
 HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
 HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@
 HAVE_GETUMASK = @HAVE_GETUMASK@
 HAVE_GRANTPT = @HAVE_GRANTPT@
 HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
+HAVE_IMAXABS = @HAVE_IMAXABS@
+HAVE_IMAXDIV = @HAVE_IMAXDIV@
 HAVE_IMAXDIV_T = @HAVE_IMAXDIV_T@
 HAVE_INITSTATE = @HAVE_INITSTATE@
 HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
@@ -907,6 +928,7 @@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@
 HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@
 HAVE_MBTOWC = @HAVE_MBTOWC@
 HAVE_MEMPCPY = @HAVE_MEMPCPY@
+HAVE_MEMSET_EXPLICIT = @HAVE_MEMSET_EXPLICIT@
 HAVE_MKDIRAT = @HAVE_MKDIRAT@
 HAVE_MKDTEMP = @HAVE_MKDTEMP@
 HAVE_MKFIFO = @HAVE_MKFIFO@
@@ -1069,6 +1091,7 @@ HAVE_TIMESPEC_GETRES = @HAVE_TIMESPEC_GETRES@
 HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@
 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@
 HAVE_UNISTD_H = @HAVE_UNISTD_H@
+HAVE_UNISTRING_WOE32DLL_H = @HAVE_UNISTRING_WOE32DLL_H@
 HAVE_UNLINKAT = @HAVE_UNLINKAT@
 HAVE_UNLOCKPT = @HAVE_UNLOCKPT@
 HAVE_USLEEP = @HAVE_USLEEP@
@@ -1118,7 +1141,6 @@ HAVE_WMEMPCPY = @HAVE_WMEMPCPY@
 HAVE_WMEMSET = @HAVE_WMEMSET@
 HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@
 HAVE_XLOCALE_H = @HAVE_XLOCALE_H@
-HAVE__BOOL = @HAVE__BOOL@
 HAVE__EXIT = @HAVE__EXIT@
 HOST_CPU = @HOST_CPU@
 HOST_CPU_C_ABI = @HOST_CPU_C_ABI@
@@ -1182,16 +1204,21 @@ LTLIBOBJS = @LTLIBOBJS@
 LTLIBSIGSEGV = @LTLIBSIGSEGV@
 LTLIBTHREAD = @LTLIBTHREAD@
 MAKEINFO = @MAKEINFO@
+MBRTOWC_LIB = @MBRTOWC_LIB@
 MKDIR_P = @MKDIR_P@
 MSGFMT = @MSGFMT@
 MSGFMT_015 = @MSGFMT_015@
 MSGMERGE = @MSGMERGE@
+NANOSLEEP_LIB = @NANOSLEEP_LIB@
 NETINET_IN_H = @NETINET_IN_H@
 NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@
+NEXT_ASSERT_H = @NEXT_ASSERT_H@
 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@
+NEXT_AS_FIRST_DIRECTIVE_ASSERT_H = @NEXT_AS_FIRST_DIRECTIVE_ASSERT_H@
 NEXT_AS_FIRST_DIRECTIVE_CTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_CTYPE_H@
 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@
 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
+NEXT_AS_FIRST_DIRECTIVE_ERROR_H = @NEXT_AS_FIRST_DIRECTIVE_ERROR_H@
 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@
 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@
 NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H = @NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H@
@@ -1225,6 +1252,7 @@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@
 NEXT_CTYPE_H = @NEXT_CTYPE_H@
 NEXT_DIRENT_H = @NEXT_DIRENT_H@
 NEXT_ERRNO_H = @NEXT_ERRNO_H@
+NEXT_ERROR_H = @NEXT_ERROR_H@
 NEXT_FCNTL_H = @NEXT_FCNTL_H@
 NEXT_FLOAT_H = @NEXT_FLOAT_H@
 NEXT_FNMATCH_H = @NEXT_FNMATCH_H@
@@ -1275,6 +1303,7 @@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
 PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
 PRIPTR_PREFIX = @PRIPTR_PREFIX@
 PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
+PTHREAD_SIGMASK_LIB = @PTHREAD_SIGMASK_LIB@
 PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
 RANLIB = @RANLIB@
 REPLACE_ACCESS = @REPLACE_ACCESS@
@@ -1294,7 +1323,10 @@ REPLACE_DIRFD = @REPLACE_DIRFD@
 REPLACE_DPRINTF = @REPLACE_DPRINTF@
 REPLACE_DUP = @REPLACE_DUP@
 REPLACE_DUP2 = @REPLACE_DUP2@
+REPLACE_DUP3 = @REPLACE_DUP3@
 REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
+REPLACE_ERROR = @REPLACE_ERROR@
+REPLACE_ERROR_AT_LINE = @REPLACE_ERROR_AT_LINE@
 REPLACE_EXECL = @REPLACE_EXECL@
 REPLACE_EXECLE = @REPLACE_EXECLE@
 REPLACE_EXECLP = @REPLACE_EXECLP@
@@ -1307,6 +1339,7 @@ REPLACE_FCHMODAT = @REPLACE_FCHMODAT@
 REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
 REPLACE_FCLOSE = @REPLACE_FCLOSE@
 REPLACE_FCNTL = @REPLACE_FCNTL@
+REPLACE_FDATASYNC = @REPLACE_FDATASYNC@
 REPLACE_FDOPEN = @REPLACE_FDOPEN@
 REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@
 REPLACE_FFLUSH = @REPLACE_FFLUSH@
@@ -1331,17 +1364,23 @@ REPLACE_GETCWD = @REPLACE_GETCWD@
 REPLACE_GETDELIM = @REPLACE_GETDELIM@
 REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
 REPLACE_GETDTABLESIZE = @REPLACE_GETDTABLESIZE@
+REPLACE_GETENTROPY = @REPLACE_GETENTROPY@
 REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
 REPLACE_GETLINE = @REPLACE_GETLINE@
+REPLACE_GETLOADAVG = @REPLACE_GETLOADAVG@
 REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
 REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
 REPLACE_GETPASS = @REPLACE_GETPASS@
 REPLACE_GETPASS_FOR_GETPASS_GNU = @REPLACE_GETPASS_FOR_GETPASS_GNU@
+REPLACE_GETPROGNAME = @REPLACE_GETPROGNAME@
+REPLACE_GETSUBOPT = @REPLACE_GETSUBOPT@
 REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
 REPLACE_GMTIME = @REPLACE_GMTIME@
 REPLACE_ICONV = @REPLACE_ICONV@
 REPLACE_ICONV_OPEN = @REPLACE_ICONV_OPEN@
 REPLACE_ICONV_UTF = @REPLACE_ICONV_UTF@
+REPLACE_IMAXABS = @REPLACE_IMAXABS@
+REPLACE_IMAXDIV = @REPLACE_IMAXDIV@
 REPLACE_INET_NTOP = @REPLACE_INET_NTOP@
 REPLACE_INET_PTON = @REPLACE_INET_PTON@
 REPLACE_INITSTATE = @REPLACE_INITSTATE@
@@ -1368,14 +1407,19 @@ REPLACE_MBSINIT = @REPLACE_MBSINIT@
 REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
 REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
 REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
+REPLACE_MBSTOWCS = @REPLACE_MBSTOWCS@
 REPLACE_MBTOWC = @REPLACE_MBTOWC@
+REPLACE_MB_CUR_MAX = @REPLACE_MB_CUR_MAX@
 REPLACE_MEMCHR = @REPLACE_MEMCHR@
 REPLACE_MEMMEM = @REPLACE_MEMMEM@
+REPLACE_MEMPCPY = @REPLACE_MEMPCPY@
 REPLACE_MKDIR = @REPLACE_MKDIR@
 REPLACE_MKFIFO = @REPLACE_MKFIFO@
 REPLACE_MKFIFOAT = @REPLACE_MKFIFOAT@
 REPLACE_MKNOD = @REPLACE_MKNOD@
 REPLACE_MKNODAT = @REPLACE_MKNODAT@
+REPLACE_MKOSTEMP = @REPLACE_MKOSTEMP@
+REPLACE_MKOSTEMPS = @REPLACE_MKOSTEMPS@
 REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
 REPLACE_MKTIME = @REPLACE_MKTIME@
 REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
@@ -1387,8 +1431,10 @@ REPLACE_OPEN = @REPLACE_OPEN@
 REPLACE_OPENAT = @REPLACE_OPENAT@
 REPLACE_OPENDIR = @REPLACE_OPENDIR@
 REPLACE_PERROR = @REPLACE_PERROR@
+REPLACE_PIPE2 = @REPLACE_PIPE2@
 REPLACE_POPEN = @REPLACE_POPEN@
 REPLACE_POSIX_MEMALIGN = @REPLACE_POSIX_MEMALIGN@
+REPLACE_POSIX_OPENPT = @REPLACE_POSIX_OPENPT@
 REPLACE_PREAD = @REPLACE_PREAD@
 REPLACE_PRINTF = @REPLACE_PRINTF@
 REPLACE_PSELECT = @REPLACE_PSELECT@
@@ -1453,6 +1499,7 @@ REPLACE_RAISE = @REPLACE_RAISE@
 REPLACE_RANDOM = @REPLACE_RANDOM@
 REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
 REPLACE_READ = @REPLACE_READ@
+REPLACE_READDIR = @REPLACE_READDIR@
 REPLACE_READLINK = @REPLACE_READLINK@
 REPLACE_READLINKAT = @REPLACE_READLINKAT@
 REPLACE_REALLOCARRAY = @REPLACE_REALLOCARRAY@
@@ -1462,10 +1509,12 @@ REPLACE_REALPATH = @REPLACE_REALPATH@
 REPLACE_REMOVE = @REPLACE_REMOVE@
 REPLACE_RENAME = @REPLACE_RENAME@
 REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
+REPLACE_REWINDDIR = @REPLACE_REWINDDIR@
 REPLACE_RMDIR = @REPLACE_RMDIR@
 REPLACE_SCHED_YIELD = @REPLACE_SCHED_YIELD@
 REPLACE_SELECT = @REPLACE_SELECT@
 REPLACE_SETENV = @REPLACE_SETENV@
+REPLACE_SETHOSTNAME = @REPLACE_SETHOSTNAME@
 REPLACE_SETLOCALE = @REPLACE_SETLOCALE@
 REPLACE_SETSTATE = @REPLACE_SETSTATE@
 REPLACE_SLEEP = @REPLACE_SLEEP@
@@ -1474,6 +1523,7 @@ REPLACE_SPRINTF = @REPLACE_SPRINTF@
 REPLACE_STAT = @REPLACE_STAT@
 REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@
 REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
+REPLACE_STPCPY = @REPLACE_STPCPY@
 REPLACE_STPNCPY = @REPLACE_STPNCPY@
 REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
 REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@
@@ -1500,7 +1550,9 @@ REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@
 REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@
 REPLACE_SYMLINK = @REPLACE_SYMLINK@
 REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@
+REPLACE_TIME = @REPLACE_TIME@
 REPLACE_TIMEGM = @REPLACE_TIMEGM@
+REPLACE_TIMESPEC_GET = @REPLACE_TIMESPEC_GET@
 REPLACE_TMPFILE = @REPLACE_TMPFILE@
 REPLACE_TOWLOWER = @REPLACE_TOWLOWER@
 REPLACE_TRUNCATE = @REPLACE_TRUNCATE@
@@ -1518,24 +1570,33 @@ REPLACE_VPRINTF = @REPLACE_VPRINTF@
 REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
 REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
 REPLACE_WCRTOMB = @REPLACE_WCRTOMB@
+REPLACE_WCSCMP = @REPLACE_WCSCMP@
 REPLACE_WCSFTIME = @REPLACE_WCSFTIME@
+REPLACE_WCSNCMP = @REPLACE_WCSNCMP@
 REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@
 REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@
+REPLACE_WCSSTR = @REPLACE_WCSSTR@
 REPLACE_WCSTOK = @REPLACE_WCSTOK@
 REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@
 REPLACE_WCTOB = @REPLACE_WCTOB@
 REPLACE_WCTOMB = @REPLACE_WCTOMB@
 REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
+REPLACE_WMEMCMP = @REPLACE_WMEMCMP@
+REPLACE_WMEMPCPY = @REPLACE_WMEMPCPY@
 REPLACE_WRITE = @REPLACE_WRITE@
+REPLACE__EXIT = @REPLACE__EXIT@
+SCHED_YIELD_LIB = @SCHED_YIELD_LIB@
 SED = @SED@
+SELECT_LIB = @SELECT_LIB@
+SETLOCALE_LIB = @SETLOCALE_LIB@
+SETLOCALE_NULL_LIB = @SETLOCALE_NULL_LIB@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 SIGSEGV_H = @SIGSEGV_H@
 SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
 SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
-STDALIGN_H = @STDALIGN_H@
 STDARG_H = @STDARG_H@
-STDBOOL_H = @STDBOOL_H@
+STDCKDINT_H = @STDCKDINT_H@
 STDDEF_H = @STDDEF_H@
 STDINT_H = @STDINT_H@
 STRIP = @STRIP@
@@ -1578,6 +1639,8 @@ am__tar = @am__tar@
 am__untar = @am__untar@
 am__xargs_n = @am__xargs_n@
 bindir = @bindir@
+bindir_c = @bindir_c@
+bindir_c_make = @bindir_c_make@
 build = @build@
 build_alias = @build_alias@
 build_cpu = @build_cpu@
@@ -1585,10 +1648,20 @@ build_os = @build_os@
 build_vendor = @build_vendor@
 builddir = @builddir@
 datadir = @datadir@
+datadir_c = @datadir_c@
+datadir_c_make = @datadir_c_make@
 datarootdir = @datarootdir@
+datarootdir_c = @datarootdir_c@
+datarootdir_c_make = @datarootdir_c_make@
 docdir = @docdir@
+docdir_c = @docdir_c@
+docdir_c_make = @docdir_c_make@
 dvidir = @dvidir@
+dvidir_c = @dvidir_c@
+dvidir_c_make = @dvidir_c_make@
 exec_prefix = @exec_prefix@
+exec_prefix_c = @exec_prefix_c@
+exec_prefix_c_make = @exec_prefix_c_make@
 gl_LIBOBJDEPS = @gl_LIBOBJDEPS@
 gl_LIBOBJS = @gl_LIBOBJS@
 gl_LTLIBOBJS = @gl_LTLIBOBJS@
@@ -1602,26 +1675,68 @@ host_cpu = @host_cpu@
 host_os = @host_os@
 host_vendor = @host_vendor@
 htmldir = @htmldir@
+htmldir_c = @htmldir_c@
+htmldir_c_make = @htmldir_c_make@
 includedir = @includedir@
+includedir_c = @includedir_c@
+includedir_c_make = @includedir_c_make@
 infodir = @infodir@
+infodir_c = @infodir_c@
+infodir_c_make = @infodir_c_make@
 install_sh = @install_sh@
 libdir = @libdir@
+libdir_c = @libdir_c@
+libdir_c_make = @libdir_c_make@
 libexecdir = @libexecdir@
+libexecdir_c = @libexecdir_c@
+libexecdir_c_make = @libexecdir_c_make@
 lispdir = @lispdir@
+lispdir_c = @lispdir_c@
+lispdir_c_make = @lispdir_c_make@
 localedir = @localedir@
+localedir_c = @localedir_c@
+localedir_c_make = @localedir_c_make@
 localstatedir = @localstatedir@
+localstatedir_c = @localstatedir_c@
+localstatedir_c_make = @localstatedir_c_make@
 mandir = @mandir@
+mandir_c = @mandir_c@
+mandir_c_make = @mandir_c_make@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+oldincludedir_c = @oldincludedir_c@
+oldincludedir_c_make = @oldincludedir_c_make@
 pdfdir = @pdfdir@
+pdfdir_c = @pdfdir_c@
+pdfdir_c_make = @pdfdir_c_make@
+pkgdatadir_c = @pkgdatadir_c@
+pkgdatadir_c_make = @pkgdatadir_c_make@
+pkgincludedir_c = @pkgincludedir_c@
+pkgincludedir_c_make = @pkgincludedir_c_make@
+pkglibdir_c = @pkglibdir_c@
+pkglibdir_c_make = @pkglibdir_c_make@
+pkglibexecdir_c = @pkglibexecdir_c@
+pkglibexecdir_c_make = @pkglibexecdir_c_make@
 prefix = @prefix@
+prefix_c = @prefix_c@
+prefix_c_make = @prefix_c_make@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+psdir_c = @psdir_c@
+psdir_c_make = @psdir_c_make@
 runstatedir = @runstatedir@
+runstatedir_c = @runstatedir_c@
+runstatedir_c_make = @runstatedir_c_make@
 sbindir = @sbindir@
+sbindir_c = @sbindir_c@
+sbindir_c_make = @sbindir_c_make@
 sharedstatedir = @sharedstatedir@
+sharedstatedir_c = @sharedstatedir_c@
+sharedstatedir_c_make = @sharedstatedir_c_make@
 srcdir = @srcdir@
 sysconfdir = @sysconfdir@
+sysconfdir_c = @sysconfdir_c@
+sysconfdir_c_make = @sysconfdir_c_make@
 target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
@@ -1629,7 +1744,7 @@ top_srcdir = @top_srcdir@
 
 # Process this file with automake to create Makefile.in
 #
-# Copyright 1997-1998, 2005-2022 Free Software Foundation, Inc.
+# Copyright 1997-1998, 2005-2023 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
@@ -1829,7 +1944,7 @@ distdir: $(BUILT_SOURCES)
 
 distdir-am: $(DISTFILES)
 	$(am__remove_distdir)
-	test -d "$(distdir)" || mkdir "$(distdir)"
+	$(AM_V_at)$(MKDIR_P) "$(distdir)"
 	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	list='$(DISTFILES)'; \
diff --git a/NEWS b/NEWS
index 697a3b46..969a3d12 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,67 @@
 GNU grep NEWS                                    -*- outline -*-
 
+* Noteworthy changes in release 3.11 (2023-05-13) [stable]
+
+** Bug fixes
+
+  With -P, patterns like [\d] now work again.  Fixing this has caused
+  grep to revert to the behavior of grep 3.8, in that patterns like \w
+  and \b go back to using ASCII rather than Unicode interpretations.
+  However, future versions of GNU grep and/or PCRE2 are likely to fix
+  this and change the behavior of \w and \b back to Unicode again,
+  without breaking [\d] as 3.10 did.
+  [bug introduced in grep 3.10]
+
+  grep no longer fails on files dated after the year 2038,
+  when running on 32-bit x86 and ARM hosts using glibc 2.34+.
+  [bug introduced in grep 3.9]
+
+  grep -P no longer fails to match patterns using negated classes
+  like \D or \W when linked with PCRE2 10.34 or newer.
+  [bug introduced in grep 3.8]
+
+
+** Changes in behavior
+
+  grep --version now prints a line describing the version of PCRE2 it uses.
+  For example, it prints this when built with the very latest from git:
+    grep -P uses PCRE2 10.43-DEV 2023-04-14
+  or this with what's currently available in Fedora 37:
+    grep -P uses PCRE2 10.40 2022-04-14
+
+  previous versions of grep wouldn't respect the user provided settings for
+  PCRE_CFLAGS and PCRE_LIBS when building if a libpcre2-8 pkg-config module
+  was found.
+
+
+* Noteworthy changes in release 3.10 (2023-03-22) [stable]
+
+** Bug fixes
+
+  With -P, \d now matches only ASCII digits, regardless of PCRE
+  options/modes. The changes in grep-3.9 to make \b and \w work
+  properly had the undesirable side effect of making \d also match
+  e.g., the Arabic digits: ٠١٢٣٤٥٦٧٨٩.  With grep-3.9, -P '\d+'
+  would match that ten-digit (20-byte) string. Now, to match such
+  a digit, you would use \p{Nd}. Similarly, \D is now mapped to [^0-9].
+  [bug introduced in grep 3.9]
+
+
+* Noteworthy changes in release 3.9 (2023-03-05) [stable]
+
+** Bug fixes
+
+  With -P, some non-ASCII UTF8 characters were not recognized as
+  word-constituent due to our omission of the PCRE2_UCP flag. E.g.,
+  given f(){ echo Perú|LC_ALL=en_US.UTF-8 grep -Po "$1"; } and
+  this command, echo $(f 'r\w'):$(f '.\b'), before it would print ":r".
+  After the fix, it prints the correct results: "rú:ú".
+
+  When given multiple patterns the last of which has a back-reference,
+  grep no longer sometimes mistakenly matches lines in some cases.
+  [Bug#36148#13 introduced in grep 3.4]
+
+
 * Noteworthy changes in release 3.8 (2022-09-02) [stable]
 
 ** Changes in behavior
@@ -1323,7 +1385,7 @@ necessary to track the evolution of the regex package, and since
 I was changing it anyway I decided to do a general cleanup.
 
 ========================================================================
-Copyright (C) 1992, 1997-2002, 2004-2022 Free Software Foundation, Inc.
+Copyright (C) 1992, 1997-2002, 2004-2023 Free Software Foundation, Inc.
 
   Copying and distribution of this file, with or without modification,
   are permitted in any medium without royalty provided the copyright
diff --git a/README b/README
index e91a89d4..08096dda 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-  Copyright (C) 1992, 1997-2002, 2004-2022 Free Software Foundation, Inc.
+  Copyright (C) 1992, 1997-2002, 2004-2023 Free Software Foundation, Inc.
 
   Copying and distribution of this file, with or without modification,
   are permitted in any medium without royalty provided the copyright
diff --git a/README-alpha b/README-alpha
index 57ff6792..33d83490 100644
--- a/README-alpha
+++ b/README-alpha
@@ -1,4 +1,4 @@
-  Copyright (C) 1992, 1997-2002, 2004-2022 Free Software Foundation, Inc.
+  Copyright (C) 1992, 1997-2002, 2004-2023 Free Software Foundation, Inc.
 
   Copying and distribution of this file, with or without modification,
   are permitted in any medium without royalty provided the copyright
diff --git a/THANKS b/THANKS
index 27b5ef5a..0abae832 100644
--- a/THANKS
+++ b/THANKS
@@ -39,6 +39,7 @@ Dmitry V. Levin                     ldv@altlinux.org
 'Drake' Daham Wang                  drakewang@gmail.com
 Egmont Koblinger                    egmont@gmail.com
 Eli Zaretskii                       eliz@gnu.org
+Emanuele Torre                      torreemanuele6@gmail.com
 Eric Blake                          eblake@redhat.com
 Fernando Basso                      fernandobasso.br@gmail.com
 Florian La Roche                    laroche@redhat.com
@@ -47,6 +48,7 @@ Gerald Stoller                      gerald_stoller@hotmail.com
 Grant McDorman                      grant@isgtec.com
 Greg Boyd                           gboyd.ccsf@gmail.com
 Greg Louis                          glouis@dynamicro.on.ca
+Gro-Tsen                            https://twitter.com/gro_tsen
 Guglielmo 'bond' Bondioni           g.bondioni@libero.it
 H. Merijn Brand                     h.m.brand@hccnet.nl
 Hans-Bernhard Broeker               broeker@physik.rwth-aachen.de
@@ -61,6 +63,7 @@ Javier Villavicencio                the_paya@gentoo.org
 Jeff Bailey                         jbailey@nisa.net
 Jim Hand                            jhand@austx.tandem.com
 Jim Meyering                        jim@meyering.net
+Jim Meyering                        meyering@meta.com
 Jochen Hein                         jochen.hein@delphi.central.de
 Joel N. Weber II                    devnull@gnu.org
 Johan Walles                        johan.walles@gmail.com
@@ -70,10 +73,12 @@ Juan Manuel Guerrero                juan.guerrero@gmx.de
 Julian Foad                         julianfoad@btopenworld.com
 Karl Berry                          karl@gnu.org
 Karl Heuer                          kwzh@gnu.org
+Karl Pettersson                     karl.pettersson@klpn.se
 Kaveh R. Ghazi                      ghazi@caip.rutgers.edu
 Kazuro Furukawa                     furukawa@apricot.kek.jp
 Keith Bostic                        bostic@bsdi.com
 Kevin Locke                         kevin@kevinlocke.name
+Koen Claessen                       koen@chalmers.se
 Krishna Sethuraman                  krishna@sgihub.corp.sgi.com
 Kurt D Schwehr                      kdschweh@insci14.ucsd.edu
 Ludovic Courtès                     ludo@gnu.org
@@ -115,6 +120,7 @@ Roland Roberts                      rroberts@muller.com
 Ruslan Ermilov                      ru@freebsd.org
 Santiago Ruano Rincón               santiago@debian.org
 Santiago Vila                       sanvila@unex.es
+Sebastian Carlos                    sebaaa1754@gmail.com
 Shannon Hill                        hill@synnet.com
 Sotiris Vassilopoulos               Sotiris.Vassilopoulos@betatech.gr
 Standish Parsley                    adsspamtrap01@yahoo.com
diff --git a/THANKS.in b/THANKS.in
index 9872bfaa..194dba25 100644
--- a/THANKS.in
+++ b/THANKS.in
@@ -28,6 +28,7 @@ David J MacKenzie                   djm@catapult.va.pubnix.com
 David O'Brien                       obrien@freebsd.org
 'Drake' Daham Wang                  drakewang@gmail.com
 Egmont Koblinger                    egmont@gmail.com
+Emanuele Torre                      torreemanuele6@gmail.com
 Fernando Basso                      fernandobasso.br@gmail.com
 Florian La Roche                    laroche@redhat.com
 François Pinard                     pinard@iro.umontreal.ca
@@ -35,6 +36,7 @@ Gerald Stoller                      gerald_stoller@hotmail.com
 Grant McDorman                      grant@isgtec.com
 Greg Boyd                           gboyd.ccsf@gmail.com
 Greg Louis                          glouis@dynamicro.on.ca
+Gro-Tsen                            https://twitter.com/gro_tsen
 Guglielmo 'bond' Bondioni           g.bondioni@libero.it
 H. Merijn Brand                     h.m.brand@hccnet.nl
 Harald Hanche-Olsen                 hanche@math.ntnu.no
@@ -50,9 +52,11 @@ Joel N. Weber II                    devnull@gnu.org
 John Hughes                         john@nitelite.calvacom.fr
 Jorge Stolfi                        stolfi@dcc.unicamp.br
 Karl Heuer                          kwzh@gnu.org
+Karl Pettersson                     karl.pettersson@klpn.se
 Kaveh R. Ghazi                      ghazi@caip.rutgers.edu
 Kazuro Furukawa                     furukawa@apricot.kek.jp
 Keith Bostic                        bostic@bsdi.com
+Koen Claessen                       koen@chalmers.se
 Krishna Sethuraman                  krishna@sgihub.corp.sgi.com
 Kurt D Schwehr                      kdschweh@insci14.ucsd.edu
 Ludovic Courtès                     ludo@gnu.org
@@ -77,6 +81,7 @@ Rainer Orth                         ro@cebitec.uni-bielefeld.de
 Roland Roberts                      rroberts@muller.com
 Ruslan Ermilov                      ru@freebsd.org
 Santiago Vila                       sanvila@unex.es
+Sebastian Carlos                    sebaaa1754@gmail.com
 Shannon Hill                        hill@synnet.com
 Sotiris Vassilopoulos               Sotiris.Vassilopoulos@betatech.gr
 Standish Parsley                    adsspamtrap01@yahoo.com
diff --git a/TODO b/TODO
index c866c2db..2da6aa9e 100644
--- a/TODO
+++ b/TODO
@@ -1,6 +1,6 @@
 Things to do for GNU grep
 
-  Copyright (C) 1992, 1997-2002, 2004-2022 Free Software Foundation, Inc.
+  Copyright (C) 1992, 1997-2002, 2004-2023 Free Software Foundation, Inc.
 
   Copying and distribution of this file, with or without modification,
   are permitted in any medium without royalty provided the copyright
diff --git a/aclocal.m4 b/aclocal.m4
index fcdf8750..13a90c79 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,6 +1,6 @@
 # generated automatically by aclocal 1.16i -*- Autoconf -*-
 
-# Copyright (C) 1996-2022 Free Software Foundation, Inc.
+# Copyright (C) 1996-2023 Free Software Foundation, Inc.
 
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,13 +14,13 @@
 m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.72a.55-bc66c],,
-[m4_warning([this file was generated for autoconf 2.72a.55-bc66c.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.72c.20-9c018],,
+[m4_warning([this file was generated for autoconf 2.72c.20-9c018.
 You have another version of autoconf.  It may work, but is not guaranteed to.
 If you have problems, you may need to regenerate the build system entirely.
 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
 
-# Copyright (C) 2002-2022 Free Software Foundation, Inc.
+# Copyright (C) 2002-2023 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -58,7 +58,7 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
-# Copyright (C) 2001-2022 Free Software Foundation, Inc.
+# Copyright (C) 2001-2023 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -110,7 +110,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd`
 
 # AM_COND_IF                                            -*- Autoconf -*-
 
-# Copyright (C) 2008-2022 Free Software Foundation, Inc.
+# Copyright (C) 2008-2023 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -147,7 +147,7 @@ fi[]dnl
 
 # AM_CONDITIONAL                                            -*- Autoconf -*-
 
-# Copyright (C) 1997-2022 Free Software Foundation, Inc.
+# Copyright (C) 1997-2023 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -178,7 +178,7 @@ AC_CONFIG_COMMANDS_PRE(
 Usually this means the macro was only invoked conditionally.]])
 fi])])
 
-# Copyright (C) 1999-2022 Free Software Foundation, Inc.
+# Copyright (C) 1999-2023 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -369,7 +369,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
 
 # Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-# Copyright (C) 1999-2022 Free Software Foundation, Inc.
+# Copyright (C) 1999-2023 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -437,7 +437,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 
 # Do all the work for Automake.                             -*- Autoconf -*-
 
-# Copyright (C) 1996-2022 Free Software Foundation, Inc.
+# Copyright (C) 1996-2023 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -614,7 +614,7 @@ for _am_header in $config_headers :; do
 done
 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
-# Copyright (C) 2001-2022 Free Software Foundation, Inc.
+# Copyright (C) 2001-2023 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -635,7 +635,7 @@ if test x"${install_sh+set}" != xset; then
 fi
 AC_SUBST([install_sh])])
 
-# Copyright (C) 2003-2022 Free Software Foundation, Inc.
+# Copyright (C) 2003-2023 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -656,7 +656,7 @@ AC_SUBST([am__leading_dot])])
 
 # Check to see how 'make' treats includes.	            -*- Autoconf -*-
 
-# Copyright (C) 2001-2022 Free Software Foundation, Inc.
+# Copyright (C) 2001-2023 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -699,7 +699,7 @@ AC_SUBST([am__quote])])
 
 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
-# Copyright (C) 1997-2022 Free Software Foundation, Inc.
+# Copyright (C) 1997-2023 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -733,7 +733,7 @@ fi
 
 # Helper functions for option handling.                     -*- Autoconf -*-
 
-# Copyright (C) 2001-2022 Free Software Foundation, Inc.
+# Copyright (C) 2001-2023 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -762,7 +762,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
 AC_DEFUN([_AM_IF_OPTION],
 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
-# Copyright (C) 1999-2022 Free Software Foundation, Inc.
+# Copyright (C) 1999-2023 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -809,7 +809,7 @@ AC_LANG_POP([C])])
 # For backward compatibility.
 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
 
-# Copyright (C) 2022 Free Software Foundation, Inc.
+# Copyright (C) 2022-2023 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -825,7 +825,7 @@ AS_IF([(rm -f && rm -fr && rm -rf) 2>/dev/null], [], [am__rm_f_notfound='""'])
 AC_SUBST(am__rm_f_notfound)
 ])
 
-# Copyright (C) 2001-2022 Free Software Foundation, Inc.
+# Copyright (C) 2001-2023 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -844,7 +844,7 @@ AC_DEFUN([AM_RUN_LOG],
 
 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
-# Copyright (C) 1996-2022 Free Software Foundation, Inc.
+# Copyright (C) 1996-2023 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -968,7 +968,7 @@ AC_CONFIG_COMMANDS_PRE(
 rm -f conftest.file
 ])
 
-# Copyright (C) 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2009-2023 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1039,7 +1039,7 @@ AC_DEFUN([AM_SILENT_RULES],
 [AC_REQUIRE([_AM_SILENT_RULES])
 AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1])])
 
-# Copyright (C) 2001-2022 Free Software Foundation, Inc.
+# Copyright (C) 2001-2023 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1067,7 +1067,7 @@ fi
 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
-# Copyright (C) 2006-2022 Free Software Foundation, Inc.
+# Copyright (C) 2006-2023 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1086,7 +1086,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 
 # Check how to create a tarball.                            -*- Autoconf -*-
 
-# Copyright (C) 2004-2022 Free Software Foundation, Inc.
+# Copyright (C) 2004-2023 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1221,7 +1221,7 @@ AC_SUBST([am__tar])
 AC_SUBST([am__untar])
 ]) # _AM_PROG_TAR
 
-# Copyright (C) 2022 Free Software Foundation, Inc.
+# Copyright (C) 2022-2023 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1248,8 +1248,11 @@ m4_include([m4/alloca.m4])
 m4_include([m4/arpa_inet_h.m4])
 m4_include([m4/asm-underscore.m4])
 m4_include([m4/assert.m4])
+m4_include([m4/assert_h.m4])
 m4_include([m4/btowc.m4])
+m4_include([m4/build-to-host.m4])
 m4_include([m4/builtin-expect.m4])
+m4_include([m4/c-bool.m4])
 m4_include([m4/c-stack.m4])
 m4_include([m4/calloc.m4])
 m4_include([m4/chdir-long.m4])
@@ -1270,16 +1273,19 @@ m4_include([m4/eealloc.m4])
 m4_include([m4/environ.m4])
 m4_include([m4/errno_h.m4])
 m4_include([m4/error.m4])
+m4_include([m4/error_h.m4])
 m4_include([m4/exponentd.m4])
 m4_include([m4/extensions.m4])
 m4_include([m4/extern-inline.m4])
 m4_include([m4/fchdir.m4])
+m4_include([m4/fclose.m4])
 m4_include([m4/fcntl-o.m4])
 m4_include([m4/fcntl-safer.m4])
 m4_include([m4/fcntl.m4])
 m4_include([m4/fcntl_h.m4])
 m4_include([m4/fdopen.m4])
 m4_include([m4/fdopendir.m4])
+m4_include([m4/fflush.m4])
 m4_include([m4/filenamecat.m4])
 m4_include([m4/flexmember.m4])
 m4_include([m4/float_h.m4])
@@ -1424,7 +1430,6 @@ m4_include([m4/stat-time.m4])
 m4_include([m4/stat.m4])
 m4_include([m4/stdalign.m4])
 m4_include([m4/stdarg.m4])
-m4_include([m4/stdbool.m4])
 m4_include([m4/stddef_h.m4])
 m4_include([m4/stdint.m4])
 m4_include([m4/stdint_h.m4])
@@ -1451,6 +1456,7 @@ m4_include([m4/sys_types_h.m4])
 m4_include([m4/sys_uio_h.m4])
 m4_include([m4/thread.m4])
 m4_include([m4/threadlib.m4])
+m4_include([m4/time.m4])
 m4_include([m4/time_h.m4])
 m4_include([m4/unistd-safer.m4])
 m4_include([m4/unistd_h.m4])
@@ -1474,5 +1480,4 @@ m4_include([m4/wmempcpy.m4])
 m4_include([m4/xalloc.m4])
 m4_include([m4/xsize.m4])
 m4_include([m4/xstrtol.m4])
-m4_include([m4/year2038.m4])
 m4_include([m4/zzgnulib.m4])
diff --git a/build-aux/announce-gen b/build-aux/announce-gen
index 3847a568..850619a1 100755
--- a/build-aux/announce-gen
+++ b/build-aux/announce-gen
@@ -3,7 +3,7 @@
 
 # Generate a release announcement message.
 
-# Copyright (C) 2002-2022 Free Software Foundation, Inc.
+# Copyright (C) 2002-2023 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
@@ -35,7 +35,7 @@
 eval 'exec perl -wSx "$0" "$@"'
      if 0;
 
-my $VERSION = '2022-07-10 01:47'; # UTC
+my $VERSION = '2023-02-26 17:15'; # 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
@@ -165,6 +165,17 @@ Print the SHA1 and SHA256 signature section for each C<@file>.
 
 =cut
 
+# This digest function omits the "=" padding that is required by cksum,
+# so add the 0..2 bytes of padding required for each of Digest's algorithms.
+sub digest_file_base64_wrap ($$)
+{
+  my ($file, $alg) = @_;
+  my $h = digest_file_base64($file, $alg);
+  $alg =~ tr{-}{}d;
+  my %pad = (MD5 => 2, SHA1 => 1, SHA256 => 1, SHA384 => 0, SHA512 => 2);
+  return $h . '=' x $pad{$alg};
+}
+
 sub print_checksums (@)
 {
   my (@file) = @_;
@@ -176,11 +187,11 @@ sub print_checksums (@)
 
   foreach my $f (@file)
     {
-      print digest_file_hex($f, "SHA-1"), "  $f\n";
-      print digest_file_base64($f, "SHA-256"), "  $f\n";
+      print '  ', digest_file_hex ($f, "SHA-1"), "  $f\n";
+      print '  ', digest_file_base64_wrap ($f, "SHA-256"), "  $f\n";
     }
-  print "\nThe SHA256 checksum is base64 encoded, instead of the\n";
-  print "hexadecimal encoding that most checksum tools default to.\n\n";
+  print "\nVerify the base64 SHA256 checksum with cksum -a sha256 --check\n";
+  print "from coreutils-9.2 or OpenBSD's cksum since 2007.\n\n";
 }
 
 =item C<print_news_deltas ($news_file, $prev_version, $curr_version)
@@ -365,6 +376,38 @@ sub get_tool_versions ($$)
   return @tool_version_pair;
 }
 
+# Print a more human-friendly representation of $SEC seconds.
+sub readable_interval0($)
+{
+  my $sec = shift;
+  $sec < 60 and return "$sec seconds";
+
+  my $min = int($sec / 60); $sec %= 60;
+  30 < $sec and $min++;
+  $min < 60 and return "$min minutes";
+
+  my $hr = int($min / 60); $min %= 60;
+  30 < $min and $hr++;
+  $hr < 24 and return "$hr hours";
+
+  my $day = int($hr / 24); $hr %= 24;
+  12 < $hr and $day++;
+  $day < 50 and return "$day days";
+
+  my $wk = int($day / 7); $day %= 7;
+  4 < $day and $wk++;
+  return "$wk weeks";
+}
+
+# Convert e.g., "1 weeks", to "1 week".
+sub readable_interval($)
+{
+  my $interval_str = shift;
+  my $i = readable_interval0 $interval_str;
+  $i =~ m{^1 \w+s$} and chop $i;
+  return $i;
+}
+
 {
   # Use the C locale so that, for instance, "du" does not
   # print "1,2" instead of "1.2", which would confuse our regexps.
@@ -493,9 +536,47 @@ sub get_tool_versions ($$)
 ${headers}Subject: $my_distdir released [$release_type]
 
 <\#secure method=pgpmime mode=sign>
+This is to announce $package_name-$curr_version, a $release_type release.
 
 FIXME: put comments here
 
+EOF
+
+  my $v0 = $prev_version;
+  my $v1 = $curr_version;
+
+  (my $first_name = `git config --global user.name|cut -d' ' -f1`)
+    =~ m{\S} or die "no name? set user.name in ~/.gitconfig\n";
+
+  chomp (my $n_ci = `git rev-list "v$v0..v$v1" | wc -l`);
+  chomp (my $n_p = `git shortlog "v$v0..v$v1" | grep -c '^[^ ]'`);
+
+  my $prev_release_date = `git log --pretty=%ct -1 "v$v0"`;
+  my $this_release_date = `git log --pretty=%ct -1 "v$v1"`;
+  my $n_seconds = $this_release_date - $prev_release_date;
+  my $time_since_prev = readable_interval $n_seconds;
+  my $names = `git shortlog "v$v0..v$v1"|perl -lne '/^(\\w.*):/ and print "  ".\$1'`;
+
+  print <<EOF;
+There have been $n_ci commits by $n_p people in the $time_since_prev since $v0.
+
+See the NEWS below for a brief summary.
+
+Thanks to everyone who has contributed!
+The following people contributed changes to this release:
+
+$names
+$first_name [on behalf of the $package_name maintainers]
+==================================================================
+
+Here is the GNU $package_name home page:
+    http://gnu.org/s/$package_name/
+
+For a summary of changes and contributors, see:
+  http://git.sv.gnu.org/gitweb/?p=$package_name.git;a=shortlog;h=v$v1
+or run this command from a git-cloned $package_name directory:
+  git shortlog v$v0..v$v1
+
 EOF
 
   if (@url_dir_list == 1 && @tarballs == 1)
@@ -587,7 +668,6 @@ keyring:
 
   wget -q https://ftp.gnu.org/gnu/gnu-keyring.gpg
   gpg --keyring gnu-keyring.gpg --verify $tarballs[0].sig
-
 EOF
 
   my @tool_versions = get_tool_versions (\@tool_list, $gnulib_version);
diff --git a/build-aux/compile b/build-aux/compile
index dfc94659..ba883b54 100755
--- a/build-aux/compile
+++ b/build-aux/compile
@@ -3,7 +3,7 @@
 
 scriptversion=2018-03-07.03; # UTC
 
-# Copyright (C) 1999-2022 Free Software Foundation, Inc.
+# Copyright (C) 1999-2023 Free Software Foundation, Inc.
 # Written by Tom Tromey <tromey@cygnus.com>.
 #
 # This program is free software; you can redistribute it and/or modify
diff --git a/build-aux/config.guess b/build-aux/config.guess
index 1817bdce..69188da7 100755
--- a/build-aux/config.guess
+++ b/build-aux/config.guess
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright 1992-2022 Free Software Foundation, Inc.
+#   Copyright 1992-2023 Free Software Foundation, Inc.
 
 # shellcheck disable=SC2006,SC2268 # see below for rationale
 
-timestamp='2022-05-25'
+timestamp='2023-01-01'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -60,7 +60,7 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright 1992-2022 Free Software Foundation, Inc.
+Copyright 1992-2023 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -966,6 +966,12 @@ EOF
 	GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
 	GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC
 	;;
+    x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*)
+	GUESS="$UNAME_MACHINE-pc-managarm-mlibc"
+	;;
+    *:[Mm]anagarm:*:*)
+	GUESS="$UNAME_MACHINE-unknown-managarm-mlibc"
+	;;
     *:Minix:*:*)
 	GUESS=$UNAME_MACHINE-unknown-minix
 	;;
@@ -1036,7 +1042,7 @@ EOF
     k1om:Linux:*:*)
 	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
 	;;
-    loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*)
+    loongarch32:Linux:*:* | loongarch64:Linux:*:*)
 	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
 	;;
     m32r*:Linux:*:*)
diff --git a/build-aux/config.rpath b/build-aux/config.rpath
index 1e1ab679..1e2595ff 100755
--- a/build-aux/config.rpath
+++ b/build-aux/config.rpath
@@ -2,7 +2,7 @@
 # Output a system dependent set of variables, describing how to set the
 # run time search path of shared libraries in an executable.
 #
-#   Copyright 1996-2022 Free Software Foundation, Inc.
+#   Copyright 1996-2023 Free Software Foundation, Inc.
 #   Taken from GNU libtool, 2001
 #   Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
 #
diff --git a/build-aux/config.sub b/build-aux/config.sub
index dba16e84..de4259e4 100755
--- a/build-aux/config.sub
+++ b/build-aux/config.sub
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Configuration validation subroutine script.
-#   Copyright 1992-2022 Free Software Foundation, Inc.
+#   Copyright 1992-2023 Free Software Foundation, Inc.
 
 # shellcheck disable=SC2006,SC2268 # see below for rationale
 
-timestamp='2022-01-03'
+timestamp='2023-01-21'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -76,7 +76,7 @@ Report bugs and patches to <config-patches@gnu.org>."
 version="\
 GNU config.sub ($timestamp)
 
-Copyright 1992-2022 Free Software Foundation, Inc.
+Copyright 1992-2023 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -145,7 +145,7 @@ case $1 in
 			nto-qnx* | linux-* | uclinux-uclibc* \
 			| uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
 			| netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
-			| storm-chaos* | os2-emx* | rtmk-nova*)
+			| storm-chaos* | os2-emx* | rtmk-nova* | managarm-*)
 				basic_machine=$field1
 				basic_os=$maybe_os
 				;;
@@ -1075,7 +1075,7 @@ case $cpu-$vendor in
 	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
 		cpu=i586
 		;;
-	pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*)
+	pentiumpro-* | p6-* | 6x86-* | athlon-* | athlon_*-*)
 		cpu=i686
 		;;
 	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
@@ -1207,7 +1207,7 @@ case $cpu-$vendor in
 			| k1om \
 			| le32 | le64 \
 			| lm32 \
-			| loongarch32 | loongarch64 | loongarchx32 \
+			| loongarch32 | loongarch64 \
 			| m32c | m32r | m32rle \
 			| m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
 			| m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
@@ -1341,6 +1341,10 @@ EOF
 		kernel=linux
 		os=`echo "$basic_os" | sed -e 's|linux|gnu|'`
 		;;
+	managarm*)
+		kernel=managarm
+		os=`echo "$basic_os" | sed -e 's|managarm|mlibc|'`
+		;;
 	*)
 		kernel=
 		os=$basic_os
@@ -1754,7 +1758,7 @@ case $os in
 	     | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
 	     | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
 	     | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \
-	     | fiwix* )
+	     | fiwix* | mlibc* )
 		;;
 	# This one is extra strict with allowed versions
 	sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
@@ -1762,6 +1766,9 @@ case $os in
 		;;
 	none)
 		;;
+	kernel* )
+		# Restricted further below
+		;;
 	*)
 		echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2
 		exit 1
@@ -1772,16 +1779,26 @@ esac
 # (given a valid OS), if there is a kernel.
 case $kernel-$os in
 	linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \
-		   | linux-musl* | linux-relibc* | linux-uclibc* )
+		   | linux-musl* | linux-relibc* | linux-uclibc* | linux-mlibc* )
 		;;
 	uclinux-uclibc* )
 		;;
-	-dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* )
+	managarm-mlibc* | managarm-kernel* )
+		;;
+	-dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* | -mlibc* )
 		# These are just libc implementations, not actual OSes, and thus
 		# require a kernel.
 		echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2
 		exit 1
 		;;
+	-kernel* )
+		echo "Invalid configuration \`$1': \`$os' needs explicit kernel." 1>&2
+		exit 1
+		;;
+	*-kernel* )
+		echo "Invalid configuration \`$1': \`$kernel' does not support \`$os'." 1>&2
+		exit 1
+		;;
 	kfreebsd*-gnu* | kopensolaris*-gnu*)
 		;;
 	vxworks-simlinux | vxworks-simwindows | vxworks-spe)
diff --git a/build-aux/depcomp b/build-aux/depcomp
index 75323b73..ce5c2f7b 100755
--- a/build-aux/depcomp
+++ b/build-aux/depcomp
@@ -1,9 +1,9 @@
 #! /bin/sh
 # depcomp - compile a program generating dependencies as side-effects
 
-scriptversion=2018-03-07.03; # UTC
+scriptversion=2022-09-18.14; # UTC
 
-# Copyright (C) 1999-2022 Free Software Foundation, Inc.
+# Copyright (C) 1999-2023 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
@@ -197,7 +197,7 @@ gcc3)
   ;;
 
 gcc)
-## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
+## Note that this doesn't just cater to obsolete pre-3.x GCC compilers.
 ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
 ## (see the conditional assignment to $gccflag above).
 ## There are various ways to get dependency output from gcc.  Here's
diff --git a/build-aux/do-release-commit-and-tag b/build-aux/do-release-commit-and-tag
index 493821a3..3402bae4 100755
--- a/build-aux/do-release-commit-and-tag
+++ b/build-aux/do-release-commit-and-tag
@@ -7,7 +7,7 @@ VERSION=2018-03-07.03 # UTC
 
 # Note: this is a bash script (could be zsh or dash)
 
-# Copyright (C) 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2009-2023 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
@@ -125,7 +125,7 @@ prev_ver=$(cat .prev-version) \
   || die 'failed to determine previous version number from .prev-version'
 
 # Verify that $ver is sensible (> .prev-version).
-case $(printf "$prev_ver\n$ver\n"|sort -V -u|tr '\n' ':') in
+case $(printf "%s\n%s\n" "$prev_ver" "$ver"|sort -V -u|tr '\n' ':') in
   "$prev_ver:$ver:") ;;
   *) die "invalid version: $ver (<= $prev_ver)";;
 esac
@@ -165,7 +165,7 @@ perl -MPOSIX -ni -e 'my $today = strftime "%F", localtime time;' \
  -e 'print $.==3 ? "$pfx $ver ($today) [$type]\n" : $_' \
      NEWS || die 'failed to update NEWS'
 
-printf "version $ver\n\n* NEWS: Record release date.\n" \
+printf "version %s\n\n* NEWS: Record release date.\n" "$ver" \
     | git commit -F -  -a || die 'git commit failed'
 git tag -s -m "$pkg $ver" v$ver HEAD || die 'git tag failed'
 
diff --git a/build-aux/gendocs.sh b/build-aux/gendocs.sh
index 8dbac302..1ad5cf4f 100755
--- a/build-aux/gendocs.sh
+++ b/build-aux/gendocs.sh
@@ -2,9 +2,9 @@
 # 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=2022-01-01.00
+scriptversion=2023-01-21.00
 
-# Copyright 2003-2022 Free Software Foundation, Inc.
+# Copyright 2003-2023 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
@@ -40,22 +40,22 @@ srcdir=`pwd`
 scripturl="https://git.savannah.gnu.org/cgit/gnulib.git/plain/build-aux/gendocs.sh"
 templateurl="https://git.savannah.gnu.org/cgit/gnulib.git/plain/doc/gendocs_template"
 
-: ${SETLANG="env LANG= LC_MESSAGES= LC_ALL= LANGUAGE="}
-: ${MAKEINFO="makeinfo"}
-: ${TEXI2DVI="texi2dvi"}
-: ${DOCBOOK2HTML="docbook2html"}
-: ${DOCBOOK2PDF="docbook2pdf"}
-: ${DOCBOOK2TXT="docbook2txt"}
-: ${GENDOCS_TEMPLATE_DIR="."}
-: ${PERL='perl'}
-: ${TEXI2HTML="texi2html"}
+: "${SETLANG="env LANG= LC_TIME= LC_MESSAGES= LC_ALL= LANGUAGE="}"
+: "${MAKEINFO="makeinfo"}"
+: "${TEXI2DVI="texi2dvi"}"
+: "${DOCBOOK2HTML="docbook2html"}"
+: "${DOCBOOK2PDF="docbook2pdf"}"
+: "${DOCBOOK2TXT="docbook2txt"}"
+: "${GENDOCS_TEMPLATE_DIR="."}"
+: "${PERL="perl"}"
+: "${TEXI2HTML="texi2html"}"
 unset CDPATH
 unset use_texi2html
 
 MANUAL_TITLE=
 PACKAGE=
 EMAIL=webmasters@gnu.org  # please override with --email
-commonarg= # passed to all makeinfo/texi2html invcations.
+commonarg= # passed to all makeinfo/texi2html invocations.
 dirargs=   # passed to all tools (-I dir).
 dirs=      # -I directories.
 htmlarg="--css-ref=https://www.gnu.org/software/gnulib/manual.css -c TOP_NODE_UP_URL=/manual"
@@ -73,7 +73,7 @@ texarg="-t @finalout"
 
 version="gendocs.sh $scriptversion
 
-Copyright 2022 Free Software Foundation, Inc.
+Copyright 2023 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."
@@ -304,7 +304,7 @@ fi  # end info
 # 
 if $generate_tex; then
   cmd="$SETLANG $TEXI2DVI $dirargs $texarg \"$srcfile\""
-  printf "\nGenerating dvi... ($cmd)\n"
+  printf "\nGenerating dvi... (%s)\n" "$cmd"
   eval "$cmd"
   # compress/finish dvi:
   gzip -f -9 $PACKAGE.dvi
@@ -313,7 +313,7 @@ if $generate_tex; then
   ls -l "$outdir/$PACKAGE.dvi.gz"
 
   cmd="$SETLANG $TEXI2DVI --pdf $dirargs $texarg \"$srcfile\""
-  printf "\nGenerating pdf... ($cmd)\n"
+  printf "\nGenerating pdf... (%s)\n" "$cmd"
   eval "$cmd"
   pdf_size=`calcsize $PACKAGE.pdf`
   mv $PACKAGE.pdf "$outdir/"
@@ -324,7 +324,7 @@ fi # end tex (dvi + pdf)
 if $generate_ascii; then
   opt="-o $PACKAGE.txt --no-split --no-headers $commonarg"
   cmd="$SETLANG $MAKEINFO $opt \"$srcfile\""
-  printf "\nGenerating ascii... ($cmd)\n"
+  printf "\nGenerating ascii... (%s)\n" "$cmd"
   eval "$cmd"
   ascii_size=`calcsize $PACKAGE.txt`
   gzip -f -9 -c $PACKAGE.txt >"$outdir/$PACKAGE.txt.gz"
@@ -341,7 +341,7 @@ html_split()
 {
   opt="--split=$1 --node-files $commonarg $htmlarg"
   cmd="$SETLANG $TEXI2HTML --output $PACKAGE.html $opt \"$srcfile\""
-  printf "\nGenerating html by $1... ($cmd)\n"
+  printf "\nGenerating html by %s... (%s)\n" "$1" "$cmd"
   eval "$cmd"
   split_html_dir=$PACKAGE.html
   (
@@ -359,7 +359,7 @@ html_split()
 if test -z "$use_texi2html"; then
   opt="--no-split --html -o $PACKAGE.html $commonarg $htmlarg"
   cmd="$SETLANG $MAKEINFO $opt \"$srcfile\""
-  printf "\nGenerating monolithic html... ($cmd)\n"
+  printf "\nGenerating monolithic html... (%s)\n" "$cmd"
   rm -rf $PACKAGE.html  # in case a directory is left over
   eval "$cmd"
   html_mono_size=`calcsize $PACKAGE.html`
@@ -380,7 +380,7 @@ if test -z "$use_texi2html"; then
   #
   opt="--html -o $PACKAGE.html $split_arg $commonarg $htmlarg"
   cmd="$SETLANG $MAKEINFO $opt \"$srcfile\""
-  printf "\nGenerating html by $split... ($cmd)\n"
+  printf "\nGenerating html by %s... (%s)\n" "$split" "$cmd"
   eval "$cmd"
   split_html_dir=$PACKAGE.html
   copy_images $split_html_dir/ $split_html_dir/*.html
@@ -398,7 +398,7 @@ if test -z "$use_texi2html"; then
 else # use texi2html:
   opt="--output $PACKAGE.html $commonarg $htmlarg"
   cmd="$SETLANG $TEXI2HTML $opt \"$srcfile\""
-  printf "\nGenerating monolithic html with texi2html... ($cmd)\n"
+  printf "\nGenerating monolithic html with texi2html... (%s)\n" "$cmd"
   rm -rf $PACKAGE.html  # in case a directory is left over
   eval "$cmd"
   html_mono_size=`calcsize $PACKAGE.html`
@@ -428,7 +428,7 @@ texi_tgz_size=`calcsize "$outdir/$PACKAGE.texi.tar.gz"`
 if test -n "$docbook"; then
   opt="-o - --docbook $commonarg"
   cmd="$SETLANG $MAKEINFO $opt \"$srcfile\" >${srcdir}/$PACKAGE-db.xml"
-  printf "\nGenerating docbook XML... ($cmd)\n"
+  printf "\nGenerating docbook XML... (%s)\n" "$cmd"
   eval "$cmd"
   docbook_xml_size=`calcsize $PACKAGE-db.xml`
   gzip -f -9 -c $PACKAGE-db.xml >"$outdir/$PACKAGE-db.xml.gz"
@@ -438,7 +438,7 @@ if test -n "$docbook"; then
   split_html_db_dir=html_node_db
   opt="$commonarg -o $split_html_db_dir"
   cmd="$DOCBOOK2HTML $opt \"${outdir}/$PACKAGE-db.xml\""
-  printf "\nGenerating docbook HTML... ($cmd)\n"
+  printf "\nGenerating docbook HTML... (%s)\n" "$cmd"
   eval "$cmd"
   (
     cd ${split_html_db_dir} || exit 1
@@ -451,20 +451,20 @@ if test -n "$docbook"; then
   rmdir ${split_html_db_dir}
 
   cmd="$DOCBOOK2TXT \"${outdir}/$PACKAGE-db.xml\""
-  printf "\nGenerating docbook ASCII... ($cmd)\n"
+  printf "\nGenerating docbook ASCII... (%s)\n" "$cmd"
   eval "$cmd"
   docbook_ascii_size=`calcsize $PACKAGE-db.txt`
   mv $PACKAGE-db.txt "$outdir/"
 
   cmd="$DOCBOOK2PDF \"${outdir}/$PACKAGE-db.xml\""
-  printf "\nGenerating docbook PDF... ($cmd)\n"
+  printf "\nGenerating docbook PDF... (%s)\n" "$cmd"
   eval "$cmd"
   docbook_pdf_size=`calcsize $PACKAGE-db.pdf`
   mv $PACKAGE-db.pdf "$outdir/"
 fi
 
 # 
-printf "\nMaking index.html for $PACKAGE...\n"
+printf "\nMaking index.html for %s...\n" "$PACKAGE"
 if test -z "$use_texi2html"; then
   CONDS="/%%IF  *HTML_SECTION%%/,/%%ENDIF  *HTML_SECTION%%/d;\
          /%%IF  *HTML_CHAPTER%%/,/%%ENDIF  *HTML_CHAPTER%%/d"
diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen
index 72a2cc8e..a72057bf 100755
--- a/build-aux/git-version-gen
+++ b/build-aux/git-version-gen
@@ -2,7 +2,7 @@
 # Print a version string.
 scriptversion=2022-07-09.08; # UTC
 
-# Copyright (C) 2007-2022 Free Software Foundation, Inc.
+# Copyright (C) 2007-2023 Free Software Foundation, Inc.
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/build-aux/gitlog-to-changelog b/build-aux/gitlog-to-changelog
index 82d9f973..4678bad1 100755
--- a/build-aux/gitlog-to-changelog
+++ b/build-aux/gitlog-to-changelog
@@ -3,7 +3,7 @@
 
 # Convert git log output to ChangeLog format.
 
-# Copyright (C) 2008-2022 Free Software Foundation, Inc.
+# Copyright (C) 2008-2023 Free Software Foundation, Inc.
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/build-aux/gnu-web-doc-update b/build-aux/gnu-web-doc-update
index c041364f..a804031a 100755
--- a/build-aux/gnu-web-doc-update
+++ b/build-aux/gnu-web-doc-update
@@ -2,9 +2,9 @@
 # Run this after each non-alpha release, to update the web documentation at
 # https://www.gnu.org/software/$pkg/manual/
 
-VERSION=2022-01-27.18; # UTC
+VERSION=2023-03-23.02; # UTC
 
-# Copyright (C) 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2009-2023 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
@@ -153,8 +153,8 @@ cleanup()
   $GIT branch -d $tmp_branch
   exit $__st
 }
-trap cleanup 0
-trap 'exit $?' 1 2 13 15
+trap cleanup EXIT
+trap 'exit $?' HUP INT PIPE TERM
 
 # We must build using sources for which --version reports the
 # just-released version number, not some string like 7.6.18-20761.
@@ -175,10 +175,13 @@ set +e
 
 tmp=$(mktemp -d web-doc-update.XXXXXX) || exit 1
 ( cd $tmp \
-    && $CVS -d $cvs_user@cvs.sv.gnu.org:/webcvs/$pkg co $pkg )
+    && $CVS -d $cvs_user@cvs.savannah.gnu.org:/webcvs/$pkg co $pkg )
 $RSYNC -avP "$builddir"/doc/manual/ $tmp/$pkg/manual
 
 (
+  cd $tmp/$pkg
+  test -d manual/CVS || $dryrun $CVS add -ko manual
+
   cd $tmp/$pkg/manual
 
   # Add all the files.  This is simpler than trying to add only the
diff --git a/build-aux/gnupload b/build-aux/gnupload
index b97e566f..3e8f102e 100755
--- a/build-aux/gnupload
+++ b/build-aux/gnupload
@@ -3,7 +3,7 @@
 
 scriptversion=2022-01-27.18; # UTC
 
-# Copyright (C) 2004-2022 Free Software Foundation, Inc.
+# Copyright (C) 2004-2023 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
@@ -398,7 +398,7 @@ upload ()
       for f in $files $base.directive.asc
       do
         echo put $f
-      done | $dbg sftp -b - puszcza.gnu.org.ua:/incoming/$destdir_topdir
+      done | $dbg sftp -b - download.gnu.org.ua:/incoming/$destdir_topdir
       ;;
     /*)
       dest_host=`echo "$dest" | sed 's,:.*,,'`
diff --git a/build-aux/mdate-sh b/build-aux/mdate-sh
index 8d8bb373..6947addb 100755
--- a/build-aux/mdate-sh
+++ b/build-aux/mdate-sh
@@ -3,7 +3,7 @@
 
 scriptversion=2018-03-07.03; # UTC
 
-# Copyright (C) 1995-2022 Free Software Foundation, Inc.
+# Copyright (C) 1995-2023 Free Software Foundation, Inc.
 # written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, June 1995
 #
 # This program is free software; you can redistribute it and/or modify
diff --git a/build-aux/missing b/build-aux/missing
index 74eaae7c..9181a218 100755
--- a/build-aux/missing
+++ b/build-aux/missing
@@ -3,7 +3,7 @@
 
 scriptversion=2018-03-07.03; # UTC
 
-# Copyright (C) 1996-2022 Free Software Foundation, Inc.
+# Copyright (C) 1996-2023 Free Software Foundation, Inc.
 # Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
 
 # This program is free software; you can redistribute it and/or modify
diff --git a/build-aux/test-driver b/build-aux/test-driver
index 2364e407..720c084f 100755
--- a/build-aux/test-driver
+++ b/build-aux/test-driver
@@ -3,7 +3,7 @@
 
 scriptversion=2018-03-07.03; # UTC
 
-# Copyright (C) 2011-2022 Free Software Foundation, Inc.
+# Copyright (C) 2011-2023 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/build-aux/texinfo.tex b/build-aux/texinfo.tex
index 8872e5e0..a32c8419 100644
--- a/build-aux/texinfo.tex
+++ b/build-aux/texinfo.tex
@@ -3,9 +3,9 @@
 % Load plain if necessary, i.e., if running under initex.
 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
 %
-\def\texinfoversion{2022-04-09.08}
+\def\texinfoversion{2023-03-27.21}
 %
-% Copyright 1985, 1986, 1988, 1990-2022 Free Software Foundation, Inc.
+% Copyright 1985, 1986, 1988, 1990-2023 Free Software Foundation, Inc.
 %
 % This texinfo.tex file is free software: you can redistribute it and/or
 % modify it under the terms of the GNU General Public License as
@@ -58,12 +58,6 @@
 
 \message{Loading texinfo [version \texinfoversion]:}
 
-% If in a .fmt file, print the version number
-% and turn on active characters that we couldn't do earlier because
-% they might have appeared in the input file name.
-\everyjob{\message{[Texinfo version \texinfoversion]}%
-  \catcode`+=\active \catcode`\_=\active}
-
 % LaTeX's \typeout.  This ensures that the messages it is used for
 % are identical in format to the corresponding ones from latex/pdflatex.
 \def\typeout{\immediate\write17}%
@@ -241,9 +235,6 @@
 %
 \def\finalout{\overfullrule=0pt }
 
-\newdimen\outerhsize \newdimen\outervsize % set by the paper size routines
-\newdimen\topandbottommargin \topandbottommargin=.75in
-
 % Output a mark which sets \thischapter, \thissection and \thiscolor.
 % We dump everything together because we only have one kind of mark.
 % This works because we only use \botmark / \topmark, not \firstmark.
@@ -317,16 +308,8 @@
 \newbox\footlinebox
 
 % When outputting the double column layout for indices, an output routine
-% is run several times, which hides the original value of \topmark.  This
-% can lead to a page heading being output and duplicating the chapter heading
-% of the index.  Hence, save the contents of \topmark at the beginning of
-% the output routine.  The saved contents are valid until we actually
-% \shipout a page.
-%
-% (We used to run a short output routine to actually set \topmark and
-% \firstmark to the right values, but if this was called with an empty page
-% containing whatsits for writing index entries, the whatsits would be thrown
-% away and the index auxiliary file would remain empty.)
+% is run several times, hiding the original value of \topmark.  Hence, save
+% \topmark at the beginning.
 %
 \newtoks\savedtopmark
 \newif\iftopmarksaved
@@ -351,15 +334,9 @@
   %
   \checkchapterpage
   %
-  % Retrieve the information for the headings from the marks in the page,
-  % and call Plain TeX's \makeheadline and \makefootline, which use the
-  % values in \headline and \footline.
-  %
-  % Common context changes for both heading and footing.
-  % Do this outside of the \shipout so @code etc. will be expanded in
-  % the headline as they should be, not taken literally (outputting ''code).
+  % Make the heading and footing.  \makeheadline and \makefootline
+  % use the contents of \headline and \footline.
   \def\commonheadfootline{\let\hsize=\txipagewidth \texinfochars}
-  %
   \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi
   \global\setbox\headlinebox = \vbox{\commonheadfootline \makeheadline}%
   \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi
@@ -547,7 +524,7 @@
 
 % ... but they get defined via ``\envdef\foo{...}'':
 \long\def\envdef#1#2{\def#1{\startenvironment#1#2}}
-\def\envparseargdef#1#2{\parseargdef#1{\startenvironment#1#2}}
+\long\def\envparseargdef#1#2{\parseargdef#1{\startenvironment#1#2}}
 
 % Check whether we're in the right environment:
 \def\checkenv#1{%
@@ -608,6 +585,9 @@
 % @/ allows a line break.
 \let\/=\allowbreak
 
+% @- allows explicit insertion of hyphenation points
+\def\-{\discretionary{\normaldash}{}{}}%
+
 % @. is an end-of-sentence period.
 \def\.{.\spacefactor=\endofsentencespacefactor\space}
 
@@ -617,21 +597,6 @@
 % @? is an end-of-sentence query.
 \def\?{?\spacefactor=\endofsentencespacefactor\space}
 
-% @frenchspacing on|off  says whether to put extra space after punctuation.
-%
-\def\onword{on}
-\def\offword{off}
-%
-\parseargdef\frenchspacing{%
-  \def\temp{#1}%
-  \ifx\temp\onword \plainfrenchspacing
-  \else\ifx\temp\offword \plainnonfrenchspacing
-  \else
-    \errhelp = \EMsimple
-    \errmessage{Unknown @frenchspacing option `\temp', must be on|off}%
-  \fi\fi
-}
-
 % @w prevents a word break.  Without the \leavevmode, @w at the
 % beginning of a paragraph, when TeX is still in vertical mode, would
 % produce a whole line of output instead of starting the paragraph.
@@ -725,32 +690,22 @@ where each line of input produces a line of output.}
   \dimen2 = \ht\strutbox
   \advance\dimen2 by \dp\strutbox
   \ifdim\dimen0 > \dimen2
+    % This is similar to the 'needspace' module in LaTeX.
+    % The first penalty allows a break if the end of the page is
+    % not too far away.  Following penalties and skips are discarded.
+    % Otherwise, require at least \dimen0 of vertical space.
     %
-    % Do a \strut just to make the height of this box be normal, so the
-    % normal leading is inserted relative to the preceding line.
-    % And a page break here is fine.
-    \vtop to #1\mil{\strut\vfil}%
-    %
-    % TeX does not even consider page breaks if a penalty added to the
-    % main vertical list is 10000 or more.  But in order to see if the
-    % empty box we just added fits on the page, we must make it consider
-    % page breaks.  On the other hand, we don't want to actually break the
-    % page after the empty box.  So we use a penalty of 9999.
-    %
-    % There is an extremely small chance that TeX will actually break the
-    % page at this \penalty, if there are no other feasible breakpoints in
-    % sight.  (If the user is using lots of big @group commands, which
-    % almost-but-not-quite fill up a page, TeX will have a hard time doing
-    % good page breaking, for example.)  However, I could not construct an
-    % example where a page broke at this \penalty; if it happens in a real
-    % document, then we can reconsider our strategy.
+    % (We used to use a \vtop to reserve space, but this had spacing issues
+    % when followed by a section heading, as it was not a "discardable item".
+    % This also has the benefit of providing glue before the page break if
+    % there isn't enough space.)
+    \vskip0pt plus \dimen0
+    \penalty-100
+    \vskip0pt plus -\dimen0
+    \vskip \dimen0
     \penalty9999
-    %
-    % Back up by the size of the box, whether we did a page break or not.
-    \kern -#1\mil
-    %
-    % Do not allow a page break right after this kern.
-    \nobreak
+    \vskip -\dimen0
+    \penalty0\relax % this hides the above glue from \safewhatsit and \dobreak
   \fi
 }
 
@@ -1147,27 +1102,33 @@ where each line of input produces a line of output.}
 
 % Output page labels information.
 % See PDF reference v.1.7 p.594, section 8.3.1.
+% Page label ranges must be increasing.
 \ifpdf
 \def\pagelabels{%
   \def\title{0 << /P (T-) /S /D >>}%
-  \edef\roman{\the\romancount << /S /r >>}%
-  \edef\arabic{\the\arabiccount << /S /D >>}%
   %
-  % Page label ranges must be increasing.  Remove any duplicates.
-  % (There is a slight chance of this being wrong if e.g. there is
-  % a @contents but no @titlepage, etc.)
-  %
-  \ifnum\romancount=0 \def\roman{}\fi
-  \ifnum\arabiccount=0 \def\title{}%
-  \else
-    \ifnum\romancount=\arabiccount \def\roman{}\fi
-  \fi
-  %
-  \ifnum\romancount<\arabiccount
-    \pdfcatalog{/PageLabels << /Nums [\title \roman \arabic ] >> }\relax
+  % support @contents at very end of document
+  \ifnum\contentsendcount=\pagecount
+    \ifnum\arabiccount<\romancount
+      \pdfcatalog{/PageLabels << /Nums
+                  [\title
+                   \the\arabiccount << /S /D >>
+                   \the\romancount << /S /r >>
+                  ] >> }\relax
+    \fi
+  % no contents in document
+  \else\ifnum\contentsendcount=0
+    \pdfcatalog{/PageLabels << /Nums
+                [\title
+                 \the\arabiccount << /S /D >>
+                ] >> }\relax
   \else
-    \pdfcatalog{/PageLabels << /Nums [\title \arabic \roman ] >> }\relax
-  \fi
+    \pdfcatalog{/PageLabels << /Nums
+                [\title
+                 \the\romancount << /S /r >>
+                 \the\contentsendcount << /S /D >>
+                ] >> }\relax
+  \fi\fi
 }
 \else
   \let\pagelabels\relax
@@ -1176,6 +1137,8 @@ where each line of input produces a line of output.}
 \newcount\pagecount \pagecount=0
 \newcount\romancount \romancount=0
 \newcount\arabiccount \arabiccount=0
+\newcount\contentsendcount \contentsendcount=0
+
 \ifpdf
   \let\ptxadvancepageno\advancepageno
   \def\advancepageno{%
@@ -1239,13 +1202,17 @@ output) for that.)}
   %
   % Set color, and create a mark which defines \thiscolor accordingly,
   % so that \makeheadline knows which color to restore.
+  \def\curcolor{0 0 0}%
   \def\setcolor#1{%
-    \xdef\currentcolordefs{\gdef\noexpand\thiscolor{#1}}%
-    \domark
-    \pdfsetcolor{#1}%
+    \ifx#1\curcolor\else
+      \xdef\currentcolordefs{\gdef\noexpand\thiscolor{#1}}%
+      \domark
+      \pdfsetcolor{#1}%
+      \xdef\curcolor{#1}%
+    \fi
   }
   %
-  \def\maincolor{\rgbBlack}
+  \let\maincolor\rgbBlack
   \pdfsetcolor{\maincolor}
   \edef\thiscolor{\maincolor}
   \def\currentcolordefs{}
@@ -1401,7 +1368,7 @@ output) for that.)}
   %
   % by default, use black for everything.
   \def\urlcolor{\rgbBlack}
-  \def\linkcolor{\rgbBlack}
+  \let\linkcolor\rgbBlack
   \def\endlink{\setcolor{\maincolor}\pdfendlink}
   %
   % Adding outlines to PDF; macros for calculating structure of outlines
@@ -1579,9 +1546,10 @@ output) for that.)}
     \next}
   \def\makelink{\addtokens{\toksB}%
     {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0}
-  \def\pdflink#1{%
+  \def\pdflink#1{\pdflinkpage{#1}{#1}}%
+  \def\pdflinkpage#1#2{%
     \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}}
-    \setcolor{\linkcolor}#1\endlink}
+    \setcolor{\linkcolor}#2\endlink}
   \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st}
 \else
   % non-pdf mode
@@ -1828,10 +1796,11 @@ output) for that.)}
     \next}
   \def\makelink{\addtokens{\toksB}%
     {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0}
-  \def\pdflink#1{%
+  \def\pdflink#1{\pdflinkpage{#1}{#1}}%
+  \def\pdflinkpage#1#2{%
     \special{pdf:bann << /Border [0 0 0]
       /Type /Annot /Subtype /Link /A << /S /GoTo /D (#1) >> >>}%
-    \setcolor{\linkcolor}#1\endlink}
+    \setcolor{\linkcolor}#2\endlink}
   \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st}
 %
   %
@@ -2176,6 +2145,11 @@ end
     \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}%
   }%
 \fi\fi
+%
+% This is what gets called when #5 of \setfont is empty.
+\let\cmap\gobble
+%
+% (end of cmaps)
 
 
 % Set the font macro #1 to the font named \fontprefix#2.
@@ -2191,11 +2165,10 @@ end
 \def\setfont#1#2#3#4#5{%
   \font#1=\fontprefix#2#3 scaled #4
   \csname cmap#5\endcsname#1%
+  \ifx#2\ttshape\hyphenchar#1=-1 \fi
+  \ifx#2\ttbshape\hyphenchar#1=-1 \fi
+  \ifx#2\ttslshape\hyphenchar#1=-1 \fi
 }
-% This is what gets called when #5 of \setfont is empty.
-\let\cmap\gobble
-%
-% (end of cmaps)
 
 % Use cm as the default font prefix.
 % To specify the font prefix, you must define \fontprefix
@@ -2558,7 +2531,7 @@ end
 \def\it{\fam=\itfam \setfontstyle{it}}
 \def\sl{\fam=\slfam \setfontstyle{sl}}
 \def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf}
-\def\tt{\fam=\ttfam \setfontstyle{tt}}\def\ttstylename{tt}
+\def\tt{\fam=\ttfam \setfontstyle{tt}}
 
 % Texinfo sort of supports the sans serif font style, which plain TeX does not.
 % So we set up a \sf.
@@ -2586,34 +2559,30 @@ end
   \scriptfont\sffam=\sevensf
 }
 
-%
 
-% The font-changing commands (all called \...fonts) redefine the meanings
-% of \STYLEfont, instead of just \STYLE.  We do this because \STYLE needs
-% to also set the current \fam for math mode.  Our \STYLE (e.g., \rm)
-% commands hardwire \STYLEfont to set the current font.
-%
-% The fonts used for \ifont are for "math italics"  (\itfont is for italics
-% in regular text).  \syfont is also used in math mode only.
-%
-% Each font-changing command also sets the names \lsize (one size lower)
-% and \lllsize (three sizes lower).  These relative commands are used
-% in, e.g., the LaTeX logo and acronyms.
-%
-% This all needs generalizing, badly.
+
+% \defineassignfonts{SIZE} -
+%   Define sequence \assignfontsSIZE, which switches between font sizes
+% by redefining the meanings of \STYLEfont.  (Just \STYLE additionally sets
+% the current \fam for math mode.)
 %
+\def\defineassignfonts#1{%
+  \expandafter\edef\csname assignfonts#1\endcsname{%
+    \let\noexpand\rmfont\csname #1rm\endcsname
+    \let\noexpand\itfont\csname #1it\endcsname
+    \let\noexpand\slfont\csname #1sl\endcsname
+    \let\noexpand\bffont\csname #1bf\endcsname
+    \let\noexpand\ttfont\csname #1tt\endcsname
+    \let\noexpand\smallcaps\csname #1sc\endcsname
+    \let\noexpand\sffont  \csname #1sf\endcsname
+    \let\noexpand\ifont   \csname #1i\endcsname
+    \let\noexpand\syfont  \csname #1sy\endcsname
+    \let\noexpand\ttslfont\csname #1ttsl\endcsname
+  }
+}
 
 \def\assignfonts#1{%
-  \expandafter\let\expandafter\rmfont\csname #1rm\endcsname
-  \expandafter\let\expandafter\itfont\csname #1it\endcsname
-  \expandafter\let\expandafter\slfont\csname #1sl\endcsname
-  \expandafter\let\expandafter\bffont\csname #1bf\endcsname
-  \expandafter\let\expandafter\ttfont\csname #1tt\endcsname
-  \expandafter\let\expandafter\smallcaps\csname #1sc\endcsname
-  \expandafter\let\expandafter\sffont  \csname #1sf\endcsname
-  \expandafter\let\expandafter\ifont   \csname #1i\endcsname
-  \expandafter\let\expandafter\syfont  \csname #1sy\endcsname
-  \expandafter\let\expandafter\ttslfont\csname #1ttsl\endcsname
+  \csname assignfonts#1\endcsname
 }
 
 \newif\ifrmisbold
@@ -2637,12 +2606,21 @@ end
    \csname\curfontstyle\endcsname
 }%
 
+% Define the font-changing commands (all called \...fonts).
+% Each font-changing command also sets the names \lsize (one size lower)
+% and \lllsize (three sizes lower).  These relative commands are used
+% in, e.g., the LaTeX logo and acronyms.
+%
+% Note: The fonts used for \ifont are for "math italics"  (\itfont is for
+% italics in regular text).  \syfont is also used in math mode only.
+%
 \def\definefontsetatsize#1#2#3#4#5{%
+  \defineassignfonts{#1}%
 \expandafter\def\csname #1fonts\endcsname{%
   \def\curfontsize{#1}%
   \def\lsize{#2}\def\lllsize{#3}%
   \csname rmisbold#5\endcsname
-  \assignfonts{#1}%
+  \csname assignfonts#1\endcsname
   \resetmathfonts
   \setleading{#4}%
 }}
@@ -2687,9 +2665,22 @@ end
 % Check if we are currently using a typewriter font.  Since all the
 % Computer Modern typewriter fonts have zero interword stretch (and
 % shrink), and it is reasonable to expect all typewriter fonts to have
-% this property, we can check that font parameter.
-%
-\def\ifmonospace{\ifdim\fontdimen3\font=0pt }
+% this property, we can check that font parameter. #1 is what to
+% print if we are indeed using \tt; #2 is what to print otherwise.
+\def\ifusingtt#1#2{\ifdim \fontdimen3\font=0pt #1\else #2\fi}
+
+% Same as above, but check for italic font.  Actually this also catches
+% non-italic slanted fonts since it is impossible to distinguish them from
+% italic fonts.  But since this is only used by $ and it uses \sl anyway
+% this is not a problem.
+\def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi}
+
+
+% Check if internal flag is clear, i.e. has not been @set.
+\def\ifflagclear#1#2#3{%
+  \expandafter\ifx\csname SET#1\endcsname\relax
+  #2\else#3\fi
+}
 
 {
 \catcode`\'=\active
@@ -2698,41 +2689,33 @@ end
 \gdef\setcodequotes{\let`\codequoteleft \let'\codequoteright}
 \gdef\setregularquotes{\let`\lq \let'\rq}
 }
+\setregularquotes
 
-% Allow an option to not use regular directed right quote/apostrophe
-% (char 0x27), but instead the undirected quote from cmtt (char 0x0d).
-% The undirected quote is ugly, so don't make it the default, but it
-% works for pasting with more pdf viewers (at least evince), the
-% lilypond developers report.  xpdf does work with the regular 0x27.
+% output for ' in @code
+% in tt font hex 0D (undirected) or 27 (curly right quote)
 %
 \def\codequoteright{%
-  \ifmonospace
-    \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax
-      \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax
-        '%
-      \else \char'15 \fi
-    \else \char'15 \fi
-   \else
-     '%
-   \fi
+  \ifusingtt
+      {\ifflagclear{txicodequoteundirected}%
+          {\ifflagclear{codequoteundirected}%
+              {'}%
+              {\char"0D }}%
+          {\char"0D }}%
+      {'}%
 }
-%
-% and a similar option for the left quote char vs. a grave accent.
-% Modern fonts display ASCII 0x60 as a grave accent, so some people like
-% the code environments to do likewise.
+
+% output for ` in @code
+% in tt font hex 12 (grave accent) or 60 (curly left quote)
+% \relax disables Spanish ligatures ?` and !` of \tt font.
 %
 \def\codequoteleft{%
-  \ifmonospace
-    \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax
-      \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax
-        % [Knuth] pp. 380,381,391
-        % \relax disables Spanish ligatures ?` and !` of \tt font.
-        \relax`%
-      \else \char'22 \fi
-    \else \char'22 \fi
-   \else
-     \relax`%
-   \fi
+  \ifusingtt
+      {\ifflagclear{txicodequotebacktick}%
+          {\ifflagclear{codequotebacktick}%
+              {\relax`}%
+              {\char"12 }}%
+          {\char"12 }}%
+      {\relax`}%
 }
 
 % Commands to set the quote options.
@@ -2750,7 +2733,7 @@ end
     \errmessage{Unknown @codequoteundirected value `\temp', must be on|off}%
   \fi\fi
 }
-%
+
 \parseargdef\codequotebacktick{%
   \def\temp{#1}%
   \ifx\temp\onword
@@ -2765,6 +2748,11 @@ end
   \fi\fi
 }
 
+% Turn them on by default
+\let\SETtxicodequoteundirected = t
+\let\SETtxicodequotebacktick = t
+
+
 % [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font.
 \def\noligaturesquoteleft{\relax\lq}
 
@@ -2779,15 +2767,16 @@ end
 \def\dosmartslant#1#2{%
   \ifusingtt
     {{\ttsl #2}\let\next=\relax}%
-    {\def\next{{#1#2}\futurelet\next\smartitaliccorrection}}%
+    {\def\next{{#1#2}\smartitaliccorrection}}%
   \next
 }
 \def\smartslanted{\dosmartslant\sl}
 \def\smartitalic{\dosmartslant\it}
 
-% Output an italic correction unless \next (presumed to be the following
-% character) is such as not to need one.
-\def\smartitaliccorrection{%
+% Output an italic correction unless the following character is such as
+% not to need one.
+\def\smartitaliccorrection{\futurelet\next\smartitaliccorrectionx}
+\def\smartitaliccorrectionx{%
   \ifx\next,%
   \else\ifx\next-%
   \else\ifx\next.%
@@ -2798,27 +2787,41 @@ end
   \aftersmartic
 }
 
-% Unconditional use \ttsl, and no ic.  @var is set to this for defuns.
-\def\ttslanted#1{{\ttsl #1}}
-
-% @cite is like \smartslanted except unconditionally use \sl.  We never want
-% ttsl for book titles, do we?
-\def\cite#1{{\sl #1}\futurelet\next\smartitaliccorrection}
+% @cite unconditionally uses \sl with \smartitaliccorrection.
+\def\cite#1{{\sl #1}\smartitaliccorrection}
 
+% @var unconditionally uses \sl.  This gives consistency for
+% parameter names whether they are in @def, @table @code or a
+% regular paragraph.
+%  To get ttsl font for @var when used in code context, @set txicodevaristt.
+% The \null is to reset \spacefactor.
 \def\aftersmartic{}
 \def\var#1{%
   \let\saveaftersmartic = \aftersmartic
   \def\aftersmartic{\null\let\aftersmartic=\saveaftersmartic}%
-  \smartslanted{#1}%
+  %
+  \ifflagclear{txicodevaristt}%
+    {\def\varnext{{{\sl #1}}\smartitaliccorrection}}%
+    {\def\varnext{\smartslanted{#1}}}%
+  \varnext
 }
 
+% To be removed after next release
+\def\SETtxicodevaristt{}% @set txicodevaristt
+
 \let\i=\smartitalic
 \let\slanted=\smartslanted
 \let\dfn=\smartslanted
 \let\emph=\smartitalic
 
-% Explicit font changes: @r, @sc, undocumented @ii.
-\def\r#1{{\rm #1}}              % roman font
+% @r for roman font, used for code comment
+\def\r#1{{%
+  \usenormaldash % get --, --- ligatures even if in @code
+  \defcharsdefault  % in case on def line
+  \rm #1}}
+{\catcode`-=\active \gdef\usenormaldash{\let-\normaldash}}
+
+% @sc, undocumented @ii.
 \def\sc#1{{\smallcaps#1}}       % smallcaps font
 \def\ii#1{{\it #1}}             % italic font
 
@@ -2829,12 +2832,8 @@ end
 % @sansserif, explicit sans.
 \def\sansserif#1{{\sf #1}}
 
-% We can't just use \exhyphenpenalty, because that only has effect at
-% the end of a paragraph.  Restore normal hyphenation at the end of the
-% group within which \nohyphenation is presumably called.
-%
-\def\nohyphenation{\hyphenchar\font = -1  \aftergroup\restorehyphenation}
-\def\restorehyphenation{\hyphenchar\font = `- }
+\newif\iffrenchspacing
+\frenchspacingfalse
 
 % Set sfcode to normal for the chars that usually have another value.
 % Can't use plain's \frenchspacing because it uses the `\x notation, and
@@ -2842,21 +2841,45 @@ end
 %
 \catcode`@=11
   \def\plainfrenchspacing{%
-    \sfcode`\.=\@m \sfcode`\?=\@m \sfcode`\!=\@m
-    \sfcode`\:=\@m \sfcode`\;=\@m \sfcode`\,=\@m
-    \def\endofsentencespacefactor{1000}% for @. and friends
+    \iffrenchspacing\else
+      \frenchspacingtrue
+      \sfcode`\.=\@m \sfcode`\?=\@m \sfcode`\!=\@m
+      \sfcode`\:=\@m \sfcode`\;=\@m \sfcode`\,=\@m
+      \def\endofsentencespacefactor{1000}% for @. and friends
+    \fi
   }
   \def\plainnonfrenchspacing{%
-    \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000
-    \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250
-    \def\endofsentencespacefactor{3000}% for @. and friends
+    \iffrenchspacing
+      \frenchspacingfalse
+       \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000
+       \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250
+       \def\endofsentencespacefactor{3000}% for @. and friends
+    \fi
   }
 \catcode`@=\other
 \def\endofsentencespacefactor{3000}% default
 
+% @frenchspacing on|off  says whether to put extra space after punctuation.
+%
+\def\onword{on}
+\def\offword{off}
+%
+\let\frenchspacingsetting\plainnonfrenchspacing % used in output routine
+\parseargdef\frenchspacing{%
+  \def\temp{#1}%
+  \ifx\temp\onword \let\frenchspacingsetting\plainfrenchspacing
+  \else\ifx\temp\offword \let\frenchspacingsetting\plainnonfrenchspacing
+  \else
+    \errhelp = \EMsimple
+    \errmessage{Unknown @frenchspacing option `\temp', must be on|off}%
+  \fi\fi
+  \frenchspacingsetting
+}
+
+
 % @t, explicit typewriter.
 \def\t#1{%
-  {\tt \plainfrenchspacing #1}%
+  {\tt \defcharsdefault \plainfrenchspacing #1}%
   \null
 }
 
@@ -2877,27 +2900,29 @@ end
     % Switch to typewriter.
     \tt
     %
-    % But `\ ' produces the large typewriter interword space.
+    % `\ ' produces the large typewriter interword space.
     \def\ {{\spaceskip = 0pt{} }}%
     %
-    % Turn off hyphenation.
-    \nohyphenation
-    %
     \plainfrenchspacing
     #1%
   }%
   \null % reset spacefactor to 1000
 }
 
-% We *must* turn on hyphenation at `-' and `_' in @code.
-% (But see \codedashfinish below.)
+% This is for LuaTeX: It is not sufficient to disable hyphenation at
+% explicit dashes by setting `\hyphenchar` to -1.
+\def\dashnobreak{%
+  \normaldash
+  \penalty 10000 }
+
+% We must turn on hyphenation at `-' and `_' in @code.
 % Otherwise, it is too hard to avoid overfull hboxes
 % in the Emacs manual, the Library manual, etc.
+% We explicitly allow hyphenation at these characters
+% using \discretionary.
 %
-% Unfortunately, TeX uses one parameter (\hyphenchar) to control
-% both hyphenation at - and hyphenation within words.
-% We must therefore turn them both off (\tclose does that)
-% and arrange explicitly to hyphenate at a dash. -- rms.
+% Hyphenation at - and hyphenation within words was turned off
+% by default for the tt fonts using the \hyphenchar parameter of TeX.
 {
   \catcode`\-=\active \catcode`\_=\active
   \catcode`\'=\active \catcode`\`=\active
@@ -2910,13 +2935,9 @@ end
      \let-\codedash
      \let_\codeunder
     \else
-     \let-\normaldash
+     \let-\dashnobreak
      \let_\realunder
     \fi
-    % Given -foo (with a single dash), we do not want to allow a break
-    % after the hyphen.
-    \global\let\codedashprev=\codedash
-    %
     \codex
   }
   %
@@ -2926,21 +2947,30 @@ end
     %
     % Now, output a discretionary to allow a line break, unless
     % (a) the next character is a -, or
-    % (b) the preceding character is a -.
+    % (b) the preceding character is a -, or
+    % (c) we are at the start of the string.
+    % In both cases (b) and (c), \codedashnobreak should be set to \codedash.
+    %
     % E.g., given --posix, we do not want to allow a break after either -.
     % Given --foo-bar, we do want to allow a break between the - and the b.
     \ifx\next\codedash \else
-      \ifx\codedashprev\codedash
+      \ifx\codedashnobreak\codedash
       \else \discretionary{}{}{}\fi
     \fi
     % we need the space after the = for the case when \next itself is a
     % space token; it would get swallowed otherwise.  As in @code{- a}.
-    \global\let\codedashprev= \next
+    \global\let\codedashnobreak= \next
   }
 }
 \def\normaldash{-}
 %
-\def\codex #1{\tclose{#1}\endgroup}
+\def\codex #1{\tclose{%
+  % Given -foo (with a single dash), we do not want to allow a break
+  % after the -.  \codedashnobreak is set to the first character in
+  % @code.
+  \futurelet\codedashnobreak\relax
+  #1%
+}\endgroup}
 
 \def\codeunder{%
   % this is all so @math{@code{var_name}+1} can work.  In math mode, _
@@ -3187,7 +3217,7 @@ end
 
 % definition of @key with no lozenge.
 %
-\def\key#1{{\setregularquotes \nohyphenation \tt #1}\null}
+\def\key#1{{\setregularquotes \tt #1}\null}
 
 % @clicksequence{File @click{} Open ...}
 \def\clicksequence#1{\begingroup #1\endgroup}
@@ -3390,8 +3420,8 @@ $$%
 \let\atchar=\@
 
 % @{ @} @lbracechar{} @rbracechar{} all generate brace characters.
-\def\lbracechar{{\ifmonospace\char123\else\ensuremath\lbrace\fi}}
-\def\rbracechar{{\ifmonospace\char125\else\ensuremath\rbrace\fi}}
+\def\lbracechar{{\ifusingtt{\char123}{\ensuremath\lbrace}}}
+\def\rbracechar{{\ifusingtt{\char125}{\ensuremath\rbrace}}}
 \let\{=\lbracechar
 \let\}=\rbracechar
 
@@ -3445,8 +3475,13 @@ $$%
        % Revert to plain's \scriptsize, which is 7pt.
        \count255=\the\fam $\fam\count255 \scriptstyle A$%
      \else
-       % For 11pt, we can use our lllsize.
-       \switchtolllsize A%
+       \ifx\curfontsize\smallword
+         % For footnotes and indices
+         \count255=\the\fam $\fam\count255 \scriptstyle A$%
+       \else
+         % For 11pt, we can use our lllsize.
+         \switchtolllsize A%
+       \fi
      \fi
      }%
      \vss
@@ -3454,6 +3489,7 @@ $$%
   \kern-.15em
   \TeX
 }
+\def\smallword{small}
 
 % Some math mode symbols.  Define \ensuremath to switch into math mode
 % unless we are already there.  Expansion tricks may not be needed here,
@@ -3532,7 +3568,7 @@ $$%
 
 % @pounds{} is a sterling sign, which Knuth put in the CM italic font.
 %
-\def\pounds{\ifmonospace{\ecfont\char"BF}\else{\it\$}\fi}
+\def\pounds{{\ifusingtt{\ecfont\char"BF}{\it\$}}}
 
 % @euro{} comes from a separate font, depending on the current style.
 % We use the free feym* fonts from the eurosym package by Henrik
@@ -3646,18 +3682,17 @@ $$%
   % hopefully nobody will notice/care.
   \edef\ecsize{\csname\curfontsize ecsize\endcsname}%
   \edef\nominalsize{\csname\curfontsize nominalsize\endcsname}%
-  \ifmonospace
-    % typewriter:
-    \font\thisecfont = #1ctt\ecsize \space at \nominalsize
-  \else
-    \ifx\curfontstyle\bfstylename
-      % bold:
-      \font\thisecfont = #1cb\ifusingit{i}{x}\ecsize \space at \nominalsize
-    \else
-      % regular:
-      \font\thisecfont = #1c\ifusingit{ti}{rm}\ecsize \space at \nominalsize
-    \fi
-  \fi
+  \ifusingtt
+      % typewriter:
+     {\font\thisecfont = #1ctt\ecsize \space at \nominalsize}%
+  % else
+     {\ifx\curfontstyle\bfstylename
+        % bold:
+        \font\thisecfont = #1cb\ifusingit{i}{x}\ecsize \space at \nominalsize
+      \else
+        % regular:
+        \font\thisecfont = #1c\ifusingit{ti}{rm}\ecsize \space at \nominalsize
+      \fi}%
   \thisecfont
 }
 
@@ -3673,7 +3708,10 @@ $$%
 
 % @textdegree - the normal degrees sign.
 %
-\def\textdegree{$^\circ$}
+\def\textdegree{%
+   \ifmmode ^\circ
+   \else {\tcfont \char 176}%
+   \fi}
 
 % Laurent Siebenmann reports \Orb undefined with:
 %  Textures 1.7.7 (preloaded format=plain 93.10.14)  (68K)  16 APR 2004 02:38
@@ -3690,11 +3728,11 @@ $$%
 % only change font for tt for correct kerning and to avoid using
 % \ecfont unless necessary.
 \def\quotedblleft{%
-  \ifmonospace{\ecfont\char"10}\else{\char"5C}\fi
+  \ifusingtt{{\ecfont\char"10}}{{\char"5C}}%
 }
 
 \def\quotedblright{%
-  \ifmonospace{\ecfont\char"11}\else{\char`\"}\fi
+  \ifusingtt{{\ecfont\char"11}}{{\char`\"}}%
 }
 
 
@@ -3719,13 +3757,14 @@ $$%
               want the contents after the title page.}}%
 
 \parseargdef\shorttitlepage{%
-  \begingroup \hbox{}\vskip 1.5in \chaprm \centerline{#1}%
-  \endgroup\page\hbox{}\page}
+  {\headingsoff \begingroup \hbox{}\vskip 1.5in \chaprm \centerline{#1}%
+  \endgroup\page\hbox{}\page}\pageone}
 
 \envdef\titlepage{%
   % Open one extra group, as we want to close it in the middle of \Etitlepage.
   \begingroup
     \parindent=0pt \textfonts
+    \headingsoff
     % Leave some space at the very top of the page.
     \vglue\titlepagetopglue
     % No rule at page bottom unless we print one at the top with @title.
@@ -3753,11 +3792,9 @@ $$%
     % If we use the new definition of \page, we always get a blank page
     % after the title page, which we certainly don't want.
     \oldpage
+    \pageone
   \endgroup
   %
-  % Need this before the \...aftertitlepage checks so that if they are
-  % in effect the toc pages will come out with page numbers.
-  \HEADINGSon
 }
 
 \def\finishtitlepage{%
@@ -3824,15 +3861,16 @@ $$%
 \newtoks\oddfootline     % footline on odd pages
 
 % Now make \makeheadline and \makefootline in Plain TeX use those variables
-\headline={{\textfonts\rm
+\headline={{\textfonts\rm\frenchspacingsetting
             \ifchapterpage
               \ifodd\pageno\the\oddchapheadline\else\the\evenchapheadline\fi
             \else
               \ifodd\pageno\the\oddheadline\else\the\evenheadline\fi
             \fi}}
 
-\footline={{\textfonts\rm \ifodd\pageno \the\oddfootline
-                            \else \the\evenfootline \fi}\HEADINGShook}
+\footline={{\textfonts\rm\frenchspacingsetting
+            \ifodd\pageno \the\oddfootline \else \the\evenfootline \fi}%
+           \HEADINGShook}
 \let\HEADINGShook=\relax
 
 % Commands to set those variables.
@@ -3925,46 +3963,37 @@ $$%
 }
 
 \def\HEADINGSoff{{\globaldefs=1 \headingsoff}} % global setting
-\HEADINGSoff  % it's the default
 
-% When we turn headings on, set the page number to 1.
+% Set the page number to 1.
 \def\pageone{
   \global\pageno=1
   \global\arabiccount = \pagecount
 }
 
+\let\contentsalignmacro = \chappager
+
+% \def\HEADINGSon{\HEADINGSdouble} % defined by \CHAPPAGon
+
 % For double-sided printing, put current file name in lower left corner,
 % chapter name on inside top of right hand pages, document
 % title on inside top of left hand pages, and page numbers on outside top
 % edge of all pages.
-\def\HEADINGSdouble{%
-\pageone
-\HEADINGSdoublex
-}
-\let\contentsalignmacro = \chappager
-
-% For single-sided printing, chapter title goes across top left of page,
-% page number on top right.
-\def\HEADINGSsingle{%
-\pageone
-\HEADINGSsinglex
-}
-\def\HEADINGSon{\HEADINGSdouble}
-
-\def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex}
+\def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdouble}
 \let\HEADINGSdoubleafter=\HEADINGSafter
-\def\HEADINGSdoublex{%
+\def\HEADINGSdouble{%
 \global\evenfootline={\hfil}
 \global\oddfootline={\hfil}
 \global\evenheadline={\line{\folio\hfil\thistitle}}
 \global\oddheadline={\line{\thischapter\hfil\folio}}
-\global\evenchapheadline={\line{\folio\hfil}}
+\global\evenchapheadline={\line{\folio\hfil\thistitle}}
 \global\oddchapheadline={\line{\hfil\folio}}
 \global\let\contentsalignmacro = \chapoddpage
 }
 
-\def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex}
-\def\HEADINGSsinglex{%
+% For single-sided printing, chapter title goes across top left of page,
+% page number on top right.
+\def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsingle}
+\def\HEADINGSsingle{%
 \global\evenfootline={\hfil}
 \global\oddfootline={\hfil}
 \global\evenheadline={\line{\thischapter\hfil\folio}}
@@ -3976,7 +4005,6 @@ $$%
 
 % for @setchapternewpage off
 \def\HEADINGSsinglechapoff{%
-\pageone
 \global\evenfootline={\hfil}
 \global\oddfootline={\hfil}
 \global\evenheadline={\line{\thischapter\hfil\folio}}
@@ -4346,8 +4374,7 @@ $$%
 % undo it ourselves.
 \def\headitemfont{\b}% for people to use in the template row; not changeable
 \def\headitem{%
-  \checkenv\multitable
-  \crcr
+  \crcr % must appear first
   \gdef\headitemcrhook{\nobreak}% attempt to avoid page break after headings
   \global\everytab={\bf}% can't use \headitemfont since the parsing differs
   \the\everytab % for the first item
@@ -4432,7 +4459,7 @@ $$%
 
 \message{conditionals,}
 
-% @iftex, @ifnotdocbook, @ifnothtml, @ifnotinfo, @ifnotplaintext,
+% @iftex, @ifnotdocbook, @ifnothtml, @ifnotinfo, @ifnotlatex, @ifnotplaintext,
 % @ifnotxml always succeed.  They currently do nothing; we don't
 % attempt to check whether the conditionals are properly nested.  But we
 % have to remember that they are conditionals, so that @end doesn't
@@ -4446,6 +4473,7 @@ $$%
 \makecond{ifnotdocbook}
 \makecond{ifnothtml}
 \makecond{ifnotinfo}
+\makecond{ifnotlatex}
 \makecond{ifnotplaintext}
 \makecond{ifnotxml}
 
@@ -4458,10 +4486,12 @@ $$%
 \def\ifdocbook{\doignore{ifdocbook}}
 \def\ifhtml{\doignore{ifhtml}}
 \def\ifinfo{\doignore{ifinfo}}
+\def\iflatex{\doignore{iflatex}}
 \def\ifnottex{\doignore{ifnottex}}
 \def\ifplaintext{\doignore{ifplaintext}}
 \def\ifxml{\doignore{ifxml}}
 \def\ignore{\doignore{ignore}}
+\def\latex{\doignore{latex}}
 \def\menu{\doignore{menu}}
 \def\xml{\doignore{xml}}
 
@@ -4700,13 +4730,11 @@ $$%
 % except not \outer, so it can be used within macros and \if's.
 \edef\newwrite{\makecsname{ptexnewwrite}}
 
-% \newindex {foo} defines an index named IX.
+% \newindex {IX} defines an index named IX.
 % It automatically defines \IXindex such that
 % \IXindex ...rest of line... puts an entry in the index IX.
 % It also defines \IXindfile to be the number of the output channel for
 % the file that accumulates this index.  The file's extension is IX.
-% The name of an index should be no more than 2 characters long
-% for the sake of vms.
 %
 \def\newindex#1{%
   \expandafter\chardef\csname#1indfile\endcsname=0
@@ -4769,21 +4797,6 @@ $$%
 \def\docodeindexxxx #1{\docind{\indexname}{#1}}
 
 
-% Used for the aux, toc and index files to prevent expansion of Texinfo
-% commands.
-%
-\def\atdummies{%
-  \definedummyletter\@%
-  \definedummyletter\ %
-  \definedummyletter\{%
-  \definedummyletter\}%
-  \definedummyletter\&%
-  %
-  % Do the redefinitions.
-  \definedummies
-  \otherbackslash
-}
-
 % \definedummyword defines \#1 as \string\#1\space, thus effectively
 % preventing its expansion.  This is used only for control words,
 % not control letters, because the \space would be incorrect for
@@ -4799,110 +4812,91 @@ $$%
 %
 \def\definedummyword  #1{\def#1{\string#1\space}}%
 \def\definedummyletter#1{\def#1{\string#1}}%
-\let\definedummyaccent\definedummyletter
 
-% Called from \atdummies to prevent the expansion of commands.
+% Used for the aux, toc and index files to prevent expansion of Texinfo
+% commands.  Most of the commands are controlled through the
+% \ifdummies conditional.
 %
-\def\definedummies{%
+\def\atdummies{%
+  \dummiestrue
   %
-  \let\commondummyword\definedummyword
-  \let\commondummyletter\definedummyletter
-  \let\commondummyaccent\definedummyaccent
-  \commondummiesnofonts
+  \definedummyletter\@%
+  \definedummyletter\ %
+  \definedummyletter\{%
+  \definedummyletter\}%
+  \definedummyletter\&%
   %
   \definedummyletter\_%
   \definedummyletter\-%
   %
-  % Non-English letters.
-  \definedummyword\AA
-  \definedummyword\AE
-  \definedummyword\DH
-  \definedummyword\L
-  \definedummyword\O
-  \definedummyword\OE
-  \definedummyword\TH
-  \definedummyword\aa
-  \definedummyword\ae
-  \definedummyword\dh
-  \definedummyword\exclamdown
-  \definedummyword\l
-  \definedummyword\o
-  \definedummyword\oe
-  \definedummyword\ordf
-  \definedummyword\ordm
-  \definedummyword\questiondown
-  \definedummyword\ss
-  \definedummyword\th
-  %
-  % Although these internal commands shouldn't show up, sometimes they do.
-  \definedummyword\bf
-  \definedummyword\gtr
-  \definedummyword\hat
-  \definedummyword\less
-  \definedummyword\sf
-  \definedummyword\sl
-  \definedummyword\tclose
-  \definedummyword\tt
-  %
-  \definedummyword\LaTeX
-  \definedummyword\TeX
-  %
-  % Assorted special characters.
-  \definedummyword\ampchar
-  \definedummyword\atchar
-  \definedummyword\arrow
-  \definedummyword\backslashchar
-  \definedummyword\bullet
-  \definedummyword\comma
-  \definedummyword\copyright
-  \definedummyword\registeredsymbol
-  \definedummyword\dots
-  \definedummyword\enddots
-  \definedummyword\entrybreak
-  \definedummyword\equiv
-  \definedummyword\error
-  \definedummyword\euro
-  \definedummyword\expansion
-  \definedummyword\geq
-  \definedummyword\guillemetleft
-  \definedummyword\guillemetright
-  \definedummyword\guilsinglleft
-  \definedummyword\guilsinglright
-  \definedummyword\lbracechar
-  \definedummyword\leq
-  \definedummyword\mathopsup
-  \definedummyword\minus
-  \definedummyword\ogonek
-  \definedummyword\pounds
-  \definedummyword\point
-  \definedummyword\print
-  \definedummyword\quotedblbase
-  \definedummyword\quotedblleft
-  \definedummyword\quotedblright
-  \definedummyword\quoteleft
-  \definedummyword\quoteright
-  \definedummyword\quotesinglbase
-  \definedummyword\rbracechar
-  \definedummyword\result
-  \definedummyword\sub
-  \definedummyword\sup
-  \definedummyword\textdegree
-  %
   \definedummyword\subentry
   %
   % We want to disable all macros so that they are not expanded by \write.
+  \let\commondummyword\definedummyword
   \macrolist
   \let\value\dummyvalue
   %
-  \normalturnoffactive
-}
-
-% \commondummiesnofonts: common to \definedummies and \indexnofonts.
-% Define \commondummyletter, \commondummyaccent and \commondummyword before
-% using.  Used for accents, font commands, and various control letters.
-%
-\def\commondummiesnofonts{%
-  % Control letters and accents.
+  \turnoffactive
+}
+
+\newif\ifdummies
+\newif\ifindexnofonts
+
+\def\commondummyletter#1{%
+  \expandafter\let\csname\string#1:impl\endcsname#1%
+  \edef#1{%
+    \noexpand\ifindexnofonts
+      % empty expansion
+    \noexpand\else
+      \noexpand\ifdummies\string#1%
+      \noexpand\else
+        \noexpand\jumptwofi % dispose of the \fi
+        \expandafter\noexpand\csname\string#1:impl\endcsname
+      \noexpand\fi
+    \noexpand\fi}%
+}
+
+\def\commondummyaccent#1{%
+  \expandafter\let\csname\string#1:impl\endcsname#1%
+  \edef#1{%
+    \noexpand\ifindexnofonts
+      \noexpand\expandafter % dispose of \else ... \fi
+      \noexpand\asis
+    \noexpand\else
+      \noexpand\ifdummies\string#1%
+      \noexpand\else
+        \noexpand\jumptwofi % dispose of the \fi
+        \expandafter\noexpand\csname\string#1:impl\endcsname
+      \noexpand\fi
+    \noexpand\fi}%
+}
+
+% Like \commondummyaccent but add a \space at the end of the dummy expansion
+% #2 is the expansion used for \indexnofonts.  #2 is always followed by
+% \asis to remove a pair of following braces.
+\def\commondummyword#1#2{%
+  \expandafter\let\csname\string#1:impl\endcsname#1%
+  \expandafter\def\csname\string#1:ixnf\endcsname{#2\asis}%
+  \edef#1{%
+    \noexpand\ifindexnofonts
+      \noexpand\expandafter % dispose of \else ... \fi
+      \expandafter\noexpand\csname\string#1:ixnf\endcsname
+    \noexpand\else
+      \noexpand\ifdummies\string#1\space
+      \noexpand\else
+        \noexpand\jumptwofi % dispose of the \fi \fi
+        \expandafter\noexpand\csname\string#1:impl\endcsname
+      \noexpand\fi
+    \noexpand\fi}%
+}
+\def\jumptwofi#1\fi\fi{\fi\fi#1}
+
+% For \atdummies and \indexnofonts.  \atdummies sets
+% \dummiestrue and \indexnofonts sets \indexnofontstrue.
+\def\definedummies{
+  % @-sign is always an escape character when reading auxiliary files
+  \escapechar = `\@
+  %
   \commondummyletter\!%
   \commondummyaccent\"%
   \commondummyaccent\'%
@@ -4916,58 +4910,123 @@ $$%
   \commondummyaccent\^%
   \commondummyaccent\`%
   \commondummyaccent\~%
-  \commondummyword\u
-  \commondummyword\v
-  \commondummyword\H
-  \commondummyword\dotaccent
-  \commondummyword\ogonek
-  \commondummyword\ringaccent
-  \commondummyword\tieaccent
-  \commondummyword\ubaraccent
-  \commondummyword\udotaccent
-  \commondummyword\dotless
+  %
+  % Control letters and accents.
+  \commondummyword\u          {}%
+  \commondummyword\v          {}%
+  \commondummyword\H          {}%
+  \commondummyword\dotaccent  {}%
+  \commondummyword\ogonek     {}%
+  \commondummyword\ringaccent {}%
+  \commondummyword\tieaccent  {}%
+  \commondummyword\ubaraccent {}%
+  \commondummyword\udotaccent {}%
+  \commondummyword\dotless    {}%
   %
   % Texinfo font commands.
-  \commondummyword\b
-  \commondummyword\i
-  \commondummyword\r
-  \commondummyword\sansserif
-  \commondummyword\sc
-  \commondummyword\slanted
-  \commondummyword\t
+  \commondummyword\b          {}%
+  \commondummyword\i          {}%
+  \commondummyword\r          {}%
+  \commondummyword\sansserif  {}%
+  \commondummyword\sc         {}%
+  \commondummyword\slanted    {}%
+  \commondummyword\t          {}%
   %
   % Commands that take arguments.
-  \commondummyword\abbr
-  \commondummyword\acronym
-  \commondummyword\anchor
-  \commondummyword\cite
-  \commondummyword\code
-  \commondummyword\command
-  \commondummyword\dfn
-  \commondummyword\dmn
-  \commondummyword\email
-  \commondummyword\emph
-  \commondummyword\env
-  \commondummyword\file
-  \commondummyword\image
-  \commondummyword\indicateurl
-  \commondummyword\inforef
-  \commondummyword\kbd
-  \commondummyword\key
-  \commondummyword\math
-  \commondummyword\option
-  \commondummyword\pxref
-  \commondummyword\ref
-  \commondummyword\samp
-  \commondummyword\strong
-  \commondummyword\tie
-  \commondummyword\U
-  \commondummyword\uref
-  \commondummyword\url
-  \commondummyword\var
-  \commondummyword\verb
-  \commondummyword\w
-  \commondummyword\xref
+  \commondummyword\abbr       {}%
+  \commondummyword\acronym    {}%
+  \commondummyword\anchor     {}%
+  \commondummyword\cite       {}%
+  \commondummyword\code       {}%
+  \commondummyword\command    {}%
+  \commondummyword\dfn        {}%
+  \commondummyword\dmn        {}%
+  \commondummyword\email      {}%
+  \commondummyword\emph       {}%
+  \commondummyword\env        {}%
+  \commondummyword\file       {}%
+  \commondummyword\image      {}%
+  \commondummyword\indicateurl{}%
+  \commondummyword\inforef    {}%
+  \commondummyword\kbd        {}%
+  \commondummyword\key        {}%
+  \commondummyword\math       {}%
+  \commondummyword\option     {}%
+  \commondummyword\pxref      {}%
+  \commondummyword\ref        {}%
+  \commondummyword\samp       {}%
+  \commondummyword\strong     {}%
+  \commondummyword\tie        {}%
+  \commondummyword\U          {}%
+  \commondummyword\uref       {}%
+  \commondummyword\url        {}%
+  \commondummyword\var        {}%
+  \commondummyword\verb       {}%
+  \commondummyword\w          {}%
+  \commondummyword\xref       {}%
+  %
+  \commondummyword\AA               {AA}%
+  \commondummyword\AE               {AE}%
+  \commondummyword\DH               {DZZ}%
+  \commondummyword\L                {L}%
+  \commondummyword\O                {O}%
+  \commondummyword\OE               {OE}%
+  \commondummyword\TH               {TH}%
+  \commondummyword\aa               {aa}%
+  \commondummyword\ae               {ae}%
+  \commondummyword\dh               {dzz}%
+  \commondummyword\exclamdown       {!}%
+  \commondummyword\l                {l}%
+  \commondummyword\o                {o}%
+  \commondummyword\oe               {oe}%
+  \commondummyword\ordf             {a}%
+  \commondummyword\ordm             {o}%
+  \commondummyword\questiondown     {?}%
+  \commondummyword\ss               {ss}%
+  \commondummyword\th               {th}%
+  %
+  \commondummyword\LaTeX            {LaTeX}%
+  \commondummyword\TeX              {TeX}%
+  %
+  % Assorted special characters.
+  \commondummyword\ampchar          {\normalamp}%
+  \commondummyword\atchar           {\@}%
+  \commondummyword\arrow            {->}%
+  \commondummyword\backslashchar    {\realbackslash}%
+  \commondummyword\bullet           {bullet}%
+  \commondummyword\comma            {,}%
+  \commondummyword\copyright        {copyright}%
+  \commondummyword\dots             {...}%
+  \commondummyword\enddots          {...}%
+  \commondummyword\entrybreak       {}%
+  \commondummyword\equiv            {===}%
+  \commondummyword\error            {error}%
+  \commondummyword\euro             {euro}%
+  \commondummyword\expansion        {==>}%
+  \commondummyword\geq              {>=}%
+  \commondummyword\guillemetleft    {<<}%
+  \commondummyword\guillemetright   {>>}%
+  \commondummyword\guilsinglleft    {<}%
+  \commondummyword\guilsinglright   {>}%
+  \commondummyword\lbracechar       {\{}%
+  \commondummyword\leq              {<=}%
+  \commondummyword\mathopsup        {sup}%
+  \commondummyword\minus            {-}%
+  \commondummyword\pounds           {pounds}%
+  \commondummyword\point            {.}%
+  \commondummyword\print            {-|}%
+  \commondummyword\quotedblbase     {"}%
+  \commondummyword\quotedblleft     {"}%
+  \commondummyword\quotedblright    {"}%
+  \commondummyword\quoteleft        {`}%
+  \commondummyword\quoteright       {'}%
+  \commondummyword\quotesinglbase   {,}%
+  \commondummyword\rbracechar       {\}}%
+  \commondummyword\registeredsymbol {R}%
+  \commondummyword\result           {=>}%
+  \commondummyword\sub              {}%
+  \commondummyword\sup              {}%
+  \commondummyword\textdegree       {o}%
 }
 
 \let\indexlbrace\relax
@@ -4985,25 +5044,24 @@ $$%
 \catcode`\-=13
 \catcode`\`=13
   \gdef\indexnonalnumdisappear{%
-    \expandafter\ifx\csname SETtxiindexlquoteignore\endcsname\relax\else
+    \ifflagclear{txiindexlquoteignore}{}{%
       % @set txiindexlquoteignore makes us ignore left quotes in the sort term.
       % (Introduced for FSFS 2nd ed.)
       \let`=\empty
-    \fi
+    }%
     %
-    \expandafter\ifx\csname SETtxiindexbackslashignore\endcsname\relax\else
+    \ifflagclear{txiindexbackslashignore}{}{%
       \backslashdisappear
-    \fi
-    %
-    \expandafter\ifx\csname SETtxiindexhyphenignore\endcsname\relax\else
+    }%
+    \ifflagclear{txiindexhyphenignore}{}{%
       \def-{}%
-    \fi
-    \expandafter\ifx\csname SETtxiindexlessthanignore\endcsname\relax\else
+    }%
+    \ifflagclear{txiindexlessthanignore}{}{%
       \def<{}%
-    \fi
-    \expandafter\ifx\csname SETtxiindexatsignignore\endcsname\relax\else
+    }%
+    \ifflagclear{txiindexatsignignore}{}{%
       \def\@{}%
-    \fi
+    }%
   }
 
   \gdef\indexnonalnumreappear{%
@@ -5019,18 +5077,7 @@ $$%
 % would be for a given command (usually its argument).
 %
 \def\indexnofonts{%
-  % Accent commands should become @asis.
-  \def\commondummyaccent##1{\let##1\asis}%
-  % We can just ignore other control letters.
-  \def\commondummyletter##1{\let##1\empty}%
-  % All control words become @asis by default; overrides below.
-  \let\commondummyword\commondummyaccent
-  \commondummiesnofonts
-  %
-  % Don't no-op \tt, since it isn't a user-level command
-  % and is used in the definitions of the active chars like <, >, |, etc.
-  % Likewise with the other plain tex font commands.
-  %\let\tt=\asis
+  \indexnofontstrue
   %
   \def\ { }%
   \def\@{@}%
@@ -5042,84 +5089,19 @@ $$%
   \let\lbracechar\{%
   \let\rbracechar\}%
   %
-  % Non-English letters.
-  \def\AA{AA}%
-  \def\AE{AE}%
-  \def\DH{DZZ}%
-  \def\L{L}%
-  \def\OE{OE}%
-  \def\O{O}%
-  \def\TH{TH}%
-  \def\aa{aa}%
-  \def\ae{ae}%
-  \def\dh{dzz}%
-  \def\exclamdown{!}%
-  \def\l{l}%
-  \def\oe{oe}%
-  \def\ordf{a}%
-  \def\ordm{o}%
-  \def\o{o}%
-  \def\questiondown{?}%
-  \def\ss{ss}%
-  \def\th{th}%
-  %
-  \let\do\indexnofontsdef
-  %
-  \do\LaTeX{LaTeX}%
-  \do\TeX{TeX}%
-  %
-  % Assorted special characters.
-  \do\atchar{@}%
-  \do\arrow{->}%
-  \do\bullet{bullet}%
-  \do\comma{,}%
-  \do\copyright{copyright}%
-  \do\dots{...}%
-  \do\enddots{...}%
-  \do\equiv{==}%
-  \do\error{error}%
-  \do\euro{euro}%
-  \do\expansion{==>}%
-  \do\geq{>=}%
-  \do\guillemetleft{<<}%
-  \do\guillemetright{>>}%
-  \do\guilsinglleft{<}%
-  \do\guilsinglright{>}%
-  \do\leq{<=}%
-  \do\lbracechar{\{}%
-  \do\minus{-}%
-  \do\point{.}%
-  \do\pounds{pounds}%
-  \do\print{-|}%
-  \do\quotedblbase{"}%
-  \do\quotedblleft{"}%
-  \do\quotedblright{"}%
-  \do\quoteleft{`}%
-  \do\quoteright{'}%
-  \do\quotesinglbase{,}%
-  \do\rbracechar{\}}%
-  \do\registeredsymbol{R}%
-  \do\result{=>}%
-  \do\textdegree{o}%
   %
   % We need to get rid of all macros, leaving only the arguments (if present).
   % Of course this is not nearly correct, but it is the best we can do for now.
-  % makeinfo does not expand macros in the argument to @deffn, which ends up
-  % writing an index entry, and texindex isn't prepared for an index sort entry
-  % that starts with \.
   %
   % Since macro invocations are followed by braces, we can just redefine them
   % to take a single TeX argument.  The case of a macro invocation that
   % goes to end-of-line is not handled.
   %
+  \def\commondummyword##1{\let##1\asis}%
   \macrolist
   \let\value\indexnofontsvalue
 }
 
-% Give the control sequence a definition that removes the {} that follows
-% its use, e.g. @AA{} -> AA
-\def\indexnofontsdef#1#2{\def#1##1{#2}}%
-
 
 
 
@@ -5250,7 +5232,10 @@ $$%
         \xdef\trimmed{\segment}%
         \xdef\trimmed{\expandafter\eatspaces\expandafter{\trimmed}}%
         \xdef\indexsortkey{\trimmed}%
-        \ifx\indexsortkey\empty\xdef\indexsortkey{ }\fi
+        \ifx\indexsortkey\empty
+          \message{Empty index sort key near line \the\inputlineno}%
+          \xdef\indexsortkey{ }%
+        \fi
       }\fi
       %
       % Append to \fullindexsortkey.
@@ -5295,9 +5280,7 @@ $$%
   %
   \atdummies
   %
-  \expandafter\ifx\csname SETtxiindexescapeisbackslash\endcsname\relax\else
-    \escapeisbackslash
-  \fi
+  \ifflagclear{txiindexescapeisbackslash}{}{\escapeisbackslash}%
   %
   % For texindex which always views { and } as separators.
   \def\{{\lbracechar{}}%
@@ -5481,9 +5464,9 @@ $$%
 % old index files using \ as the escape character.  Reading this would
 % at best lead to typesetting garbage, at worst a TeX syntax error.
 \def\printindexzz#1#2\finish{%
-  \expandafter\ifx\csname SETtxiindexescapeisbackslash\endcsname\relax
+  \ifflagclear{txiindexescapeisbackslash}{%
     \uccode`\~=`\\ \uppercase{\if\noexpand~}\noexpand#1
-      \expandafter\ifx\csname SETtxiskipindexfileswithbackslash\endcsname\relax
+      \ifflagclear{txiskipindexfileswithbackslash}{%
 \errmessage{%
 ERROR: A sorted index file in an obsolete format was skipped.
 To fix this problem, please upgrade your version of 'texi2dvi'
@@ -5499,15 +5482,15 @@ this, Texinfo will try to use index files in the old format.
 If you continue to have problems, deleting the index files and starting again
 might help (with 'rm \jobname.?? \jobname.??s')%
 }%
-      \else
+      }{%
         (Skipped sorted index file in obsolete format)
-      \fi
+      }%
     \else
       \begindoublecolumns
       \input \jobname.\indexname s
       \enddoublecolumns
     \fi
-  \else
+  }{%
     \begindoublecolumns
     \catcode`\\=0\relax
     %
@@ -5517,7 +5500,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
     \catcode`\@=0\relax
     \input \jobname.\indexname s
     \enddoublecolumns
-  \fi
+  }%
 }
 
 % These macros are used by the sorted index file itself.
@@ -5592,6 +5575,11 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 \newdimen\entryrightmargin
 \entryrightmargin=0pt
 
+% for PDF output, whether to make the text of the entry a link to the page
+% number.  set for @contents and @shortcontents where there is only one
+% page number.
+\newif\iflinkentrytext
+
 % \entry typesets a paragraph consisting of the text (#1), dot leaders, and
 % then page number (#2) flushed to the right margin.  It is used for index
 % and table of contents entries.  The paragraph is indented by \leftskip.
@@ -5618,7 +5606,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 }
 \def\entrybreak{\unskip\space\ignorespaces}%
 \def\doentry{%
-    % Save the text of the entry
+    % Save the text of the entry in \boxA
     \global\setbox\boxA=\hbox\bgroup
     \bgroup % Instead of the swallowed brace.
       \noindent
@@ -5628,12 +5616,21 @@ might help (with 'rm \jobname.?? \jobname.??s')%
       % with catcodes occurring.
 }
 {\catcode`\@=11
+% #1 is the page number
 \gdef\finishentry#1{%
-    \egroup % end box A
+    \egroup % end \boxA
     \dimen@ = \wd\boxA % Length of text of entry
+    % add any leaders and page number to \boxA.
     \global\setbox\boxA=\hbox\bgroup
-      \unhbox\boxA
-      % #1 is the page number.
+      \ifpdforxetex
+        \iflinkentrytext
+          \pdflinkpage{#1}{\unhbox\boxA}%
+        \else
+          \unhbox\boxA
+        \fi
+      \else
+        \unhbox\boxA
+      \fi
       %
       % Get the width of the page numbers, and only use
       % leaders if they are present.
@@ -5652,6 +5649,8 @@ might help (with 'rm \jobname.?? \jobname.??s')%
         \fi
       \fi
     \egroup % end \boxA
+    %
+    % now output
     \ifdim\wd\boxB = 0pt
       \noindent\unhbox\boxA\par
       \nobreak
@@ -6351,7 +6350,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
   \fi
 }
 
-\parseargdef\setchapternewpage{\csname CHAPPAG#1\endcsname}
+\parseargdef\setchapternewpage{\csname CHAPPAG#1\endcsname\HEADINGSon}
 
 \def\CHAPPAGoff{%
 \global\let\contentsalignmacro = \chappager
@@ -6368,7 +6367,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 \global\let\pchapsepmacro=\chapoddpage
 \global\def\HEADINGSon{\HEADINGSdouble}}
 
-\CHAPPAGon
+\setchapternewpage on
 
 % \chapmacro - Chapter opening.
 %
@@ -6381,6 +6380,16 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 \def\Yappendixkeyword{Yappendix}
 \def\Yomitfromtockeyword{Yomitfromtoc}
 %
+%
+% Definitions for @thischapter. These can be overridden in translation
+% files.
+\def\thischapterAppendix{%
+  \putwordAppendix{} \thischapternum: \thischaptername}
+
+\def\thischapterChapter{%
+  \putwordChapter{} \thischapternum: \thischaptername}
+%
+%
 \def\chapmacro#1#2#3{%
   \expandafter\ifx\thisenv\titlepage\else
     \checkenv{}% chapters, etc., should not start inside an environment.
@@ -6403,22 +6412,14 @@ might help (with 'rm \jobname.?? \jobname.??s')%
     \xdef\currentchapterdefs{%
       \gdef\noexpand\thischaptername{\the\toks0}%
       \gdef\noexpand\thischapternum{\appendixletter}%
-      % \noexpand\putwordAppendix avoids expanding indigestible
-      % commands in some of the translations.
-      \gdef\noexpand\thischapter{\noexpand\putwordAppendix{}
-                                 \noexpand\thischapternum:
-                                 \noexpand\thischaptername}%
+      \let\noexpand\thischapter\noexpand\thischapterAppendix
     }%
   \else
     \toks0={#1}%
     \xdef\currentchapterdefs{%
       \gdef\noexpand\thischaptername{\the\toks0}%
       \gdef\noexpand\thischapternum{\the\chapno}%
-      % \noexpand\putwordChapter avoids expanding indigestible
-      % commands in some of the translations.
-      \gdef\noexpand\thischapter{\noexpand\putwordChapter{}
-                                 \noexpand\thischapternum:
-                                 \noexpand\thischaptername}%
+      \let\noexpand\thischapter\noexpand\thischapterChapter
     }%
   \fi\fi\fi
   %
@@ -6504,6 +6505,12 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 \def\subsubsecheadingskip{\subsecheadingskip}
 \def\subsubsecheadingbreak{\subsecheadingbreak}
 
+% Definition for @thissection. This can be overridden in translation
+% files.
+\def\thissectionDef{%
+  \putwordSection{} \thissectionnum: \thissectionname}
+%
+
 
 % Print any size, any type, section title.
 %
@@ -6545,11 +6552,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
         \xdef\currentsectiondefs{%
           \gdef\noexpand\thissectionname{\the\toks0}%
           \gdef\noexpand\thissectionnum{#4}%
-          % \noexpand\putwordSection avoids expanding indigestible
-          % commands in some of the translations.
-          \gdef\noexpand\thissection{\noexpand\putwordSection{}
-                                     \noexpand\thissectionnum:
-                                     \noexpand\thissectionname}%
+          \let\noexpand\thissection\noexpand\thissectionDef
         }%
       \fi
     \else
@@ -6558,11 +6561,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
         \xdef\currentsectiondefs{%
           \gdef\noexpand\thissectionname{\the\toks0}%
           \gdef\noexpand\thissectionnum{#4}%
-          % \noexpand\putwordSection avoids expanding indigestible
-          % commands in some of the translations.
-          \gdef\noexpand\thissection{\noexpand\putwordSection{}
-                                     \noexpand\thissectionnum:
-                                     \noexpand\thissectionname}%
+          \let\noexpand\thissection\noexpand\thissectionDef
         }%
       \fi
     \fi\fi\fi
@@ -6748,8 +6747,14 @@ might help (with 'rm \jobname.?? \jobname.??s')%
     \def\thistitle{}% no title in double-sided headings
     % Record where the Roman numerals started.
     \ifnum\romancount=0 \global\romancount=\pagecount \fi
+    \linkentrytexttrue
 }
 
+% \raggedbottom in plain.tex hardcodes \topskip so override it
+\catcode`\@=11
+\def\raggedbottom{\advance\topskip by 0pt plus60pt \r@ggedbottomtrue}
+\catcode`\@=\other
+
 % redefined for the two-volume lispref.  We always output on
 % \jobname.toc even if this is redefined.
 %
@@ -6812,12 +6817,8 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 % Get ready to use Arabic numerals again
 \def\contentsendroman{%
   \lastnegativepageno = \pageno
-  \global\pageno = \savepageno
-  %
-  % If \romancount > \arabiccount, the contents are at the end of the
-  % document.  Otherwise, advance where the Arabic numerals start for
-  % the page numbers.
-  \ifnum\romancount>\arabiccount\else\global\arabiccount=\pagecount\fi
+  \global\pageno=1
+  \contentsendcount = \pagecount
 }
 
 % Typeset the label for a chapter or appendix for the short contents.
@@ -6870,7 +6871,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 % Chapters, in the short toc.
 % See comments in \dochapentry re vbox and related settings.
 \def\shortchapentry#1#2#3#4{%
-  \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#4\egroup}%
+  \tocentry{\shortchaplabel{#2}\labelspace #1}{#4}%
 }
 
 % Appendices, in the main contents.
@@ -6885,7 +6886,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 
 % Unnumbered chapters.
 \def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}}
-\def\shortunnchapentry#1#2#3#4{\tocentry{#1}{\doshortpageno\bgroup#4\egroup}}
+\def\shortunnchapentry#1#2#3#4{\tocentry{#1}{#4}}
 
 % Sections.
 \def\numsecentry#1#2#3#4{\dosecentry{#2\labelspace#1}{#4}}
@@ -6917,24 +6918,24 @@ might help (with 'rm \jobname.?? \jobname.??s')%
      % Move the page numbers slightly to the right
      \advance\entryrightmargin by -0.05em
      \chapentryfonts
-     \tocentry{#1}{\dopageno\bgroup#2\egroup}%
+     \tocentry{#1}{#2}%
    \endgroup
    \nobreak\vskip .25\baselineskip plus.1\baselineskip
 }
 
 \def\dosecentry#1#2{\begingroup
   \secentryfonts \leftskip=\tocindent
-  \tocentry{#1}{\dopageno\bgroup#2\egroup}%
+  \tocentry{#1}{#2}%
 \endgroup}
 
 \def\dosubsecentry#1#2{\begingroup
   \subsecentryfonts \leftskip=2\tocindent
-  \tocentry{#1}{\dopageno\bgroup#2\egroup}%
+  \tocentry{#1}{#2}%
 \endgroup}
 
 \def\dosubsubsecentry#1#2{\begingroup
   \subsubsecentryfonts \leftskip=3\tocindent
-  \tocentry{#1}{\dopageno\bgroup#2\egroup}%
+  \tocentry{#1}{#2}%
 \endgroup}
 
 % We use the same \entry macro as for the index entries.
@@ -6943,9 +6944,6 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 % Space between chapter (or whatever) number and the title.
 \def\labelspace{\hskip1em \relax}
 
-\def\dopageno#1{{\rm #1}}
-\def\doshortpageno#1{{\rm #1}}
-
 \def\chapentryfonts{\secfonts \rm}
 \def\secentryfonts{\textfonts}
 \def\subsecentryfonts{\textfonts}
@@ -7090,19 +7088,25 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 \newdimen\cartouter\newdimen\cartinner
 \newskip\normbskip\newskip\normpskip\newskip\normlskip
 
-
-\envdef\cartouche{%
+\envparseargdef\cartouche{%
   \cartouchefontdefs
   \ifhmode\par\fi  % can't be in the midst of a paragraph.
   \startsavinginserts
   \lskip=\leftskip \rskip=\rightskip
   \leftskip=0pt\rightskip=0pt % we want these *outside*.
+  %
+  % Set paragraph width for text inside cartouche.  There are
+  % left and right margins of 3pt each plus two vrules 0.4pt each.
   \cartinner=\hsize \advance\cartinner by-\lskip
   \advance\cartinner by-\rskip
+  \advance\cartinner by -6.8pt
+  %
+  % For drawing top and bottom of cartouche.  Each corner char
+  % adds 6pt and we take off the width of a rule to line up with the
+  % right boundary perfectly.
   \cartouter=\hsize
-  \advance\cartouter by 18.4pt	% allow for 3pt kerns on either
-				% side, and for 6pt waste from
-				% each corner char, and rule thickness
+  \advance\cartouter by 11.6pt
+  %
   \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip
   %
   % If this cartouche directly follows a sectioning command, we need the
@@ -7110,20 +7114,23 @@ might help (with 'rm \jobname.?? \jobname.??s')%
   % collide with the section heading.
   \ifnum\lastpenalty>10000 \vskip\parskip \penalty\lastpenalty \fi
   %
-  \setbox\groupbox=\vbox\bgroup
+  \setbox\groupbox=\vtop\bgroup
       \baselineskip=0pt\parskip=0pt\lineskip=0pt
       \carttop
       \hbox\bgroup
-	  \hskip\lskip
-	  \vrule\kern3pt
-	  \vbox\bgroup
-	      \kern3pt
-	      \hsize=\cartinner
-	      \baselineskip=\normbskip
-	      \lineskip=\normlskip
-	      \parskip=\normpskip
-	      \vskip -\parskip
-	      \comment % For explanation, see the end of def\group.
+          \hskip\lskip
+          \vrule\kern3pt
+          \vbox\bgroup
+              \hsize=\cartinner
+              \baselineskip=\normbskip
+              \lineskip=\normlskip
+              \parskip=\normpskip
+              \def\arg{#1}%
+              \ifx\arg\empty\else
+                \centerV{\hfil \bf #1 \hfil}%
+              \fi
+              \kern3pt
+              \vskip -\parskip
 }
 \def\Ecartouche{%
               \ifhmode\par\fi
@@ -7277,22 +7284,6 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 }
 \let\Eraggedright\par
 
-\envdef\raggedleft{%
-  \parindent=0pt \leftskip0pt plus2em
-  \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt
-  \hbadness=10000 % Last line will usually be underfull, so turn off
-                  % badness reporting.
-}
-\let\Eraggedleft\par
-
-\envdef\raggedcenter{%
-  \parindent=0pt \rightskip0pt plus1em \leftskip0pt plus1em
-  \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt
-  \hbadness=10000 % Last line will usually be underfull, so turn off
-                  % badness reporting.
-}
-\let\Eraggedcenter\par
-
 
 % @quotation does normal linebreaking (hence we can't use \nonfillstart)
 % and narrows the margins.  We keep \parskip nonzero in general, since
@@ -7390,8 +7381,9 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 \endgroup
 %
 \def\setupverb{%
-  \tt  % easiest (and conventionally used) font for verbatim
+  \tt
   \def\par{\leavevmode\endgraf}%
+  \parindent = 0pt
   \setcodequotes
   \tabeightspaces
   % Respect line breaks,
@@ -7515,9 +7507,11 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 % file; b) letting users define the frontmatter in as flexible order as
 % possible is desirable.
 %
-\def\copying{\checkenv{}\begingroup\scanargctxt\docopying}
-\def\docopying#1@end copying{\endgroup\def\copyingtext{#1}}
-%
+\def\copying{\checkenv{}\begingroup\macrobodyctxt\docopying}
+{\catcode`\ =\other
+\gdef\docopying#1@end copying{\endgroup\def\copyingtext{#1}}
+}
+
 \def\insertcopying{%
   \begingroup
     \parindent = 0pt  % paragraph indentation looks wrong on title page
@@ -7565,32 +7559,19 @@ might help (with 'rm \jobname.?? \jobname.??s')%
   \exdentamount=\defbodyindent
 }
 
-\def\dodefunx#1{%
-  % First, check whether we are in the right environment:
-  \checkenv#1%
-  %
-  % As above, allow line break if we have multiple x headers in a row.
-  % It's not a great place, though.
-  \ifnum\lastpenalty=10002 \penalty3000 \else \defunpenalty=10002 \fi
-  %
-  % And now, it's time to reuse the body of the original defun:
-  \expandafter\gobbledefun#1%
-}
-\def\gobbledefun#1\startdefun{}
-
-% \printdefunline \deffnheader{text}
+% Called as \printdefunline \deffooheader{text}
 %
 \def\printdefunline#1#2{%
   \begingroup
     \plainfrenchspacing
-    % call \deffnheader:
+    % call \deffooheader:
     #1#2 \endheader
     % common ending:
     \interlinepenalty = 10000
     \advance\rightskip by 0pt plus 1fil\relax
     \endgraf
     \nobreak\vskip -\parskip
-    \penalty\defunpenalty  % signal to \startdefun and \dodefunx
+    \penalty\defunpenalty  % signal to \startdefun and \deffoox
     % Some of the @defun-type tags do not enable magic parentheses,
     % rendering the following check redundant.  But we don't optimize.
     \checkparencounts
@@ -7599,29 +7580,51 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 
 \def\Edefun{\endgraf\medbreak}
 
-% \makedefun{deffn} creates \deffn, \deffnx and \Edeffn;
-% the only thing remaining is to define \deffnheader.
+% @defblock, @defline do not automatically create index entries
+\envdef\defblock{%
+  \startdefun
+}
+\let\Edefblock\Edefun
+
+\def\defline{%
+  \doingtypefnfalse
+  \parseargusing\activeparens{\printdefunline\deflineheader}%
+}
+\def\deflineheader#1 #2 #3\endheader{%
+  \printdefname{#1}{}{#2}\magicamp\defunargs{#3\unskip}%
+}
+\def\deftypeline{%
+  \doingtypefntrue
+  \parseargusing\activeparens{\printdefunline\deflineheader}%
+}
+
+% \makedefun{deffoo} (\deffooheader parameters) { (\deffooheader expansion) }
 %
+% Define \deffoo, \deffoox  \Edeffoo and \deffooheader.
 \def\makedefun#1{%
   \expandafter\let\csname E#1\endcsname = \Edefun
   \edef\temp{\noexpand\domakedefun
     \makecsname{#1}\makecsname{#1x}\makecsname{#1header}}%
   \temp
 }
-
-% \domakedefun \deffn \deffnx \deffnheader { (defn. of \deffnheader) }
-%
-% Define \deffn and \deffnx, without parameters.
-% \deffnheader has to be defined explicitly.
-%
 \def\domakedefun#1#2#3{%
   \envdef#1{%
     \startdefun
     \doingtypefnfalse    % distinguish typed functions from all else
     \parseargusing\activeparens{\printdefunline#3}%
   }%
-  \def#2{\dodefunx#1}%
-  \def#3%
+  \def#2{%
+    % First, check whether we are in the right environment:
+    \checkenv#1%
+    %
+    % As in \startdefun, allow line break if we have multiple x headers
+    % in a row.  It's not a great place, though.
+    \ifnum\lastpenalty=10002 \penalty3000 \else \defunpenalty=10002 \fi
+    %
+    \doingtypefnfalse    % distinguish typed functions from all else
+    \parseargusing\activeparens{\printdefunline#3}%
+  }%
+  \def#3% definition of \deffooheader follows
 }
 
 \newif\ifdoingtypefn       % doing typed function?
@@ -7646,74 +7649,51 @@ might help (with 'rm \jobname.?? \jobname.??s')%
   \fi\fi
 }
 
-% \dosubind {index}{topic}{subtopic}
-%
-% If SUBTOPIC is present, precede it with a space, and call \doind.
-% (At some time during the 20th century, this made a two-level entry in an
-% index such as the operation index.  Nobody seemed to notice the change in
-% behaviour though.)
-\def\dosubind#1#2#3{%
-  \def\thirdarg{#3}%
-  \ifx\thirdarg\empty
-    \doind{#1}{#2}%
-  \else
-    \doind{#1}{#2\space#3}%
-  \fi
-}
-
 % Untyped functions:
 
 % @deffn category name args
-\makedefun{deffn}{\deffngeneral{}}
-
-% @deffn category class name args
-\makedefun{defop}#1 {\defopon{#1\ \putwordon}}
-
-% \defopon {category on}class name args
-\def\defopon#1#2 {\deffngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} }
+\makedefun{deffn}#1 #2 #3\endheader{%
+  \doind{fn}{\code{#2}}%
+  \printdefname{#1}{}{#2}\magicamp\defunargs{#3\unskip}%
+}
 
-% \deffngeneral {subind}category name args
-%
-\def\deffngeneral#1#2 #3 #4\endheader{%
-  \dosubind{fn}{\code{#3}}{#1}%
-  \defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}%
+% @defop category class name args
+\makedefun{defop}#1 {\defopheaderx{#1\ \putwordon}}
+\def\defopheaderx#1#2 #3 #4\endheader{%
+  \doind{fn}{\code{#3}\space\putwordon\ \code{#2}}%
+  \printdefname{#1\ \code{#2}}{}{#3}\magicamp\defunargs{#4\unskip}%
 }
 
 % Typed functions:
 
 % @deftypefn category type name args
-\makedefun{deftypefn}{\deftypefngeneral{}}
+\makedefun{deftypefn}#1 #2 #3 #4\endheader{%
+  \doind{fn}{\code{#3}}%
+  \doingtypefntrue
+  \printdefname{#1}{#2}{#3}\defunargs{#4\unskip}%
+}
 
 % @deftypeop category class type name args
-\makedefun{deftypeop}#1 {\deftypeopon{#1\ \putwordon}}
-
-% \deftypeopon {category on}class type name args
-\def\deftypeopon#1#2 {\deftypefngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} }
-
-% \deftypefngeneral {subind}category type name args
-%
-\def\deftypefngeneral#1#2 #3 #4 #5\endheader{%
-  \dosubind{fn}{\code{#4}}{#1}%
+\makedefun{deftypeop}#1 {\deftypeopheaderx{#1\ \putwordon}}
+\def\deftypeopheaderx#1#2 #3 #4 #5\endheader{%
+  \doind{fn}{\code{#4}\space\putwordon\ \code{#1\ \code{#2}}}%
   \doingtypefntrue
-  \defname{#2}{#3}{#4}\defunargs{#5\unskip}%
+  \printdefname{#1\ \code{#2}}{#3}{#4}\defunargs{#5\unskip}%
 }
 
 % Typed variables:
 
 % @deftypevr category type var args
-\makedefun{deftypevr}{\deftypecvgeneral{}}
+\makedefun{deftypevr}#1 #2 #3 #4\endheader{%
+  \doind{vr}{\code{#3}}%
+  \printdefname{#1}{#2}{#3}\defunargs{#4\unskip}%
+}
 
 % @deftypecv category class type var args
-\makedefun{deftypecv}#1 {\deftypecvof{#1\ \putwordof}}
-
-% \deftypecvof {category of}class type var args
-\def\deftypecvof#1#2 {\deftypecvgeneral{\putwordof\ \code{#2}}{#1\ \code{#2}} }
-
-% \deftypecvgeneral {subind}category type var args
-%
-\def\deftypecvgeneral#1#2 #3 #4 #5\endheader{%
-  \dosubind{vr}{\code{#4}}{#1}%
-  \defname{#2}{#3}{#4}\defunargs{#5\unskip}%
+\makedefun{deftypecv}#1 {\deftypecvheaderx{#1\ \putwordof}}
+\def\deftypecvheaderx#1#2 #3 #4 #5\endheader{%
+  \doind{vr}{\code{#4}\space\putwordof\ \code{#2}}%
+  \printdefname{#1\ \code{#2}}{#3}{#4}\defunargs{#5\unskip}%
 }
 
 % Untyped variables:
@@ -7722,17 +7702,15 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 \makedefun{defvr}#1 {\deftypevrheader{#1} {} }
 
 % @defcv category class var args
-\makedefun{defcv}#1 {\defcvof{#1\ \putwordof}}
-
-% \defcvof {category of}class var args
-\def\defcvof#1#2 {\deftypecvof{#1}#2 {} }
+\makedefun{defcv}#1 {\defcvheaderx{#1\ \putwordof}}
+\def\defcvheaderx#1#2 {\deftypecvheaderx{#1}#2 {} }
 
 % Types:
 
 % @deftp category name args
 \makedefun{deftp}#1 #2 #3\endheader{%
   \doind{tp}{\code{#2}}%
-  \defname{#1}{}{#2}\defunargs{#3\unskip}%
+  \printdefname{#1}{}{#2}\defunargs{#3\unskip}%
 }
 
 % Remaining @defun-like shortcuts:
@@ -7743,19 +7721,19 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 \makedefun{defvar}{\defvrheader{\putwordDefvar} }
 \makedefun{defopt}{\defvrheader{\putwordDefopt} }
 \makedefun{deftypevar}{\deftypevrheader{\putwordDefvar} }
-\makedefun{defmethod}{\defopon\putwordMethodon}
-\makedefun{deftypemethod}{\deftypeopon\putwordMethodon}
-\makedefun{defivar}{\defcvof\putwordInstanceVariableof}
-\makedefun{deftypeivar}{\deftypecvof\putwordInstanceVariableof}
+\makedefun{defmethod}{\defopheaderx\putwordMethodon}
+\makedefun{deftypemethod}{\deftypeopheaderx\putwordMethodon}
+\makedefun{defivar}{\defcvheaderx\putwordInstanceVariableof}
+\makedefun{deftypeivar}{\deftypecvheaderx\putwordInstanceVariableof}
 
-% \defname, which formats the name of the @def (not the args).
+% \printdefname, which formats the name of the @def (not the args).
 % #1 is the category, such as "Function".
 % #2 is the return type, if any.
 % #3 is the function name.
 %
 % We are followed by (but not passed) the arguments, if any.
 %
-\def\defname#1#2#3{%
+\def\printdefname#1#2#3{%
   \par
   % Get the values of \leftskip and \rightskip as they were outside the @def...
   \advance\leftskip by -\defbodyindent
@@ -7765,9 +7743,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
   \rettypeownlinefalse
   \ifdoingtypefn  % doing a typed function specifically?
     % then check user option for putting return type on its own line:
-    \expandafter\ifx\csname SETtxideftypefnnl\endcsname\relax \else
-      \rettypeownlinetrue
-    \fi
+    \ifflagclear{txideftypefnnl}{}{\rettypeownlinetrue}%
   \fi
   %
   % How we'll format the category name.  Putting it in brackets helps
@@ -7832,30 +7808,22 @@ might help (with 'rm \jobname.?? \jobname.??s')%
     \fi           % no return type
     #3% output function name
   }%
-  {\rm\enskip}% hskip 0.5 em of \rmfont
+  \ifflagclear{txidefnamenospace}{%
+    {\rm\enskip}% hskip 0.5 em of \rmfont
+  }{}%
   %
   \boldbrax
   % arguments will be output next, if any.
 }
 
-% Print arguments in slanted roman (not ttsl), inconsistently with using
-% tt for the name.  This is because literal text is sometimes needed in
-% the argument list (groff manual), and ttsl and tt are not very
-% distinguishable.  Prevent hyphenation at `-' chars.
-%
+% Print arguments.  Use slanted for @def*, typewriter for @deftype*.
 \def\defunargs#1{%
-  % use sl by default (not ttsl),
-  % tt for the names.
-  \df \sl \hyphenchar\font=0
-  %
-  % On the other hand, if an argument has two dashes (for instance), we
-  % want a way to get ttsl.  We used to recommend @var for that, so
-  % leave the code in, but it's strange for @var to lead to typewriter.
-  % Nowadays we recommend @code, since the difference between a ttsl hyphen
-  % and a tt hyphen is pretty tiny.  @code also disables ?` !`.
-  \def\var##1{{\setregularquotes\ttslanted{##1}}}%
-  #1%
-  \sl\hyphenchar\font=45
+  \bgroup
+    \df \ifdoingtypefn \tt \else \sl \fi
+    \ifflagclear{txicodevaristt}{}%
+       {\def\var##1{{\setregularquotes \ttsl ##1}}}%
+    #1%
+  \egroup
 }
 
 % We want ()&[] to print specially on the defun line.
@@ -7874,9 +7842,12 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 % so TeX would otherwise complain about undefined control sequence.
 {
   \activeparens
-  \global\let(=\lparen \global\let)=\rparen
-  \global\let[=\lbrack \global\let]=\rbrack
-  \global\let& = \&
+  \gdef\defcharsdefault{%
+    \let(=\lparen \let)=\rparen
+    \let[=\lbrack \let]=\rbrack
+    \let& = \&%
+  }
+  \globaldefs=1 \defcharsdefault
 
   \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb}
   \gdef\magicamp{\let&=\amprm}
@@ -7887,7 +7858,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 
 % If we encounter &foo, then turn on ()-hacking afterwards
 \newif\ifampseen
-\def\amprm#1 {\ampseentrue{\bf\&#1 }}
+\def\amprm#1 {\ampseentrue{\rm\&#1 }}
 
 \def\parenfont{%
   \ifampseen
@@ -8060,24 +8031,17 @@ might help (with 'rm \jobname.?? \jobname.??s')%
   \catcode`\_=\other
   \catcode`\|=\other
   \catcode`\~=\other
-  \passthroughcharstrue
-}
-
-\def\scanargctxt{% used for copying and captions, not macros.
-  \scanctxt
   \catcode`\@=\other
-  \catcode`\\=\other
   \catcode`\^^M=\other
+  \catcode`\\=\active
+  \passthroughcharstrue
 }
 
-\def\macrobodyctxt{% used for @macro definitions
+\def\macrobodyctxt{% used for @macro definitions and @copying
   \scanctxt
   \catcode`\ =\other
-  \catcode`\@=\other
   \catcode`\{=\other
   \catcode`\}=\other
-  \catcode`\^^M=\other
-  \usembodybackslash
 }
 
 % Used when scanning braced macro arguments.  Note, however, that catcode
@@ -8086,14 +8050,10 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 \def\macroargctxt{%
   \scanctxt
   \catcode`\ =\active
-  \catcode`\@=\other
-  \catcode`\^^M=\other
-  \catcode`\\=\active
 }
 
 \def\macrolineargctxt{% used for whole-line arguments without braces
   \scanctxt
-  \catcode`\@=\other
   \catcode`\{=\other
   \catcode`\}=\other
 }
@@ -8137,7 +8097,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
      \global\expandafter\let\csname ismacro.\the\macname\endcsname=1%
      \addtomacrolist{\the\macname}%
   \fi
-  \begingroup \macrobodyctxt
+  \begingroup \macrobodyctxt \usembodybackslash
   \ifrecursive \expandafter\parsermacbody
   \else \expandafter\parsemacbody
   \fi}
@@ -8222,12 +8182,12 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 %
 % We are in \macrobodyctxt, and the \xdef causes backslashshes in the macro
 % body to be transformed.
-% Set \macrobody to the body of the macro, and call \defmacro.
+% Set \macrobody to the body of the macro, and call \macrodef.
 %
 {\catcode`\ =\other\long\gdef\parsemacbody#1@end macro{%
-\xdef\macrobody{\eatcr{#1}}\endgroup\defmacro}}%
+\xdef\macrobody{\eatcr{#1}}\endgroup\macrodef}}%
 {\catcode`\ =\other\long\gdef\parsermacbody#1@end rmacro{%
-\xdef\macrobody{\eatcr{#1}}\endgroup\defmacro}}%
+\xdef\macrobody{\eatcr{#1}}\endgroup\macrodef}}%
 
 % Make @ a letter, so that we can make private-to-Texinfo macro names.
 \edef\texiatcatcode{\the\catcode`\@}
@@ -8446,35 +8406,36 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 % \xdef is used so that macro definitions will survive the file
 % they're defined in: @include reads the file inside a group.
 %
-\def\defmacro{%
+\def\macrodef{%
   \let\hash=##% convert placeholders to macro parameter chars
   \ifnum\paramno=1
-    \def\xeatspaces##1{##1}%
-    % This removes the pair of braces around the argument.  We don't
-    % use \eatspaces, because this can cause ends of lines to be lost
-    % when the argument to \eatspaces is read, leading to line-based
-    % commands like "@itemize" not being read correctly.
+    \long\def\xeatspaces##1{##1}%
+    % We don't use \xeatspaces for single-argument macros, because we
+    % want to keep ends of lines.  This definition removes \xeatspaces
+    % when \macrobody is expanded below.
   \else
-    \let\xeatspaces\relax % suppress expansion
+    \def\xeatspaces{\string\xeatspaces}%
+    % This expands \xeatspaces as a sequence of character tokens, which
+    % stops \scantokens inserting an extra space after the control sequence.
   \fi
   \ifcase\paramno
   % 0
     \expandafter\xdef\csname\the\macname\endcsname{%
-      \bgroup
+      \begingroup
         \noexpand\spaceisspace
         \noexpand\endlineisspace
         \noexpand\expandafter % skip any whitespace after the macro name.
         \expandafter\noexpand\csname\the\macname @@@\endcsname}%
     \expandafter\xdef\csname\the\macname @@@\endcsname{%
-      \egroup
+      \endgroup
       \noexpand\scanmacro{\macrobody}}%
   \or % 1
     \expandafter\xdef\csname\the\macname\endcsname{%
-       \bgroup
+       \begingroup
        \noexpand\braceorline
        \expandafter\noexpand\csname\the\macname @@@\endcsname}%
     \expandafter\xdef\csname\the\macname @@@\endcsname##1{%
-      \egroup
+      \endgroup
       \noexpand\scanmacro{\macrobody}%
       }%
   \else % at most 9
@@ -8485,7 +8446,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
       % @MACNAME@@@ removes braces surrounding the argument list.
       % @MACNAME@@@@ scans the macro body with arguments substituted.
       \expandafter\xdef\csname\the\macname\endcsname{%
-        \bgroup
+        \begingroup
         \noexpand\expandafter  % This \expandafter skip any spaces after the
         \noexpand\macroargctxt % macro before we change the catcode of space.
         \noexpand\expandafter
@@ -8499,7 +8460,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
       \expandafter\xdef
       \expandafter\expandafter
         \csname\the\macname @@@@\endcsname\paramlist{%
-          \egroup\noexpand\scanmacro{\macrobody}}%
+          \endgroup\noexpand\scanmacro{\macrobody}}%
     \else % 10 or more:
       \expandafter\xdef\csname\the\macname\endcsname{%
         \noexpand\getargvals@{\the\macname}{\argl}%
@@ -8621,6 +8582,75 @@ might help (with 'rm \jobname.?? \jobname.??s')%
   \fi \macnamexxx}
 
 
+% @linemacro
+
+\parseargdef\linemacro{%
+  \getargs{#1}% now \macname is the macname and \argl the arglist
+  \ifx\argl\empty
+    \paramno=0
+    \let\hash\relax
+    \def\paramlist{\hash 1\endlinemacro}%
+  \else
+    \expandafter\linegetparamlist\argl;%
+  \fi
+  \begingroup \macrobodyctxt \usembodybackslash
+  \parselinemacrobody
+}
+
+% Build up \paramlist which will be used as the parameter text for the macro.
+% At the end it will be like "#1 #2 #3\endlinemacro".
+\def\linegetparamlist#1;{%
+  \paramno=0\def\paramlist{}%
+  \let\hash\relax
+  \linegetparamlistxxx#1,;,%
+}
+\def\linegetparamlistxxx#1,{%
+  \if#1;\let\next=\linegetparamlistxxxx
+  \else \let\next=\linegetparamlistxxx
+    \advance\paramno by 1
+    \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname
+        {\hash\the\paramno}%
+    \edef\paramlist{\paramlist\hash\the\paramno\space}%
+  \fi\next}
+\def\linegetparamlistxxxx{%
+  \expandafter\fixparamlist\paramlist\fixparamlist
+}
+% Replace final space token
+\def\fixparamlist#1 \fixparamlist{%
+  \def\paramlist{#1\endlinemacro}%
+}
+
+% Read the body of the macro, replacing backslash-surrounded variables
+%
+{\catcode`\ =\other\long\gdef\parselinemacrobody#1@end linemacro{%
+\xdef\macrobody{#1}%
+\endgroup
+\linemacrodef
+}}
+
+% Make the definition
+\def\linemacrodef{%
+  \let\hash=##%
+  \expandafter\xdef\csname\the\macname\endcsname{%
+    \bgroup
+    \noexpand\parsearg
+    \expandafter\noexpand\csname\the\macname @@\endcsname
+  }
+  \expandafter\xdef\csname\the\macname @@\endcsname##1{%
+    \egroup
+    \expandafter\noexpand
+    \csname\the\macname @@@\endcsname##1\noexpand\endlinemacro
+  }
+  \expandafter\expandafter
+  \expandafter\xdef
+  \expandafter\expandafter\csname\the\macname @@@\endcsname\paramlist{%
+    \newlinechar=13 % split \macrobody into lines
+    \noexpand\scantokens{\macrobody}%
+  }
+}
+
+
+
 % @alias.
 % We need some trickery to remove the optional spaces around the equal
 % sign.  Make them active and then expand them all to nothing.
@@ -8941,12 +8971,11 @@ might help (with 'rm \jobname.?? \jobname.??s')%
       % output the `[mynode]' via the macro below so it can be overridden.
       \xrefprintnodename\printedrefname
       %
-      \expandafter\ifx\csname SETtxiomitxrefpg\endcsname\relax
-        % But we always want a comma and a space:
-        ,\space
-        %
+      \ifflagclear{txiomitxrefpg}{%
+        % We always want a comma
+        ,%
         % output the `page 3'.
-        \turnoffactive \putwordpage\tie\refx{#1-pg}%
+        \turnoffactive \putpageref{#1}%
         % Add a , if xref followed by a space
         \if\space\noexpand\tokenafterxref ,%
         \else\ifx\	\tokenafterxref ,% @TAB
@@ -8956,12 +8985,16 @@ might help (with 'rm \jobname.?? \jobname.??s')%
                   \tokenafterxref ,%    @NL
         \else\ifx\tie\tokenafterxref ,% @tie
         \fi\fi\fi\fi\fi\fi
-      \fi
+      }{}%
     \fi\fi
   \fi
   \endlink
 \endgroup}
 
+% can be overridden in translation files
+\def\putpageref#1{%
+  \space\putwordpage\tie\refx{#1-pg}}
+
 % Output a cross-manual xref to #1.  Used just above (twice).
 %
 % Only include the text "Section ``foo'' in" if the foo is neither
@@ -9373,6 +9406,12 @@ might help (with 'rm \jobname.?? \jobname.??s')%
     \imagexxx #1,,,,,\finish
   \fi
 }
+
+% Approximate height of a line in the standard text font.
+\newdimen\capheight
+\setbox0=\vbox{\tenrm H}
+\capheight=\ht0
+
 %
 % Arguments to @image:
 % #1 is (mandatory) image filename; we tack on .eps extension.
@@ -9387,13 +9426,6 @@ might help (with 'rm \jobname.?? \jobname.??s')%
   \makevalueexpandable
   \ifvmode
     \imagevmodetrue
-  \else \ifx\centersub\centerV
-    % for @center @image, we need a vbox so we can have our vertical space
-    \imagevmodetrue
-    \vbox\bgroup % vbox has better behavior than vtop here
-  \fi\fi
-  %
-  \ifimagevmode
     \medskip
     % Usually we'll have text after the image which will insert
     % \parskip glue, so insert it here too to equalize the space
@@ -9402,17 +9434,20 @@ might help (with 'rm \jobname.?? \jobname.??s')%
     %
     % Place image in a \vtop for a top page margin that is (close to) correct,
     % as \topskip glue is relative to the first baseline.
-    \vtop\bgroup\hrule height 0pt\vskip-\parskip
+    \vtop\bgroup \kern -\capheight \vskip-\parskip
   \fi
   %
-  % Enter horizontal mode so that indentation from an enclosing
-  %  environment such as @quotation is respected.
-  % However, if we're at the top level, we don't want the
-  %  normal paragraph indentation.
-  % On the other hand, if we are in the case of @center @image, we don't
-  %  want to start a paragraph, which will create a hsize-width box and
-  %  eradicate the centering.
-  \ifx\centersub\centerV \else \imageindent \fi
+  \ifx\centersub\centerV
+    % For @center @image, enter vertical mode and add vertical space
+    % Enter an extra \parskip because @center doesn't add space itself.
+    \vbox\bgroup\vskip\parskip\medskip\vskip\parskip
+  \else
+    % Enter horizontal mode so that indentation from an enclosing
+    %  environment such as @quotation is respected.
+    % However, if we're at the top level, we don't want the
+    %  normal paragraph indentation.
+    \imageindent
+  \fi
   %
   % Output the image.
   \ifpdf
@@ -9437,7 +9472,10 @@ might help (with 'rm \jobname.?? \jobname.??s')%
     \egroup
     \medskip  % space after a standalone image
   \fi
-  \ifx\centersub\centerV \egroup \fi
+  \ifx\centersub\centerV % @center @image
+    \medskip
+    \egroup % close \vbox
+  \fi
 \endgroup}
 
 
@@ -9604,8 +9642,8 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 %
 \def\caption{\docaption\thiscaption}
 \def\shortcaption{\docaption\thisshortcaption}
-\def\docaption{\checkenv\float \bgroup\scanargctxt\defcaption}
-\def\defcaption#1#2{\egroup \def#1{#2}}
+\def\docaption{\checkenv\float \bgroup\scanctxt\docaptionz}
+\def\docaptionz#1#2{\egroup \def#1{#2}}
 
 % The parameter is the control sequence identifying the counter we are
 % going to use.  Create it if it doesn't exist and assign it to \floatno.
@@ -9894,12 +9932,10 @@ directory should work if nowhere else does.}
        % For native Unicode handling (XeTeX and LuaTeX)
        \nativeunicodechardefs
      \else
-       % For treating UTF-8 as byte sequences (TeX, eTeX and pdfTeX)
+       % For treating UTF-8 as byte sequences (TeX, eTeX and pdfTeX).
+       % Since we already invoke \utfeightchardefs at the top level,
+       % making non-ascii chars active is sufficient.
        \setnonasciicharscatcode\active
-       % since we already invoked \utfeightchardefs at the top level
-       % (below), do not re-invoke it, otherwise our check for duplicated
-       % definitions gets triggered.  Making non-ascii chars active is
-       % sufficient.
      \fi
   %
   \else
@@ -9924,7 +9960,6 @@ directory should work if nowhere else does.}
   \fi
 }
 
-% emacs-page
 % A message to be logged when using a character that isn't available
 % the default font encoding (OT1).
 %
@@ -9933,12 +9968,6 @@ directory should work if nowhere else does.}
 % Take account of \c (plain) vs. \, (Texinfo) difference.
 \def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi}
 
-% First, make active non-ASCII characters in order for them to be
-% correctly categorized when TeX reads the replacement text of
-% macros containing the character definitions.
-\setnonasciicharscatcode\active
-%
-
 \def\gdefchar#1#2{%
 \gdef#1{%
    \ifpassthroughchars
@@ -9948,8 +9977,14 @@ directory should work if nowhere else does.}
    \fi
 }}
 
+\begingroup
+
+% Make non-ASCII characters active for defining the character definition
+% macros.
+\setnonasciicharscatcode\active
+
 % Latin1 (ISO-8859-1) character definitions.
-\def\latonechardefs{%
+\gdef\latonechardefs{%
   \gdefchar^^a0{\tie}
   \gdefchar^^a1{\exclamdown}
   \gdefchar^^a2{{\tcfont \char162}} % cent
@@ -10054,7 +10089,7 @@ directory should work if nowhere else does.}
 }
 
 % Latin9 (ISO-8859-15) encoding character definitions.
-\def\latninechardefs{%
+\gdef\latninechardefs{%
   % Encoding is almost identical to Latin1.
   \latonechardefs
   %
@@ -10069,7 +10104,7 @@ directory should work if nowhere else does.}
 }
 
 % Latin2 (ISO-8859-2) character definitions.
-\def\lattwochardefs{%
+\gdef\lattwochardefs{%
   \gdefchar^^a0{\tie}
   \gdefchar^^a1{\ogonek{A}}
   \gdefchar^^a2{\u{}}
@@ -10087,7 +10122,7 @@ directory should work if nowhere else does.}
   \gdefchar^^ae{\v Z}
   \gdefchar^^af{\dotaccent Z}
   %
-  \gdefchar^^b0{\textdegree{}}
+  \gdefchar^^b0{\textdegree}
   \gdefchar^^b1{\ogonek{a}}
   \gdefchar^^b2{\ogonek{ }}
   \gdefchar^^b3{\l}
@@ -10173,6 +10208,8 @@ directory should work if nowhere else does.}
   \gdefchar^^ff{\dotaccent{}}
 }
 
+\endgroup % active chars
+
 % UTF-8 character definitions.
 %
 % This code to support UTF-8 is based on LaTeX's utf8.def, with some
@@ -10324,9 +10361,9 @@ directory should work if nowhere else does.}
   % Given the value in \countUTFz as a Unicode code point, set \UTFviiiTmp
   % to the corresponding UTF-8 sequence.
   \gdef\parseXMLCharref{%
-    \ifnum\countUTFz < "A0\relax
+    \ifnum\countUTFz < "20\relax
       \errhelp = \EMsimple
-      \errmessage{Cannot define Unicode char value < 00A0}%
+      \errmessage{Cannot define Unicode char value < 0020}%
     \else\ifnum\countUTFz < "800\relax
       \parseUTFviiiA,%
       \parseUTFviiiB C\UTFviiiTwoOctetsName.,%
@@ -10396,6 +10433,103 @@ directory should work if nowhere else does.}
 % least make most of the characters not bomb out.
 %
 \def\unicodechardefs{%
+  \DeclareUnicodeCharacter{0020}{ } % space
+  \DeclareUnicodeCharacter{0021}{\char"21 }% % space to terminate number
+  \DeclareUnicodeCharacter{0022}{\char"22 }%
+  \DeclareUnicodeCharacter{0023}{\char"23 }%
+  \DeclareUnicodeCharacter{0024}{\char"24 }%
+  \DeclareUnicodeCharacter{0025}{\char"25 }%
+  \DeclareUnicodeCharacter{0026}{\char"26 }%
+  \DeclareUnicodeCharacter{0027}{\char"27 }%
+  \DeclareUnicodeCharacter{0028}{\char"28 }%
+  \DeclareUnicodeCharacter{0029}{\char"29 }%
+  \DeclareUnicodeCharacter{002A}{\char"2A }%
+  \DeclareUnicodeCharacter{002B}{\char"2B }%
+  \DeclareUnicodeCharacter{002C}{\char"2C }%
+  \DeclareUnicodeCharacter{002D}{\char"2D }%
+  \DeclareUnicodeCharacter{002E}{\char"2E }%
+  \DeclareUnicodeCharacter{002F}{\char"2F }%
+  \DeclareUnicodeCharacter{0030}{0}%
+  \DeclareUnicodeCharacter{0031}{1}%
+  \DeclareUnicodeCharacter{0032}{2}%
+  \DeclareUnicodeCharacter{0033}{3}%
+  \DeclareUnicodeCharacter{0034}{4}%
+  \DeclareUnicodeCharacter{0035}{5}%
+  \DeclareUnicodeCharacter{0036}{6}%
+  \DeclareUnicodeCharacter{0037}{7}%
+  \DeclareUnicodeCharacter{0038}{8}%
+  \DeclareUnicodeCharacter{0039}{9}%
+  \DeclareUnicodeCharacter{003A}{\char"3A }%
+  \DeclareUnicodeCharacter{003B}{\char"3B }%
+  \DeclareUnicodeCharacter{003C}{\char"3C }%
+  \DeclareUnicodeCharacter{003D}{\char"3D }%
+  \DeclareUnicodeCharacter{003E}{\char"3E }%
+  \DeclareUnicodeCharacter{003F}{\char"3F }%
+  \DeclareUnicodeCharacter{0040}{\char"40 }%
+  \DeclareUnicodeCharacter{0041}{A}%
+  \DeclareUnicodeCharacter{0042}{B}%
+  \DeclareUnicodeCharacter{0043}{C}%
+  \DeclareUnicodeCharacter{0044}{D}%
+  \DeclareUnicodeCharacter{0045}{E}%
+  \DeclareUnicodeCharacter{0046}{F}%
+  \DeclareUnicodeCharacter{0047}{G}%
+  \DeclareUnicodeCharacter{0048}{H}%
+  \DeclareUnicodeCharacter{0049}{I}%
+  \DeclareUnicodeCharacter{004A}{J}%
+  \DeclareUnicodeCharacter{004B}{K}%
+  \DeclareUnicodeCharacter{004C}{L}%
+  \DeclareUnicodeCharacter{004D}{M}%
+  \DeclareUnicodeCharacter{004E}{N}%
+  \DeclareUnicodeCharacter{004F}{O}%
+  \DeclareUnicodeCharacter{0050}{P}%
+  \DeclareUnicodeCharacter{0051}{Q}%
+  \DeclareUnicodeCharacter{0052}{R}%
+  \DeclareUnicodeCharacter{0053}{S}%
+  \DeclareUnicodeCharacter{0054}{T}%
+  \DeclareUnicodeCharacter{0055}{U}%
+  \DeclareUnicodeCharacter{0056}{V}%
+  \DeclareUnicodeCharacter{0057}{W}%
+  \DeclareUnicodeCharacter{0058}{X}%
+  \DeclareUnicodeCharacter{0059}{Y}%
+  \DeclareUnicodeCharacter{005A}{Z}%
+  \DeclareUnicodeCharacter{005B}{\char"5B }%
+  \DeclareUnicodeCharacter{005C}{\char"5C }%
+  \DeclareUnicodeCharacter{005D}{\char"5D }%
+  \DeclareUnicodeCharacter{005E}{\char"5E }%
+  \DeclareUnicodeCharacter{005F}{\char"5F }%
+  \DeclareUnicodeCharacter{0060}{\char"60 }%
+  \DeclareUnicodeCharacter{0061}{a}%
+  \DeclareUnicodeCharacter{0062}{b}%
+  \DeclareUnicodeCharacter{0063}{c}%
+  \DeclareUnicodeCharacter{0064}{d}%
+  \DeclareUnicodeCharacter{0065}{e}%
+  \DeclareUnicodeCharacter{0066}{f}%
+  \DeclareUnicodeCharacter{0067}{g}%
+  \DeclareUnicodeCharacter{0068}{h}%
+  \DeclareUnicodeCharacter{0069}{i}%
+  \DeclareUnicodeCharacter{006A}{j}%
+  \DeclareUnicodeCharacter{006B}{k}%
+  \DeclareUnicodeCharacter{006C}{l}%
+  \DeclareUnicodeCharacter{006D}{m}%
+  \DeclareUnicodeCharacter{006E}{n}%
+  \DeclareUnicodeCharacter{006F}{o}%
+  \DeclareUnicodeCharacter{0070}{p}%
+  \DeclareUnicodeCharacter{0071}{q}%
+  \DeclareUnicodeCharacter{0072}{r}%
+  \DeclareUnicodeCharacter{0073}{s}%
+  \DeclareUnicodeCharacter{0074}{t}%
+  \DeclareUnicodeCharacter{0075}{u}%
+  \DeclareUnicodeCharacter{0076}{v}%
+  \DeclareUnicodeCharacter{0077}{w}%
+  \DeclareUnicodeCharacter{0078}{x}%
+  \DeclareUnicodeCharacter{0079}{y}%
+  \DeclareUnicodeCharacter{007A}{z}%
+  \DeclareUnicodeCharacter{007B}{\char"7B }%
+  \DeclareUnicodeCharacter{007C}{\char"7C }%
+  \DeclareUnicodeCharacter{007D}{\char"7D }%
+  \DeclareUnicodeCharacter{007E}{\char"7E }%
+  % \DeclareUnicodeCharacter{007F}{} % DEL
+  %
   \DeclareUnicodeCharacter{00A0}{\tie}%
   \DeclareUnicodeCharacter{00A1}{\exclamdown}%
   \DeclareUnicodeCharacter{00A2}{{\tcfont \char162}}% 0242=cent
@@ -10413,7 +10547,7 @@ directory should work if nowhere else does.}
   \DeclareUnicodeCharacter{00AE}{\registeredsymbol{}}%
   \DeclareUnicodeCharacter{00AF}{\={ }}%
   %
-  \DeclareUnicodeCharacter{00B0}{\ringaccent{ }}%
+  \DeclareUnicodeCharacter{00B0}{\textdegree}%
   \DeclareUnicodeCharacter{00B1}{\ensuremath\pm}%
   \DeclareUnicodeCharacter{00B2}{$^2$}%
   \DeclareUnicodeCharacter{00B3}{$^3$}%
@@ -10917,7 +11051,7 @@ directory should work if nowhere else does.}
   %
   \DeclareUnicodeCharacter{20AC}{\euro{}}%
   %
-  \DeclareUnicodeCharacter{2192}{\expansion{}}%
+  \DeclareUnicodeCharacter{2192}{\arrow}%
   \DeclareUnicodeCharacter{21D2}{\result{}}%
   %
   % Mathematical symbols
@@ -11080,24 +11214,26 @@ directory should work if nowhere else does.}
 % provide a definition macro to replace/pass-through a Unicode character
 %
 \def\DeclareUnicodeCharacterNative#1#2{%
-  \catcode"#1=\active
-  \def\dodeclareunicodecharacternative##1##2##3{%
+  \ifnum"#1>"7F % only make non-ASCII chars active
+    \catcode"#1=\active
+    \def\dodeclareunicodecharacternative##1##2##3{%
+      \begingroup
+        \uccode`\~="##2\relax
+        \uppercase{\gdef~}{%
+          \ifpassthroughchars
+            ##1%
+          \else
+            ##3%
+          \fi
+        }
+      \endgroup
+    }
     \begingroup
-      \uccode`\~="##2\relax
-      \uppercase{\gdef~}{%
-        \ifpassthroughchars
-          ##1%
-        \else
-          ##3%
-        \fi
-      }
+      \uccode`\.="#1\relax
+      \uppercase{\def\UTFNativeTmp{.}}%
+      \expandafter\dodeclareunicodecharacternative\UTFNativeTmp{#1}{#2}%
     \endgroup
-  }
-  \begingroup
-    \uccode`\.="#1\relax
-    \uppercase{\def\UTFNativeTmp{.}}%
-    \expandafter\dodeclareunicodecharacternative\UTFNativeTmp{#1}{#2}%
-  \endgroup
+  \fi
 }
 
 % Native Unicode handling (XeTeX and LuaTeX) character replacing definition.
@@ -11126,14 +11262,14 @@ directory should work if nowhere else does.}
    \relax
 }
 
-% Define all Unicode characters we know about.  This makes UTF-8 the default
-% input encoding and allows @U to work.
+% Define all Unicode characters we know about
 \iftxinativeunicodecapable
   \nativeunicodechardefsatu
 \else
   \utfeightchardefs
 \fi
 
+
 \message{formatting,}
 
 \newdimen\defaultparindent \defaultparindent = 15pt
@@ -11180,13 +11316,9 @@ directory should work if nowhere else does.}
   %
   \vsize = #1\relax
   \advance\vsize by \topskip
-  \outervsize = \vsize
-  \advance\outervsize by 2\topandbottommargin
   \txipageheight = \vsize
   %
   \hsize = #2\relax
-  \outerhsize = \hsize
-  \advance\outerhsize by 0.5in
   \txipagewidth = \hsize
   %
   \normaloffset = #4\relax
@@ -11276,7 +11408,7 @@ directory should work if nowhere else does.}
   \textleading = 12.5pt
   %
   \internalpagesizes{160mm}{120mm}%
-                    {\voffset}{\hoffset}%
+                    {\voffset}{-11.4mm}%
                     {\bindingoffset}{8pt}%
                     {210mm}{148mm}%
   %
@@ -11355,9 +11487,138 @@ directory should work if nowhere else does.}
 \hfuzz = 1pt
 
 
+\message{microtype,}
+
+% protrusion, from Thanh's protcode.tex.
+\def\mtsetprotcode#1{%
+  \rpcode#1`\!=200  \rpcode#1`\,=700  \rpcode#1`\-=700  \rpcode#1`\.=700
+  \rpcode#1`\;=500  \rpcode#1`\:=500  \rpcode#1`\?=200
+  \rpcode#1`\'=700
+  \rpcode#1 34=500  % ''
+  \rpcode#1 123=300 % --
+  \rpcode#1 124=200 % ---
+  \rpcode#1`\)=50   \rpcode#1`\A=50   \rpcode#1`\F=50   \rpcode#1`\K=50
+  \rpcode#1`\L=50   \rpcode#1`\T=50   \rpcode#1`\V=50   \rpcode#1`\W=50
+  \rpcode#1`\X=50   \rpcode#1`\Y=50   \rpcode#1`\k=50   \rpcode#1`\r=50
+  \rpcode#1`\t=50   \rpcode#1`\v=50   \rpcode#1`\w=50   \rpcode#1`\x=50
+  \rpcode#1`\y=50
+  %
+  \lpcode#1`\`=700
+  \lpcode#1 92=500  % ``
+  \lpcode#1`\(=50   \lpcode#1`\A=50   \lpcode#1`\J=50   \lpcode#1`\T=50
+  \lpcode#1`\V=50   \lpcode#1`\W=50   \lpcode#1`\X=50   \lpcode#1`\Y=50
+  \lpcode#1`\v=50   \lpcode#1`\w=50   \lpcode#1`\x=50   \lpcode#1`\y=0
+  %
+  \mtadjustprotcode#1\relax
+}
+
+\newcount\countC
+\def\mtadjustprotcode#1{%
+  \countC=0
+  \loop
+    \ifcase\lpcode#1\countC\else
+      \mtadjustcp\lpcode#1\countC
+    \fi
+    \ifcase\rpcode#1\countC\else
+      \mtadjustcp\rpcode#1\countC
+    \fi
+    \advance\countC 1
+  \ifnum\countC < 256 \repeat
+}
+
+\newcount\countB
+\def\mtadjustcp#1#2#3{%
+  \setbox\boxA=\hbox{%
+    \ifx#2\font\else#2\fi
+    \char#3}%
+  \countB=\wd\boxA
+  \multiply\countB #1#2#3\relax
+  \divide\countB \fontdimen6 #2\relax
+  #1#2#3=\countB\relax
+}
+
+\ifx\XeTeXrevision\thisisundefined
+  \ifx\luatexversion\thisisundefined
+    \ifpdf % pdfTeX
+      \mtsetprotcode\textrm
+      \def\mtfontexpand#1{\pdffontexpand#1 20 20 1 autoexpand\relax}
+    \else % TeX
+      \def\mtfontexpand#1{}
+    \fi
+  \else % LuaTeX
+    \mtsetprotcode\textrm
+    \def\mtfontexpand#1{\expandglyphsinfont#1 20 20 1\relax}
+  \fi
+\else % XeTeX
+  \mtsetprotcode\textrm
+  \def\mtfontexpand#1{}
+\fi
+
+
+\newif\ifmicrotype
+
+\def\microtypeON{%
+  \microtypetrue
+  %
+  \ifx\XeTeXrevision\thisisundefined
+    \ifx\luatexversion\thisisundefined
+      \ifpdf % pdfTeX
+        \pdfadjustspacing=2
+        \pdfprotrudechars=2
+      \fi
+    \else % LuaTeX
+      \adjustspacing=2
+      \protrudechars=2
+    \fi
+  \else % XeTeX
+    \XeTeXprotrudechars=2
+  \fi
+  %
+  \mtfontexpand\textrm
+  \mtfontexpand\textsl
+  \mtfontexpand\textbf
+}
+
+\def\microtypeOFF{%
+  \microtypefalse
+  %
+  \ifx\XeTeXrevision\thisisundefined
+    \ifx\luatexversion\thisisundefined
+      \ifpdf % pdfTeX
+        \pdfadjustspacing=0
+        \pdfprotrudechars=0
+      \fi
+    \else % LuaTeX
+      \adjustspacing=0
+      \protrudechars=0
+    \fi
+  \else % XeTeX
+    \XeTeXprotrudechars=0
+  \fi
+}
+
+\microtypeOFF
+
+\parseargdef\microtype{%
+  \def\txiarg{#1}%
+  \ifx\txiarg\onword
+    \microtypeON
+  \else\ifx\txiarg\offword
+    \microtypeOFF
+  \else
+    \errhelp = \EMsimple
+    \errmessage{Unknown @microtype option `\txiarg', must be on|off}%
+  \fi\fi
+}
+
+
 \message{and turning on texinfo input format.}
 
+% Make UTF-8 the default encoding.
+\documentencodingzzz{UTF-8}
+
 \def^^L{\par} % remove \outer, so ^L can appear in an @comment
+\catcode`\^^K = 10 % treat vertical tab as whitespace
 
 % DEL is a comment character, in case @c does not suffice.
 \catcode`\^^? = 14
@@ -11373,23 +11634,6 @@ directory should work if nowhere else does.}
 \catcode`\|=\other \def\normalverticalbar{|}
 \catcode`\~=\other \def\normaltilde{~}
 
-% This macro is used to make a character print one way in \tt
-% (where it can probably be output as-is), and another way in other fonts,
-% where something hairier probably needs to be done.
-%
-% #1 is what to print if we are indeed using \tt; #2 is what to print
-% otherwise.  Since all the Computer Modern typewriter fonts have zero
-% interword stretch (and shrink), and it is reasonable to expect all
-% typewriter fonts to have this, we can check that font parameter.
-%
-\def\ifusingtt#1#2{\ifdim \fontdimen3\font=0pt #1\else #2\fi}
-
-% Same as above, but check for italic font.  Actually this also catches
-% non-italic slanted fonts since it is impossible to distinguish them from
-% italic fonts.  But since this is only used by $ and it uses \sl anyway
-% this is not a problem.
-\def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi}
-
 % Set catcodes for Texinfo file
 
 % Active characters for printing the wanted glyph.
@@ -11435,23 +11679,32 @@ directory should work if nowhere else does.}
 % Used sometimes to turn off (effectively) the active characters even after
 % parsing them.
 \def\turnoffactive{%
-  \normalturnoffactive
+  \passthroughcharstrue
+  \let-=\normaldash
+  \let"=\normaldoublequote
+  \let$=\normaldollar %$ font-lock fix
+  \let+=\normalplus
+  \let<=\normalless
+  \let>=\normalgreater
+  \let^=\normalcaret
+  \let_=\normalunderscore
+  \let|=\normalverticalbar
+  \let~=\normaltilde
   \otherbackslash
+  \setregularquotes
+  \unsepspaces
 }
 
-\catcode`\@=0
+% If a .fmt file is being used, characters that might appear in a file
+% name cannot be active until we have parsed the command line.
+% So turn them off again, and have \loadconf turn them back on.
+\catcode`+=\other \catcode`\_=\other
+
 
 % \backslashcurfont outputs one backslash character in current font,
 % as in \char`\\.
 \global\chardef\backslashcurfont=`\\
 
-% \realbackslash is an actual character `\' with catcode other.
-{\catcode`\\=\other @gdef@realbackslash{\}}
-
-% In Texinfo, backslash is an active character; it prints the backslash
-% in fixed width font.
-\catcode`\\=\active  % @ for escape char from now on.
-
 % Print a typewriter backslash.  For math mode, we can't simply use
 % \backslashcurfont: the story here is that in math mode, the \char
 % of \backslashcurfont ends up printing the roman \ from the math symbol
@@ -11461,109 +11714,120 @@ directory should work if nowhere else does.}
 % ignored family value; char position "5C).  We can't use " for the
 % usual hex value because it has already been made active.
 
-@def@ttbackslash{{@tt @ifmmode @mathchar29020 @else @backslashcurfont @fi}}
-@let@backslashchar = @ttbackslash % @backslashchar{} is for user documents.
+\def\ttbackslash{{\tt \ifmmode \mathchar29020 \else \backslashcurfont \fi}}
+\let\backslashchar = \ttbackslash % \backslashchar{} is for user documents.
 
-% \otherbackslash defines an active \ to be a literal `\' character with
-% catcode other.
-@gdef@otherbackslash{@let\=@realbackslash}
-
-% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
-% the literal character `\'.
-%
-{@catcode`- = @active
- @gdef@normalturnoffactive{%
-   @passthroughcharstrue
-   @let-=@normaldash
-   @let"=@normaldoublequote
-   @let$=@normaldollar %$ font-lock fix
-   @let+=@normalplus
-   @let<=@normalless
-   @let>=@normalgreater
-   @let^=@normalcaret
-   @let_=@normalunderscore
-   @let|=@normalverticalbar
-   @let~=@normaltilde
-   @let\=@ttbackslash
-   @setregularquotes
-   @unsepspaces
- }
-}
-
-% If a .fmt file is being used, characters that might appear in a file
-% name cannot be active until we have parsed the command line.
-% So turn them off again, and have @fixbackslash turn them back on.
-@catcode`+=@other @catcode`@_=@other
-
-% \enablebackslashhack - allow file to begin `\input texinfo'
-%
-% If a .fmt file is being used, we don't want the `\input texinfo' to show up.
-% That is what \eatinput is for; after that, the `\' should revert to printing
-% a backslash.
-% If the file did not have a `\input texinfo', then it is turned off after
-% the first line; otherwise the first `\' in the file would cause an error.
-% This is used on the very last line of this file, texinfo.tex.
-% We also use @c to call @fixbackslash, in case ends of lines are hidden.
-{
-@catcode`@^=7
-@catcode`@^^M=13@gdef@enablebackslashhack{%
-  @global@let\ = @eatinput%
-  @catcode`@^^M=13%
-  @def@c{@fixbackslash@c}%
-  % Definition for the newline at the end of this file.
-  @def ^^M{@let^^M@secondlinenl}%
-  % Definition for a newline in the main Texinfo file.
-  @gdef @secondlinenl{@fixbackslash}%
+% These are made active for url-breaking, so need
+% active definitions as the normal characters.
+\def\normaldot{.}
+\def\normalquest{?}
+\def\normalslash{/}
+
+% \newlinesloadsconf - call \loadconf as soon as possible in the
+% file, e.g. at the first newline.
+%
+{\catcode`\^=7
+\catcode`\^^M=13
+\gdef\newlineloadsconf{%
+  \catcode`\^^M=13 %
+  \newlineloadsconfzz%
+}
+\gdef\newlineloadsconfzz#1^^M{%
+  \def\c{\loadconf\c}%
+  % Definition for the first newline read in the file
+  \def ^^M{\loadconf}%
   % In case the first line has a whole-line command on it
-  @let@originalparsearg@parsearg
-  @def@parsearg{@fixbackslash@originalparsearg}
+  \let\originalparsearg\parsearg%
+  \def\parsearg{\loadconf\originalparsearg}%
 }}
 
-{@catcode`@^=7 @catcode`@^^M=13%
-@gdef@eatinput input texinfo#1^^M{@fixbackslash}}
 
 % Emergency active definition of newline, in case an active newline token
 % appears by mistake.
-{@catcode`@^=7 @catcode13=13%
-@gdef@enableemergencynewline{%
-  @gdef^^M{%
-    @par%
-    %<warning: active newline>@par%
+{\catcode`\^=7 \catcode13=13%
+\gdef\enableemergencynewline{%
+  \gdef^^M{%
+    \par%
+    %<warning: active newline>\par%
 }}}
 
 
-@gdef@fixbackslash{%
-  @ifx\@eatinput @let\ = @ttbackslash @fi
-  @catcode13=5 % regular end of line
-  @enableemergencynewline
-  @let@c=@comment
-  @let@parsearg@originalparsearg
+% \loadconf gets called at the beginning of every Texinfo file.
+% If texinfo.cnf is present on the system, read it.  Useful for site-wide
+% @afourpaper, etc.  Not opening texinfo.cnf directly in texinfo.tex
+% makes it possible to make a format file for Texinfo.
+%
+\gdef\loadconf{%
+  \relax  % Terminate the filename if running as "tex '&texinfo' FILE.texi".
+  %
+  % Turn off the definitions that trigger \loadconf
+  \everyjobreset
+  \catcode13=5 % regular end of line
+  \enableemergencynewline
+  \let\c=\comment
+  \let\parsearg\originalparsearg
+  %
   % Also turn back on active characters that might appear in the input
   % file name, in case not using a pre-dumped format.
-  @catcode`+=@active
-  @catcode`@_=@active
-  %
-  % If texinfo.cnf is present on the system, read it.
-  % Useful for site-wide @afourpaper, etc.  This macro, @fixbackslash, gets
-  % called at the beginning of every Texinfo file.  Not opening texinfo.cnf
-  % directly in this file, texinfo.tex, makes it possible to make a format
-  % file for Texinfo.
+  \catcode`+=\active
+  \catcode`\_=\active
   %
-  @openin 1 texinfo.cnf
-  @ifeof 1 @else @input texinfo.cnf @fi
-  @closein 1
+  \openin 1 texinfo.cnf
+  \ifeof 1 \else \input texinfo.cnf \fi
+  \closein 1
 }
 
+% Redefine some control sequences to be controlled by the \ifdummies
+% and \ifindexnofonts switches.  Do this at the end so that the control
+% sequences are all defined.
+\definedummies
+
+
+
+
+\catcode`\@=0
+
+% \realbackslash is an actual character `\' with catcode other.
+{\catcode`\\=\other @gdef@realbackslash{\}}
+
+% In Texinfo, backslash is an active character; it prints the backslash
+% in fixed width font.
+\catcode`\\=\active  % @ for escape char from now on.
+
+@let\ = @ttbackslash
+
+% If in a .fmt file, print the version number.
+% \eatinput stops the `\input texinfo' from showing up.
+% After that, `\' should revert to printing a backslash.
+% Turn on active characters that we couldn't do earlier because
+% they might have appeared in the input file name.
+%
+@everyjob{@message{[Texinfo version @texinfoversion]}%
+  @global@let\ = @eatinput
+  @catcode`+=@active @catcode`@_=@active}
+
+{@catcode`@^=7 @catcode`@^^M=13%
+@gdef@eatinput input texinfo#1^^M{@loadconf}}
+
+@def@everyjobreset{@ifx\@eatinput @let\ = @ttbackslash @fi}
+
+% \otherbackslash defines an active \ to be a literal `\' character with
+% catcode other.
+@gdef@otherbackslash{@let\=@realbackslash}
+
+% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
+% the literal character `\'.
+%
+{@catcode`- = @active
+ @gdef@normalturnoffactive{%
+   @turnoffactive
+   @let\=@ttbackslash
+ }
+}
 
 % Say @foo, not \foo, in error messages.
 @escapechar = `@@
 
-% These (along with & and #) are made active for url-breaking, so need
-% active definitions as the normal characters.
-@def@normaldot{.}
-@def@normalquest{?}
-@def@normalslash{/}
-
 % These look ok in all fonts, so just make them not special.
 % @hashchar{} gets its own user-level command, because of #line.
 @catcode`@& = @other @def@normalamp{&}
@@ -11578,15 +11842,11 @@ directory should work if nowhere else does.}
 @c Do this last of all since we use ` in the previous @catcode assignments.
 @catcode`@'=@active
 @catcode`@`=@active
-@setregularquotes
 
 @c Local variables:
 @c eval: (add-hook 'before-save-hook 'time-stamp nil t)
 @c time-stamp-pattern: "texinfoversion{%Y-%02m-%02d.%02H}"
-@c page-delimiter: "^\\\\message\\|emacs-page"
+@c page-delimiter: "^\\\\message"
 @c End:
 
-@c vim:sw=2:
-
-@enablebackslashhack
-
+@newlineloadsconf
diff --git a/build-aux/update-copyright b/build-aux/update-copyright
index 81b691e8..99196fce 100755
--- a/build-aux/update-copyright
+++ b/build-aux/update-copyright
@@ -3,7 +3,7 @@
 
 # Update an FSF copyright year list to include the current year.
 
-# Copyright (C) 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2009-2023 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
@@ -137,7 +137,7 @@
 eval 'exec perl -wSx -0777 -pi "$0" "$@"'
      if 0;
 
-my $VERSION = '2020-04-04.15:07'; # UTC
+my $VERSION = '2023-01-11.04:24'; # 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
@@ -280,7 +280,7 @@ if (defined $stmt_re)
           }
 
         # Replace the old copyright statement.
-        s/$stmt_re/$stmt_wrapped/;
+        s/$stmt_re/$stmt_wrapped/g;
       }
   }
 else
diff --git a/build-aux/useless-if-before-free b/build-aux/useless-if-before-free
index 1a027a5d..f4908ba0 100755
--- a/build-aux/useless-if-before-free
+++ b/build-aux/useless-if-before-free
@@ -4,7 +4,7 @@
 # Detect instances of "if (p) free (p);".
 # Likewise "if (p != 0)", "if (0 != p)", or with NULL; and with braces.
 
-# Copyright (C) 2008-2022 Free Software Foundation, Inc.
+# Copyright (C) 2008-2023 Free Software Foundation, Inc.
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/build-aux/vc-list-files b/build-aux/vc-list-files
index 77750b9f..5ed2b14d 100755
--- a/build-aux/vc-list-files
+++ b/build-aux/vc-list-files
@@ -4,7 +4,7 @@
 # Print a version string.
 scriptversion=2018-03-07.03; # UTC
 
-# Copyright (C) 2006-2022 Free Software Foundation, Inc.
+# Copyright (C) 2006-2023 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/cfg.mk b/cfg.mk
index 776d1fe9..8d7a6f76 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -1,5 +1,5 @@
 # Customize maint.mk                           -*- makefile -*-
-# Copyright (C) 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2009-2023 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
@@ -31,7 +31,8 @@ url_dir_list = https://ftp.gnu.org/gnu/$(PACKAGE)
 # Tests not to run as part of "make distcheck".
 local-checks-to-skip =			\
   sc_indent				\
-  sc_texinfo_acronym
+  sc_texinfo_acronym			\
+  sc_unportable_grep_q
 
 # Tools used to bootstrap this package, used for "announcement".
 bootstrap-tools = autoconf,automake,gnulib
@@ -67,7 +68,7 @@ export VERBOSE = yes
 # 1127556 9e
 export XZ_OPT = -6e
 
-old_NEWS_hash = f4973b8b2470d613d782203aac8e8304
+old_NEWS_hash = acc0cb77b06cc80cd3d8811590cdd5f0
 
 # We prefer to spell it back-reference, as POSIX does.
 sc_prohibit_backref:
diff --git a/config.hin b/config.hin
index 24eead10..eca0484b 100644
--- a/config.hin
+++ b/config.hin
@@ -111,6 +111,10 @@
 #endif
 
 
+/* Witness that <config.h> has been included.  */
+#define _GL_CONFIG_H_INCLUDED 1
+
+
 /* Define if building universal (internal helper macro) */
 #undef AC_APPLE_UNIVERSAL_BUILD
 
@@ -181,6 +185,10 @@
 /* Define to 1 if fopen() fails to recognize a trailing slash. */
 #undef FOPEN_TRAILING_SLASH_BUG
 
+/* Define to 1 if fflush is known to work on stdin as per POSIX.1-2008, 0 if
+   fflush is known to not work, -1 if unknown. */
+#undef FUNC_FFLUSH_STDIN
+
 /* Define to 1 if nl_langinfo (YESEXPR) returns a non-empty string. */
 #undef FUNC_NL_LANGINFO_YESEXPR_WORKS
 
@@ -395,6 +403,9 @@
 /* Define to 1 when the gnulib module getpagesize should be tested. */
 #undef GNULIB_TEST_GETPAGESIZE
 
+/* Define to 1 when the gnulib module getprogname should be tested. */
+#undef GNULIB_TEST_GETPROGNAME
+
 /* Define to 1 when the gnulib module gettimeofday should be tested. */
 #undef GNULIB_TEST_GETTIMEOFDAY
 
@@ -593,6 +604,9 @@
 /* Define to 1 when the gnulib module symlink should be tested. */
 #undef GNULIB_TEST_SYMLINK
 
+/* Define to 1 when the gnulib module time should be tested. */
+#undef GNULIB_TEST_TIME
+
 /* Define to 1 when the gnulib module unsetenv should be tested. */
 #undef GNULIB_TEST_UNSETENV
 
@@ -658,7 +672,7 @@
 /* Define to 1 if nanosleep mishandles large arguments. */
 #undef HAVE_BUG_BIG_NANOSLEEP
 
-/* Define to 1 if you have the 'catgets' function. */
+/* Define to 1 if you have the `catgets' function. */
 #undef HAVE_CATGETS
 
 /* Define to 1 if you have the Mac OS X function
@@ -675,6 +689,15 @@
 /* Define to 1 if you have the <crtdefs.h> header file. */
 #undef HAVE_CRTDEFS_H
 
+/* Define to 1 if the alignas and alignof keywords work. */
+#undef HAVE_C_ALIGNASOF
+
+/* Define to 1 if bool, true and false work as per C2023. */
+#undef HAVE_C_BOOL
+
+/* Define to 1 if the static_assert keyword works. */
+#undef HAVE_C_STATIC_ASSERT
+
 /* Define to 1 if C supports variable-length arrays. */
 #undef HAVE_C_VARARRAYS
 
@@ -766,6 +789,10 @@
    don't. */
 #undef HAVE_DECL_GETDTABLESIZE
 
+/* Define to 1 if you have the declaration of 'getw', and to 0 if you don't.
+   */
+#undef HAVE_DECL_GETW
+
 /* Define to 1 if you have the declaration of 'inet_pton', and to 0 if you
    don't. */
 #undef HAVE_DECL_INET_PTON
@@ -814,6 +841,10 @@
    don't. */
 #undef HAVE_DECL_PUTC_UNLOCKED
 
+/* Define to 1 if you have the declaration of 'putw', and to 0 if you don't.
+   */
+#undef HAVE_DECL_PUTW
+
 /* Define to 1 if you have the declaration of 'setenv', and to 0 if you don't.
    */
 #undef HAVE_DECL_SETENV
@@ -901,12 +932,18 @@
 /* Define to 1 if you have the 'dirfd' function. */
 #undef HAVE_DIRFD
 
-/* Define to 1 if you have the 'duplocale' function. */
+/* Define to 1 if you have the `duplocale' function. */
 #undef HAVE_DUPLOCALE
 
 /* Define if you have the declaration of environ. */
 #undef HAVE_ENVIRON_DECL
 
+/* Define to 1 if you have the `error' function. */
+#undef HAVE_ERROR
+
+/* Define to 1 if you have the <error.h> header file. */
+#undef HAVE_ERROR_H
+
 /* Define if the locale_t type contains insufficient information, as on
    OpenBSD. */
 #undef HAVE_FAKE_LOCALES
@@ -929,7 +966,7 @@
 /* Define to 1 if you have the <fnmatch.h> header file. */
 #undef HAVE_FNMATCH_H
 
-/* Define to 1 if you have the 'freelocale' function. */
+/* Define to 1 if you have the `freelocale' function. */
 #undef HAVE_FREELOCALE
 
 /* Define if the 'free' function is guaranteed to preserve errno. */
@@ -941,9 +978,12 @@
 /* Define to 1 if you have the 'fstatfs' function. */
 #undef HAVE_FSTATFS
 
-/* Define to 1 if you have the 'ftruncate' function. */
+/* Define to 1 if you have the `ftruncate' function. */
 #undef HAVE_FTRUNCATE
 
+/* Define to 1 if you have the `fts_open' function. */
+#undef HAVE_FTS_OPEN
+
 /* Define to 1 if you have the 'getdtablesize' function. */
 #undef HAVE_GETDTABLESIZE
 
@@ -959,7 +999,7 @@
 /* Define to 1 if you have the 'getopt_long_only' function. */
 #undef HAVE_GETOPT_LONG_ONLY
 
-/* Define to 1 if you have the 'getprogname' function. */
+/* Define to 1 if you have the `getprogname' function. */
 #undef HAVE_GETPROGNAME
 
 /* Define to 1 if you have the 'getrlimit' function. */
@@ -1014,7 +1054,7 @@
 /* Define to 1 if you have the 'isblank' function. */
 #undef HAVE_ISBLANK
 
-/* Define to 1 if you have the 'iswblank' function. */
+/* Define to 1 if you have the `iswblank' function. */
 #undef HAVE_ISWBLANK
 
 /* Define to 1 if you have the 'iswcntrl' function. */
@@ -1078,10 +1118,10 @@
 /* Define to 1 if <wchar.h> declares mbstate_t. */
 #undef HAVE_MBSTATE_T
 
-/* Define to 1 if you have the 'mbtowc' function. */
+/* Define to 1 if you have the `mbtowc' function. */
 #undef HAVE_MBTOWC
 
-/* Define to 1 if you have the 'mempcpy' function. */
+/* Define to 1 if you have the `mempcpy' function. */
 #undef HAVE_MEMPCPY
 
 /* Define to 1 if you have the 'memrchr' function. */
@@ -1116,10 +1156,10 @@
 /* Define to 1 if you have the <netinet/in.h> header file. */
 #undef HAVE_NETINET_IN_H
 
-/* Define to 1 if you have the 'newlocale' function. */
+/* Define to 1 if you have the `newlocale' function. */
 #undef HAVE_NEWLOCALE
 
-/* Define to 1 if you have the 'nl_langinfo' function. */
+/* Define to 1 if you have the `nl_langinfo' function. */
 #undef HAVE_NL_LANGINFO
 
 /* Define to 1 if the system has obstacks that work with any size object. */
@@ -1143,7 +1183,7 @@
 /* Define if you have the <pthread.h> header and the POSIX threads API. */
 #undef HAVE_PTHREAD_API
 
-/* Define to 1 if you have the 'pthread_atfork' function. */
+/* Define to 1 if you have the `pthread_atfork' function. */
 #undef HAVE_PTHREAD_ATFORK
 
 /* Define to 1 if you have the <pthread.h> header file. */
@@ -1177,7 +1217,7 @@
 /* Define to 1 if you have the 'readdir' function. */
 #undef HAVE_READDIR
 
-/* Define to 1 if you have the 'reallocarray' function. */
+/* Define to 1 if you have the `reallocarray' function. */
 #undef HAVE_REALLOCARRAY
 
 /* Define to 1 if the system has the type 'sa_family_t'. */
@@ -1240,6 +1280,12 @@
 /* Define if the locale_t type is as on Solaris 11.4. */
 #undef HAVE_SOLARIS114_LOCALES
 
+/* Define to 1 if you have the <stdbool.h> header file. */
+#undef HAVE_STDBOOL_H
+
+/* Define to 1 if you have the <stdckdint.h> header file. */
+#undef HAVE_STDCKDINT_H
+
 /* Define to 1 if you have the <stdint.h> header file. */
 #undef HAVE_STDINT_H
 
@@ -1256,10 +1302,10 @@
 /* Define to 1 if you have the <stdlib.h> header file. */
 #undef HAVE_STDLIB_H
 
-/* Define to 1 if you have the 'stpcpy' function. */
+/* Define to 1 if you have the `stpcpy' function. */
 #undef HAVE_STPCPY
 
-/* Define to 1 if you have the 'strerror_r' function. */
+/* Define to 1 if you have the `strerror_r' function. */
 #undef HAVE_STRERROR_R
 
 /* Define to 1 if you have the <strings.h> header file. */
@@ -1290,6 +1336,9 @@
 /* Define to 1 if 'decimal_point' is a member of 'struct lconv'. */
 #undef HAVE_STRUCT_LCONV_DECIMAL_POINT
 
+/* Define to 1 if 'int_p_cs_precedes' is a member of 'struct lconv'. */
+#undef HAVE_STRUCT_LCONV_INT_P_CS_PRECEDES
+
 /* Define to 1 if the system has the type 'struct sockaddr_storage'. */
 #undef HAVE_STRUCT_SOCKADDR_STORAGE
 
@@ -1376,7 +1425,7 @@
 /* Define to 1 if you have the <sys/wait.h> header file. */
 #undef HAVE_SYS_WAIT_H
 
-/* Define to 1 if you have the 'thrd_create' function. */
+/* Define to 1 if you have the `thrd_create' function. */
 #undef HAVE_THRD_CREATE
 
 /* Define to 1 if you have the <threads.h> header file. */
@@ -1385,19 +1434,22 @@
 /* Define to 1 if you have the 'towlower' function. */
 #undef HAVE_TOWLOWER
 
-/* Define to 1 if you have the 'tsearch' function. */
+/* Define to 1 if you have the `tsearch' function. */
 #undef HAVE_TSEARCH
 
 /* Define to 1 if you have the <unistd.h> header file. */
 #undef HAVE_UNISTD_H
 
+/* Define to 1 if you have the <unistring/woe32dll.h> header file. */
+#undef HAVE_UNISTRING_WOE32DLL_H
+
 /* Define to 1 if you have the 'unsetenv' function. */
 #undef HAVE_UNSETENV
 
 /* Define to 1 if the system has the type 'unsigned long long int'. */
 #undef HAVE_UNSIGNED_LONG_LONG_INT
 
-/* Define to 1 if you have the 'uselocale' function. */
+/* Define to 1 if you have the `uselocale' function. */
 #undef HAVE_USELOCALE
 
 /* Define if you have a global __progname variable */
@@ -1422,9 +1474,6 @@
 /* Define to 1 if you have the 'wcslen' function. */
 #undef HAVE_WCSLEN
 
-/* Define to 1 if you have the 'wcsnlen' function. */
-#undef HAVE_WCSNLEN
-
 /* Define to 1 if you have the 'wctob' function. */
 #undef HAVE_WCTOB
 
@@ -1444,7 +1493,7 @@
 /* Define if you have the 'wint_t' type. */
 #undef HAVE_WINT_T
 
-/* Define to 1 if you have the 'wmempcpy' function. */
+/* Define to 1 if you have the `wmempcpy' function. */
 #undef HAVE_WMEMPCPY
 
 /* Define to 1 if fstatat (..., 0) works. For example, it does not work in AIX
@@ -1469,9 +1518,6 @@
 /* Define to 1 if you have the <xlocale.h> header file. */
 #undef HAVE_XLOCALE_H
 
-/* Define to 1 if the system has the type '_Bool'. */
-#undef HAVE__BOOL
-
 /* Define to 1 if you have the '_chsize' function. */
 #undef HAVE__CHSIZE
 
@@ -1730,9 +1776,6 @@
    'ptrdiff_t'. */
 #undef PTRDIFF_T_SUFFIX
 
-/* Define to 1 if gnulib's dirfd() replacement is used. */
-#undef REPLACE_DIRFD
-
 /* Define to 1 if gnulib's fchdir() replacement is used. */
 #undef REPLACE_FCHDIR
 
@@ -1789,7 +1832,7 @@
 /* Define to 1 if the 'S_IS*' macros in <sys/stat.h> do not work properly. */
 #undef STAT_MACROS_BROKEN
 
-/* Define to 1 if all of the C90 standard headers exist (not just the ones
+/* Define to 1 if all of the C89 standard headers exist (not just the ones
    required in a freestanding environment). This macro is provided for
    backward compatibility; new code need not use it. */
 #undef STDC_HEADERS
@@ -1801,6 +1844,9 @@
    timespec. */
 #undef TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC
 
+/* building with included regex code */
+#undef USE_INCLUDED_REGEX
+
 /* Define if the combination of the ISO C and POSIX multithreading APIs can be
    used. */
 #undef USE_ISOC_AND_POSIX_THREADS
@@ -1819,7 +1865,7 @@
    weak. */
 #undef USE_POSIX_THREADS_WEAK
 
-/* Enable extensions on AIX 3, Interix.  */
+/* Enable extensions on AIX, Interix, z/OS.  */
 #ifndef _ALL_SOURCE
 # undef _ALL_SOURCE
 #endif
@@ -1880,11 +1926,15 @@
 #ifndef __STDC_WANT_IEC_60559_DFP_EXT__
 # undef __STDC_WANT_IEC_60559_DFP_EXT__
 #endif
+/* Enable extensions specified by C23 Annex F.  */
+#ifndef __STDC_WANT_IEC_60559_EXT__
+# undef __STDC_WANT_IEC_60559_EXT__
+#endif
 /* Enable extensions specified by ISO/IEC TS 18661-4:2015.  */
 #ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
 # undef __STDC_WANT_IEC_60559_FUNCS_EXT__
 #endif
-/* Enable extensions specified by ISO/IEC TS 18661-3:2015.  */
+/* Enable extensions specified by C23 Annex H and ISO/IEC TS 18661-3:2015.  */
 #ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
 # undef __STDC_WANT_IEC_60559_TYPES_EXT__
 #endif
@@ -1963,7 +2013,7 @@
 /* Define to enable the declarations of ISO C 11 types and functions. */
 #undef _ISOC11_SOURCE
 
-/* Define for large files, on AIX-style hosts. */
+/* Define to 1 on platforms where this makes off_t a 64-bit type. */
 #undef _LARGE_FILES
 
 /* Define to 1 on Solaris. */
@@ -1982,6 +2032,11 @@
        AIX system header files and several gnulib header files use precisely
        this syntax with 'extern'.  */
 #  define _Noreturn [[noreturn]]
+# elif (defined __clang__ && __clang_major__ < 16 \
+        && defined _GL_WORK_AROUND_LLVM_BUG_59792)
+   /* Compile with -D_GL_WORK_AROUND_LLVM_BUG_59792 to work around
+      that rare LLVM bug, though you may get many false-alarm warnings.  */
+#  define _Noreturn
 # elif ((!defined __cplusplus || defined __clang__) \
         && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \
             || (!defined __STRICT_ANSI__ \
@@ -2011,7 +2066,7 @@
 /* Define if you want regoff_t to be at least as wide POSIX requires. */
 #undef _REGEX_LARGE_OFFSETS
 
-/* Number of bits in a timestamp, on hosts where this is settable. */
+/* Number of bits in time_t, on hosts where this is settable. */
 #undef _TIME_BITS
 
 /* For standard stat data types on VMS. */
@@ -2021,7 +2076,7 @@
    used. */
 #undef __GETOPT_PREFIX
 
-/* For 64-bit time_t on 32-bit mingw. */
+/* Define to 1 on platforms where this makes time_t a 64-bit type. */
 #undef __MINGW_USE_VC2005_COMPAT
 
 /* Define to 1 if the system <stdint.h> predates C++11. */
@@ -2066,7 +2121,7 @@
      && (!defined __clang_minor__ \
          || (defined __apple_build_version__ \
              ? 6000000 <= __apple_build_version__ \
-             : 3 < __clang_major__ + (5 <= __clang_minor__))))
+             : 5 <= __clang_major__)))
 # define _GL_HAS_ATTRIBUTE(attr) __has_attribute (__##attr##__)
 #else
 # define _GL_HAS_ATTRIBUTE(attr) _GL_ATTR_##attr
@@ -2100,46 +2155,62 @@
 # define _GL_ATTR_warn_unused_result _GL_GNUC_PREREQ (3, 4)
 #endif
 
-#ifdef __has_c_attribute
-# if ((defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) <= 201710 \
-      && _GL_GNUC_PREREQ (4, 6))
-#  pragma GCC diagnostic ignored "-Wpedantic"
+/* Disable GCC -Wpedantic if using __has_c_attribute and this is not C23+.  */
+#if (defined __has_c_attribute && _GL_GNUC_PREREQ (4, 6) \
+     && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) <= 201710)
+# pragma GCC diagnostic ignored "-Wpedantic"
+#endif
+
+/* Define if, in a function declaration, the attributes in bracket syntax
+   [[...]] must come before the attributes in __attribute__((...)) syntax.
+   If this is defined, it is best to avoid the bracket syntax, so that the
+   various _GL_ATTRIBUTE_* can be cumulated on the same declaration in any
+   order.  */
+#ifdef __cplusplus
+# if defined __clang__
+#  define _GL_BRACKET_BEFORE_ATTRIBUTE 1
 # endif
-# define _GL_HAS_C_ATTRIBUTE(attr) __has_c_attribute (__##attr##__)
 #else
-# define _GL_HAS_C_ATTRIBUTE(attr) 0
+# if defined __GNUC__ && !defined __clang__
+#  define _GL_BRACKET_BEFORE_ATTRIBUTE 1
+# endif
 #endif
 
-
 /* _GL_ATTRIBUTE_ALLOC_SIZE ((N)) declares that the Nth argument of the function
    is the size of the returned memory block.
    _GL_ATTRIBUTE_ALLOC_SIZE ((M, N)) declares that the Mth argument multiplied
    by the Nth argument of the function is the size of the returned memory block.
  */
 /* Applies to: function, pointer to function, function types.  */
-#if _GL_HAS_ATTRIBUTE (alloc_size)
-# define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args))
-#else
-# define _GL_ATTRIBUTE_ALLOC_SIZE(args)
+#ifndef _GL_ATTRIBUTE_ALLOC_SIZE
+# if _GL_HAS_ATTRIBUTE (alloc_size)
+#  define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args))
+# else
+#  define _GL_ATTRIBUTE_ALLOC_SIZE(args)
+# endif
 #endif
 
 /* _GL_ATTRIBUTE_ALWAYS_INLINE tells that the compiler should always inline the
    function and report an error if it cannot do so.  */
 /* Applies to: function.  */
-#if _GL_HAS_ATTRIBUTE (always_inline)
-# define _GL_ATTRIBUTE_ALWAYS_INLINE __attribute__ ((__always_inline__))
-#else
-# define _GL_ATTRIBUTE_ALWAYS_INLINE
+#ifndef _GL_ATTRIBUTE_ALWAYS_INLINE
+# if _GL_HAS_ATTRIBUTE (always_inline)
+#  define _GL_ATTRIBUTE_ALWAYS_INLINE __attribute__ ((__always_inline__))
+# else
+#  define _GL_ATTRIBUTE_ALWAYS_INLINE
+# endif
 #endif
 
 /* _GL_ATTRIBUTE_ARTIFICIAL declares that the function is not important to show
     in stack traces when debugging.  The compiler should omit the function from
     stack traces.  */
 /* Applies to: function.  */
-#if _GL_HAS_ATTRIBUTE (artificial)
-# define _GL_ATTRIBUTE_ARTIFICIAL __attribute__ ((__artificial__))
-#else
-# define _GL_ATTRIBUTE_ARTIFICIAL
+#ifndef _GL_ATTRIBUTE_ARTIFICIAL
+# if _GL_HAS_ATTRIBUTE (artificial)
+#  define _GL_ATTRIBUTE_ARTIFICIAL __attribute__ ((__artificial__))
+# else
+#  define _GL_ATTRIBUTE_ARTIFICIAL
+# endif
 #endif
 
 /* _GL_ATTRIBUTE_COLD declares that the function is rarely executed.  */
@@ -2147,14 +2218,16 @@
 /* Avoid __attribute__ ((cold)) on MinGW; see thread starting at
    <https://lists.gnu.org/r/emacs-devel/2019-04/msg01152.html>.
    Also, Oracle Studio 12.6 requires 'cold' not '__cold__'.  */
-#if _GL_HAS_ATTRIBUTE (cold) && !defined __MINGW32__
-# ifndef __SUNPRO_C
-#  define _GL_ATTRIBUTE_COLD __attribute__ ((__cold__))
+#ifndef _GL_ATTRIBUTE_COLD
+# if _GL_HAS_ATTRIBUTE (cold) && !defined __MINGW32__
+#  ifndef __SUNPRO_C
+#   define _GL_ATTRIBUTE_COLD __attribute__ ((__cold__))
+#  else
+#   define _GL_ATTRIBUTE_COLD __attribute__ ((cold))
+#  endif
 # else
-#  define _GL_ATTRIBUTE_COLD __attribute__ ((cold))
+#  define _GL_ATTRIBUTE_COLD
 # endif
-#else
-# define _GL_ATTRIBUTE_COLD
 #endif
 
 /* _GL_ATTRIBUTE_CONST declares that it is OK for a compiler to omit duplicate
@@ -2164,10 +2237,12 @@
    forever, and does not call longjmp.
    (This attribute is stricter than _GL_ATTRIBUTE_PURE.)  */
 /* Applies to: functions.  */
-#if _GL_HAS_ATTRIBUTE (const)
-# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__))
-#else
-# define _GL_ATTRIBUTE_CONST
+#ifndef _GL_ATTRIBUTE_CONST
+# if _GL_HAS_ATTRIBUTE (const)
+#  define _GL_ATTRIBUTE_CONST __attribute__ ((__const__))
+# else
+#  define _GL_ATTRIBUTE_CONST
+# endif
 #endif
 
 /* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers
@@ -2176,16 +2251,25 @@
    _GL_ATTRIBUTE_DEALLOC_FREE declares that the function returns pointers that
    can be freed via 'free'; it can be used only after declaring 'free'.  */
 /* Applies to: functions.  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)
+#ifndef _GL_ATTRIBUTE_DEALLOC
+# if _GL_GNUC_PREREQ (11, 0)
+#  define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i)))
+# else
+#  define _GL_ATTRIBUTE_DEALLOC(f, i)
+# endif
 #endif
 /* If gnulib's <string.h> or <wchar.h> has already defined this macro, continue
    to use this earlier definition, since <stdlib.h> may not have been included
    yet.  */
 #ifndef _GL_ATTRIBUTE_DEALLOC_FREE
-# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (free, 1)
+# if defined __cplusplus && defined __GNUC__ && !defined __clang__
+/* Work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108231> */
+#  define _GL_ATTRIBUTE_DEALLOC_FREE \
+     _GL_ATTRIBUTE_DEALLOC ((void (*) (void *)) free, 1)
+# else
+#  define _GL_ATTRIBUTE_DEALLOC_FREE \
+     _GL_ATTRIBUTE_DEALLOC (free, 1)
+# endif
 #endif
 
 /* _GL_ATTRIBUTE_DEPRECATED: Declares that an entity is deprecated.
@@ -2196,12 +2280,20 @@
      - enumeration, enumeration item,
      - typedef,
    in C++ also: namespace, class, template specialization.  */
-#if _GL_HAS_C_ATTRIBUTE (deprecated)
-# define _GL_ATTRIBUTE_DEPRECATED [[__deprecated__]]
-#elif _GL_HAS_ATTRIBUTE (deprecated)
-# define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__))
-#else
-# define _GL_ATTRIBUTE_DEPRECATED
+#ifndef _GL_ATTRIBUTE_DEPRECATED
+# ifndef _GL_BRACKET_BEFORE_ATTRIBUTE
+#  ifdef __has_c_attribute
+#   if __has_c_attribute (__deprecated__)
+#    define _GL_ATTRIBUTE_DEPRECATED [[__deprecated__]]
+#   endif
+#  endif
+# endif
+# if !defined _GL_ATTRIBUTE_DEPRECATED && _GL_HAS_ATTRIBUTE (deprecated)
+#  define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__))
+# endif
+# ifndef _GL_ATTRIBUTE_DEPRECATED
+#  define _GL_ATTRIBUTE_DEPRECATED
+# endif
 #endif
 
 /* _GL_ATTRIBUTE_ERROR(msg) requests an error if a function is called and
@@ -2209,24 +2301,28 @@
    _GL_ATTRIBUTE_WARNING(msg) requests a warning if a function is called and
    the function call is not optimized away.  */
 /* Applies to: functions.  */
-#if _GL_HAS_ATTRIBUTE (error)
-# define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__error__ (msg)))
-# define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__warning__ (msg)))
-#elif _GL_HAS_ATTRIBUTE (diagnose_if)
-# define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__diagnose_if__ (1, msg, "error")))
-# define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__diagnose_if__ (1, msg, "warning")))
-#else
-# define _GL_ATTRIBUTE_ERROR(msg)
-# define _GL_ATTRIBUTE_WARNING(msg)
+#if !(defined _GL_ATTRIBUTE_ERROR && defined _GL_ATTRIBUTE_WARNING)
+# if _GL_HAS_ATTRIBUTE (error)
+#  define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__error__ (msg)))
+#  define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__warning__ (msg)))
+# elif _GL_HAS_ATTRIBUTE (diagnose_if)
+#  define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__diagnose_if__ (1, msg, "error")))
+#  define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__diagnose_if__ (1, msg, "warning")))
+# else
+#  define _GL_ATTRIBUTE_ERROR(msg)
+#  define _GL_ATTRIBUTE_WARNING(msg)
+# endif
 #endif
 
 /* _GL_ATTRIBUTE_EXTERNALLY_VISIBLE declares that the entity should remain
    visible to debuggers etc., even with '-fwhole-program'.  */
 /* Applies to: functions, variables.  */
-#if _GL_HAS_ATTRIBUTE (externally_visible)
-# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE __attribute__ ((externally_visible))
-#else
-# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE
+#ifndef _GL_ATTRIBUTE_EXTERNALLY_VISIBLE
+# if _GL_HAS_ATTRIBUTE (externally_visible)
+#  define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE __attribute__ ((externally_visible))
+# else
+#  define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE
+# endif
 #endif
 
 /* _GL_ATTRIBUTE_FALLTHROUGH declares that it is not a programming mistake if
@@ -2234,12 +2330,18 @@
    'default' label.  The compiler should not warn in this case.  */
 /* Applies to: Empty statement (;), inside a 'switch' statement.  */
 /* Always expands to something.  */
-#if _GL_HAS_C_ATTRIBUTE (fallthrough)
-# define _GL_ATTRIBUTE_FALLTHROUGH [[__fallthrough__]]
-#elif _GL_HAS_ATTRIBUTE (fallthrough)
-# define _GL_ATTRIBUTE_FALLTHROUGH __attribute__ ((__fallthrough__))
-#else
-# define _GL_ATTRIBUTE_FALLTHROUGH ((void) 0)
+#ifndef _GL_ATTRIBUTE_FALLTHROUGH
+# ifdef __has_c_attribute
+#  if __has_c_attribute (__fallthrough__)
+#   define _GL_ATTRIBUTE_FALLTHROUGH [[__fallthrough__]]
+#  endif
+# endif
+# if !defined _GL_ATTRIBUTE_FALLTHROUGH && _GL_HAS_ATTRIBUTE (fallthrough)
+#  define _GL_ATTRIBUTE_FALLTHROUGH __attribute__ ((__fallthrough__))
+# endif
+# ifndef _GL_ATTRIBUTE_FALLTHROUGH
+#  define _GL_ATTRIBUTE_FALLTHROUGH ((void) 0)
+# endif
 #endif
 
 /* _GL_ATTRIBUTE_FORMAT ((ARCHETYPE, STRING-INDEX, FIRST-TO-CHECK))
@@ -2253,10 +2355,12 @@
    If FIRST-TO-CHECK is not 0, arguments starting at FIRST-TO_CHECK
    are suitable for the format string.  */
 /* Applies to: functions.  */
-#if _GL_HAS_ATTRIBUTE (format)
-# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
-#else
-# define _GL_ATTRIBUTE_FORMAT(spec)
+#ifndef _GL_ATTRIBUTE_FORMAT
+# if _GL_HAS_ATTRIBUTE (format)
+#  define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
+# else
+#  define _GL_ATTRIBUTE_FORMAT(spec)
+# endif
 #endif
 
 /* _GL_ATTRIBUTE_LEAF declares that if the function is called from some other
@@ -2264,19 +2368,23 @@
    exception handling.  This declaration lets the compiler optimize that unit
    more aggressively.  */
 /* Applies to: functions.  */
-#if _GL_HAS_ATTRIBUTE (leaf)
-# define _GL_ATTRIBUTE_LEAF __attribute__ ((__leaf__))
-#else
-# define _GL_ATTRIBUTE_LEAF
+#ifndef _GL_ATTRIBUTE_LEAF
+# if _GL_HAS_ATTRIBUTE (leaf)
+#  define _GL_ATTRIBUTE_LEAF __attribute__ ((__leaf__))
+# else
+#  define _GL_ATTRIBUTE_LEAF
+# endif
 #endif
 
 /* _GL_ATTRIBUTE_MALLOC declares that the function returns a pointer to freshly
    allocated memory.  */
 /* Applies to: functions.  */
-#if _GL_HAS_ATTRIBUTE (malloc)
-# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
-#else
-# define _GL_ATTRIBUTE_MALLOC
+#ifndef _GL_ATTRIBUTE_MALLOC
+# if _GL_HAS_ATTRIBUTE (malloc)
+#  define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
+# else
+#  define _GL_ATTRIBUTE_MALLOC
+# endif
 #endif
 
 /* _GL_ATTRIBUTE_MAY_ALIAS declares that pointers to the type may point to the
@@ -2284,10 +2392,12 @@
    strict aliasing optimization.  */
 /* Applies to: types.  */
 /* Oracle Studio 12.6 mishandles may_alias despite __has_attribute OK.  */
-#if _GL_HAS_ATTRIBUTE (may_alias) && !defined __SUNPRO_C
-# define _GL_ATTRIBUTE_MAY_ALIAS __attribute__ ((__may_alias__))
-#else
-# define _GL_ATTRIBUTE_MAY_ALIAS
+#ifndef _GL_ATTRIBUTE_MAY_ALIAS
+# if _GL_HAS_ATTRIBUTE (may_alias) && !defined __SUNPRO_C
+#  define _GL_ATTRIBUTE_MAY_ALIAS __attribute__ ((__may_alias__))
+# else
+#  define _GL_ATTRIBUTE_MAY_ALIAS
+# endif
 #endif
 
 /* _GL_ATTRIBUTE_MAYBE_UNUSED declares that it is not a programming mistake if
@@ -2299,15 +2409,29 @@
      - enumeration, enumeration item,
      - typedef,
    in C++ also: class.  */
-/* In C++ and C2x, this is spelled [[__maybe_unused__]].
+/* In C++ and C23, this is spelled [[__maybe_unused__]].
    GCC's syntax is __attribute__ ((__unused__)).
-   clang supports both syntaxes.  */
-#if _GL_HAS_C_ATTRIBUTE (maybe_unused)
-# define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]]
-#else
-# define _GL_ATTRIBUTE_MAYBE_UNUSED _GL_ATTRIBUTE_UNUSED
+   clang supports both syntaxes.  Except that with clang ≥ 6, < 10, in C++ mode,
+   __has_c_attribute (__maybe_unused__) yields true but the use of
+   [[__maybe_unused__]] nevertheless produces a warning.  */
+#ifndef _GL_ATTRIBUTE_MAYBE_UNUSED
+# ifndef _GL_BRACKET_BEFORE_ATTRIBUTE
+#  if defined __clang__ && defined __cplusplus
+#   if !defined __apple_build_version__ && __clang_major__ >= 10
+#    define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]]
+#   endif
+#  elif defined __has_c_attribute
+#   if __has_c_attribute (__maybe_unused__)
+#    define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]]
+#   endif
+#  endif
+# endif
+# ifndef _GL_ATTRIBUTE_MAYBE_UNUSED
+#  define _GL_ATTRIBUTE_MAYBE_UNUSED _GL_ATTRIBUTE_UNUSED
+# endif
 #endif
-/* Alternative spelling of this macro, for convenience.  */
+/* Alternative spelling of this macro, for convenience and for
+   compatibility with glibc/include/libc-symbols.h.  */
 #define _GL_UNUSED _GL_ATTRIBUTE_MAYBE_UNUSED
 /* Earlier spellings of this macro.  */
 #define _UNUSED_PARAMETER_ _GL_ATTRIBUTE_MAYBE_UNUSED
@@ -2316,21 +2440,40 @@
    discard the return value.  The compiler may warn if the caller does not use
    the return value, unless the caller uses something like ignore_value.  */
 /* Applies to: function, enumeration, class.  */
-#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__))
-#else
-# define _GL_ATTRIBUTE_NODISCARD
+#ifndef _GL_ATTRIBUTE_NODISCARD
+# ifndef _GL_BRACKET_BEFORE_ATTRIBUTE
+#  if defined __clang__ && defined __cplusplus
+  /* With clang up to 15.0.6 (at least), in C++ mode, [[__nodiscard__]] produces
+     a warning.
+     The 1000 below means a yet unknown threshold.  When clang++ version X
+     starts supporting [[__nodiscard__]] without warning about it, you can
+     replace the 1000 with X.  */
+#   if __clang_major__ >= 1000
+#    define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]]
+#   endif
+#  elif defined __has_c_attribute
+#   if __has_c_attribute (__nodiscard__)
+#    define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]]
+#   endif
+#  endif
+# endif
+# if !defined _GL_ATTRIBUTE_NODISCARD && _GL_HAS_ATTRIBUTE (warn_unused_result)
+#  define _GL_ATTRIBUTE_NODISCARD __attribute__ ((__warn_unused_result__))
+# endif
+# ifndef _GL_ATTRIBUTE_NODISCARD
+#  define _GL_ATTRIBUTE_NODISCARD
+# endif
 #endif
 
 /* _GL_ATTRIBUTE_NOINLINE tells that the compiler should not inline the
    function.  */
 /* Applies to: functions.  */
-#if _GL_HAS_ATTRIBUTE (noinline)
-# define _GL_ATTRIBUTE_NOINLINE __attribute__ ((__noinline__))
-#else
-# define _GL_ATTRIBUTE_NOINLINE
+#ifndef _GL_ATTRIBUTE_NOINLINE
+# if _GL_HAS_ATTRIBUTE (noinline)
+#  define _GL_ATTRIBUTE_NOINLINE __attribute__ ((__noinline__))
+# else
+#  define _GL_ATTRIBUTE_NOINLINE
+# endif
 #endif
 
 /* _GL_ATTRIBUTE_NONNULL ((N1, N2,...)) declares that the arguments N1, N2,...
@@ -2338,20 +2481,24 @@
    _GL_ATTRIBUTE_NONNULL () declares that all pointer arguments must not be
    null.  */
 /* Applies to: functions.  */
-#if _GL_HAS_ATTRIBUTE (nonnull)
-# define _GL_ATTRIBUTE_NONNULL(args) __attribute__ ((__nonnull__ args))
-#else
-# define _GL_ATTRIBUTE_NONNULL(args)
+#ifndef _GL_ATTRIBUTE_NONNULL
+# if _GL_HAS_ATTRIBUTE (nonnull)
+#  define _GL_ATTRIBUTE_NONNULL(args) __attribute__ ((__nonnull__ args))
+# else
+#  define _GL_ATTRIBUTE_NONNULL(args)
+# endif
 #endif
 
 /* _GL_ATTRIBUTE_NONSTRING declares that the contents of a character array is
    not meant to be NUL-terminated.  */
 /* Applies to: struct/union members and variables that are arrays of element
    type '[[un]signed] char'.  */
-#if _GL_HAS_ATTRIBUTE (nonstring)
-# define _GL_ATTRIBUTE_NONSTRING __attribute__ ((__nonstring__))
-#else
-# define _GL_ATTRIBUTE_NONSTRING
+#ifndef _GL_ATTRIBUTE_NONSTRING
+# if _GL_HAS_ATTRIBUTE (nonstring)
+#  define _GL_ATTRIBUTE_NONSTRING __attribute__ ((__nonstring__))
+# else
+#  define _GL_ATTRIBUTE_NONSTRING
+# endif
 #endif
 
 /* There is no _GL_ATTRIBUTE_NORETURN; use _Noreturn instead.  */
@@ -2359,10 +2506,12 @@
 /* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions.
  */
 /* Applies to: functions.  */
-#if _GL_HAS_ATTRIBUTE (nothrow) && !defined __cplusplus
-# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__))
-#else
-# define _GL_ATTRIBUTE_NOTHROW
+#ifndef _GL_ATTRIBUTE_NOTHROW
+# if _GL_HAS_ATTRIBUTE (nothrow) && !defined __cplusplus
+#  define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__))
+# else
+#  define _GL_ATTRIBUTE_NOTHROW
+# endif
 #endif
 
 /* _GL_ATTRIBUTE_PACKED declares:
@@ -2371,10 +2520,12 @@
    minimizing the memory required.  */
 /* Applies to: struct members, struct, union,
    in C++ also: class.  */
-#if _GL_HAS_ATTRIBUTE (packed)
-# define _GL_ATTRIBUTE_PACKED __attribute__ ((__packed__))
-#else
-# define _GL_ATTRIBUTE_PACKED
+#ifndef _GL_ATTRIBUTE_PACKED
+# if _GL_HAS_ATTRIBUTE (packed)
+#  define _GL_ATTRIBUTE_PACKED __attribute__ ((__packed__))
+# else
+#  define _GL_ATTRIBUTE_PACKED
+# endif
 #endif
 
 /* _GL_ATTRIBUTE_PURE declares that It is OK for a compiler to omit duplicate
@@ -2384,19 +2535,23 @@
    observable state, and always returns exactly once.
    (This attribute is looser than _GL_ATTRIBUTE_CONST.)  */
 /* Applies to: functions.  */
-#if _GL_HAS_ATTRIBUTE (pure)
-# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
-#else
-# define _GL_ATTRIBUTE_PURE
+#ifndef _GL_ATTRIBUTE_PURE
+# if _GL_HAS_ATTRIBUTE (pure)
+#  define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
+# else
+#  define _GL_ATTRIBUTE_PURE
+# endif
 #endif
 
 /* _GL_ATTRIBUTE_RETURNS_NONNULL declares that the function's return value is
    a non-NULL pointer.  */
 /* Applies to: functions.  */
-#if _GL_HAS_ATTRIBUTE (returns_nonnull)
-# define _GL_ATTRIBUTE_RETURNS_NONNULL __attribute__ ((__returns_nonnull__))
-#else
-# define _GL_ATTRIBUTE_RETURNS_NONNULL
+#ifndef _GL_ATTRIBUTE_RETURNS_NONNULL
+# if _GL_HAS_ATTRIBUTE (returns_nonnull)
+#  define _GL_ATTRIBUTE_RETURNS_NONNULL __attribute__ ((__returns_nonnull__))
+# else
+#  define _GL_ATTRIBUTE_RETURNS_NONNULL
+# endif
 #endif
 
 /* _GL_ATTRIBUTE_SENTINEL(pos) declares that the variadic function expects a
@@ -2404,17 +2559,21 @@
    _GL_ATTRIBUTE_SENTINEL () - The last argument is NULL (requires C99).
    _GL_ATTRIBUTE_SENTINEL ((N)) - The (N+1)st argument from the end is NULL.  */
 /* Applies to: functions.  */
-#if _GL_HAS_ATTRIBUTE (sentinel)
-# define _GL_ATTRIBUTE_SENTINEL(pos) __attribute__ ((__sentinel__ pos))
-#else
-# define _GL_ATTRIBUTE_SENTINEL(pos)
+#ifndef _GL_ATTRIBUTE_SENTINEL
+# if _GL_HAS_ATTRIBUTE (sentinel)
+#  define _GL_ATTRIBUTE_SENTINEL(pos) __attribute__ ((__sentinel__ pos))
+# else
+#  define _GL_ATTRIBUTE_SENTINEL(pos)
+# endif
 #endif
 
 /* A helper macro.  Don't use it directly.  */
-#if _GL_HAS_ATTRIBUTE (unused)
-# define _GL_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
-#else
-# define _GL_ATTRIBUTE_UNUSED
+#ifndef _GL_ATTRIBUTE_UNUSED
+# if _GL_HAS_ATTRIBUTE (unused)
+#  define _GL_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
+# else
+#  define _GL_ATTRIBUTE_UNUSED
+# endif
 #endif
 
 
@@ -2424,10 +2583,24 @@
 /* Applies to: label (both in C and C++).  */
 /* Note that g++ < 4.5 does not support the '__attribute__ ((__unused__)) ;'
    syntax.  But clang does.  */
-#if !(defined __cplusplus && !_GL_GNUC_PREREQ (4, 5)) || defined __clang__
-# define _GL_UNUSED_LABEL _GL_ATTRIBUTE_UNUSED
+#ifndef _GL_UNUSED_LABEL
+# if !(defined __cplusplus && !_GL_GNUC_PREREQ (4, 5)) || defined __clang__
+#  define _GL_UNUSED_LABEL _GL_ATTRIBUTE_UNUSED
+# else
+#  define _GL_UNUSED_LABEL
+# endif
+#endif
+
+
+/* In C++, there is the concept of "language linkage", that encompasses
+    name mangling and function calling conventions.
+    The following macros start and end a block of "C" linkage.  */
+#ifdef __cplusplus
+# define _GL_BEGIN_C_LINKAGE extern "C" {
+# define _GL_END_C_LINKAGE }
 #else
-# define _GL_UNUSED_LABEL
+# define _GL_BEGIN_C_LINKAGE
+# define _GL_END_C_LINKAGE
 #endif
 
 
@@ -2452,7 +2625,7 @@
 /* Define to the overridden function name */
 #undef fts_set
 
-/* Define to 'int' if <sys/types.h> doesn't define. */
+/* Define as 'int' if <sys/types.h> doesn't define. */
 #undef gid_t
 
 /* A replacement for va_copy, if needed.  */
@@ -2575,7 +2748,7 @@
 # define __restrict__
 #endif
 
-/* Define to 'unsigned int' if <sys/types.h> does not define. */
+/* Define as 'unsigned int' if <stddef.h> doesn't define. */
 #undef size_t
 
 /* type to use in place of socklen_t if not defined */
@@ -2588,7 +2761,7 @@
    sigaltstack */
 #undef stack_t
 
-/* Define to 'int' if <sys/types.h> doesn't define. */
+/* Define as 'int' if <sys/types.h> doesn't define. */
 #undef uid_t
 
 
@@ -2609,3 +2782,149 @@
 
 /* Define as a macro for copying va_list variables. */
 #undef va_copy
+
+#if !defined HAVE_C_ALIGNASOF && __cplusplus < 201103 && !defined alignof
+# if HAVE_STDALIGN_H
+#  include <stdalign.h>
+# endif
+
+/* ISO C23 alignas and alignof for platforms that lack it.
+
+   References:
+   ISO C23 (latest free draft
+   <http://www.open-std.org/jtc1/sc22/wg14/www/docs/n3047.pdf>)
+   sections 6.5.3.4, 6.7.5, 7.15.
+   C++11 (latest free draft
+   <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf>)
+   section 18.10. */
+
+/* alignof (TYPE), also known as _Alignof (TYPE), yields the alignment
+   requirement of a structure member (i.e., slot or field) that is of
+   type TYPE, as an integer constant expression.
+
+   This differs from GCC's and clang's __alignof__ operator, which can
+   yield a better-performing alignment for an object of that type.  For
+   example, on x86 with GCC and on Linux/x86 with clang,
+   __alignof__ (double) and __alignof__ (long long) are 8, whereas
+   alignof (double) and alignof (long long) are 4 unless the option
+   '-malign-double' is used.
+
+   The result cannot be used as a value for an 'enum' constant, if you
+   want to be portable to HP-UX 10.20 cc and AIX 3.2.5 xlc.  */
+
+/* GCC releases before GCC 4.9 had a bug in _Alignof.  See GCC bug 52023
+   <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>.
+   clang versions < 8.0.0 have the same bug.  */
+#  if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \
+       || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9) \
+           && !defined __clang__) \
+       || (defined __clang__ && __clang_major__ < 8))
+#   undef/**/_Alignof
+#   ifdef __cplusplus
+#    if (201103 <= __cplusplus || defined _MSC_VER)
+#     define _Alignof(type) alignof (type)
+#    else
+      template <class __t> struct __alignof_helper { char __a; __t __b; };
+#     define _Alignof(type) offsetof (__alignof_helper<type>, __b)
+#     define _GL_STDALIGN_NEEDS_STDDEF 1
+#    endif
+#   else
+#    if (defined __GNUC__ && 4 <= __GNUC__) || defined __clang__
+#     define _Alignof(type) __builtin_offsetof (struct { char __a; type __b; }, __b)
+#    else
+#     define _Alignof(type) offsetof (struct { char __a; type __b; }, __b)
+#     define _GL_STDALIGN_NEEDS_STDDEF 1
+#    endif
+#   endif
+#  endif
+#  if ! (defined __cplusplus && (201103 <= __cplusplus || defined _MSC_VER))
+#   undef/**/alignof
+#   define alignof _Alignof
+#  endif
+
+/* alignas (A), also known as _Alignas (A), aligns a variable or type
+   to the alignment A, where A is an integer constant expression.  For
+   example:
+
+      int alignas (8) foo;
+      struct s { int a; int alignas (8) bar; };
+
+   aligns the address of FOO and the offset of BAR to be multiples of 8.
+
+   A should be a power of two that is at least the type's alignment
+   and at most the implementation's alignment limit.  This limit is
+   2**28 on typical GNUish hosts, and 2**13 on MSVC.  To be portable
+   to MSVC through at least version 10.0, A should be an integer
+   constant, as MSVC does not support expressions such as 1 << 3.
+   To be portable to Sun C 5.11, do not align auto variables to
+   anything stricter than their default alignment.
+
+   The following C23 requirements are not supported here:
+
+     - If A is zero, alignas has no effect.
+     - alignas can be used multiple times; the strictest one wins.
+     - alignas (TYPE) is equivalent to alignas (alignof (TYPE)).
+
+   */
+# if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112
+#  if defined __cplusplus && (201103 <= __cplusplus || defined _MSC_VER)
+#   define _Alignas(a) alignas (a)
+#  elif (!defined __attribute__ \
+         && ((defined __APPLE__ && defined __MACH__ \
+              ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
+              : __GNUC__ && !defined __ibmxl__) \
+             || (4 <= __clang_major__) \
+             || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \
+             || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__))
+#   define _Alignas(a) __attribute__ ((__aligned__ (a)))
+#  elif 1300 <= _MSC_VER
+#   define _Alignas(a) __declspec (align (a))
+#  endif
+# endif
+# if !HAVE_STDALIGN_H
+#  if ((defined _Alignas \
+        && !(defined __cplusplus \
+             && (201103 <= __cplusplus || defined _MSC_VER))) \
+       || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__))
+#   define alignas _Alignas
+#  endif
+# endif
+
+# if _GL_STDALIGN_NEEDS_STDDEF
+#  include <stddef.h>
+# endif
+#endif
+
+#ifndef HAVE_C_BOOL
+# if !defined __cplusplus && !defined __bool_true_false_are_defined
+#  if HAVE_STDBOOL_H
+#   include <stdbool.h>
+#  else
+#   if defined __SUNPRO_C
+#    error "<stdbool.h> is not usable with this configuration. To make it usable, add -D_STDC_C99= to $CC."
+#   else
+#    error "<stdbool.h> does not exist on this platform. Use gnulib module 'stdbool-c99' instead of gnulib module 'stdbool'."
+#   endif
+#  endif
+# endif
+# if !true
+#  define true (!false)
+# endif
+#endif
+
+#if (!defined HAVE_C_STATIC_ASSERT && !defined assert \
+     && (!defined __cplusplus \
+         || (__cpp_static_assert < 201411 \
+             && __GNUG__ < 6 && __clang_major__ < 6)))
+ #include <assert.h>
+ #undef/**/assert
+ #ifdef __sgi
+  #undef/**/__ASSERT_H__
+ #endif
+ /* Solaris 11.4 <assert.h> defines static_assert as a macro with 2 arguments.
+    We need it also to be invocable with a single argument.  */
+ #if defined __sun && (__STDC_VERSION__ - 0 >= 201112L) && !defined __cplusplus
+  #undef/**/static_assert
+  #define static_assert _Static_assert
+ #endif
+#endif
diff --git a/configure b/configure
index 51bd1099..3485a589 100755
--- a/configure
+++ b/configure
@@ -1,11 +1,11 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.72a.55-bc66c for GNU grep 3.8.
+# Generated by GNU Autoconf 2.72c.20-9c018 for GNU grep 3.11.
 #
 # Report bugs to <bug-grep@gnu.org>.
 #
 #
-# Copyright (C) 1992-1996, 1998-2017, 2020-2022 Free Software Foundation,
+# Copyright (C) 1992-1996, 1998-2017, 2020-2023 Free Software Foundation,
 # Inc.
 #
 #
@@ -604,8 +604,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='GNU grep'
 PACKAGE_TARNAME='grep'
-PACKAGE_VERSION='3.8'
-PACKAGE_STRING='GNU grep 3.8'
+PACKAGE_VERSION='3.11'
+PACKAGE_STRING='GNU grep 3.11'
 PACKAGE_BUGREPORT='bug-grep@gnu.org'
 PACKAGE_URL='https://www.gnu.org/software/grep/'
 
@@ -643,12 +643,13 @@ ac_includes_default="\
 
 ac_header_c_list=
 gl_use_threads_default=
-gl_use_winpthreads_default=
+gl_use_winpthreads_default=no
 ac_config_libobj_dir=gnulib-tests
 ac_func_c_list=
 gl_fnmatch_required=POSIX
 gl_getopt_required=POSIX
 gt_needs=
+enable_year2038=yes
 ac_subst_vars='gltests_LIBOBJDEPS
 gltests_LTLIBOBJS
 gltests_LIBOBJS
@@ -696,6 +697,8 @@ GL_COND_OBJ_WINDOWS_THREAD_TRUE
 abs_aux_dir
 GL_COND_OBJ_UNSETENV_FALSE
 GL_COND_OBJ_UNSETENV_TRUE
+GL_COND_OBJ_TIME_FALSE
+GL_COND_OBJ_TIME_TRUE
 HAVE_SYS_UIO_H
 NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H
 NEXT_SYS_UIO_H
@@ -715,11 +718,13 @@ GL_COND_OBJ_SETSOCKOPT_TRUE
 GL_COND_OBJ_SETLOCALE_FALSE
 GL_COND_OBJ_SETLOCALE_TRUE
 LIB_SETLOCALE
+SETLOCALE_LIB
 GL_COND_OBJ_SETENV_FALSE
 GL_COND_OBJ_SETENV_TRUE
 GL_COND_OBJ_SELECT_FALSE
 GL_COND_OBJ_SELECT_TRUE
 LIB_SELECT
+SELECT_LIB
 LIBSOCKET
 GL_GNULIB_SCHED_YIELD
 HAVE_STRUCT_SCHED_PARAM
@@ -733,6 +738,7 @@ GL_COND_OBJ_PUTENV_TRUE
 GL_COND_OBJ_PTHREAD_SIGMASK_FALSE
 GL_COND_OBJ_PTHREAD_SIGMASK_TRUE
 LIB_PTHREAD_SIGMASK
+PTHREAD_SIGMASK_LIB
 GL_COND_OBJ_PTHREAD_THREAD_FALSE
 GL_COND_OBJ_PTHREAD_THREAD_TRUE
 GL_GNULIB_PTHREAD_MUTEX_TIMEDLOCK
@@ -876,6 +882,7 @@ NEXT_NETINET_IN_H
 GL_COND_OBJ_NANOSLEEP_FALSE
 GL_COND_OBJ_NANOSLEEP_TRUE
 LIB_NANOSLEEP
+NANOSLEEP_LIB
 INTL_MACOSX_LIBS
 GL_COND_OBJ_LISTEN_FALSE
 GL_COND_OBJ_LISTEN_TRUE
@@ -983,6 +990,7 @@ LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE
 LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_FALSE
 LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE
 LIBUNISTRING_UNISTR_H
+HAVE_UNISTRING_WOE32DLL_H
 HAVE_UNISTD_H
 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
 NEXT_UNISTD_H
@@ -993,6 +1001,7 @@ GL_GNULIB_TIME_R
 GL_GNULIB_TIMESPEC_GETRES
 GL_GNULIB_TIMESPEC_GET
 GL_GNULIB_TIMEGM
+GL_GNULIB_TIME
 GL_GNULIB_STRPTIME
 GL_GNULIB_STRFTIME
 GL_GNULIB_NANOSLEEP
@@ -1010,7 +1019,9 @@ REPLACE_LOCALTIME
 REPLACE_GMTIME
 GNULIB_GETTIMEOFDAY
 REPLACE_TZSET
+REPLACE_TIMESPEC_GET
 REPLACE_TIMEGM
+REPLACE_TIME
 REPLACE_STRFTIME
 REPLACE_NANOSLEEP
 REPLACE_MKTIME
@@ -1057,18 +1068,14 @@ STDINT_H
 GL_GENERATE_STDDEF_H_FALSE
 GL_GENERATE_STDDEF_H_TRUE
 STDDEF_H
-GL_GENERATE_STDBOOL_H_FALSE
-GL_GENERATE_STDBOOL_H_TRUE
-STDBOOL_H
-HAVE__BOOL
+GL_GENERATE_STDCKDINT_H_FALSE
+GL_GENERATE_STDCKDINT_H_TRUE
+STDCKDINT_H
 GL_GENERATE_STDARG_H_FALSE
 GL_GENERATE_STDARG_H_TRUE
 STDARG_H
 NEXT_AS_FIRST_DIRECTIVE_STDARG_H
 NEXT_STDARG_H
-GL_GENERATE_STDALIGN_H_FALSE
-GL_GENERATE_STDALIGN_H_TRUE
-STDALIGN_H
 GL_COND_OBJ_STAT_FALSE
 GL_COND_OBJ_STAT_TRUE
 GL_GENERATE_SIGSEGV_H_FALSE
@@ -1152,6 +1159,8 @@ REPLACE_STRNCAT
 REPLACE_STRDUP
 REPLACE_STRCHRNUL
 REPLACE_STPNCPY
+REPLACE_STPCPY
+REPLACE_MEMPCPY
 REPLACE_MEMMEM
 REPLACE_MEMCHR
 REPLACE_FFSLL
@@ -1173,6 +1182,7 @@ HAVE_STPNCPY
 HAVE_STPCPY
 HAVE_RAWMEMCHR
 HAVE_DECL_MEMRCHR
+HAVE_MEMSET_EXPLICIT
 HAVE_MEMPCPY
 HAVE_DECL_MEMMEM
 HAVE_FFSLL
@@ -1215,6 +1225,7 @@ GL_GNULIB_STRCHRNUL
 GL_GNULIB_STPNCPY
 GL_GNULIB_STPCPY
 GL_GNULIB_RAWMEMCHR
+GL_GNULIB_MEMSET_EXPLICIT
 GL_GNULIB_MEMRCHR
 GL_GNULIB_MEMPCPY
 GL_GNULIB_MEMMEM
@@ -1229,6 +1240,7 @@ GL_COND_OBJ_MBRTOWC_TRUE
 GL_COND_OBJ_MBRLEN_FALSE
 GL_COND_OBJ_MBRLEN_TRUE
 LIB_MBRTOWC
+MBRTOWC_LIB
 GREP
 SED
 GL_COND_OBJ_LSTAT_FALSE
@@ -1331,6 +1343,10 @@ INT64_MAX_EQ_LONG_MAX
 INT32_MAX_LT_INTMAX_MAX
 REPLACE_STRTOUMAX
 REPLACE_STRTOIMAX
+REPLACE_IMAXDIV
+REPLACE_IMAXABS
+HAVE_IMAXDIV
+HAVE_IMAXABS
 HAVE_IMAXDIV_T
 HAVE_DECL_STRTOUMAX
 HAVE_DECL_STRTOIMAX
@@ -1381,12 +1397,17 @@ LIBICONV
 HOST_CPU_C_ABI
 HOST_CPU
 LIB_HARD_LOCALE
+HARD_LOCALE_LIB
 LIB_SETLOCALE_NULL
+SETLOCALE_NULL_LIB
 LIB_SCHED_YIELD
+SCHED_YIELD_LIB
 LIBPMULTITHREAD
 LIBPTHREAD
 LTLIBINTL
 LIBINTL
+GL_COND_OBJ_GETPROGNAME_FALSE
+GL_COND_OBJ_GETPROGNAME_TRUE
 GL_COND_OBJ_GETPAGESIZE_FALSE
 GL_COND_OBJ_GETPAGESIZE_TRUE
 GL_COND_OBJ_GETOPT_FALSE
@@ -1567,7 +1588,9 @@ HAVE_FSEEKO
 HAVE_DPRINTF
 HAVE_DECL_VSNPRINTF
 HAVE_DECL_SNPRINTF
+HAVE_DECL_PUTW
 HAVE_DECL_OBSTACK_PRINTF
+HAVE_DECL_GETW
 HAVE_DECL_GETLINE
 HAVE_DECL_GETDELIM
 HAVE_DECL_FTELLO
@@ -1604,8 +1627,18 @@ HAVE_OPENAT
 HAVE_FCNTL
 GL_COND_OBJ_FCHDIR_FALSE
 GL_COND_OBJ_FCHDIR_TRUE
+GL_GENERATE_ERROR_H_FALSE
+GL_GENERATE_ERROR_H_TRUE
+ERROR_H
 GL_COND_OBJ_ERROR_FALSE
 GL_COND_OBJ_ERROR_TRUE
+REPLACE_ERROR_AT_LINE
+REPLACE_ERROR
+HAVE_ERROR_AT_LINE
+HAVE_ERROR
+HAVE_ERROR_H
+NEXT_AS_FIRST_DIRECTIVE_ERROR_H
+NEXT_ERROR_H
 GL_GENERATE_ERRNO_H_FALSE
 GL_GENERATE_ERRNO_H_TRUE
 ERRNO_H
@@ -1629,12 +1662,65 @@ NEXT_DIRENT_H
 GL_GNULIB_ISBLANK
 NEXT_AS_FIRST_DIRECTIVE_CTYPE_H
 NEXT_CTYPE_H
-PRAGMA_COLUMNS
-PRAGMA_SYSTEM_HEADER
-INCLUDE_NEXT_AS_FIRST_DIRECTIVE
-INCLUDE_NEXT
 HAVE_ISBLANK
+pkglibexecdir_c_make
+pkglibexecdir_c
+pkglibdir_c_make
+pkglibdir_c
+pkgincludedir_c_make
+pkgincludedir_c
+pkgdatadir_c_make
+pkgdatadir_c
+mandir_c_make
+mandir_c
+localedir_c_make
+localedir_c
+lispdir_c_make
+lispdir_c
+libdir_c_make
+libdir_c
+psdir_c_make
+psdir_c
+pdfdir_c_make
+pdfdir_c
+dvidir_c_make
+dvidir_c
+htmldir_c_make
+htmldir_c
+infodir_c_make
+infodir_c
+docdir_c_make
+docdir_c
+oldincludedir_c_make
+oldincludedir_c
+includedir_c_make
+includedir_c
+runstatedir_c_make
+runstatedir_c
+localstatedir_c_make
+localstatedir_c
+sharedstatedir_c_make
+sharedstatedir_c
+sysconfdir_c_make
+sysconfdir_c
+datadir_c_make
+datadir_c
+datarootdir_c_make
+datarootdir_c
+libexecdir_c_make
+libexecdir_c
+sbindir_c_make
+sbindir_c
+bindir_c_make
+bindir_c
+exec_prefix_c_make
+exec_prefix_c
+prefix_c_make
+prefix_c
 pkglibexecdir
+pkglibdir
+pkgincludedir
+pkgdatadir
 lispdir
 GL_GNULIB_ALPHASORT
 GL_GNULIB_SCANDIR
@@ -1646,9 +1732,12 @@ GL_GNULIB_READDIR
 GL_GNULIB_OPENDIR
 GL_COND_OBJ_CLOSEDIR_FALSE
 GL_COND_OBJ_CLOSEDIR_TRUE
+DIR_HAS_FD_MEMBER
 REPLACE_FDOPENDIR
 REPLACE_DIRFD
 REPLACE_CLOSEDIR
+REPLACE_REWINDDIR
+REPLACE_READDIR
 REPLACE_OPENDIR
 HAVE_ALPHASORT
 HAVE_SCANDIR
@@ -1680,12 +1769,14 @@ REPLACE_TRUNCATE
 REPLACE_SYMLINKAT
 REPLACE_SYMLINK
 REPLACE_SLEEP
+REPLACE_SETHOSTNAME
 REPLACE_RMDIR
 REPLACE_READLINKAT
 REPLACE_READLINK
 REPLACE_READ
 REPLACE_PWRITE
 REPLACE_PREAD
+REPLACE_PIPE2
 REPLACE_LSEEK
 REPLACE_LINKAT
 REPLACE_LINK
@@ -1696,10 +1787,12 @@ REPLACE_GETPASS
 REPLACE_GETPAGESIZE
 REPLACE_GETGROUPS
 REPLACE_GETLOGIN_R
+REPLACE_GETENTROPY
 REPLACE_GETDTABLESIZE
 REPLACE_GETDOMAINNAME
 REPLACE_GETCWD
 REPLACE_FTRUNCATE
+REPLACE_FDATASYNC
 REPLACE_FCHOWNAT
 REPLACE_FACCESSAT
 REPLACE_EXECVPE
@@ -1709,6 +1802,7 @@ REPLACE_EXECV
 REPLACE_EXECLP
 REPLACE_EXECLE
 REPLACE_EXECL
+REPLACE_DUP3
 REPLACE_DUP2
 REPLACE_DUP
 REPLACE_COPY_FILE_RANGE
@@ -1873,17 +1967,26 @@ REPLACE_QSORT_R
 REPLACE_PUTENV
 REPLACE_PTSNAME_R
 REPLACE_PTSNAME
+REPLACE_POSIX_OPENPT
 REPLACE_POSIX_MEMALIGN
 REPLACE_MKSTEMP
+REPLACE_MKOSTEMPS
+REPLACE_MKOSTEMP
 REPLACE_MBTOWC
+REPLACE_MBSTOWCS
+REPLACE_MB_CUR_MAX
 REPLACE_MALLOC_FOR_MALLOC_POSIX
 REPLACE_MALLOC_FOR_MALLOC_GNU
 REPLACE_INITSTATE
+REPLACE_GETSUBOPT
+REPLACE_GETPROGNAME
+REPLACE_GETLOADAVG
 REPLACE_FREE
 REPLACE_CANONICALIZE_FILE_NAME
 REPLACE_CALLOC_FOR_CALLOC_POSIX
 REPLACE_CALLOC_FOR_CALLOC_GNU
 REPLACE_ALIGNED_ALLOC
+REPLACE__EXIT
 HAVE_DECL_UNSETENV
 HAVE_UNLOCKPT
 HAVE_SYS_LOADAVG_H
@@ -1920,6 +2023,8 @@ HAVE_DECL_INITSTATE
 HAVE_INITSTATE
 HAVE_GRANTPT
 HAVE_GETSUBOPT
+HAVE_GETPROGNAME
+HAVE_DECL_PROGRAM_INVOCATION_NAME
 HAVE_DECL_GETLOADAVG
 HAVE_DECL_GCVT
 HAVE_DECL_FCVT
@@ -1964,10 +2069,12 @@ GL_GNULIB_MKOSTEMPS
 GL_GNULIB_MKOSTEMP
 GL_GNULIB_MKDTEMP
 GL_GNULIB_MBTOWC
+GL_GNULIB_MBSTOWCS
 GL_GNULIB_MALLOC_POSIX
 GL_GNULIB_MALLOC_GNU
 GL_GNULIB_GRANTPT
 GL_GNULIB_GETSUBOPT
+GL_GNULIB_GETPROGNAME
 GL_GNULIB_GETLOADAVG
 GL_GNULIB_FREE_POSIX
 GL_GNULIB_CANONICALIZE_FILE_NAME
@@ -2021,7 +2128,12 @@ GL_GNULIB_BTOWC
 GL_COND_OBJ_BTOWC_FALSE
 GL_COND_OBJ_BTOWC_TRUE
 LOCALE_FR
+REPLACE_WMEMPCPY
+REPLACE_WMEMCMP
 REPLACE_WCSTOK
+REPLACE_WCSSTR
+REPLACE_WCSNCMP
+REPLACE_WCSCMP
 REPLACE_WCSFTIME
 REPLACE_WCSWIDTH
 REPLACE_WCWIDTH
@@ -2078,6 +2190,15 @@ HAVE_MBRLEN
 HAVE_MBRTOWC
 HAVE_MBSINIT
 HAVE_BTOWC
+GL_GENERATE_ASSERT_H_FALSE
+GL_GENERATE_ASSERT_H_TRUE
+ASSERT_H
+NEXT_AS_FIRST_DIRECTIVE_ASSERT_H
+NEXT_ASSERT_H
+PRAGMA_COLUMNS
+PRAGMA_SYSTEM_HEADER
+INCLUDE_NEXT_AS_FIRST_DIRECTIVE
+INCLUDE_NEXT
 GL_GENERATE_ALLOCA_H_FALSE
 GL_GENERATE_ALLOCA_H_TRUE
 ALLOCA_H
@@ -2194,7 +2315,6 @@ enable_option_checking
 enable_silent_rules
 enable_dependency_tracking
 enable_largefile
-enable_year2038
 enable_threads
 enable_cross_guesses
 enable_assert
@@ -2211,6 +2331,7 @@ enable_gcc_warnings
 enable_nls
 with_libintl_prefix
 enable_perl_regexp
+enable_year2038
 '
       ac_precious_vars='build_alias
 host_alias
@@ -2774,7 +2895,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-'configure' configures GNU grep 3.8 to adapt to many kinds of systems.
+'configure' configures GNU grep 3.11 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -2845,7 +2966,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of GNU grep 3.8:";;
+     short | recursive ) echo "Configuration of GNU grep 3.11:";;
    esac
   cat <<\_ACEOF
 
@@ -2860,7 +2981,6 @@ Optional Features:
   --disable-dependency-tracking
                           speeds up one-time build
   --disable-largefile     omit support for large files
-  --disable-year2038      omit support for timestamps past the year 2038
   --enable-threads={isoc|posix|isoc+posix|windows}
                           specify multithreading API
   --disable-threads       build without multithread safety
@@ -2877,6 +2997,7 @@ Optional Features:
                           available.
   --disable-nls           do not use Native Language Support
   --disable-perl-regexp   disable perl-regexp (PCRE) support
+  --disable-year2038      don't support timestamps after 2038
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -2985,10 +3106,10 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-GNU grep configure 3.8
-generated by GNU Autoconf 2.72a.55-bc66c
+GNU grep configure 3.11
+generated by GNU Autoconf 2.72c.20-9c018
 
-Copyright (C) 2022 Free Software Foundation, Inc.
+Copyright (C) 2023 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it.
 _ACEOF
@@ -3283,7 +3404,7 @@ else case e in #(
 #define $2 innocuous_$2
 
 /* System header to define __stub macros and hopefully few prototypes,
-   which can conflict with char $2 (); below.  */
+   which can conflict with char $2 (void); below.  */
 
 #include <limits.h>
 #undef $2
@@ -3294,7 +3415,7 @@ else case e in #(
 #ifdef __cplusplus
 extern "C"
 #endif
-char $2 ();
+char $2 (void);
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
     something starting with __ and the normal name is an alias.  */
@@ -3668,8 +3789,8 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by GNU grep $as_me 3.8, which was
-generated by GNU Autoconf 2.72a.55-bc66c.  Invocation command line was
+It was created by GNU grep $as_me 3.11, which was
+generated by GNU Autoconf 2.72c.20-9c018.  Invocation command line was
 
   $ $0$ac_configure_args_raw
 
@@ -3954,9 +4075,7 @@ struct stat;
 /* Most of the following tests are stolen from RCS 5.7 src/conf.sh.  */
 struct buf { int x; };
 struct buf * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
-     char **p;
-     int i;
+static char *e (char **p, int i)
 {
   return p[i];
 }
@@ -3970,6 +4089,21 @@ static char *f (char * (*g) (char **, int), char **p, ...)
   return s;
 }
 
+/* C89 style stringification. */
+#define noexpand_stringify(a) #a
+const char *stringified = noexpand_stringify(arbitrary+token=sequence);
+
+/* C89 style token pasting.  Exercises some of the corner cases that
+   e.g. old MSVC gets wrong, but not very hard. */
+#define noexpand_concat(a,b) a##b
+#define expand_concat(a,b) noexpand_concat(a,b)
+extern int vA;
+extern int vbee;
+#define aye A
+#define bee B
+int *pvA = &expand_concat(v,aye);
+int *pvbee = &noexpand_concat(v,bee);
+
 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
    function prototypes and stuff, but not \xHH hex character constants.
    These do not provoke an error unfortunately, instead are silently treated
@@ -4007,6 +4141,7 @@ extern int puts (const char *);
 extern int printf (const char *, ...);
 extern int dprintf (int, const char *, ...);
 extern void *malloc (size_t);
+extern void free (void *);
 
 // Check varargs macros.  These examples are taken from C99 6.10.3.5.
 // dprintf is used instead of fprintf to avoid needing to declare
@@ -4261,15 +4396,16 @@ as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
 as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H"
 as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H"
 as_fn_append ac_func_c_list " btowc HAVE_BTOWC"
+as_fn_append ac_func_c_list " mbrtowc HAVE_MBRTOWC"
 as_fn_append ac_header_c_list " sys/param.h sys_param_h HAVE_SYS_PARAM_H"
 as_fn_append ac_func_c_list " _set_invalid_parameter_handler HAVE__SET_INVALID_PARAMETER_HANDLER"
 as_fn_append ac_header_c_list " sys/socket.h sys_socket_h HAVE_SYS_SOCKET_H"
 as_fn_append ac_func_c_list " fchdir HAVE_FCHDIR"
 as_fn_append ac_header_c_list " dirent.h dirent_h HAVE_DIRENT_H"
+as_fn_append ac_header_c_list " error.h error_h HAVE_ERROR_H"
 as_fn_append ac_func_c_list " fcntl HAVE_FCNTL"
 as_fn_append ac_func_c_list " symlink HAVE_SYMLINK"
 as_fn_append ac_func_c_list " fdopendir HAVE_FDOPENDIR"
-as_fn_append ac_func_c_list " mempcpy HAVE_MEMPCPY"
 as_fn_append ac_header_c_list " fnmatch.h fnmatch_h HAVE_FNMATCH_H"
 as_fn_append ac_func_c_list " fnmatch HAVE_FNMATCH"
 as_fn_append ac_func_c_list " mbsrtowcs HAVE_MBSRTOWCS"
@@ -4282,7 +4418,6 @@ as_fn_append ac_func_c_list " getdtablesize HAVE_GETDTABLESIZE"
 gl_getopt_required=GNU
 as_fn_append ac_header_c_list " getopt.h getopt_h HAVE_GETOPT_H"
 as_fn_append ac_header_c_list " sys/cdefs.h sys_cdefs_h HAVE_SYS_CDEFS_H"
-as_fn_append ac_func_c_list " getprogname HAVE_GETPROGNAME"
 as_fn_append ac_func_c_list " getexecname HAVE_GETEXECNAME"
 as_fn_append ac_header_c_list " threads.h threads_h HAVE_THREADS_H"
 as_fn_append ac_header_c_list " iconv.h iconv_h HAVE_ICONV_H"
@@ -4291,17 +4426,14 @@ as_fn_append ac_func_c_list " isblank HAVE_ISBLANK"
 as_fn_append ac_func_c_list " iswcntrl HAVE_ISWCNTRL"
 as_fn_append ac_header_c_list " crtdefs.h crtdefs_h HAVE_CRTDEFS_H"
 as_fn_append ac_header_c_list " wctype.h wctype_h HAVE_WCTYPE_H"
-as_fn_append ac_func_c_list " iswblank HAVE_ISWBLANK"
 as_fn_append ac_header_c_list " langinfo.h langinfo_h HAVE_LANGINFO_H"
 as_fn_append ac_header_c_list " xlocale.h xlocale_h HAVE_XLOCALE_H"
 as_fn_append ac_func_c_list " lstat HAVE_LSTAT"
 as_fn_append ac_func_c_list " mbsinit HAVE_MBSINIT"
-as_fn_append ac_func_c_list " mbrtowc HAVE_MBRTOWC"
 as_fn_append ac_func_c_list " mbrlen HAVE_MBRLEN"
 as_fn_append ac_func_c_list " mbslen HAVE_MBSLEN"
 as_fn_append ac_header_c_list " sys/mman.h sys_mman_h HAVE_SYS_MMAN_H"
 as_fn_append ac_func_c_list " mprotect HAVE_MPROTECT"
-as_fn_append ac_func_c_list " nl_langinfo HAVE_NL_LANGINFO"
 as_fn_append ac_func_c_list " pipe HAVE_PIPE"
 as_fn_append ac_header_c_list " malloc.h malloc_h HAVE_MALLOC_H"
 as_fn_append ac_func_c_list " iswctype HAVE_ISWCTYPE"
@@ -4309,7 +4441,8 @@ as_fn_append ac_func_c_list " sigaltstack HAVE_SIGALTSTACK"
 as_fn_append ac_func_c_list " setrlimit HAVE_SETRLIMIT"
 as_fn_append ac_func_c_list " getrlimit HAVE_GETRLIMIT"
 as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H"
-as_fn_append ac_func_c_list " strerror_r HAVE_STRERROR_R"
+as_fn_append ac_header_c_list " stdbool.h stdbool_h HAVE_STDBOOL_H"
+as_fn_append ac_header_c_list " stdckdint.h stdckdint_h HAVE_STDCKDINT_H"
 as_fn_append ac_func_c_list " __xpg_strerror_r HAVE___XPG_STRERROR_R"
 as_fn_append ac_func_c_list " strtoimax HAVE_STRTOIMAX"
 as_fn_append ac_func_c_list " strtoumax HAVE_STRTOUMAX"
@@ -4317,16 +4450,10 @@ as_fn_append ac_header_c_list " features.h features_h HAVE_FEATURES_H"
 as_fn_append ac_func_c_list " wcrtomb HAVE_WCRTOMB"
 as_fn_append ac_func_c_list " wctob HAVE_WCTOB"
 as_fn_append ac_func_c_list " wcwidth HAVE_WCWIDTH"
-as_fn_append ac_func_c_list " wmempcpy HAVE_WMEMPCPY"
 as_fn_append ac_header_c_list " arpa/inet.h arpa_inet_h HAVE_ARPA_INET_H"
-as_fn_append ac_func_c_list " ftruncate HAVE_FTRUNCATE"
 as_fn_append ac_func_c_list " gettimeofday HAVE_GETTIMEOFDAY"
-as_fn_append ac_func_c_list " duplocale HAVE_DUPLOCALE"
 as_fn_append ac_header_c_list " netdb.h netdb_h HAVE_NETDB_H"
 as_fn_append ac_header_c_list " netinet/in.h netinet_in_h HAVE_NETINET_IN_H"
-as_fn_append ac_func_c_list " newlocale HAVE_NEWLOCALE"
-as_fn_append ac_func_c_list " uselocale HAVE_USELOCALE"
-as_fn_append ac_func_c_list " freelocale HAVE_FREELOCALE"
 as_fn_append ac_header_c_list " sys/select.h sys_select_h HAVE_SYS_SELECT_H"
 as_fn_append ac_func_c_list " pselect HAVE_PSELECT"
 as_fn_append ac_header_c_list " sys/wait.h sys_wait_h HAVE_SYS_WAIT_H"
@@ -4335,7 +4462,6 @@ as_fn_append ac_func_c_list " pthread_sigmask HAVE_PTHREAD_SIGMASK"
 as_fn_append ac_func_c_list " setenv HAVE_SETENV"
 as_fn_append ac_func_c_list " sleep HAVE_SLEEP"
 as_fn_append ac_func_c_list " snprintf HAVE_SNPRINTF"
-as_fn_append ac_func_c_list " catgets HAVE_CATGETS"
 as_fn_append ac_header_c_list " sys/ioctl.h sys_ioctl_h HAVE_SYS_IOCTL_H"
 as_fn_append ac_func_c_list " shutdown HAVE_SHUTDOWN"
 as_fn_append ac_header_c_list " sys/uio.h sys_uio_h HAVE_SYS_UIO_H"
@@ -4954,11 +5080,9 @@ fi
   if test ${ac_cv_path_mkdir+y}; then
     MKDIR_P="$ac_cv_path_mkdir -p"
   else
-    # As a last resort, use the slow shell script.  Don't cache a
-    # value for MKDIR_P within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the value is a relative name.
-    MKDIR_P="$ac_install_sh -d"
+    # As a last resort, use plain mkdir -p,
+    # in the hope it doesn't have the bugs of ancient mkdir.
+    MKDIR_P='mkdir -p'
   fi
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
@@ -5144,7 +5268,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='grep'
- VERSION='3.8'
+ VERSION='3.11'
 
 
 printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@@ -6844,6 +6968,8 @@ printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; }
 
   printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
 
+  printf "%s\n" "#define __STDC_WANT_IEC_60559_EXT__ 1" >>confdefs.h
+
   printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
 
   printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
@@ -7054,9 +7180,10 @@ do
       as_fn_executable_p "$ac_path_EGREP_TRADITIONAL" || continue
 # Check for GNU ac_path_EGREP_TRADITIONAL and select it if it is found.
   # Check for GNU $ac_path_EGREP_TRADITIONAL
-case `"$ac_path_EGREP_TRADITIONAL" --version 2>&1` in
+case `"$ac_path_EGREP_TRADITIONAL" --version 2>&1` in #(
 *GNU*)
   ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_found=:;;
+#(
 *)
   ac_count=0
   printf %s 0123456789 >"conftest.in"
@@ -7115,9 +7242,10 @@ do
       as_fn_executable_p "$ac_path_EGREP_TRADITIONAL" || continue
 # Check for GNU ac_path_EGREP_TRADITIONAL and select it if it is found.
   # Check for GNU $ac_path_EGREP_TRADITIONAL
-case `"$ac_path_EGREP_TRADITIONAL" --version 2>&1` in
+case `"$ac_path_EGREP_TRADITIONAL" --version 2>&1` in #(
 *GNU*)
   ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_found=:;;
+#(
 *)
   ac_count=0
   printf %s 0123456789 >"conftest.in"
@@ -7462,99 +7590,23 @@ if test ${enable_largefile+y}
 then :
   enableval=$enable_largefile;
 fi
-
-if test "$enable_largefile" != no
-then :
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
-printf %s "checking for special C compiler options needed for large files... " >&6; }
-if test ${ac_cv_sys_largefile_CC+y}
+if test "$enable_largefile,$enable_year2038" != no,no
 then :
-  printf %s "(cached) " >&6
-else case e in #(
-  e) ac_cv_sys_largefile_CC=no
-     if test "$GCC" != yes; then
-       ac_save_CC=$CC
-       while :; do
-         # IRIX 6.2 and later do not support large files by default,
-         # so use the C compiler's -n32 option if that helps.
-         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
-    We can't simply define LARGE_OFF_T to be 9223372036854775807,
-    since some C++ compilers masquerading as C compilers
-    incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
-  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
-		       && LARGE_OFF_T % 2147483647 == 1)
-		      ? 1 : -1];
-int
-main (void)
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-         if ac_fn_c_try_compile "$LINENO"
-then :
-  break
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam
-         CC="$CC -n32"
-         if ac_fn_c_try_compile "$LINENO"
-then :
-  ac_cv_sys_largefile_CC=' -n32'; break
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam
-         break
-       done
-       CC=$ac_save_CC
-       rm -f conftest.$ac_ext
-    fi ;;
-esac
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
-printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; }
-  if test "$ac_cv_sys_largefile_CC" != no; then
-    CC=$CC$ac_cv_sys_largefile_CC
-  fi
-
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
-printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
-if test ${ac_cv_sys_file_offset_bits+y}
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable large file support" >&5
+printf %s "checking for $CC option to enable large file support... " >&6; }
+if test ${ac_cv_sys_largefile_opts+y}
 then :
   printf %s "(cached) " >&6
 else case e in #(
-  e) while :; do
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
-    We can't simply define LARGE_OFF_T to be 9223372036854775807,
-    since some C++ compilers masquerading as C compilers
-    incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
-  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
-		       && LARGE_OFF_T % 2147483647 == 1)
-		      ? 1 : -1];
-int
-main (void)
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
+  e) ac_save_CC="$CC"
+  ac_opt_found=no
+  for ac_opt in "none needed" "-D_FILE_OFFSET_BITS=64" "-D_LARGE_FILES=1" "-n32"; do
+    if test x"$ac_opt" != x"none needed"
 then :
-  ac_cv_sys_file_offset_bits=no; break
+  CC="$ac_save_CC $ac_opt"
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#undef _FILE_OFFSET_BITS
-#define _FILE_OFFSET_BITS 64
 #include <sys/types.h>
  /* Check that off_t can represent 2**63 - 1 correctly.
     We can't simply define LARGE_OFF_T to be 9223372036854775807,
@@ -7574,149 +7626,71 @@ main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  ac_cv_sys_file_offset_bits=64; break
+  ac_cv_sys_largefile_opts="$ac_opt"
+      ac_opt_found=yes
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-  ac_cv_sys_file_offset_bits=unknown
-  break
-done ;;
-esac
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
-printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; }
-case $ac_cv_sys_file_offset_bits in #(
-  no | unknown) ;;
-  *)
-printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs.h
-;;
-esac
-rm -rf conftest*
-  case $ac_cv_sys_file_offset_bits in #(
-  unknown) :
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
-printf %s "checking for _LARGE_FILES value needed for large files... " >&6; }
-if test ${ac_cv_sys_large_files+y}
-then :
-  printf %s "(cached) " >&6
-else case e in #(
-  e) while :; do
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
-    We can't simply define LARGE_OFF_T to be 9223372036854775807,
-    since some C++ compilers masquerading as C compilers
-    incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
-  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
-		       && LARGE_OFF_T % 2147483647 == 1)
-		      ? 1 : -1];
-int
-main (void)
-{
+    test $ac_opt_found = no || break
+  done
+  CC="$ac_save_CC"
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-  ac_cv_sys_large_files=no; break
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#undef _LARGE_FILES
-#define _LARGE_FILES 1
-#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
-    We can't simply define LARGE_OFF_T to be 9223372036854775807,
-    since some C++ compilers masquerading as C compilers
-    incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
-  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
-		       && LARGE_OFF_T % 2147483647 == 1)
-		      ? 1 : -1];
-int
-main (void)
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-  ac_cv_sys_large_files=1; break
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-  ac_cv_sys_large_files=unknown
-  break
-done ;;
-esac
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
-printf "%s\n" "$ac_cv_sys_large_files" >&6; }
-case $ac_cv_sys_large_files in #(
-  no | unknown) ;;
-  *)
-printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h
-;;
+    if test $ac_opt_found != yes; then
+      case $host_os in #(
+  mingw*) :
+    ac_cv_sys_largefile_opts="supported through gnulib"
+           ac_opt_found=yes
+       ;; #(
+  *) :
+     ;;
 esac
-rm -rf conftest* ;; #(
-  64) :
+    fi
 
- # Check whether --enable-year2038 was given.
-if test ${enable_year2038+y}
-then :
-  enableval=$enable_year2038;
+  test $ac_opt_found = yes || ac_cv_sys_largefile_opts="support not detected" ;;
+esac
 fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_opts" >&5
+printf "%s\n" "$ac_cv_sys_largefile_opts" >&6; }
 
- if test "$enable_year2038" != no
-then :
+ac_have_largefile=yes
+case $ac_cv_sys_largefile_opts in #(
+  "none needed") :
+     ;; #(
+  "supported through gnulib") :
+     ;; #(
+  "support not detected") :
+    ac_have_largefile=no ;; #(
+  "-D_FILE_OFFSET_BITS=64") :
 
-                            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for time_t past the year 2038" >&5
-printf %s "checking for time_t past the year 2038... " >&6; }
-if test ${gl_cv_type_time_t_y2038+y}
-then :
-  printf %s "(cached) " >&6
-else case e in #(
-  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+printf "%s\n" "#define _FILE_OFFSET_BITS 64" >>confdefs.h
+ ;; #(
+  "-D_LARGE_FILES=1") :
 
-  #include <time.h>
-  /* 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];
+printf "%s\n" "#define _LARGE_FILES 1" >>confdefs.h
+ ;; #(
+  "-n32") :
+    CC="$CC -n32" ;; #(
+  *) :
+    as_fn_error $? "internal error: bad value for \$ac_cv_sys_largefile_opts" "$LINENO" 5 ;;
+esac
 
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
+if test "$enable_year2038" != no
 then :
-  gl_cv_type_time_t_y2038=yes
-else case e in #(
-  e) gl_cv_type_time_t_y2038=no ;;
-esac
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-     ;;
-esac
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_time_t_y2038" >&5
-printf "%s\n" "$gl_cv_type_time_t_y2038" >&6; }
-  if test "$gl_cv_type_time_t_y2038" = no; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit time_t with _TIME_BITS=64" >&5
-printf %s "checking for 64-bit time_t with _TIME_BITS=64... " >&6; }
-if test ${gl_cv_type_time_t_bits_macro+y}
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option for timestamps after 2038" >&5
+printf %s "checking for $CC option for timestamps after 2038... " >&6; }
+if test ${ac_cv_sys_year2038_opts+y}
 then :
   printf %s "(cached) " >&6
 else case e in #(
-  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  e) ac_save_CPPFLAGS="$CPPFLAGS"
+  ac_opt_found=no
+  for ac_opt in "none needed" "-D_TIME_BITS=64" "-D__MINGW_USE_VC2005_COMPAT" "-U_USE_32_BIT_TIME_T -D__MINGW_USE_VC2005_COMPAT"; do
+    if test x"$ac_opt" != x"none needed"
+then :
+  CPPFLAGS="$ac_save_CPPFLAGS $ac_opt"
+fi
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#define _TIME_BITS 64
-                           #define _FILE_OFFSET_BITS 64
 
   #include <time.h>
   /* Check that time_t can represent 2**32 - 1 correctly.  */
@@ -7726,86 +7700,57 @@ else case e in #(
                            && LARGE_TIME_T % 65537 == 0)
                           ? 1 : -1];
 
+int
+main (void)
+{
+
+  ;
+  return 0;
+}
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  gl_cv_type_time_t_bits_macro=yes
-else case e in #(
-  e) gl_cv_type_time_t_bits_macro=no ;;
-esac
+  ac_cv_sys_year2038_opts="$ac_opt"
+      ac_opt_found=yes
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-       ;;
+    test $ac_opt_found = no || break
+  done
+  CPPFLAGS="$ac_save_CPPFLAGS"
+  test $ac_opt_found = yes || ac_cv_sys_year2038_opts="support not detected" ;;
 esac
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_time_t_bits_macro" >&5
-printf "%s\n" "$gl_cv_type_time_t_bits_macro" >&6; }
-    if test "$gl_cv_type_time_t_bits_macro" = yes; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_year2038_opts" >&5
+printf "%s\n" "$ac_cv_sys_year2038_opts" >&6; }
 
-printf "%s\n" "#define _TIME_BITS 64" >>confdefs.h
-
-
-printf "%s\n" "#define _FILE_OFFSET_BITS 64" >>confdefs.h
+ac_have_year2038=yes
+case $ac_cv_sys_year2038_opts in #(
+  "none needed") :
+     ;; #(
+  "support not detected") :
+    ac_have_year2038=no ;; #(
+  "-D_TIME_BITS=64") :
 
-      gl_cv_type_time_t_y2038=yes
-    fi
-  fi
-  if test $gl_cv_type_time_t_y2038 = no; then
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#ifdef _USE_32BIT_TIME_T
-             int ok;
-           #else
-             error fail
-           #endif
+printf "%s\n" "#define _TIME_BITS 64" >>confdefs.h
+ ;; #(
+  "-D__MINGW_USE_VC2005_COMPAT") :
 
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
-as_fn_error $? "The 'time_t' type stops working after January 2038.
-          Remove _USE_32BIT_TIME_T from the compiler flags.
-See 'config.log' for more details" "$LINENO" 5; }
-else case e in #(
-  e) # If not cross-compiling and  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.
-
-       if test "$gl_warned_about_y2038" != yes; then
-         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 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?" >&5
-printf "%s\n" "$as_me: WARNING: 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?" >&2;}
-         gl_warned_about_y2038=yes
-       fi
-       ;;
-esac
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-  fi
-fi
+printf "%s\n" "#define __MINGW_USE_VC2005_COMPAT 1" >>confdefs.h
  ;; #(
+  "-U_USE_32_BIT_TIME_T"*) :
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
+as_fn_error $? "the 'time_t' type is currently forced to be 32-bit. It
+will stop working after mid-January 2038. Remove
+_USE_32BIT_TIME_T from the compiler flags.
+See 'config.log' for more details" "$LINENO" 5; } ;; #(
   *) :
-     ;;
+    as_fn_error $? "internal error: bad value for \$ac_cv_sys_year2038_opts" "$LINENO" 5 ;;
 esac
-fi
-
 
+fi
 
-  case "$host_os" in
-    mingw*)
-
-printf "%s\n" "#define __MINGW_USE_VC2005_COMPAT 1" >>confdefs.h
-
-      ;;
-  esac
-
+fi
 
 
 
@@ -7873,6 +7818,33 @@ fi
 
   fi
 
+if test "$enable_year2038,$ac_have_year2038,$cross_compiling" = yes,no,no
+then :
+  # If we're not cross compiling and 'touch' works with a large
+  # timestamp, then we can presume the system supports wider time_t
+  # *somehow* and we just weren't able to detect it.  One common
+  # case that we deliberately *don't* probe for is a system that
+  # supports both 32- and 64-bit ABIs but only the 64-bit ABI offers
+  # wide time_t.  (It would be inappropriate for us to override an
+  # intentional use of -m32.)  Error out, demanding use of
+  # --disable-year2038 if this is intentional.
+  if 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'*) :
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
+as_fn_error $? "this system appears to support timestamps after
+mid-January 2038, but no mechanism for enabling wide
+'time_t' was detected. Did you mean to build a 64-bit
+binary? (E.g., 'CC=\"${CC} -m64\"'.) To proceed with
+32-bit time_t, configure with '--disable-year2038'.
+See 'config.log' for more details" "$LINENO" 5; } ;; #(
+  *) :
+     ;;
+esac
+fi
+fi
 
 
   # Pre-early section.
@@ -7882,6 +7854,8 @@ fi
   # Code from module absolute-header:
   # Code from module accept:
   # Code from module accept-tests:
+  # Code from module alignasof:
+  # Code from module alignasof-tests:
   # Code from module alignof:
   # Code from module alignof-tests:
   # Code from module alloca:
@@ -7893,6 +7867,8 @@ fi
   # Code from module arpa_inet:
   # Code from module arpa_inet-tests:
   # Code from module assert:
+  # Code from module assert-h:
+  # Code from module assert-h-tests:
   # Code from module assure:
   # Code from module at-internal:
   # Code from module attribute:
@@ -7913,6 +7889,8 @@ fi
   # Code from module c-strcase:
   # Code from module c-strcase-tests:
   # Code from module c-strcaseeq:
+  # Code from module c-strcasestr:
+  # Code from module c-strcasestr-tests:
   # Code from module c99:
   # Code from module calloc-gnu:
   # Code from module calloc-gnu-tests:
@@ -7948,13 +7926,13 @@ fi
   # Code from module dup-tests:
   # Code from module dup2:
   # Code from module dup2-tests:
-  # Code from module dynarray:
-  # Code from module dynarray-tests:
   # Code from module environ:
   # Code from module environ-tests:
   # Code from module errno:
   # Code from module errno-tests:
   # Code from module error:
+  # Code from module error-h:
+  # Code from module error-tests:
   # Code from module exclude:
   # Code from module exclude-tests:
   # Code from module exitfail:
@@ -8023,6 +8001,8 @@ fi
   # Code from module gettimeofday-tests:
   # Code from module git-version-gen:
   # Code from module gitlog-to-changelog:
+  # Code from module glibc-internal/dynarray:
+  # Code from module glibc-internal/dynarray-tests:
   # Code from module gnu-web-doc-update:
   # Code from module gnumakefile:
   # Code from module gnupload:
@@ -8072,7 +8052,7 @@ fi
   # Code from module langinfo-tests:
   # Code from module largefile:
 
-
+  # Code from module largefile-tests:
   # Code from module libc-config:
   # Code from module limits-h:
   # Code from module limits-h-tests:
@@ -8101,6 +8081,7 @@ fi
   # Code from module mbchar:
   # Code from module mbiter:
   # Code from module mbrlen:
+  # Code from module mbrlen-tests:
   # Code from module mbrtowc:
   # Code from module mbscasecmp:
   # Code from module mbscasecmp-tests:
@@ -8243,8 +8224,6 @@ fi
   # Code from module stat-time:
   # Code from module stat-time-tests:
   # Code from module std-gnu11:
-  # Code from module stdalign:
-  # Code from module stdalign-tests:
   # Code from module stdarg:
 
 
@@ -8252,11 +8231,18 @@ fi
   # Code from module stdarg-tests:
   # Code from module stdbool:
   # Code from module stdbool-tests:
+  # Code from module stdckdint:
+  # Code from module stdckdint-tests:
   # Code from module stddef:
   # Code from module stddef-tests:
   # Code from module stdint:
   # Code from module stdint-tests:
   # Code from module stdio:
+
+
+  printf "%s\n" "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
+
+
   # Code from module stdio-tests:
   # Code from module stdlib:
   # Code from module stdlib-tests:
@@ -8312,8 +8298,11 @@ fi
 
 
   # Code from module time:
+  # Code from module time-h:
+  # Code from module time-h-tests:
   # Code from module time-tests:
   # Code from module trim:
+  # Code from module trim-tests:
   # Code from module unistd:
   # Code from module unistd-safer:
   # Code from module unistd-safer-tests:
@@ -8376,6 +8365,9 @@ fi
   # Code from module xstrtol:
   # Code from module xstrtol-error:
   # Code from module xstrtol-tests:
+  # Code from module year2038:
+
+  # Code from module year2038-tests:
 
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
@@ -8724,6 +8716,8 @@ fi
 
 
 
+
+
                         # Check whether --enable-cross-guesses was given.
 if test ${enable_cross_guesses+y}
 then :
@@ -8907,6 +8901,131 @@ printf "%s\n" "#define STACK_DIRECTION $ac_cv_c_stack_direction" >>confdefs.h
 fi
 
 
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
+printf %s "checking whether the preprocessor supports include_next... " >&6; }
+if test ${gl_cv_have_include_next+y}
+then :
+  printf %s "(cached) " >&6
+else case e in #(
+  e) rm -rf conftestd1a conftestd1b conftestd2
+     mkdir conftestd1a conftestd1b conftestd2
+                                                  cat <<EOF > conftestd1a/conftest.h
+#define DEFINED_IN_CONFTESTD1
+#include_next <conftest.h>
+#ifdef DEFINED_IN_CONFTESTD2
+int foo;
+#else
+#error "include_next doesn't work"
+#endif
+EOF
+     cat <<EOF > conftestd1b/conftest.h
+#define DEFINED_IN_CONFTESTD1
+#include <stdio.h>
+#include_next <conftest.h>
+#ifdef DEFINED_IN_CONFTESTD2
+int foo;
+#else
+#error "include_next doesn't work"
+#endif
+EOF
+     cat <<EOF > conftestd2/conftest.h
+#ifndef DEFINED_IN_CONFTESTD1
+#error "include_next test doesn't work"
+#endif
+#define DEFINED_IN_CONFTESTD2
+EOF
+     gl_save_CPPFLAGS="$CPPFLAGS"
+     CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <conftest.h>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  gl_cv_have_include_next=yes
+else case e in #(
+  e) CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <conftest.h>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  gl_cv_have_include_next=buggy
+else case e in #(
+  e) gl_cv_have_include_next=no ;;
+esac
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+        ;;
+esac
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+     CPPFLAGS="$gl_save_CPPFLAGS"
+     rm -rf conftestd1a conftestd1b conftestd2
+     ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
+printf "%s\n" "$gl_cv_have_include_next" >&6; }
+  PRAGMA_SYSTEM_HEADER=
+  if test $gl_cv_have_include_next = yes; then
+    INCLUDE_NEXT=include_next
+    INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
+    if test -n "$GCC"; then
+      PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
+    fi
+  else
+    if test $gl_cv_have_include_next = buggy; then
+      INCLUDE_NEXT=include
+      INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
+    else
+      INCLUDE_NEXT=include
+      INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
+    fi
+  fi
+
+
+
+
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether source code line length is unlimited" >&5
+printf %s "checking whether source code line length is unlimited... " >&6; }
+if test ${gl_cv_source_line_length_unlimited+y}
+then :
+  printf %s "(cached) " >&6
+else case e in #(
+  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef __TANDEM
+choke me
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP_TRADITIONAL "choke me" >/dev/null 2>&1
+then :
+  gl_cv_source_line_length_unlimited=no
+else case e in #(
+  e) gl_cv_source_line_length_unlimited=yes ;;
+esac
+fi
+rm -rf conftest*
+
+     ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_source_line_length_unlimited" >&5
+printf "%s\n" "$gl_cv_source_line_length_unlimited" >&6; }
+  if test $gl_cv_source_line_length_unlimited = no; then
+    PRAGMA_COLUMNS="#pragma COLUMNS 10000"
+  else
+    PRAGMA_COLUMNS=
+  fi
+
+
+
     HAVE_BTOWC=1;
   HAVE_MBSINIT=1;
   HAVE_MBRTOWC=1;
@@ -8963,7 +9082,12 @@ fi
   REPLACE_WCWIDTH=0;
   REPLACE_WCSWIDTH=0;
   REPLACE_WCSFTIME=0;
+  REPLACE_WCSCMP=0;
+  REPLACE_WCSNCMP=0;
+  REPLACE_WCSSTR=0;
   REPLACE_WCSTOK=0;
+  REPLACE_WMEMCMP=0;
+  REPLACE_WMEMPCPY=0;
 
 
 
@@ -9235,6 +9359,7 @@ printf "%s\n" "$gt_cv_locale_fr" >&6; }
 
 
 
+
   GL_GNULIB_BTOWC=0
 
 
@@ -9437,6 +9562,10 @@ printf "%s\n" "$gt_cv_locale_fr" >&6; }
 
 
 
+  GL_GNULIB_GETPROGNAME=0
+
+
+
   GL_GNULIB_GETSUBOPT=0
 
 
@@ -9453,6 +9582,10 @@ printf "%s\n" "$gt_cv_locale_fr" >&6; }
 
 
 
+  GL_GNULIB_MBSTOWCS=0
+
+
+
   GL_GNULIB_MBTOWC=0
 
 
@@ -9606,6 +9739,8 @@ printf "%s\n" "$gt_cv_locale_fr" >&6; }
   HAVE_DECL_FCVT=1;
   HAVE_DECL_GCVT=1;
   HAVE_DECL_GETLOADAVG=1;
+  HAVE_DECL_PROGRAM_INVOCATION_NAME=1;
+  HAVE_GETPROGNAME=1;
   HAVE_GETSUBOPT=1;
   HAVE_GRANTPT=1;
   HAVE_INITSTATE=1;
@@ -9642,17 +9777,26 @@ printf "%s\n" "$gt_cv_locale_fr" >&6; }
   HAVE_SYS_LOADAVG_H=0;
   HAVE_UNLOCKPT=1;
   HAVE_DECL_UNSETENV=1;
+  REPLACE__EXIT=0;
   REPLACE_ALIGNED_ALLOC=0;
   REPLACE_CALLOC_FOR_CALLOC_GNU=0;
   REPLACE_CALLOC_FOR_CALLOC_POSIX=0;
   REPLACE_CANONICALIZE_FILE_NAME=0;
   REPLACE_FREE=0;
+  REPLACE_GETLOADAVG=0;
+  REPLACE_GETPROGNAME=0;
+  REPLACE_GETSUBOPT=0;
   REPLACE_INITSTATE=0;
   REPLACE_MALLOC_FOR_MALLOC_GNU=0;
   REPLACE_MALLOC_FOR_MALLOC_POSIX=0;
+  REPLACE_MB_CUR_MAX=0;
+  REPLACE_MBSTOWCS=0;
   REPLACE_MBTOWC=0;
+  REPLACE_MKOSTEMP=0;
+  REPLACE_MKOSTEMPS=0;
   REPLACE_MKSTEMP=0;
   REPLACE_POSIX_MEMALIGN=0;
+  REPLACE_POSIX_OPENPT=0;
   REPLACE_PTSNAME=0;
   REPLACE_PTSNAME_R=0;
   REPLACE_PUTENV=0;
@@ -11448,6 +11592,7 @@ printf "%s\n" "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
   REPLACE_COPY_FILE_RANGE=0;
   REPLACE_DUP=0;
   REPLACE_DUP2=0;
+  REPLACE_DUP3=0;
   REPLACE_EXECL=0;
   REPLACE_EXECLE=0;
   REPLACE_EXECLP=0;
@@ -11457,10 +11602,12 @@ printf "%s\n" "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
   REPLACE_EXECVPE=0;
   REPLACE_FACCESSAT=0;
   REPLACE_FCHOWNAT=0;
+  REPLACE_FDATASYNC=0;
   REPLACE_FTRUNCATE=0;
   REPLACE_GETCWD=0;
   REPLACE_GETDOMAINNAME=0;
   REPLACE_GETDTABLESIZE=0;
+  REPLACE_GETENTROPY=0;
   REPLACE_GETLOGIN_R=0;
   REPLACE_GETGROUPS=0;
   REPLACE_GETPAGESIZE=0;
@@ -11471,12 +11618,14 @@ printf "%s\n" "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
   REPLACE_LINK=0;
   REPLACE_LINKAT=0;
   REPLACE_LSEEK=0;
+  REPLACE_PIPE2=0;
   REPLACE_PREAD=0;
   REPLACE_PWRITE=0;
   REPLACE_READ=0;
   REPLACE_READLINK=0;
   REPLACE_READLINKAT=0;
   REPLACE_RMDIR=0;
+  REPLACE_SETHOSTNAME=0;
   REPLACE_SLEEP=0;
   REPLACE_SYMLINK=0;
   REPLACE_SYMLINKAT=0;
@@ -11517,6 +11666,56 @@ printf "%s\n" "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
 
 
 
+
+
+
+    if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
+      REPLACE_CLOSE=1
+    fi
+
+
+
+
+
+
+  if test $ac_cv_header_sys_socket_h != yes; then
+                    ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
+if test "x$ac_cv_header_winsock2_h" = xyes
+then :
+  printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
+
+fi
+
+  fi
+  if test "$ac_cv_header_winsock2_h" = yes; then
+    HAVE_WINSOCK2_H=1
+    UNISTD_H_HAVE_WINSOCK2_H=1
+    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
+  else
+    HAVE_WINSOCK2_H=0
+  fi
+
+
+    if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
+                        REPLACE_CLOSE=1
+    fi
+
+
+    if test $REPLACE_CLOSE = 0; then
+
+
+
+  if test $ac_cv_func_fchdir = no; then
+    HAVE_FCHDIR=0
+  fi
+
+      if test $HAVE_FCHDIR = 0; then
+        REPLACE_CLOSE=1
+      fi
+    fi
+
+
+
     HAVE_OPENDIR=1;
   HAVE_READDIR=1;
   HAVE_REWINDDIR=1;
@@ -11527,12 +11726,22 @@ printf "%s\n" "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
   HAVE_SCANDIR=1;
   HAVE_ALPHASORT=1;
   REPLACE_OPENDIR=0;
+  REPLACE_READDIR=0;
+  REPLACE_REWINDDIR=0;
   REPLACE_CLOSEDIR=0;
   REPLACE_DIRFD=0;
   REPLACE_FDOPENDIR=0;
 
 
 
+  case "$host_os" in
+    mingw*) DIR_HAS_FD_MEMBER=0 ;;
+    *)      DIR_HAS_FD_MEMBER=1 ;;
+  esac
+
+
+
+
 
 
 
@@ -11570,132 +11779,32 @@ printf "%s\n" "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
 
 
 
-    HAVE_ISBLANK=1;
-
+  if test "x$lispdir" = x; then
+    lispdir='${datarootdir}/emacs/site-lisp'
 
+  fi
+    if test "x$runstatedir" = x; then
+    runstatedir='${localstatedir}/run'
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
-printf %s "checking whether the preprocessor supports include_next... " >&6; }
-if test ${gl_cv_have_include_next+y}
-then :
-  printf %s "(cached) " >&6
-else case e in #(
-  e) rm -rf conftestd1a conftestd1b conftestd2
-     mkdir conftestd1a conftestd1b conftestd2
-                                                  cat <<EOF > conftestd1a/conftest.h
-#define DEFINED_IN_CONFTESTD1
-#include_next <conftest.h>
-#ifdef DEFINED_IN_CONFTESTD2
-int foo;
-#else
-#error "include_next doesn't work"
-#endif
-EOF
-     cat <<EOF > conftestd1b/conftest.h
-#define DEFINED_IN_CONFTESTD1
-#include <stdio.h>
-#include_next <conftest.h>
-#ifdef DEFINED_IN_CONFTESTD2
-int foo;
-#else
-#error "include_next doesn't work"
-#endif
-EOF
-     cat <<EOF > conftestd2/conftest.h
-#ifndef DEFINED_IN_CONFTESTD1
-#error "include_next test doesn't work"
-#endif
-#define DEFINED_IN_CONFTESTD2
-EOF
-     gl_save_CPPFLAGS="$CPPFLAGS"
-     CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
-     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <conftest.h>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-  gl_cv_have_include_next=yes
-else case e in #(
-  e) CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <conftest.h>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-  gl_cv_have_include_next=buggy
-else case e in #(
-  e) gl_cv_have_include_next=no ;;
-esac
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-        ;;
-esac
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-     CPPFLAGS="$gl_save_CPPFLAGS"
-     rm -rf conftestd1a conftestd1b conftestd2
-     ;;
-esac
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
-printf "%s\n" "$gl_cv_have_include_next" >&6; }
-  PRAGMA_SYSTEM_HEADER=
-  if test $gl_cv_have_include_next = yes; then
-    INCLUDE_NEXT=include_next
-    INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
-    if test -n "$GCC"; then
-      PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
-    fi
-  else
-    if test $gl_cv_have_include_next = buggy; then
-      INCLUDE_NEXT=include
-      INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
-    else
-      INCLUDE_NEXT=include
-      INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
-    fi
   fi
 
+            pkgdatadir='${datadir}/${PACKAGE}'
 
+  pkgincludedir='${includedir}/${PACKAGE}'
 
+  pkglibdir='${libdir}/${PACKAGE}'
 
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether source code line length is unlimited" >&5
-printf %s "checking whether source code line length is unlimited... " >&6; }
-if test ${gl_cv_source_line_length_unlimited+y}
-then :
-  printf %s "(cached) " >&6
-else case e in #(
-  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+  pkglibexecdir='${libexecdir}/${PACKAGE}'
 
-#ifdef __TANDEM
-choke me
-#endif
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP_TRADITIONAL "choke me" >/dev/null 2>&1
-then :
-  gl_cv_source_line_length_unlimited=no
-else case e in #(
-  e) gl_cv_source_line_length_unlimited=yes ;;
-esac
-fi
-rm -rf conftest*
 
-     ;;
-esac
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_source_line_length_unlimited" >&5
-printf "%s\n" "$gl_cv_source_line_length_unlimited" >&6; }
-  if test $gl_cv_source_line_length_unlimited = no; then
-    PRAGMA_COLUMNS="#pragma COLUMNS 10000"
-  else
-    PRAGMA_COLUMNS=
-  fi
+  gl_sed_double_backslashes='s/\\/\\\\/g'
+  gl_sed_escape_doublequotes='s/"/\\"/g'
+  gl_sed_escape_for_make_1="s,\\([ \"&'();<>\\\\\`|]\\),\\\\\\1,g"
+  gl_sed_escape_for_make_2='s,\$,\\$$,g'
+
 
+    HAVE_ISBLANK=1;
 
 
 
@@ -11924,6 +12033,8 @@ printf "%s\n" "$gl_cv_next_dirent_h" >&6; }
 
 
 
+
+
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
 printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
 if test ${ac_cv_c_undeclared_builtin_options+y}
@@ -12453,6 +12564,329 @@ printf "%s\n" "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
   fi
 
 
+
+
+
+
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_error_h='<'error.h'>'
+     else
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <error.h>" >&5
+printf %s "checking absolute name of <error.h>... " >&6; }
+if test ${gl_cv_next_error_h+y}
+then :
+  printf %s "(cached) " >&6
+else case e in #(
+  e)
+             if test $ac_cv_header_error_h = yes; then
+
+
+
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <error.h>
+_ACEOF
+                case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
+  esac
+
+  case "$host_os" in
+    mingw*)
+                                          gl_dirsep_regex='[/\\]'
+      ;;
+    *)
+      gl_dirsep_regex='\/'
+      ;;
+  esac
+      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+  gl_header_literal_regex=`echo 'error.h' \
+                           | sed -e "$gl_make_literal_regex_sed"`
+  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+      s|^/[^/]|//&|
+      p
+      q
+    }'
+
+        gl_cv_absolute_error_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
+
+          gl_header=$gl_cv_absolute_error_h
+          gl_cv_next_error_h='"'$gl_header'"'
+          else
+               gl_cv_next_error_h='<'error.h'>'
+             fi
+
+          ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_error_h" >&5
+printf "%s\n" "$gl_cv_next_error_h" >&6; }
+     fi
+     NEXT_ERROR_H=$gl_cv_next_error_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'error.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_error_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_ERROR_H=$gl_next_as_first_directive
+
+
+
+
+  if test $ac_cv_header_error_h = yes; then
+    HAVE_ERROR_H=1
+  else
+    HAVE_ERROR_H=0
+  fi
+
+
+  REPLACE_ERROR=0
+
+
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for error" >&5
+printf %s "checking for error... " >&6; }
+if test ${gl_cv_onwards_func_error+y}
+then :
+  printf %s "(cached) " >&6
+else case e in #(
+  e)
+  exec 9>&6 6>/dev/null
+
+       case "$host_os" in
+
+         linux*-android*)
+           ac_fn_check_decl "$LINENO" "error" "ac_cv_have_decl_error" "#include <error.h>
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_error" = xyes
+then :
+
+fi
+           if test $ac_cv_have_decl_error = yes; then
+             ac_fn_c_check_func "$LINENO" "error" "ac_cv_func_error"
+if test "x$ac_cv_func_error" = xyes
+then :
+
+fi
+
+             if test $ac_cv_func_error = yes; then
+               gl_cv_onwards_func_error=yes
+             else
+                                                            gl_cv_onwards_func_error='future OS version'
+             fi
+           else
+             gl_cv_onwards_func_error='future OS version'
+           fi
+           ;;
+
+
+         *)
+           ac_fn_c_check_func "$LINENO" "error" "ac_cv_func_error"
+if test "x$ac_cv_func_error" = xyes
+then :
+
+fi
+
+           gl_cv_onwards_func_error=$ac_cv_func_error
+           ;;
+
+       esac
+
+  exec 6>&9 9>&-
+
+     ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_error" >&5
+printf "%s\n" "$gl_cv_onwards_func_error" >&6; }
+
+  case "$gl_cv_onwards_func_error" in
+    future*) ac_cv_func_error=no ;;
+    *)       ac_cv_func_error=$gl_cv_onwards_func_error ;;
+  esac
+  if test $ac_cv_func_error = yes; then
+
+printf "%s\n" "#define HAVE_ERROR 1" >>confdefs.h
+
+  fi
+
+
+  if test $ac_cv_func_error = yes; then
+    HAVE_ERROR=1
+  else
+    HAVE_ERROR=0
+    case "$gl_cv_onwards_func_error" in
+      future*) REPLACE_ERROR=1 ;;
+    esac
+  fi
+
+        ac_fn_check_decl "$LINENO" "error_at_line" "ac_cv_have_decl_error_at_line" "#include <error.h>
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_error_at_line" = xyes
+then :
+
+fi
+  if test $ac_cv_have_decl_error_at_line = yes; then
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
+printf %s "checking for error_at_line... " >&6; }
+if test ${ac_cv_lib_error_at_line+y}
+then :
+  printf %s "(cached) " >&6
+else case e in #(
+  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <error.h>
+int
+main (void)
+{
+error_at_line (0, 0, "", 0, "an error occurred");
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+  ac_cv_lib_error_at_line=yes
+else case e in #(
+  e) ac_cv_lib_error_at_line=no ;;
+esac
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
+printf "%s\n" "$ac_cv_lib_error_at_line" >&6; }
+  else
+    ac_cv_lib_error_at_line=no
+  fi
+  if test $ac_cv_lib_error_at_line = yes; then
+    HAVE_ERROR_AT_LINE=1
+  else
+    HAVE_ERROR_AT_LINE=0
+  fi
+  REPLACE_ERROR_AT_LINE=0
+
+  if test $ac_cv_func_error = yes && test $ac_cv_lib_error_at_line = yes; then
+            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working error function" >&5
+printf %s "checking for working error function... " >&6; }
+if test ${gl_cv_func_working_error+y}
+then :
+  printf %s "(cached) " >&6
+else case e in #(
+  e) if test $cross_compiling != yes; then
+         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+              #include <error.h>
+              static void print_no_progname (void) {}
+
+int
+main (void)
+{
+
+              error_print_progname = print_no_progname;
+              error (0, 0, "foo");
+
+  ;
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+  rm -f conftest.out
+            if test -s conftest$ac_exeext \
+               && ./conftest$ac_exeext 2> conftest.out; then
+              if grep ' ' conftest.out >/dev/null; then
+                gl_cv_func_working_error=no
+              else
+                gl_cv_func_working_error=yes
+              fi
+            else
+              gl_cv_func_working_error=no
+            fi
+            rm -f conftest.out
+
+else case e in #(
+  e) gl_cv_func_working_error=no ;;
+esac
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+       else
+         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+              #include <error.h>
+
+int
+main (void)
+{
+
+              error (0, 0, "foo");
+
+  ;
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  case "$host_os" in
+                               # Guess yes on glibc systems.
+              *-gnu* | gnu*)   gl_cv_func_working_error="guessing yes" ;;
+                               # Guess no on Android.
+              linux*-android*) gl_cv_func_working_error="guessing no" ;;
+                               # If we don't know, obey --enable-cross-guesses.
+              *)               gl_cv_func_working_error="$gl_cross_guess_normal" ;;
+            esac
+
+else case e in #(
+  e) gl_cv_func_working_error=no ;;
+esac
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+       fi
+       ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_error" >&5
+printf "%s\n" "$gl_cv_func_working_error" >&6; }
+    case "$gl_cv_func_working_error" in
+      *no)
+        REPLACE_ERROR=1
+        REPLACE_ERROR_AT_LINE=1
+        ;;
+    esac
+  fi
+
+  if test $HAVE_ERROR = 0 || test $REPLACE_ERROR = 1 \
+     || test $HAVE_ERROR_AT_LINE = 0 || test $REPLACE_ERROR_AT_LINE = 1; then
+        GL_GENERATE_ERROR_H=true
+  else
+    GL_GENERATE_ERROR_H=false
+  fi
+
+
+
+
+
+
 ac_fn_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
 if test "x$ac_cv_have_decl_strerror_r" = xyes
 then :
@@ -12936,7 +13370,6 @@ printf "%s\n" "#define PROMOTED_MODE_T $gl_cv_promoted_mode_t" >>confdefs.h
 
 
 
-
     HAVE_FNMATCH=1;
   REPLACE_FNMATCH=0;
 
@@ -13106,7 +13539,9 @@ printf "%s\n" "#define mbstate_t int" >>confdefs.h
   HAVE_DECL_FTELLO=1;
   HAVE_DECL_GETDELIM=1;
   HAVE_DECL_GETLINE=1;
+  HAVE_DECL_GETW=1;
   HAVE_DECL_OBSTACK_PRINTF=1;
+  HAVE_DECL_PUTW=1;
   HAVE_DECL_SNPRINTF=1;
   HAVE_DECL_VSNPRINTF=1;
   HAVE_DPRINTF=1;
@@ -13153,6 +13588,292 @@ printf "%s\n" "#define mbstate_t int" >>confdefs.h
 
 
 
+
+  case "$host_os" in
+    mingw* | pw*)
+            REPLACE_FOPEN=1
+            gl_cv_func_fopen_slash="guessing no"
+      ;;
+    *)
+                  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fopen recognizes a trailing slash" >&5
+printf %s "checking whether fopen recognizes a trailing slash... " >&6; }
+if test ${gl_cv_func_fopen_slash+y}
+then :
+  printf %s "(cached) " >&6
+else case e in #(
+  e)
+          if test "$cross_compiling" = yes
+then :
+
+             case "$host_os" in
+               aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
+                 gl_cv_func_fopen_slash="guessing no" ;;
+               *)
+                 gl_cv_func_fopen_slash="guessing yes" ;;
+             esac
+
+else case e in #(
+  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stddef.h>
+#include <stdio.h>
+int main ()
+{
+  FILE *fp = fopen ("conftest.sl/", "w");
+  int result = (fp != NULL);
+  if (fp != NULL)
+    fclose (fp);
+  return result;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  gl_cv_func_fopen_slash=yes
+else case e in #(
+  e) gl_cv_func_fopen_slash=no ;;
+esac
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
+fi
+
+          rm -f conftest.sl
+         ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_slash" >&5
+printf "%s\n" "$gl_cv_func_fopen_slash" >&6; }
+      ;;
+  esac
+  case "$gl_cv_func_fopen_slash" in
+    *no)
+
+printf "%s\n" "#define FOPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
+
+      REPLACE_FOPEN=1
+      ;;
+  esac
+
+
+
+
+
+
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
+printf %s "checking whether fflush works on input streams... " >&6; }
+if test ${gl_cv_func_fflush_stdin+y}
+then :
+  printf %s "(cached) " >&6
+else case e in #(
+  e) echo hello world > conftest.txt
+     if test "$cross_compiling" = yes
+then :
+  case "$host_os" in
+                  # Guess no on native Windows.
+          mingw*) gl_cv_func_fflush_stdin="guessing no" ;;
+          *)      gl_cv_func_fflush_stdin=cross ;;
+        esac
+
+else case e in #(
+  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdio.h>
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#else /* on Windows with MSVC */
+# include <io.h>
+#endif
+
+
+$gl_mda_defines
+
+int
+main (void)
+{
+FILE *f = fopen ("conftest.txt", "r");
+         char buffer[10];
+         int fd;
+         int c;
+         if (f == NULL)
+           return 1;
+         fd = fileno (f);
+         if (fd < 0 || fread (buffer, 1, 5, f) != 5)
+           { fclose (f); return 2; }
+         /* For deterministic results, ensure f read a bigger buffer.  */
+         if (lseek (fd, 0, SEEK_CUR) == 5)
+           { fclose (f); return 3; }
+         /* POSIX requires fflush-fseek to set file offset of fd.  This fails
+            on BSD systems and on mingw.  */
+         if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
+           { fclose (f); return 4; }
+         if (lseek (fd, 0, SEEK_CUR) != 5)
+           { fclose (f); return 5; }
+         /* Verify behaviour of fflush after ungetc. See
+            <https://www.opengroup.org/austin/aardvark/latest/xshbug3.txt>  */
+         /* Verify behaviour of fflush after a backup ungetc.  This fails on
+            mingw.  */
+         c = fgetc (f);
+         ungetc (c, f);
+         fflush (f);
+         if (fgetc (f) != c)
+           { fclose (f); return 6; }
+         /* Verify behaviour of fflush after a non-backup ungetc.  This fails
+            on glibc 2.8 and on BSD systems.  */
+         c = fgetc (f);
+         ungetc ('@', f);
+         fflush (f);
+         if (fgetc (f) != c)
+           { fclose (f); return 7; }
+         fclose (f);
+         return 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  gl_cv_func_fflush_stdin=yes
+else case e in #(
+  e) gl_cv_func_fflush_stdin=no ;;
+esac
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
+fi
+
+     rm conftest.txt
+     ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
+printf "%s\n" "$gl_cv_func_fflush_stdin" >&6; }
+  case "$gl_cv_func_fflush_stdin" in
+    *yes) gl_func_fflush_stdin=1 ;;
+    *no)  gl_func_fflush_stdin=0 ;;
+    *)    gl_func_fflush_stdin='(-1)' ;;
+  esac
+
+printf "%s\n" "#define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin" >>confdefs.h
+
+
+  case "$gl_cv_func_fflush_stdin" in
+    *yes) ;;
+    *) REPLACE_FCLOSE=1 ;;
+  esac
+
+
+  if test $REPLACE_CLOSE = 1; then
+    REPLACE_FCLOSE=1
+  fi
+
+  case "$host_os" in
+    openedition) REPLACE_FCLOSE=1 ;;
+  esac
+
+  if test $REPLACE_FCLOSE = 0; then
+
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fclose works on input streams" >&5
+printf %s "checking whether fclose works on input streams... " >&6; }
+if test ${gl_cv_func_fclose_stdin+y}
+then :
+  printf %s "(cached) " >&6
+else case e in #(
+  e) echo hello world > conftest.txt
+     if test "$cross_compiling" = yes
+then :
+  case "$host_os" in
+                              # Guess no on glibc systems.
+          *-gnu* | gnu*)      gl_cv_func_fclose_stdin="guessing no" ;;
+                              # Guess yes on musl systems.
+          *-musl* | midipix*) gl_cv_func_fclose_stdin="guessing yes" ;;
+                              # Guess no on native Windows.
+          mingw*)             gl_cv_func_fclose_stdin="guessing no" ;;
+                              # If we don't know, obey --enable-cross-guesses.
+          *)                  gl_cv_func_fclose_stdin="$gl_cross_guess_normal" ;;
+        esac
+
+else case e in #(
+  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <fcntl.h>
+            #include <stdio.h>
+            #if HAVE_UNISTD_H
+            # include <unistd.h>
+            #else /* on Windows with MSVC */
+            # include <io.h>
+            #endif
+
+
+$gl_mda_defines
+
+int
+main (void)
+{
+int fd;
+            int fd2;
+            FILE *fp;
+            fd = open ("conftest.txt", O_RDONLY);
+            if (fd < 0)
+              return 1;
+            if (lseek (fd, 1, SEEK_SET) != 1)
+              return 2;
+            fd2 = dup (fd);
+            if (fd2 < 0)
+              return 3;
+            fp = fdopen (fd2, "r");
+            if (fp == NULL)
+              return 4;
+            if (fgetc (fp) != 'e')
+              { fclose (fp); return 5; }
+            /* This fclose() call should reposition the underlying file
+               descriptor.  */
+            if (fclose (fp) != 0)
+              return 6;
+            if (lseek (fd2, 0, SEEK_CUR) != -1) /* should fail with EBADF */
+              return 7;
+            /* Verify the file position.  */
+            if (lseek (fd, 0, SEEK_CUR) != 2)
+              return 8;
+            return 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  gl_cv_func_fclose_stdin=yes
+else case e in #(
+  e) gl_cv_func_fclose_stdin=no ;;
+esac
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
+fi
+
+     rm conftest.txt
+     ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fclose_stdin" >&5
+printf "%s\n" "$gl_cv_func_fclose_stdin" >&6; }
+
+    case "$gl_cv_func_fclose_stdin" in
+      *yes) ;;
+      *) REPLACE_FCLOSE=1 ;;
+    esac
+  fi
+
+
+
   GL_GNULIB_DPRINTF=0
 
 
@@ -13837,6 +14558,9 @@ then :
           linux-* | linux)
             # Guess yes on Linux systems.
             gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
+          midipix*)
+            # Guess yes on systems that emulate the Linux system calls.
+            gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
           *-gnu* | gnu*)
             # Guess yes on glibc systems.
             gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
@@ -13947,6 +14671,8 @@ then :
             *-gnu* | gnu*) gl_cv_func_getcwd_null="guessing yes";;
                            # Guess yes on musl systems.
             *-musl*)       gl_cv_func_getcwd_null="guessing yes";;
+                           # Guess yes on systems that emulate the Linux system calls.
+            midipix*)      gl_cv_func_getcwd_null="guessing yes";;
                            # Guess yes on Cygwin.
             cygwin*)       gl_cv_func_getcwd_null="guessing yes";;
                            # If we don't know, obey --enable-cross-guesses.
@@ -14706,7 +15432,6 @@ printf "%s\n" "$gl_cv_func_getopt_long_gnu" >&6; }
 
 
 
-
   if test -z "$gl_pthreadlib_body_done"; then
     gl_pthread_api=no
     LIBPTHREAD=
@@ -14762,8 +15487,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \
         LIBS=$save_LIBS
         test $gl_pthread_api = yes && break
       done
-      echo "$as_me:14765: gl_pthread_api=$gl_pthread_api" >&5
-      echo "$as_me:14766: LIBPTHREAD=$LIBPTHREAD" >&5
+      echo "$as_me:15490: gl_pthread_api=$gl_pthread_api" >&5
+      echo "$as_me:15491: LIBPTHREAD=$LIBPTHREAD" >&5
 
       gl_pthread_in_glibc=no
       # On Linux with glibc >= 2.34, libc contains the fully functional
@@ -14789,7 +15514,7 @@ rm -rf conftest*
 
           ;;
       esac
-      echo "$as_me:14792: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5
+      echo "$as_me:15517: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5
 
       # Test for libpthread by looking for pthread_kill. (Not pthread_self,
       # since it is defined as a macro on OSF/1.)
@@ -14811,12 +15536,12 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    Use char because int might match the return type of a GCC
    builtin and then its argument prototype would still apply.
    The 'extern "C"' is for builds by C++ compilers;
-   although this is not generally supported in C code, supporting it here
+   although this is not generally supported in C code supporting it here
    has little cost and some practical benefit (sr 110532).  */
 #ifdef __cplusplus
 extern "C"
 #endif
-char pthread_kill ();
+char pthread_kill (void);
 int
 main (void)
 {
@@ -14852,7 +15577,7 @@ then :
              # 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*)
+               solaris | solaris2.[1-9] | solaris2.[1-9].* | hpux*)
 
 printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
 
@@ -14878,12 +15603,12 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    Use char because int might match the return type of a GCC
    builtin and then its argument prototype would still apply.
    The 'extern "C"' is for builds by C++ compilers;
-   although this is not generally supported in C code, supporting it here
+   although this is not generally supported in C code supporting it here
    has little cost and some practical benefit (sr 110532).  */
 #ifdef __cplusplus
 extern "C"
 #endif
-char pthread_kill ();
+char pthread_kill (void);
 int
 main (void)
 {
@@ -14930,12 +15655,12 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    Use char because int might match the return type of a GCC
    builtin and then its argument prototype would still apply.
    The 'extern "C"' is for builds by C++ compilers;
-   although this is not generally supported in C code, supporting it here
+   although this is not generally supported in C code supporting it here
    has little cost and some practical benefit (sr 110532).  */
 #ifdef __cplusplus
 extern "C"
 #endif
-char pthread_kill ();
+char pthread_kill (void);
 int
 main (void)
 {
@@ -14967,7 +15692,7 @@ fi
 
         fi
       fi
-      echo "$as_me:14970: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5
+      echo "$as_me:15695: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5
     fi
     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
 printf %s "checking whether POSIX threads API is available... " >&6; }
@@ -14994,7 +15719,7 @@ sched_yield ();
 _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
-  LIB_SCHED_YIELD=
+  SCHED_YIELD_LIB=
 
 else case e in #(
   e)        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
@@ -15012,12 +15737,12 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    Use char because int might match the return type of a GCC
    builtin and then its argument prototype would still apply.
    The 'extern "C"' is for builds by C++ compilers;
-   although this is not generally supported in C code, supporting it here
+   although this is not generally supported in C code supporting it here
    has little cost and some practical benefit (sr 110532).  */
 #ifdef __cplusplus
 extern "C"
 #endif
-char sched_yield ();
+char sched_yield (void);
 int
 main (void)
 {
@@ -15042,7 +15767,7 @@ fi
 printf "%s\n" "$ac_cv_lib_rt_sched_yield" >&6; }
 if test "x$ac_cv_lib_rt_sched_yield" = xyes
 then :
-  LIB_SCHED_YIELD=-lrt
+  SCHED_YIELD_LIB=-lrt
 else case e in #(
   e)           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
 printf %s "checking for sched_yield in -lposix4... " >&6; }
@@ -15059,12 +15784,12 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    Use char because int might match the return type of a GCC
    builtin and then its argument prototype would still apply.
    The 'extern "C"' is for builds by C++ compilers;
-   although this is not generally supported in C code, supporting it here
+   although this is not generally supported in C code supporting it here
    has little cost and some practical benefit (sr 110532).  */
 #ifdef __cplusplus
 extern "C"
 #endif
-char sched_yield ();
+char sched_yield (void);
 int
 main (void)
 {
@@ -15089,7 +15814,7 @@ fi
 printf "%s\n" "$ac_cv_lib_posix4_sched_yield" >&6; }
 if test "x$ac_cv_lib_posix4_sched_yield" = xyes
 then :
-  LIB_SCHED_YIELD=-lposix4
+  SCHED_YIELD_LIB=-lposix4
 fi
  ;;
 esac
@@ -15101,6 +15826,8 @@ fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 
+        LIB_SCHED_YIELD="$SCHED_YIELD_LIB"
+
 
     gl_pthreadlib_body_done=done
   fi
@@ -15119,9 +15846,33 @@ then :
   printf %s "(cached) " >&6
 else case e in #(
   e) case "$host_os" in
-       # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
-       *-musl* | darwin* | freebsd* | midnightbsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
+       # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku.
+       *-musl* | midipix* | darwin* | freebsd* | midnightbsd* | netbsd* | openbsd* | aix* | haiku*)
          gl_cv_func_setlocale_null_all_mtsafe=no ;;
+       # Guess no on Cygwin < 3.4.6.
+       cygwin*)
+         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#if defined __CYGWIN__
+ #include <cygwin/version.h>
+ #if CYGWIN_VERSION_DLL_COMBINED >= CYGWIN_VERSION_DLL_MAKE_COMBINED (3004, 6)
+  Lucky user
+ #endif
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP_TRADITIONAL "Lucky user" >/dev/null 2>&1
+then :
+  gl_cv_func_setlocale_null_all_mtsafe=yes
+else case e in #(
+  e) gl_cv_func_setlocale_null_all_mtsafe=no ;;
+esac
+fi
+rm -rf conftest*
+
+        ;;
        # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
        *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
          gl_cv_func_setlocale_null_all_mtsafe=yes ;;
@@ -15161,7 +15912,7 @@ else case e in #(
        openbsd* | aix*)
          gl_cv_func_setlocale_null_one_mtsafe=no ;;
        # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
-       *-gnu* | gnu* | *-musl* | darwin* | freebsd* | midnightbsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
+       *-gnu* | gnu* | *-musl* | midipix* | darwin* | freebsd* | midnightbsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
          gl_cv_func_setlocale_null_one_mtsafe=yes ;;
        # If we don't know, obey --enable-cross-guesses.
        *)
@@ -15190,7 +15941,7 @@ printf "%s\n" "#define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE" >>c
 
     if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
     case "$host_os" in
-      mingw*) LIB_SETLOCALE_NULL= ;;
+      mingw*) SETLOCALE_NULL_LIB= ;;
       *)
 
 
@@ -15201,8 +15952,8 @@ then :
   printf %s "(cached) " >&6
 else case e in #(
   e) case "$host_os" in
-       cygwin*)
-                                    gl_cv_have_weak="guessing no"
+       cygwin* | mingw*)
+                                             gl_cv_have_weak="guessing no"
          ;;
        *)
          gl_cv_have_weak=no
@@ -15309,15 +16060,17 @@ printf "%s\n" "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
   esac
 
         case "$gl_cv_have_weak" in
-          *yes) LIB_SETLOCALE_NULL= ;;
-          *)    LIB_SETLOCALE_NULL="$LIBPTHREAD" ;;
+          *yes) SETLOCALE_NULL_LIB= ;;
+          *)    SETLOCALE_NULL_LIB="$LIBPTHREAD" ;;
         esac
         ;;
     esac
   else
-    LIB_SETLOCALE_NULL=
+    SETLOCALE_NULL_LIB=
   fi
 
+    LIB_SETLOCALE_NULL="$SETLOCALE_NULL_LIB"
+
 
 
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -16833,6 +17586,7 @@ else case e in #(
             int wb = WORD_BIT;
             int ullw = ULLONG_WIDTH;
             int bw = BOOL_WIDTH;
+            int bm = BOOL_MAX;
 
 int
 main (void)
@@ -17826,6 +18580,10 @@ printf "%s\n" "$ac_res" >&6; }
   HAVE_DECL_STRTOIMAX=1;
   HAVE_DECL_STRTOUMAX=1;
   HAVE_IMAXDIV_T=1;
+  HAVE_IMAXABS=1;
+  HAVE_IMAXDIV=1;
+  REPLACE_IMAXABS=0;
+  REPLACE_IMAXDIV=0;
   REPLACE_STRTOIMAX=0;
   REPLACE_STRTOUMAX=0;
   INT32_MAX_LT_INTMAX_MAX=1;
@@ -18555,7 +19313,6 @@ printf "%s\n" "$gl_cv_type_wctrans_t" >&6; }
 
 
 
-
   GL_GNULIB_ISWBLANK=0
 
 
@@ -19372,7 +20129,14 @@ then :
 else case e in #(
   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <stddef.h>
+/* On FreeBSD 12.0/x86, max_align_t defined by <stddef.h> has
+               the correct alignment with the default (wrong) definition of
+               _Alignof, but a wrong alignment as soon as we activate an
+               ISO C compliant _Alignof definition.  */
+            #if ((defined __GNUC__ && 4 <= __GNUC__) || defined __clang__) && !defined __cplusplus
+             #define _Alignof(type) __builtin_offsetof (struct { char __a; type __b; }, __b)
+            #endif
+            #include <stddef.h>
             unsigned int s = sizeof (max_align_t);
             #if defined __GNUC__ || defined __clang__ || defined __IBM__ALIGNOF__
             int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
@@ -19453,6 +20217,43 @@ printf "%s\n" "$gl_cv_decl_null_works" >&6; }
     GL_GENERATE_STDDEF_H=true
   fi
 
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unreachable" >&5
+printf %s "checking for unreachable... " >&6; }
+if test ${gl_cv_func_unreachable+y}
+then :
+  printf %s "(cached) " >&6
+else case e in #(
+  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stddef.h>
+
+int
+main (void)
+{
+unreachable ();
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+  gl_cv_func_unreachable=yes
+else case e in #(
+  e) gl_cv_func_unreachable=no ;;
+esac
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+     ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unreachable" >&5
+printf "%s\n" "$gl_cv_func_unreachable" >&6; }
+  if test $gl_cv_func_unreachable = no; then
+    GL_GENERATE_STDDEF_H=true
+  fi
+
   if $GL_GENERATE_STDDEF_H; then
 
 
@@ -19811,8 +20612,8 @@ then :
   printf %s "(cached) " >&6
 else case e in #(
   e) case "$host_os" in
-       cygwin*)
-                                    gl_cv_have_weak="guessing no"
+       cygwin* | mingw*)
+                                             gl_cv_have_weak="guessing no"
          ;;
        *)
          gl_cv_have_weak=no
@@ -19986,8 +20787,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \
         LIBS=$save_LIBS
         test $gl_pthread_api = yes && break
       done
-      echo "$as_me:19989: gl_pthread_api=$gl_pthread_api" >&5
-      echo "$as_me:19990: LIBPTHREAD=$LIBPTHREAD" >&5
+      echo "$as_me:20790: gl_pthread_api=$gl_pthread_api" >&5
+      echo "$as_me:20791: LIBPTHREAD=$LIBPTHREAD" >&5
 
       gl_pthread_in_glibc=no
       # On Linux with glibc >= 2.34, libc contains the fully functional
@@ -20013,7 +20814,7 @@ rm -rf conftest*
 
           ;;
       esac
-      echo "$as_me:20016: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5
+      echo "$as_me:20817: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5
 
       # Test for libpthread by looking for pthread_kill. (Not pthread_self,
       # since it is defined as a macro on OSF/1.)
@@ -20035,12 +20836,12 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    Use char because int might match the return type of a GCC
    builtin and then its argument prototype would still apply.
    The 'extern "C"' is for builds by C++ compilers;
-   although this is not generally supported in C code, supporting it here
+   although this is not generally supported in C code supporting it here
    has little cost and some practical benefit (sr 110532).  */
 #ifdef __cplusplus
 extern "C"
 #endif
-char pthread_kill ();
+char pthread_kill (void);
 int
 main (void)
 {
@@ -20076,7 +20877,7 @@ then :
              # 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*)
+               solaris | solaris2.[1-9] | solaris2.[1-9].* | hpux*)
 
 printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
 
@@ -20102,12 +20903,12 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    Use char because int might match the return type of a GCC
    builtin and then its argument prototype would still apply.
    The 'extern "C"' is for builds by C++ compilers;
-   although this is not generally supported in C code, supporting it here
+   although this is not generally supported in C code supporting it here
    has little cost and some practical benefit (sr 110532).  */
 #ifdef __cplusplus
 extern "C"
 #endif
-char pthread_kill ();
+char pthread_kill (void);
 int
 main (void)
 {
@@ -20154,12 +20955,12 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    Use char because int might match the return type of a GCC
    builtin and then its argument prototype would still apply.
    The 'extern "C"' is for builds by C++ compilers;
-   although this is not generally supported in C code, supporting it here
+   although this is not generally supported in C code supporting it here
    has little cost and some practical benefit (sr 110532).  */
 #ifdef __cplusplus
 extern "C"
 #endif
-char pthread_kill ();
+char pthread_kill (void);
 int
 main (void)
 {
@@ -20191,7 +20992,7 @@ fi
 
         fi
       fi
-      echo "$as_me:20194: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5
+      echo "$as_me:20995: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5
     fi
     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
 printf %s "checking whether POSIX threads API is available... " >&6; }
@@ -20218,7 +21019,7 @@ sched_yield ();
 _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
-  LIB_SCHED_YIELD=
+  SCHED_YIELD_LIB=
 
 else case e in #(
   e)        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
@@ -20236,12 +21037,12 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    Use char because int might match the return type of a GCC
    builtin and then its argument prototype would still apply.
    The 'extern "C"' is for builds by C++ compilers;
-   although this is not generally supported in C code, supporting it here
+   although this is not generally supported in C code supporting it here
    has little cost and some practical benefit (sr 110532).  */
 #ifdef __cplusplus
 extern "C"
 #endif
-char sched_yield ();
+char sched_yield (void);
 int
 main (void)
 {
@@ -20266,7 +21067,7 @@ fi
 printf "%s\n" "$ac_cv_lib_rt_sched_yield" >&6; }
 if test "x$ac_cv_lib_rt_sched_yield" = xyes
 then :
-  LIB_SCHED_YIELD=-lrt
+  SCHED_YIELD_LIB=-lrt
 else case e in #(
   e)           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
 printf %s "checking for sched_yield in -lposix4... " >&6; }
@@ -20283,12 +21084,12 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    Use char because int might match the return type of a GCC
    builtin and then its argument prototype would still apply.
    The 'extern "C"' is for builds by C++ compilers;
-   although this is not generally supported in C code, supporting it here
+   although this is not generally supported in C code supporting it here
    has little cost and some practical benefit (sr 110532).  */
 #ifdef __cplusplus
 extern "C"
 #endif
-char sched_yield ();
+char sched_yield (void);
 int
 main (void)
 {
@@ -20313,7 +21114,7 @@ fi
 printf "%s\n" "$ac_cv_lib_posix4_sched_yield" >&6; }
 if test "x$ac_cv_lib_posix4_sched_yield" = xyes
 then :
-  LIB_SCHED_YIELD=-lposix4
+  SCHED_YIELD_LIB=-lposix4
 fi
  ;;
 esac
@@ -20325,6 +21126,8 @@ fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 
+        LIB_SCHED_YIELD="$SCHED_YIELD_LIB"
+
 
     gl_pthreadlib_body_done=done
   fi
@@ -20438,8 +21241,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \
         LIBS=$save_LIBS
         test $gl_pthread_api = yes && break
       done
-      echo "$as_me:20441: gl_pthread_api=$gl_pthread_api" >&5
-      echo "$as_me:20442: LIBPTHREAD=$LIBPTHREAD" >&5
+      echo "$as_me:21244: gl_pthread_api=$gl_pthread_api" >&5
+      echo "$as_me:21245: LIBPTHREAD=$LIBPTHREAD" >&5
 
       gl_pthread_in_glibc=no
       # On Linux with glibc >= 2.34, libc contains the fully functional
@@ -20465,7 +21268,7 @@ rm -rf conftest*
 
           ;;
       esac
-      echo "$as_me:20468: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5
+      echo "$as_me:21271: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5
 
       # Test for libpthread by looking for pthread_kill. (Not pthread_self,
       # since it is defined as a macro on OSF/1.)
@@ -20487,12 +21290,12 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    Use char because int might match the return type of a GCC
    builtin and then its argument prototype would still apply.
    The 'extern "C"' is for builds by C++ compilers;
-   although this is not generally supported in C code, supporting it here
+   although this is not generally supported in C code supporting it here
    has little cost and some practical benefit (sr 110532).  */
 #ifdef __cplusplus
 extern "C"
 #endif
-char pthread_kill ();
+char pthread_kill (void);
 int
 main (void)
 {
@@ -20528,7 +21331,7 @@ then :
              # 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*)
+               solaris | solaris2.[1-9] | solaris2.[1-9].* | hpux*)
 
 printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
 
@@ -20554,12 +21357,12 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    Use char because int might match the return type of a GCC
    builtin and then its argument prototype would still apply.
    The 'extern "C"' is for builds by C++ compilers;
-   although this is not generally supported in C code, supporting it here
+   although this is not generally supported in C code supporting it here
    has little cost and some practical benefit (sr 110532).  */
 #ifdef __cplusplus
 extern "C"
 #endif
-char pthread_kill ();
+char pthread_kill (void);
 int
 main (void)
 {
@@ -20606,12 +21409,12 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    Use char because int might match the return type of a GCC
    builtin and then its argument prototype would still apply.
    The 'extern "C"' is for builds by C++ compilers;
-   although this is not generally supported in C code, supporting it here
+   although this is not generally supported in C code supporting it here
    has little cost and some practical benefit (sr 110532).  */
 #ifdef __cplusplus
 extern "C"
 #endif
-char pthread_kill ();
+char pthread_kill (void);
 int
 main (void)
 {
@@ -20643,7 +21446,7 @@ fi
 
         fi
       fi
-      echo "$as_me:20646: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5
+      echo "$as_me:21449: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5
     fi
     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
 printf %s "checking whether POSIX threads API is available... " >&6; }
@@ -20670,7 +21473,7 @@ sched_yield ();
 _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
-  LIB_SCHED_YIELD=
+  SCHED_YIELD_LIB=
 
 else case e in #(
   e)        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
@@ -20688,12 +21491,12 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    Use char because int might match the return type of a GCC
    builtin and then its argument prototype would still apply.
    The 'extern "C"' is for builds by C++ compilers;
-   although this is not generally supported in C code, supporting it here
+   although this is not generally supported in C code supporting it here
    has little cost and some practical benefit (sr 110532).  */
 #ifdef __cplusplus
 extern "C"
 #endif
-char sched_yield ();
+char sched_yield (void);
 int
 main (void)
 {
@@ -20718,7 +21521,7 @@ fi
 printf "%s\n" "$ac_cv_lib_rt_sched_yield" >&6; }
 if test "x$ac_cv_lib_rt_sched_yield" = xyes
 then :
-  LIB_SCHED_YIELD=-lrt
+  SCHED_YIELD_LIB=-lrt
 else case e in #(
   e)           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
 printf %s "checking for sched_yield in -lposix4... " >&6; }
@@ -20735,12 +21538,12 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    Use char because int might match the return type of a GCC
    builtin and then its argument prototype would still apply.
    The 'extern "C"' is for builds by C++ compilers;
-   although this is not generally supported in C code, supporting it here
+   although this is not generally supported in C code supporting it here
    has little cost and some practical benefit (sr 110532).  */
 #ifdef __cplusplus
 extern "C"
 #endif
-char sched_yield ();
+char sched_yield (void);
 int
 main (void)
 {
@@ -20765,7 +21568,7 @@ fi
 printf "%s\n" "$ac_cv_lib_posix4_sched_yield" >&6; }
 if test "x$ac_cv_lib_posix4_sched_yield" = xyes
 then :
-  LIB_SCHED_YIELD=-lposix4
+  SCHED_YIELD_LIB=-lposix4
 fi
  ;;
 esac
@@ -20777,18 +21580,82 @@ fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 
+        LIB_SCHED_YIELD="$SCHED_YIELD_LIB"
+
 
     gl_pthreadlib_body_done=done
   fi
 
         if test $ac_cv_header_threads_h = yes; then
-                                                            ac_fn_c_check_func "$LINENO" "thrd_create" "ac_cv_func_thrd_create"
+
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for thrd_create" >&5
+printf %s "checking for thrd_create... " >&6; }
+if test ${gl_cv_onwards_func_thrd_create+y}
+then :
+  printf %s "(cached) " >&6
+else case e in #(
+  e)
+  exec 9>&6 6>/dev/null
+
+       case "$host_os" in
+
+         linux*-android*)
+           ac_fn_check_decl "$LINENO" "thrd_create" "ac_cv_have_decl_thrd_create" "#include <threads.h>
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_thrd_create" = xyes
+then :
+
+fi
+           if test $ac_cv_have_decl_thrd_create = yes; then
+             ac_fn_c_check_func "$LINENO" "thrd_create" "ac_cv_func_thrd_create"
 if test "x$ac_cv_func_thrd_create" = xyes
 then :
-  printf "%s\n" "#define HAVE_THRD_CREATE 1" >>confdefs.h
 
 fi
 
+             if test $ac_cv_func_thrd_create = yes; then
+               gl_cv_onwards_func_thrd_create=yes
+             else
+                                                            gl_cv_onwards_func_thrd_create='future OS version'
+             fi
+           else
+             gl_cv_onwards_func_thrd_create='future OS version'
+           fi
+           ;;
+
+
+         *)
+           ac_fn_c_check_func "$LINENO" "thrd_create" "ac_cv_func_thrd_create"
+if test "x$ac_cv_func_thrd_create" = xyes
+then :
+
+fi
+
+           gl_cv_onwards_func_thrd_create=$ac_cv_func_thrd_create
+           ;;
+
+       esac
+
+  exec 6>&9 9>&-
+
+     ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_thrd_create" >&5
+printf "%s\n" "$gl_cv_onwards_func_thrd_create" >&6; }
+
+  case "$gl_cv_onwards_func_thrd_create" in
+    future*) ac_cv_func_thrd_create=no ;;
+    *)       ac_cv_func_thrd_create=$gl_cv_onwards_func_thrd_create ;;
+  esac
+  if test $ac_cv_func_thrd_create = yes; then
+
+printf "%s\n" "#define HAVE_THRD_CREATE 1" >>confdefs.h
+
+  fi
+
+
           if test $ac_cv_func_thrd_create = yes; then
             LIBSTDTHREAD=
           else
@@ -20807,12 +21674,12 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    Use char because int might match the return type of a GCC
    builtin and then its argument prototype would still apply.
    The 'extern "C"' is for builds by C++ compilers;
-   although this is not generally supported in C code, supporting it here
+   although this is not generally supported in C code supporting it here
    has little cost and some practical benefit (sr 110532).  */
 #ifdef __cplusplus
 extern "C"
 #endif
-char thrd_create ();
+char thrd_create (void);
 int
 main (void)
 {
@@ -20849,7 +21716,7 @@ fi
 
           fi
         else
-                    LIBSTDTHREAD="$LIBPMULTITHREAD $LIB_SCHED_YIELD"
+                    LIBSTDTHREAD="$LIBPMULTITHREAD $SCHED_YIELD_LIB"
         fi
         ;;
     esac
@@ -21039,9 +21906,10 @@ do
       as_fn_executable_p "$ac_path_SED" || continue
 # Check for GNU ac_path_SED and select it if it is found.
   # Check for GNU $ac_path_SED
-case `"$ac_path_SED" --version 2>&1` in
+case `"$ac_path_SED" --version 2>&1` in #(
 *GNU*)
   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
+#(
 *)
   ac_count=0
   printf %s 0123456789 >"conftest.in"
@@ -21109,9 +21977,10 @@ do
       as_fn_executable_p "$ac_path_GREP" || continue
 # Check for GNU ac_path_GREP and select it if it is found.
   # Check for GNU $ac_path_GREP
-case `"$ac_path_GREP" --version 2>&1` in
+case `"$ac_path_GREP" --version 2>&1` in #(
 *GNU*)
   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+#(
 *)
   ac_count=0
   printf %s 0123456789 >"conftest.in"
@@ -21167,7 +22036,7 @@ then :
   case "$host_os" in
           # Guess yes on platforms where we know the result.
           *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
-          | gnu* | *-musl* | midnightbsd* \
+          | gnu* | *-musl* | midipix* | midnightbsd* \
           | hpux* | solaris* | cygwin* | mingw* | msys* )
             ac_cv_func_malloc_0_nonnull="guessing yes" ;;
           # If we don't know, obey --enable-cross-guesses.
@@ -21227,13 +22096,6 @@ printf "%s\n" "#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull" >>confd
 
 
 
-
-
-
-
-
-
-
         if case "$host_os" in
        mingw*) true ;;
        *) test $ac_cv_func_mbsinit = yes ;;
@@ -21424,6 +22286,13 @@ printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
 
 
 
+
+
+
+
+
+
+
   if test $ac_cv_func_mbrtowc = no; then
     HAVE_MBRTOWC=0
     ac_fn_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
@@ -22093,7 +22962,7 @@ printf "%s\n" "#define MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
   fi
   if test $REPLACE_MBSTATE_T = 1; then
     case "$host_os" in
-      mingw*) LIB_MBRTOWC= ;;
+      mingw*) MBRTOWC_LIB= ;;
       *)
 
 
@@ -22104,8 +22973,8 @@ then :
   printf %s "(cached) " >&6
 else case e in #(
   e) case "$host_os" in
-       cygwin*)
-                                    gl_cv_have_weak="guessing no"
+       cygwin* | mingw*)
+                                             gl_cv_have_weak="guessing no"
          ;;
        *)
          gl_cv_have_weak=no
@@ -22212,15 +23081,17 @@ printf "%s\n" "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
   esac
 
         case "$gl_cv_have_weak" in
-          *yes) LIB_MBRTOWC= ;;
-          *)    LIB_MBRTOWC="$LIBPTHREAD" ;;
+          *yes) MBRTOWC_LIB= ;;
+          *)    MBRTOWC_LIB="$LIBPTHREAD" ;;
         esac
         ;;
     esac
   else
-    LIB_MBRTOWC=
+    MBRTOWC_LIB=
   fi
 
+    LIB_MBRTOWC="$MBRTOWC_LIB"
+
 
 
 
@@ -22253,6 +23124,10 @@ printf "%s\n" "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
 
 
 
+  GL_GNULIB_MEMSET_EXPLICIT=0
+
+
+
   GL_GNULIB_RAWMEMCHR=0
 
 
@@ -22404,6 +23279,7 @@ printf "%s\n" "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
   HAVE_FFSLL=1;
   HAVE_DECL_MEMMEM=1;
   HAVE_MEMPCPY=1;
+  HAVE_MEMSET_EXPLICIT=1;
   HAVE_DECL_MEMRCHR=1;
   HAVE_RAWMEMCHR=1;
   HAVE_STPCPY=1;
@@ -22425,6 +23301,8 @@ printf "%s\n" "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
   REPLACE_FFSLL=0;
   REPLACE_MEMCHR=0;
   REPLACE_MEMMEM=0;
+  REPLACE_MEMPCPY=0;
+  REPLACE_STPCPY=0;
   REPLACE_STPNCPY=0;
   REPLACE_STRCHRNUL=0;
   REPLACE_STRDUP=0;
@@ -22733,7 +23611,6 @@ printf "%s\n" "#define HAVE_MINMAX_IN_SYS_PARAM_H 1" >>confdefs.h
 
 
 
-
     HAVE_POSIX_SIGNALBLOCKING=1;
   HAVE_PTHREAD_SIGMASK=1;
   HAVE_RAISE=1;
@@ -22848,38 +23725,26 @@ printf "%s\n" "#define ssize_t int" >>confdefs.h
 
   fi
 
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
-printf %s "checking for uid_t in sys/types.h... " >&6; }
-if test ${ac_cv_type_uid_t+y}
+ac_fn_c_check_type "$LINENO" "uid_t" "ac_cv_type_uid_t" "$ac_includes_default"
+if test "x$ac_cv_type_uid_t" = xyes
 then :
-  printf %s "(cached) " >&6
-else case e in #(
-  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP_TRADITIONAL "uid_t" >/dev/null 2>&1
-then :
-  ac_cv_type_uid_t=yes
 else case e in #(
-  e) ac_cv_type_uid_t=no ;;
-esac
-fi
-rm -rf conftest*
+  e)
+printf "%s\n" "#define uid_t int" >>confdefs.h
  ;;
 esac
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
-printf "%s\n" "$ac_cv_type_uid_t" >&6; }
-if test $ac_cv_type_uid_t = no; then
-
-printf "%s\n" "#define uid_t int" >>confdefs.h
 
+ac_fn_c_check_type "$LINENO" "gid_t" "ac_cv_type_gid_t" "$ac_includes_default"
+if test "x$ac_cv_type_gid_t" = xyes
+then :
 
+else case e in #(
+  e)
 printf "%s\n" "#define gid_t int" >>confdefs.h
-
+ ;;
+esac
 fi
 
 
@@ -23001,130 +23866,53 @@ fi
 
 
   case "$host_os" in
-    *-musl*)
-printf "%s\n" "#define MUSL_LIBC 1" >>confdefs.h
- ;;
-  esac
-
+    *-musl* | midipix*)
 
+printf "%s\n" "#define MUSL_LIBC 1" >>confdefs.h
 
+      ;;
+  esac
 
 
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
-printf %s "checking for stdbool.h that conforms to C99... " >&6; }
-if test ${ac_cv_header_stdbool_h+y}
-then :
-  printf %s "(cached) " >&6
-else case e in #(
-  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-             #include <stdbool.h>
 
-             #ifdef __cplusplus
-              typedef bool Bool;
-             #else
-              typedef _Bool Bool;
-              #ifndef bool
-               "error: bool is not defined"
-              #endif
-              #ifndef false
-               "error: false is not defined"
-              #endif
-              #if false
-               "error: false is not 0"
-              #endif
-              #ifndef true
-               "error: true is not defined"
-              #endif
-              #if true != 1
-               "error: true is not 1"
-              #endif
-             #endif
 
-             #ifndef __bool_true_false_are_defined
-              "error: __bool_true_false_are_defined is not defined"
-             #endif
 
-             struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
 
-             char a[true == 1 ? 1 : -1];
-             char b[false == 0 ? 1 : -1];
-             char c[__bool_true_false_are_defined == 1 ? 1 : -1];
-             char d[(bool) 0.5 == true ? 1 : -1];
-             /* See body of main program for 'e'.  */
-             char f[(Bool) 0.0 == false ? 1 : -1];
-             char g[true];
-             char h[sizeof (Bool)];
-             char i[sizeof s.t];
-             enum { j = false, k = true, l = false * true, m = true * 256 };
-             /* The following fails for
-                HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
-             Bool n[m];
-             char o[sizeof n == m * sizeof n[0] ? 1 : -1];
-             char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
-             /* Catch a bug in an HP-UX C compiler.  See
-                https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
-                https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html
-              */
-             Bool q = true;
-             Bool *pq = &q;
-             bool *qq = &q;
 
-int
-main (void)
-{
 
-             bool e = &s;
-             *pq |= q; *pq |= ! q;
-             *qq |= q; *qq |= ! q;
-             /* Refer to every declared value, to avoid compiler optimizations.  */
-             return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
-                     + !m + !n + !o + !p + !q + !pq + !qq);
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
+ac_fn_check_decl "$LINENO" "fcloseall" "ac_cv_have_decl_fcloseall" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_fcloseall" = xyes
 then :
-  ac_cv_header_stdbool_h=yes
+  ac_have_decl=1
 else case e in #(
-  e) ac_cv_header_stdbool_h=no ;;
-esac
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+  e) ac_have_decl=0 ;;
 esac
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
-printf "%s\n" "$ac_cv_header_stdbool_h" >&6; }
-   ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
-if test "x$ac_cv_type__Bool" = xyes
-then :
-
-printf "%s\n" "#define HAVE__BOOL 1" >>confdefs.h
-
+printf "%s\n" "#define HAVE_DECL_FCLOSEALL $ac_have_decl" >>confdefs.h
 
+ac_fn_check_decl "$LINENO" "getw" "ac_cv_have_decl_getw" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_getw" = xyes
+then :
+  ac_have_decl=1
+else case e in #(
+  e) ac_have_decl=0 ;;
+esac
 fi
+printf "%s\n" "#define HAVE_DECL_GETW $ac_have_decl" >>confdefs.h
 
-
-
-
-ac_fn_check_decl "$LINENO" "fcloseall" "ac_cv_have_decl_fcloseall" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
-if test "x$ac_cv_have_decl_fcloseall" = xyes
+ac_fn_check_decl "$LINENO" "putw" "ac_cv_have_decl_putw" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_putw" = xyes
 then :
   ac_have_decl=1
 else case e in #(
   e) ac_have_decl=0 ;;
 esac
 fi
-printf "%s\n" "#define HAVE_DECL_FCLOSEALL $ac_have_decl" >>confdefs.h
-
+printf "%s\n" "#define HAVE_DECL_PUTW $ac_have_decl" >>confdefs.h
 
 
 
-  printf "%s\n" "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
-
 
 
 
@@ -23257,10 +24045,22 @@ printf "%s\n" "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
 
 
 
+
+
   if test $ac_cv_have_decl_fcloseall = no; then
     HAVE_DECL_FCLOSEALL=0
   fi
 
+
+  if test $ac_cv_have_decl_getw = no; then
+    HAVE_DECL_GETW=0
+  fi
+
+
+  if test $ac_cv_have_decl_putw = no; then
+    HAVE_DECL_PUTW=0
+  fi
+
 ac_fn_check_decl "$LINENO" "ecvt" "ac_cv_have_decl_ecvt" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
 if test "x$ac_cv_have_decl_ecvt" = xyes
 then :
@@ -23374,6 +24174,65 @@ printf "%s\n" "$gl_cv_next_stdlib_h" >&6; }
 
 
 
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether MB_CUR_MAX is correct" >&5
+printf %s "checking whether MB_CUR_MAX is correct... " >&6; }
+if test ${gl_cv_macro_MB_CUR_MAX_good+y}
+then :
+  printf %s "(cached) " >&6
+else case e in #(
+  e)
+                  case "$host_os" in
+                  # Guess no on Solaris.
+        solaris*) gl_cv_macro_MB_CUR_MAX_good="guessing no" ;;
+                  # Guess yes otherwise.
+        *)        gl_cv_macro_MB_CUR_MAX_good="guessing yes" ;;
+      esac
+      if test $LOCALE_FR_UTF8 != none; then
+        if test "$cross_compiling" = yes
+then :
+  :
+else case e in #(
+  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <stdlib.h>
+int main ()
+{
+  int result = 0;
+  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+    {
+      if (MB_CUR_MAX < 4)
+        result |= 1;
+    }
+  return result;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  gl_cv_macro_MB_CUR_MAX_good=yes
+else case e in #(
+  e) gl_cv_macro_MB_CUR_MAX_good=no ;;
+esac
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
+fi
+
+      fi
+     ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_macro_MB_CUR_MAX_good" >&5
+printf "%s\n" "$gl_cv_macro_MB_CUR_MAX_good" >&6; }
+  case "$gl_cv_macro_MB_CUR_MAX_good" in
+    *yes) ;;
+    *) REPLACE_MB_CUR_MAX=1 ;;
+  esac
+
+
   if test $ac_cv_have_decl_ecvt = no; then
     HAVE_DECL_ECVT=0
   fi
@@ -23407,14 +24266,14 @@ else case e in #(
   e) if test "$cross_compiling" = yes
 then :
   case "$host_os" in
-                        # Guess yes on glibc systems.
-         *-gnu* | gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
-                        # Guess yes on musl systems.
-         *-musl*)       gl_cv_func_strerror_0_works="guessing yes" ;;
-                        # Guess yes on native Windows.
-         mingw*)        gl_cv_func_strerror_0_works="guessing yes" ;;
-                        # If we don't know, obey --enable-cross-guesses.
-         *)             gl_cv_func_strerror_0_works="$gl_cross_guess_normal" ;;
+                             # Guess yes on glibc systems.
+         *-gnu* | gnu*)      gl_cv_func_strerror_0_works="guessing yes" ;;
+                             # Guess yes on musl systems.
+         *-musl* | midipix*) gl_cv_func_strerror_0_works="guessing yes" ;;
+                             # Guess yes on native Windows.
+         mingw*)             gl_cv_func_strerror_0_works="guessing yes" ;;
+                             # If we don't know, obey --enable-cross-guesses.
+         *)                  gl_cv_func_strerror_0_works="$gl_cross_guess_normal" ;;
        esac
 
 else case e in #(
@@ -23476,6 +24335,73 @@ printf "%s\n" "#define REPLACE_STRERROR_0 1" >>confdefs.h
 
 
 
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for strerror_r" >&5
+printf %s "checking for strerror_r... " >&6; }
+if test ${gl_cv_onwards_func_strerror_r+y}
+then :
+  printf %s "(cached) " >&6
+else case e in #(
+  e)
+  exec 9>&6 6>/dev/null
+
+       case "$host_os" in
+
+         linux*-android*)
+           ac_fn_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "#include <string.h>
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_strerror_r" = xyes
+then :
+
+fi
+           if test $ac_cv_have_decl_strerror_r = yes; then
+             ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
+if test "x$ac_cv_func_strerror_r" = xyes
+then :
+
+fi
+
+             if test $ac_cv_func_strerror_r = yes; then
+               gl_cv_onwards_func_strerror_r=yes
+             else
+                                                            gl_cv_onwards_func_strerror_r='future OS version'
+             fi
+           else
+             gl_cv_onwards_func_strerror_r='future OS version'
+           fi
+           ;;
+
+
+         *)
+           ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
+if test "x$ac_cv_func_strerror_r" = xyes
+then :
+
+fi
+
+           gl_cv_onwards_func_strerror_r=$ac_cv_func_strerror_r
+           ;;
+
+       esac
+
+  exec 6>&9 9>&-
+
+     ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_strerror_r" >&5
+printf "%s\n" "$gl_cv_onwards_func_strerror_r" >&6; }
+
+  case "$gl_cv_onwards_func_strerror_r" in
+    future*) ac_cv_func_strerror_r=no ;;
+    *)       ac_cv_func_strerror_r=$gl_cv_onwards_func_strerror_r ;;
+  esac
+  if test $ac_cv_func_strerror_r = yes; then
+
+printf "%s\n" "#define HAVE_STRERROR_R 1" >>confdefs.h
+
+  fi
+
+
   if test $ac_cv_func_strerror_r = yes; then
     if test "$GL_GENERATE_ERRNO_H:$REPLACE_STRERROR_0" = false:0; then
                         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5
@@ -23650,6 +24576,10 @@ printf "%s\n" "$gl_cv_func_strerror_r_works" >&6; }
         fi
       fi
     fi
+  else
+    case "$gl_cv_onwards_func_strerror_r" in
+      future*) REPLACE_STRERROR_R=1 ;;
+    esac
   fi
 
 
@@ -23875,7 +24805,9 @@ printf "%s\n" "#define HAVE_DECL_STRTOUMAX $ac_have_decl" >>confdefs.h
   REPLACE_MKTIME=GNULIB_PORTCHECK;
   REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
   REPLACE_STRFTIME=GNULIB_PORTCHECK;
+  REPLACE_TIME=0;
   REPLACE_TIMEGM=GNULIB_PORTCHECK;
+  REPLACE_TIMESPEC_GET=GNULIB_PORTCHECK;
   REPLACE_TZSET=GNULIB_PORTCHECK;
 
       : ${GNULIB_GETTIMEOFDAY=0};
@@ -24109,6 +25041,10 @@ printf "%s\n" "$gl_cv_next_time_h" >&6; }
 
 
 
+
+
+
+
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for TIME_UTC in <time.h>" >&5
 printf %s "checking for TIME_UTC in <time.h>... " >&6; }
 if test ${gl_cv_time_h_has_TIME_UTC+y}
@@ -24172,6 +25108,10 @@ printf "%s\n" "$gl_cv_time_h_has_TIME_UTC" >&6; }
 
 
 
+  GL_GNULIB_TIME=0
+
+
+
   GL_GNULIB_TIMEGM=0
 
 
@@ -24344,6 +25284,26 @@ q
     LIBUNISTRING_VERSION_SUBMINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_subminor"`
   fi
 
+                if test "$HAVE_LIBUNISTRING" = yes; then
+              for ac_header in unistring/woe32dll.h
+do :
+  ac_fn_c_check_header_compile "$LINENO" "unistring/woe32dll.h" "ac_cv_header_unistring_woe32dll_h" "$ac_includes_default"
+if test "x$ac_cv_header_unistring_woe32dll_h" = xyes
+then :
+  printf "%s\n" "#define HAVE_UNISTRING_WOE32DLL_H 1" >>confdefs.h
+ HAVE_UNISTRING_WOE32DLL_H=1
+else case e in #(
+  e) HAVE_UNISTRING_WOE32DLL_H=0 ;;
+esac
+fi
+
+done
+     else
+       HAVE_UNISTRING_WOE32DLL_H=0
+     fi
+
+
+
 ac_fn_check_decl "$LINENO" "clearerr_unlocked" "ac_cv_have_decl_clearerr_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
 if test "x$ac_cv_have_decl_clearerr_unlocked" = xyes
 then :
@@ -24614,7 +25574,6 @@ printf "%s\n" "#define HAVE_DECL_WCSDUP $ac_have_decl" >>confdefs.h
 
 
 
-
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler option to allow warnings" >&5
 printf %s "checking for C compiler option to allow warnings... " >&6; }
 if test ${gl_cv_cc_wallow+y}
@@ -25199,6 +26158,139 @@ printf "%s\n" "$gl_cv_next_arpa_inet_h" >&6; }
 
 
 
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a turkish Unicode locale" >&5
+printf %s "checking for a turkish Unicode locale... " >&6; }
+if test ${gt_cv_locale_tr_utf8+y}
+then :
+  printf %s "(cached) " >&6
+else case e in #(
+  e)
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+#include <wctype.h>
+struct tm t;
+char buf[16];
+int main () {
+  /* On BeOS, locales are not implemented in libc.  Rather, libintl
+     imitates locale dependent behaviour by looking at the environment
+     variables, and all locales use the UTF-8 encoding.  But BeOS does not
+     implement the Turkish upper-/lowercase mappings.  Therefore, let this
+     program return 1 on BeOS.  */
+  /* Check whether the given locale name is recognized by the system.  */
+#if defined _WIN32 && !defined __CYGWIN__
+  /* On native Windows, setlocale(category, "") looks at the system settings,
+     not at the environment variables.  Also, when an encoding suffix such
+     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
+     category of the locale to "C".  */
+  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+    return 1;
+#else
+  if (setlocale (LC_ALL, "") == NULL) return 1;
+#endif
+  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+     On Mac OS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET)
+     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+     some unit tests fail.  */
+#if HAVE_LANGINFO_CODESET
+  {
+    const char *cs = nl_langinfo (CODESET);
+    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+      return 1;
+  }
+#endif
+#ifdef __CYGWIN__
+  /* On Cygwin, avoid locale names without encoding suffix, because the
+     locale_charset() function relies on the encoding suffix.  Note that
+     LC_ALL is set on the command line.  */
+  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+  /* Check whether in the abbreviation of the eighth month, the second
+     character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is
+     two bytes long, with UTF-8 encoding.  */
+  t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19;
+  if (strftime (buf, sizeof (buf), "%b", &t) < 4
+      || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f)
+    return 1;
+  /* Check whether the upper-/lowercase mappings are as expected for
+     Turkish.  */
+  if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i'
+      || towupper(0x0131) != 'I' || towlower ('I') != 0x0131)
+    return 1;
+  return 0;
+}
+
+_ACEOF
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest$ac_exeext; then
+      case "$host_os" in
+        # Handle native Windows specially, because there setlocale() interprets
+        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+        # "fr" or "fra" as "French" or "French_France.1252",
+        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+        # "ja" as "Japanese" or "Japanese_Japan.932",
+        # and similar.
+        mingw*)
+          # Test for the hypothetical native Windows locale name.
+          if (LC_ALL=Turkish_Turkey.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_tr_utf8=Turkish_Turkey.65001
+          else
+            # None found.
+            gt_cv_locale_tr_utf8=none
+          fi
+          ;;
+        *)
+          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
+          # configure script would override the LC_ALL setting. Likewise for
+          # LC_CTYPE, which is also set at the beginning of the configure script.
+          # Test for the usual locale name.
+          if (LC_ALL=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_tr_utf8=tr_TR
+          else
+            # Test for the locale name with explicit encoding suffix.
+            if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+              gt_cv_locale_tr_utf8=tr_TR.UTF-8
+            else
+              # Test for the Solaris 7 locale name.
+              if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                gt_cv_locale_tr_utf8=tr.UTF-8
+              else
+                # None found.
+                gt_cv_locale_tr_utf8=none
+              fi
+            fi
+          fi
+          ;;
+      esac
+    else
+      gt_cv_locale_tr_utf8=none
+    fi
+    rm -fr conftest*
+   ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_tr_utf8" >&5
+printf "%s\n" "$gt_cv_locale_tr_utf8" >&6; }
+  LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8
+
+
+
+
+
 
 
 
@@ -25251,7 +26343,6 @@ printf "%s\n" "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
   fi
 
 
-
     HAVE_GETTIMEOFDAY=1;
   HAVE_STRUCT_TIMEVAL=1;
   HAVE_SYS_TIME_H=1;
@@ -25472,7 +26563,6 @@ printf "%s\n" "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
 
 
 
-
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IPv4 sockets" >&5
 printf %s "checking for IPv4 sockets... " >&6; }
 if test ${gl_cv_socket_ipv4+y}
@@ -25584,7 +26674,6 @@ fi
 
 
 
-
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
 printf %s "checking for LC_MESSAGES... " >&6; }
 if test ${gt_cv_val_LC_MESSAGES+y}
@@ -25632,6 +26721,73 @@ printf "%s\n" "#define HAVE_LC_MESSAGES 1" >>confdefs.h
 
 
 
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uselocale" >&5
+printf %s "checking for uselocale... " >&6; }
+if test ${gl_cv_onwards_func_uselocale+y}
+then :
+  printf %s "(cached) " >&6
+else case e in #(
+  e)
+  exec 9>&6 6>/dev/null
+
+       case "$host_os" in
+
+         linux*-android*)
+           ac_fn_check_decl "$LINENO" "uselocale" "ac_cv_have_decl_uselocale" "#include <locale.h>
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_uselocale" = xyes
+then :
+
+fi
+           if test $ac_cv_have_decl_uselocale = yes; then
+             ac_fn_c_check_func "$LINENO" "uselocale" "ac_cv_func_uselocale"
+if test "x$ac_cv_func_uselocale" = xyes
+then :
+
+fi
+
+             if test $ac_cv_func_uselocale = yes; then
+               gl_cv_onwards_func_uselocale=yes
+             else
+                                                            gl_cv_onwards_func_uselocale='future OS version'
+             fi
+           else
+             gl_cv_onwards_func_uselocale='future OS version'
+           fi
+           ;;
+
+
+         *)
+           ac_fn_c_check_func "$LINENO" "uselocale" "ac_cv_func_uselocale"
+if test "x$ac_cv_func_uselocale" = xyes
+then :
+
+fi
+
+           gl_cv_onwards_func_uselocale=$ac_cv_func_uselocale
+           ;;
+
+       esac
+
+  exec 6>&9 9>&-
+
+     ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_uselocale" >&5
+printf "%s\n" "$gl_cv_onwards_func_uselocale" >&6; }
+
+  case "$gl_cv_onwards_func_uselocale" in
+    future*) ac_cv_func_uselocale=no ;;
+    *)       ac_cv_func_uselocale=$gl_cv_onwards_func_uselocale ;;
+  esac
+  if test $ac_cv_func_uselocale = yes; then
+
+printf "%s\n" "#define HAVE_USELOCALE 1" >>confdefs.h
+
+  fi
+
+
 
           if test $ac_cv_func_uselocale = yes; then
 
@@ -25944,7 +27100,6 @@ printf "%s\n" "#define HAVE_CFLOCALECOPYPREFERREDLANGUAGES 1" >>confdefs.h
 
 
 
-
   if test $ac_cv_have_decl_strerror_r = no; then
     HAVE_DECL_STRERROR_R=0
   fi
@@ -27007,13 +28162,75 @@ then :
 
 fi
 
-  ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
+
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tsearch" >&5
+printf %s "checking for tsearch... " >&6; }
+if test ${gl_cv_onwards_func_tsearch+y}
+then :
+  printf %s "(cached) " >&6
+else case e in #(
+  e)
+  exec 9>&6 6>/dev/null
+
+       case "$host_os" in
+
+         linux*-android*)
+           ac_fn_check_decl "$LINENO" "tsearch" "ac_cv_have_decl_tsearch" "#include <search.h>
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_tsearch" = xyes
+then :
+
+fi
+           if test $ac_cv_have_decl_tsearch = yes; then
+             ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
 if test "x$ac_cv_func_tsearch" = xyes
 then :
-  printf "%s\n" "#define HAVE_TSEARCH 1" >>confdefs.h
 
 fi
 
+             if test $ac_cv_func_tsearch = yes; then
+               gl_cv_onwards_func_tsearch=yes
+             else
+                                                            gl_cv_onwards_func_tsearch='future OS version'
+             fi
+           else
+             gl_cv_onwards_func_tsearch='future OS version'
+           fi
+           ;;
+
+
+         *)
+           ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
+if test "x$ac_cv_func_tsearch" = xyes
+then :
+
+fi
+
+           gl_cv_onwards_func_tsearch=$ac_cv_func_tsearch
+           ;;
+
+       esac
+
+  exec 6>&9 9>&-
+
+     ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_tsearch" >&5
+printf "%s\n" "$gl_cv_onwards_func_tsearch" >&6; }
+
+  case "$gl_cv_onwards_func_tsearch" in
+    future*) ac_cv_func_tsearch=no ;;
+    *)       ac_cv_func_tsearch=$gl_cv_onwards_func_tsearch ;;
+  esac
+  if test $ac_cv_func_tsearch = yes; then
+
+printf "%s\n" "#define HAVE_TSEARCH 1" >>confdefs.h
+
+  fi
+
+
 
 
 
@@ -27037,7 +28254,7 @@ then :
                                  # Guess yes on glibc systems.
            *-gnu* | gnu*)        gl_cv_func_snprintf_retval_c99="guessing yes";;
                                  # Guess yes on musl systems.
-           *-musl*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
+           *-musl* | midipix*)   gl_cv_func_snprintf_retval_c99="guessing yes";;
                                  # Guess yes on FreeBSD >= 5.
            freebsd[1-4].*)       gl_cv_func_snprintf_retval_c99="guessing no";;
            freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
@@ -27138,375 +28355,72 @@ fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5
 printf "%s\n" "$gl_cv_func_snprintf_retval_c99" >&6; }
 
-ac_fn_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
-if test "x$ac_cv_have_decl_snprintf" = xyes
-then :
-  ac_have_decl=1
-else case e in #(
-  e) ac_have_decl=0 ;;
-esac
-fi
-printf "%s\n" "#define HAVE_DECL_SNPRINTF $ac_have_decl" >>confdefs.h
-
-
-
-
-
-
-
-  if test $ac_cv_header_sys_ioctl_h = yes; then
-    HAVE_SYS_IOCTL_H=1
-            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/ioctl.h> declares ioctl" >&5
-printf %s "checking whether <sys/ioctl.h> declares ioctl... " >&6; }
-if test ${gl_cv_decl_ioctl_in_sys_ioctl_h+y}
-then :
-  printf %s "(cached) " >&6
-else case e in #(
-  e)        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/ioctl.h>
-int
-main (void)
-{
-(void) ioctl;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-  gl_cv_decl_ioctl_in_sys_ioctl_h=yes
-else case e in #(
-  e) gl_cv_decl_ioctl_in_sys_ioctl_h=no ;;
-esac
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-       ;;
-esac
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_ioctl_in_sys_ioctl_h" >&5
-printf "%s\n" "$gl_cv_decl_ioctl_in_sys_ioctl_h" >&6; }
-  else
-    HAVE_SYS_IOCTL_H=0
-  fi
-
-
-
-
-
-
-
-
-
-
-     if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_sys_ioctl_h='<'sys/ioctl.h'>'
-     else
-       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/ioctl.h>" >&5
-printf %s "checking absolute name of <sys/ioctl.h>... " >&6; }
-if test ${gl_cv_next_sys_ioctl_h+y}
-then :
-  printf %s "(cached) " >&6
-else case e in #(
-  e)
-             if test $ac_cv_header_sys_ioctl_h = yes; then
-
-
-
-
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/ioctl.h>
-_ACEOF
-                case "$host_os" in
-    aix*) gl_absname_cpp="$ac_cpp -C" ;;
-    *)    gl_absname_cpp="$ac_cpp" ;;
-  esac
-
-  case "$host_os" in
-    mingw*)
-                                          gl_dirsep_regex='[/\\]'
-      ;;
-    *)
-      gl_dirsep_regex='\/'
-      ;;
-  esac
-      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'sys/ioctl.h' \
-                           | sed -e "$gl_make_literal_regex_sed"`
-  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
-      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
-      s|^/[^/]|//&|
-      p
-      q
-    }'
-
-        gl_cv_absolute_sys_ioctl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-  sed -n "$gl_absolute_header_sed"`
-
-          gl_header=$gl_cv_absolute_sys_ioctl_h
-          gl_cv_next_sys_ioctl_h='"'$gl_header'"'
-          else
-               gl_cv_next_sys_ioctl_h='<'sys/ioctl.h'>'
-             fi
-
-          ;;
-esac
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_ioctl_h" >&5
-printf "%s\n" "$gl_cv_next_sys_ioctl_h" >&6; }
-     fi
-     NEXT_SYS_IOCTL_H=$gl_cv_next_sys_ioctl_h
-
-     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
-       gl_next_as_first_directive='<'sys/ioctl.h'>'
-     else
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_sys_ioctl_h
-     fi
-     NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H=$gl_next_as_first_directive
-
-
-
-
-
-
-
-
-
-
-
-
-
-
 
 
-
-
-
-
-
-
-
-
-     if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_sys_uio_h='<'sys/uio.h'>'
-     else
-       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/uio.h>" >&5
-printf %s "checking absolute name of <sys/uio.h>... " >&6; }
-if test ${gl_cv_next_sys_uio_h+y}
+     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
+printf %s "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
+if test ${gl_cv_func_printf_positions+y}
 then :
   printf %s "(cached) " >&6
 else case e in #(
   e)
-             if test $ac_cv_header_sys_uio_h = yes; then
-
-
-
-
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/uio.h>
-_ACEOF
-                case "$host_os" in
-    aix*) gl_absname_cpp="$ac_cpp -C" ;;
-    *)    gl_absname_cpp="$ac_cpp" ;;
-  esac
-
-  case "$host_os" in
-    mingw*)
-                                          gl_dirsep_regex='[/\\]'
-      ;;
-    *)
-      gl_dirsep_regex='\/'
-      ;;
-  esac
-      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'sys/uio.h' \
-                           | sed -e "$gl_make_literal_regex_sed"`
-  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
-      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
-      s|^/[^/]|//&|
-      p
-      q
-    }'
-
-        gl_cv_absolute_sys_uio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-  sed -n "$gl_absolute_header_sed"`
-
-          gl_header=$gl_cv_absolute_sys_uio_h
-          gl_cv_next_sys_uio_h='"'$gl_header'"'
-          else
-               gl_cv_next_sys_uio_h='<'sys/uio.h'>'
-             fi
-
-          ;;
-esac
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_uio_h" >&5
-printf "%s\n" "$gl_cv_next_sys_uio_h" >&6; }
-     fi
-     NEXT_SYS_UIO_H=$gl_cv_next_sys_uio_h
-
-     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
-       gl_next_as_first_directive='<'sys/uio.h'>'
-     else
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_sys_uio_h
-     fi
-     NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H=$gl_next_as_first_directive
-
-
-
-
-  if test $ac_cv_header_sys_uio_h = yes; then
-    HAVE_SYS_UIO_H=1
-  else
-    HAVE_SYS_UIO_H=0
-  fi
-
-
-
-
-ac_fn_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
-if test "x$ac_cv_have_decl_unsetenv" = xyes
+      if test "$cross_compiling" = yes
 then :
-  ac_have_decl=1
-else case e in #(
-  e) ac_have_decl=0 ;;
-esac
-fi
-printf "%s\n" "#define HAVE_DECL_UNSETENV $ac_have_decl" >>confdefs.h
-
 
+         case "$host_os" in
+           netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
+                            gl_cv_func_printf_positions="guessing no";;
+           beos*)           gl_cv_func_printf_positions="guessing no";;
+                            # Guess yes on Android.
+           linux*-android*) gl_cv_func_printf_positions="guessing yes";;
+                            # Guess no on native Windows.
+           mingw* | pw*)    gl_cv_func_printf_positions="guessing no";;
+           *)               gl_cv_func_printf_positions="guessing yes";;
+         esac
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
-printf %s "checking for inttypes.h... " >&6; }
-if test ${gl_cv_header_inttypes_h+y}
-then :
-  printf %s "(cached) " >&6
 else case e in #(
   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#include <sys/types.h>
-#include <inttypes.h>
-
-int
-main (void)
+#include <stdio.h>
+#include <string.h>
+/* The string "%2$d %1$d", with dollar characters protected from the shell's
+   dollar expansion (possibly an autoconf bug).  */
+static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
+static char buf[100];
+int main ()
 {
-uintmax_t i = (uintmax_t) -1; return !i;
-  ;
-  return 0;
+  sprintf (buf, format, 33, 55);
+  return (strcmp (buf, "55 33") != 0);
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"
+if ac_fn_c_try_run "$LINENO"
 then :
-  gl_cv_header_inttypes_h=yes
+  gl_cv_func_printf_positions=yes
 else case e in #(
-  e) gl_cv_header_inttypes_h=no ;;
+  e) gl_cv_func_printf_positions=no ;;
 esac
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
 esac
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
-printf "%s\n" "$gl_cv_header_inttypes_h" >&6; }
-  if test $gl_cv_header_inttypes_h = yes; then
-
-printf "%s\n" "#define HAVE_INTTYPES_H_WITH_UINTMAX 1" >>confdefs.h
-
-  fi
-
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
-printf %s "checking for stdint.h... " >&6; }
-if test ${gl_cv_header_stdint_h+y}
-then :
-  printf %s "(cached) " >&6
-else case e in #(
-  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
-            #include <stdint.h>
-int
-main (void)
-{
-uintmax_t i = (uintmax_t) -1; return !i;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-  gl_cv_header_stdint_h=yes
-else case e in #(
-  e) gl_cv_header_stdint_h=no ;;
-esac
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+     ;;
 esac
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5
-printf "%s\n" "$gl_cv_header_stdint_h" >&6; }
-  if test $gl_cv_header_stdint_h = yes; then
-
-printf "%s\n" "#define HAVE_STDINT_H_WITH_UINTMAX 1" >>confdefs.h
-
-  fi
-
-
-
-
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
-printf %s "checking for intmax_t... " >&6; }
-if test ${gt_cv_c_intmax_t+y}
-then :
-  printf %s "(cached) " >&6
-else case e in #(
-  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stddef.h>
-#include <stdlib.h>
-#if HAVE_STDINT_H_WITH_UINTMAX
-#include <stdint.h>
-#endif
-#if HAVE_INTTYPES_H_WITH_UINTMAX
-#include <inttypes.h>
-#endif
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
+printf "%s\n" "$gl_cv_func_printf_positions" >&6; }
 
-int
-main (void)
-{
-intmax_t x = -1; return !x;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
+ac_fn_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_snprintf" = xyes
 then :
-  gt_cv_c_intmax_t=yes
+  ac_have_decl=1
 else case e in #(
-  e) gt_cv_c_intmax_t=no ;;
-esac
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+  e) ac_have_decl=0 ;;
 esac
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
-printf "%s\n" "$gt_cv_c_intmax_t" >&6; }
-  if test $gt_cv_c_intmax_t = yes; then
-
-printf "%s\n" "#define HAVE_INTMAX_T 1" >>confdefs.h
-
-  else
-
-printf "%s\n" "#define intmax_t long long" >>confdefs.h
-
-  fi
+printf "%s\n" "#define HAVE_DECL_SNPRINTF $ac_have_decl" >>confdefs.h
 
 
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
@@ -27877,6 +28791,365 @@ printf "%s\n" "#define DBL_EXPBIT0_BIT $bit" >>confdefs.h
 
 
 
+
+
+  if test $ac_cv_header_sys_ioctl_h = yes; then
+    HAVE_SYS_IOCTL_H=1
+            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/ioctl.h> declares ioctl" >&5
+printf %s "checking whether <sys/ioctl.h> declares ioctl... " >&6; }
+if test ${gl_cv_decl_ioctl_in_sys_ioctl_h+y}
+then :
+  printf %s "(cached) " >&6
+else case e in #(
+  e)        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/ioctl.h>
+int
+main (void)
+{
+(void) ioctl;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  gl_cv_decl_ioctl_in_sys_ioctl_h=yes
+else case e in #(
+  e) gl_cv_decl_ioctl_in_sys_ioctl_h=no ;;
+esac
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+       ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_ioctl_in_sys_ioctl_h" >&5
+printf "%s\n" "$gl_cv_decl_ioctl_in_sys_ioctl_h" >&6; }
+  else
+    HAVE_SYS_IOCTL_H=0
+  fi
+
+
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_sys_ioctl_h='<'sys/ioctl.h'>'
+     else
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/ioctl.h>" >&5
+printf %s "checking absolute name of <sys/ioctl.h>... " >&6; }
+if test ${gl_cv_next_sys_ioctl_h+y}
+then :
+  printf %s "(cached) " >&6
+else case e in #(
+  e)
+             if test $ac_cv_header_sys_ioctl_h = yes; then
+
+
+
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/ioctl.h>
+_ACEOF
+                case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
+  esac
+
+  case "$host_os" in
+    mingw*)
+                                          gl_dirsep_regex='[/\\]'
+      ;;
+    *)
+      gl_dirsep_regex='\/'
+      ;;
+  esac
+      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+  gl_header_literal_regex=`echo 'sys/ioctl.h' \
+                           | sed -e "$gl_make_literal_regex_sed"`
+  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+      s|^/[^/]|//&|
+      p
+      q
+    }'
+
+        gl_cv_absolute_sys_ioctl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
+
+          gl_header=$gl_cv_absolute_sys_ioctl_h
+          gl_cv_next_sys_ioctl_h='"'$gl_header'"'
+          else
+               gl_cv_next_sys_ioctl_h='<'sys/ioctl.h'>'
+             fi
+
+          ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_ioctl_h" >&5
+printf "%s\n" "$gl_cv_next_sys_ioctl_h" >&6; }
+     fi
+     NEXT_SYS_IOCTL_H=$gl_cv_next_sys_ioctl_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'sys/ioctl.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_sys_ioctl_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H=$gl_next_as_first_directive
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_sys_uio_h='<'sys/uio.h'>'
+     else
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/uio.h>" >&5
+printf %s "checking absolute name of <sys/uio.h>... " >&6; }
+if test ${gl_cv_next_sys_uio_h+y}
+then :
+  printf %s "(cached) " >&6
+else case e in #(
+  e)
+             if test $ac_cv_header_sys_uio_h = yes; then
+
+
+
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/uio.h>
+_ACEOF
+                case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
+  esac
+
+  case "$host_os" in
+    mingw*)
+                                          gl_dirsep_regex='[/\\]'
+      ;;
+    *)
+      gl_dirsep_regex='\/'
+      ;;
+  esac
+      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+  gl_header_literal_regex=`echo 'sys/uio.h' \
+                           | sed -e "$gl_make_literal_regex_sed"`
+  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+      s|^/[^/]|//&|
+      p
+      q
+    }'
+
+        gl_cv_absolute_sys_uio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
+
+          gl_header=$gl_cv_absolute_sys_uio_h
+          gl_cv_next_sys_uio_h='"'$gl_header'"'
+          else
+               gl_cv_next_sys_uio_h='<'sys/uio.h'>'
+             fi
+
+          ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_uio_h" >&5
+printf "%s\n" "$gl_cv_next_sys_uio_h" >&6; }
+     fi
+     NEXT_SYS_UIO_H=$gl_cv_next_sys_uio_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'sys/uio.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_sys_uio_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H=$gl_next_as_first_directive
+
+
+
+
+  if test $ac_cv_header_sys_uio_h = yes; then
+    HAVE_SYS_UIO_H=1
+  else
+    HAVE_SYS_UIO_H=0
+  fi
+
+
+
+
+ac_fn_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_unsetenv" = xyes
+then :
+  ac_have_decl=1
+else case e in #(
+  e) ac_have_decl=0 ;;
+esac
+fi
+printf "%s\n" "#define HAVE_DECL_UNSETENV $ac_have_decl" >>confdefs.h
+
+
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
+printf %s "checking for inttypes.h... " >&6; }
+if test ${gl_cv_header_inttypes_h+y}
+then :
+  printf %s "(cached) " >&6
+else case e in #(
+  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <sys/types.h>
+#include <inttypes.h>
+
+int
+main (void)
+{
+uintmax_t i = (uintmax_t) -1; return !i;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  gl_cv_header_inttypes_h=yes
+else case e in #(
+  e) gl_cv_header_inttypes_h=no ;;
+esac
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
+printf "%s\n" "$gl_cv_header_inttypes_h" >&6; }
+  if test $gl_cv_header_inttypes_h = yes; then
+
+printf "%s\n" "#define HAVE_INTTYPES_H_WITH_UINTMAX 1" >>confdefs.h
+
+  fi
+
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
+printf %s "checking for stdint.h... " >&6; }
+if test ${gl_cv_header_stdint_h+y}
+then :
+  printf %s "(cached) " >&6
+else case e in #(
+  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+            #include <stdint.h>
+int
+main (void)
+{
+uintmax_t i = (uintmax_t) -1; return !i;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  gl_cv_header_stdint_h=yes
+else case e in #(
+  e) gl_cv_header_stdint_h=no ;;
+esac
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5
+printf "%s\n" "$gl_cv_header_stdint_h" >&6; }
+  if test $gl_cv_header_stdint_h = yes; then
+
+printf "%s\n" "#define HAVE_STDINT_H_WITH_UINTMAX 1" >>confdefs.h
+
+  fi
+
+
+
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
+printf %s "checking for intmax_t... " >&6; }
+if test ${gt_cv_c_intmax_t+y}
+then :
+  printf %s "(cached) " >&6
+else case e in #(
+  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stddef.h>
+#include <stdlib.h>
+#if HAVE_STDINT_H_WITH_UINTMAX
+#include <stdint.h>
+#endif
+#if HAVE_INTTYPES_H_WITH_UINTMAX
+#include <inttypes.h>
+#endif
+
+int
+main (void)
+{
+intmax_t x = -1; return !x;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  gt_cv_c_intmax_t=yes
+else case e in #(
+  e) gt_cv_c_intmax_t=no ;;
+esac
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
+printf "%s\n" "$gt_cv_c_intmax_t" >&6; }
+  if test $gt_cv_c_intmax_t = yes; then
+
+printf "%s\n" "#define HAVE_INTMAX_T 1" >>confdefs.h
+
+  else
+
+printf "%s\n" "#define intmax_t long long" >>confdefs.h
+
+  fi
+
+
+
+
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf truncates the result as in C99" >&5
 printf %s "checking whether snprintf truncates the result as in C99... " >&6; }
 if test ${gl_cv_func_snprintf_truncation_c99+y}
@@ -27891,7 +29164,7 @@ then :
                                  # Guess yes on glibc systems.
            *-gnu* | gnu*)        gl_cv_func_snprintf_truncation_c99="guessing yes";;
                                  # Guess yes on musl systems.
-           *-musl*)              gl_cv_func_snprintf_truncation_c99="guessing yes";;
+           *-musl* | midipix*)   gl_cv_func_snprintf_truncation_c99="guessing yes";;
                                  # Guess yes on FreeBSD >= 5.
            freebsd[1-4].*)       gl_cv_func_snprintf_truncation_c99="guessing no";;
            freebsd* | kfreebsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
@@ -27984,6 +29257,16 @@ printf "%s\n" "$gl_cv_func_snprintf_truncation_c99" >&6; }
 
 
 
+  ac_fn_c_check_func "$LINENO" "wcslen" "ac_cv_func_wcslen"
+if test "x$ac_cv_func_wcslen" = xyes
+then :
+  printf "%s\n" "#define HAVE_WCSLEN 1" >>confdefs.h
+
+fi
+
+
+
+
   ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
 if test "x$ac_cv_func_snprintf" = xyes
 then :
@@ -27995,24 +29278,6 @@ if test "x$ac_cv_func_strnlen" = xyes
 then :
   printf "%s\n" "#define HAVE_STRNLEN 1" >>confdefs.h
 
-fi
-ac_fn_c_check_func "$LINENO" "wcslen" "ac_cv_func_wcslen"
-if test "x$ac_cv_func_wcslen" = xyes
-then :
-  printf "%s\n" "#define HAVE_WCSLEN 1" >>confdefs.h
-
-fi
-ac_fn_c_check_func "$LINENO" "wcsnlen" "ac_cv_func_wcsnlen"
-if test "x$ac_cv_func_wcsnlen" = xyes
-then :
-  printf "%s\n" "#define HAVE_WCSNLEN 1" >>confdefs.h
-
-fi
-ac_fn_c_check_func "$LINENO" "mbrtowc" "ac_cv_func_mbrtowc"
-if test "x$ac_cv_func_mbrtowc" = xyes
-then :
-  printf "%s\n" "#define HAVE_MBRTOWC 1" >>confdefs.h
-
 fi
 ac_fn_c_check_func "$LINENO" "wcrtomb" "ac_cv_func_wcrtomb"
 if test "x$ac_cv_func_wcrtomb" = xyes
@@ -28033,7 +29298,6 @@ fi
 printf "%s\n" "#define HAVE_DECL__SNPRINTF $ac_have_decl" >>confdefs.h
 
 
-
   case "$gl_cv_func_snprintf_retval_c99" in
     *yes)
 
@@ -28052,6 +29316,7 @@ printf "%s\n" "#define HAVE_SNPRINTF_TRUNCATION_C99 1" >>confdefs.h
 
 
 
+
       GL_CFLAG_GNULIB_WARNINGS=''
   if test -n "$GL_CFLAG_ALLOW_WARNINGS"; then
                                                                         cat > conftest.c <<\EOF
@@ -28125,6 +29390,93 @@ fi
   gl_source_base='lib'
   gl_source_base_prefix=
 
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alignas and alignof" >&5
+printf %s "checking for alignas and alignof... " >&6; }
+if test ${gl_cv_header_working_stdalign_h+y}
+then :
+  printf %s "(cached) " >&6
+else case e in #(
+  e) gl_save_CFLAGS=$CFLAGS
+     for gl_working in "yes, keywords" "yes, <stdalign.h> macros"; do
+      case $gl_working in #(
+  *stdalign.h*) :
+    CFLAGS="$gl_save_CFLAGS -DINCLUDE_STDALIGN_H" ;; #(
+  *) :
+     ;;
+esac
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdint.h>
+            #ifdef INCLUDE_STDALIGN_H
+             #include <stdalign.h>
+            #endif
+            #include <stddef.h>
+
+            /* Test that alignof yields a result consistent with offsetof.
+               This catches GCC bug 52023
+               <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>.  */
+            #ifdef __cplusplus
+               template <class t> struct alignof_helper { char a; t b; };
+            # define ao(type) offsetof (alignof_helper<type>, b)
+            #else
+            # define ao(type) offsetof (struct { char a; type b; }, b)
+            #endif
+            char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
+            char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
+            char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
+
+            /* Test alignas only on platforms where gnulib can help.  */
+            #if \
+                ((defined __cplusplus && 201103 <= __cplusplus) \
+                 || (__TINYC__ && defined __attribute__) \
+                 || (defined __APPLE__ && defined __MACH__ \
+                     ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
+                     : __GNUC__) \
+                 || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \
+                 || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__ \
+                 || 1300 <= _MSC_VER)
+              struct alignas_test { char c; char alignas (8) alignas_8; };
+              char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
+                                ? 1 : -1];
+            #endif
+
+int
+main (void)
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  gl_cv_header_working_stdalign_h=$gl_working
+else case e in #(
+  e) gl_cv_header_working_stdalign_h=no ;;
+esac
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+      CFLAGS=$gl_save_CFLAGS
+      test "$gl_cv_header_working_stdalign_h" != no && break
+     done ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
+printf "%s\n" "$gl_cv_header_working_stdalign_h" >&6; }
+
+  case $gl_cv_header_working_stdalign_h in #(
+  yes*keyword*) :
+
+printf "%s\n" "#define HAVE_C_ALIGNASOF 1" >>confdefs.h
+ ;; #(
+  *) :
+     ;;
+esac
+
+
+
+
 
   if test $ac_cv_func_alloca_works = no; then
     :
@@ -28240,72 +29592,247 @@ fi
 printf "%s\n" "$enable_assert" >&6; }
 
 
-
-
-
-
-
-
-  if test $ac_cv_func_btowc = no; then
-    HAVE_BTOWC=0
-  else
-
-
-
-
-        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5
-printf %s "checking whether btowc(0) is correct... " >&6; }
-if test ${gl_cv_func_btowc_nul+y}
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for static_assert" >&5
+printf %s "checking for static_assert... " >&6; }
+if test ${gl_cv_static_assert+y}
 then :
   printf %s "(cached) " >&6
 else case e in #(
-  e)
-        if test "$cross_compiling" = yes
-then :
-
-           case "$host_os" in
-                      # Guess no on Cygwin.
-             cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
-                      # Guess yes on native Windows.
-             mingw*)  gl_cv_func_btowc_nul="guessing yes" ;;
-                      # Guess yes otherwise.
-             *)       gl_cv_func_btowc_nul="guessing yes" ;;
-           esac
+  e) gl_save_CFLAGS=$CFLAGS
+     for gl_working in "yes, a keyword" "yes, an <assert.h> macro"; do
+      case $gl_working in #(
+  *assert.h*) :
+    CFLAGS="$gl_save_CFLAGS -DINCLUDE_ASSERT_H" ;; #(
+  *) :
+     ;;
+esac
 
-else case e in #(
-  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+#if defined __clang__ && __STDC_VERSION__ < 202311
+             #pragma clang diagnostic error "-Wc2x-extensions"
+             #pragma clang diagnostic error "-Wc++1z-extensions"
+            #endif
+            #ifdef INCLUDE_ASSERT_H
+             #include <assert.h>
+            #endif
+            static_assert (2 + 2 == 4, "arithmetic does not work");
+            static_assert (2 + 2 == 4);
 
-#include <wchar.h>
-int main ()
+int
+main (void)
 {
-  if (btowc ('\0') != 0)
-    return 1;
+
+            static_assert (sizeof (char) == 1, "sizeof does not work");
+            static_assert (sizeof (char) == 1);
+
+  ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_run "$LINENO"
+if ac_fn_c_try_compile "$LINENO"
 then :
-  gl_cv_func_btowc_nul=yes
+  gl_cv_static_assert=$gl_working
 else case e in #(
-  e) gl_cv_func_btowc_nul=no ;;
+  e) gl_cv_static_assert=no ;;
 esac
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+      CFLAGS=$gl_save_CFLAGS
+      test "$gl_cv_static_assert" != no && break
+     done ;;
 esac
 fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_static_assert" >&5
+printf "%s\n" "$gl_cv_static_assert" >&6; }
 
-       ;;
-esac
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5
-printf "%s\n" "$gl_cv_func_btowc_nul" >&6; }
+  GL_GENERATE_ASSERT_H=false
+  case $gl_cv_static_assert in #(
+  yes*keyword*) :
 
-        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5
-printf %s "checking whether btowc(EOF) is correct... " >&6; }
-if test ${gl_cv_func_btowc_eof+y}
-then :
+printf "%s\n" "#define HAVE_C_STATIC_ASSERT 1" >>confdefs.h
+ ;; #(
+  no) :
+    GL_GENERATE_ASSERT_H=true
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_assert_h='<'assert.h'>'
+     else
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <assert.h>" >&5
+printf %s "checking absolute name of <assert.h>... " >&6; }
+if test ${gl_cv_next_assert_h+y}
+then :
+  printf %s "(cached) " >&6
+else case e in #(
+  e)
+
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <assert.h>
+_ACEOF
+                case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
+  esac
+
+  case "$host_os" in
+    mingw*)
+                                          gl_dirsep_regex='[/\\]'
+      ;;
+    *)
+      gl_dirsep_regex='\/'
+      ;;
+  esac
+      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+  gl_header_literal_regex=`echo 'assert.h' \
+                           | sed -e "$gl_make_literal_regex_sed"`
+  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+      s|^/[^/]|//&|
+      p
+      q
+    }'
+
+        gl_cv_absolute_assert_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
+
+          gl_header=$gl_cv_absolute_assert_h
+          gl_cv_next_assert_h='"'$gl_header'"'
+
+          ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_assert_h" >&5
+printf "%s\n" "$gl_cv_next_assert_h" >&6; }
+     fi
+     NEXT_ASSERT_H=$gl_cv_next_assert_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'assert.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_assert_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_ASSERT_H=$gl_next_as_first_directive
+
+
+
+ ;; #(
+  *) :
+     ;;
+esac
+
+
+
+
+
+
+
+  case "$GL_GENERATE_ASSERT_H" in
+    false) ASSERT_H='' ;;
+    true)
+                  if test -z "$ASSERT_H"; then
+        ASSERT_H="${gl_source_base_prefix}assert.h"
+      fi
+      ;;
+    *) echo "*** GL_GENERATE_ASSERT_H is not set correctly" 1>&2; exit 1 ;;
+  esac
+
+
+     if $GL_GENERATE_ASSERT_H; then
+  GL_GENERATE_ASSERT_H_TRUE=
+  GL_GENERATE_ASSERT_H_FALSE='#'
+else
+  GL_GENERATE_ASSERT_H_TRUE='#'
+  GL_GENERATE_ASSERT_H_FALSE=
+fi
+:
+    if test -z "${GL_GENERATE_ASSERT_H_TRUE}" && test -z "${GL_GENERATE_ASSERT_H_FALSE}"; then
+    GL_GENERATE_ASSERT_H_TRUE='#'
+    GL_GENERATE_ASSERT_H_FALSE='#'
+  fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+  if test $ac_cv_func_btowc = no; then
+    HAVE_BTOWC=0
+  else
+
+
+
+
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5
+printf %s "checking whether btowc(0) is correct... " >&6; }
+if test ${gl_cv_func_btowc_nul+y}
+then :
+  printf %s "(cached) " >&6
+else case e in #(
+  e)
+        if test "$cross_compiling" = yes
+then :
+
+           case "$host_os" in
+                      # Guess no on Cygwin.
+             cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
+                      # Guess yes on native Windows.
+             mingw*)  gl_cv_func_btowc_nul="guessing yes" ;;
+                      # Guess yes otherwise.
+             *)       gl_cv_func_btowc_nul="guessing yes" ;;
+           esac
+
+else case e in #(
+  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <wchar.h>
+int main ()
+{
+  if (btowc ('\0') != 0)
+    return 1;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  gl_cv_func_btowc_nul=yes
+else case e in #(
+  e) gl_cv_func_btowc_nul=no ;;
+esac
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
+fi
+
+       ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5
+printf "%s\n" "$gl_cv_func_btowc_nul" >&6; }
+
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5
+printf %s "checking whether btowc(EOF) is correct... " >&6; }
+if test ${gl_cv_func_btowc_eof+y}
+then :
   printf %s "(cached) " >&6
 else case e in #(
   e)
@@ -28357,6 +29884,80 @@ fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
 printf "%s\n" "$gl_cv_func_btowc_eof" >&6; }
 
+
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether btowc is consistent with mbrtowc in the C locale" >&5
+printf %s "checking whether btowc is consistent with mbrtowc in the C locale... " >&6; }
+if test ${gl_cv_func_btowc_consistent+y}
+then :
+  printf %s "(cached) " >&6
+else case e in #(
+  e)
+        if test "$cross_compiling" = yes
+then :
+  case "$host_os" in
+                     # Guess no on mingw.
+             mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef __MINGW32__
+ Problem
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP_TRADITIONAL "Problem" >/dev/null 2>&1
+then :
+  gl_cv_func_btowc_consistent="guessing no"
+else case e in #(
+  e) gl_cv_func_btowc_consistent="guessing yes" ;;
+esac
+fi
+rm -rf conftest*
+
+                     ;;
+                     # Guess yes otherwise.
+             *)      gl_cv_func_btowc_consistent="guessing yes" ;;
+           esac
+
+else case e in #(
+  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+#if HAVE_MBRTOWC
+  wint_t wc1 = btowc (0x80);
+  wchar_t wc2 = (wchar_t) 0xbadface;
+  char buf[1] = { 0x80 };
+  mbstate_t state;
+  memset (&state, 0, sizeof (mbstate_t));
+  if (mbrtowc (&wc2, buf, 1, &state) != 1 || wc1 != wc2)
+    return 1;
+#endif
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  gl_cv_func_btowc_consistent=yes
+else case e in #(
+  e) gl_cv_func_btowc_consistent=no ;;
+esac
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
+fi
+
+       ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_consistent" >&5
+printf "%s\n" "$gl_cv_func_btowc_consistent" >&6; }
+
     case "$gl_cv_func_btowc_nul" in
       *yes) ;;
       *) REPLACE_BTOWC=1 ;;
@@ -28365,6 +29966,81 @@ printf "%s\n" "$gl_cv_func_btowc_eof" >&6; }
       *yes) ;;
       *) REPLACE_BTOWC=1 ;;
     esac
+    case "$gl_cv_func_btowc_consistent" in
+      *yes) ;;
+      *) REPLACE_BTOWC=1 ;;
+    esac
+    if test $REPLACE_BTOWC = 0; then
+
+     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
+printf %s "checking whether the C locale is free of encoding errors... " >&6; }
+if test ${gl_cv_func_mbrtowc_C_locale_sans_EILSEQ+y}
+then :
+  printf %s "(cached) " >&6
+else case e in #(
+  e)
+               gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="$gl_cross_guess_normal"
+
+     if test "$cross_compiling" = yes
+then :
+  case "$host_os" in
+                 # Guess yes on native Windows.
+         mingw*) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="guessing yes" ;;
+       esac
+
+else case e in #(
+  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <limits.h>
+            #include <locale.h>
+            #include <wchar.h>
+
+int
+main (void)
+{
+
+            int i;
+            char *locale = setlocale (LC_ALL, "C");
+            if (! locale)
+              return 2;
+            for (i = CHAR_MIN; i <= CHAR_MAX; i++)
+              {
+                char c = i;
+                wchar_t wc;
+                mbstate_t mbs = { 0, };
+                size_t ss = mbrtowc (&wc, &c, 1, &mbs);
+                if (1 < ss)
+                  return 3;
+              }
+            return 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=yes
+else case e in #(
+  e) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=no ;;
+esac
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
+fi
+
+     ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&5
+printf "%s\n" "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&6; }
+
+      case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in
+        *yes) ;;
+        *) REPLACE_BTOWC=1 ;;
+      esac
+    fi
   fi
 
 
@@ -28387,6 +30063,7 @@ fi
   :
 
 
+
 fi
 
 
@@ -28531,14 +30208,14 @@ fi
 
      else
        case "$host_os" in
-                        # Guess yes on glibc systems.
-         *-gnu* | gnu*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
-                        # Guess yes on musl systems.
-         *-musl*)       ac_cv_func_calloc_0_nonnull="guessing yes" ;;
-                        # Guess yes on native Windows.
-         mingw*)        ac_cv_func_calloc_0_nonnull="guessing yes" ;;
-                        # If we don't know, obey --enable-cross-guesses.
-         *)             ac_cv_func_calloc_0_nonnull="$gl_cross_guess_normal" ;;
+                             # Guess yes on glibc systems.
+         *-gnu* | gnu*)      ac_cv_func_calloc_0_nonnull="guessing yes" ;;
+                             # Guess yes on musl systems.
+         *-musl* | midipix*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
+                             # Guess yes on native Windows.
+         mingw*)             ac_cv_func_calloc_0_nonnull="guessing yes" ;;
+                             # If we don't know, obey --enable-cross-guesses.
+         *)                  ac_cv_func_calloc_0_nonnull="$gl_cross_guess_normal" ;;
        esac
      fi
      ;;
@@ -28719,55 +30396,6 @@ printf "%s\n" "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
 
 
 
-
-
-    if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
-      REPLACE_CLOSE=1
-    fi
-
-
-
-
-
-
-  if test $ac_cv_header_sys_socket_h != yes; then
-                    ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
-if test "x$ac_cv_header_winsock2_h" = xyes
-then :
-  printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
-
-fi
-
-  fi
-  if test "$ac_cv_header_winsock2_h" = yes; then
-    HAVE_WINSOCK2_H=1
-    UNISTD_H_HAVE_WINSOCK2_H=1
-    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
-  else
-    HAVE_WINSOCK2_H=0
-  fi
-
-
-    if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
-                        REPLACE_CLOSE=1
-    fi
-
-
-    if test $REPLACE_CLOSE = 0; then
-
-
-
-  if test $ac_cv_func_fchdir = no; then
-    HAVE_FCHDIR=0
-  fi
-
-      if test $HAVE_FCHDIR = 0; then
-        REPLACE_CLOSE=1
-      fi
-    fi
-
-
-
      if test $REPLACE_CLOSE = 1; then
   GL_COND_OBJ_CLOSE_TRUE=
   GL_COND_OBJ_CLOSE_FALSE='#'
@@ -28817,7 +30445,14 @@ fi
 
   if test $ac_cv_func_closedir = no; then
     HAVE_CLOSEDIR=0
-  fi
+  else
+
+    if test $DIR_HAS_FD_MEMBER = 0; then
+      REPLACE_CLOSEDIR=1
+    fi
+        case $host_os in
+      os2*) REPLACE_CLOSEDIR=1 ;;
+    esac
 
 
 
@@ -28826,16 +30461,11 @@ fi
     HAVE_FCHDIR=0
   fi
 
-    if test $HAVE_FCHDIR = 0; then
-      if test $HAVE_CLOSEDIR = 1; then
+      if test $HAVE_FCHDIR = 0; then
         REPLACE_CLOSEDIR=1
       fi
-    fi
 
-    case $host_os,$HAVE_CLOSEDIR in
-    os2*,1)
-      REPLACE_CLOSEDIR=1;;
-  esac
+  fi
 
 
      if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
@@ -28871,144 +30501,163 @@ printf "%s\n" "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
 
 
 
-  if test "x$lispdir" = x; then
-    lispdir='${datarootdir}/emacs/site-lisp'
 
-  fi
-    if test "x$runstatedir" = x; then
-    runstatedir='${localstatedir}/run'
 
+    gl_save_prefix="${prefix}"
+  gl_save_exec_prefix="${exec_prefix}"
+  gl_save_bindir="${bindir}"
+  gl_save_sbindir="${sbindir}"
+  gl_save_libexecdir="${libexecdir}"
+  gl_save_datarootdir="${datarootdir}"
+  gl_save_datadir="${datadir}"
+  gl_save_sysconfdir="${sysconfdir}"
+  gl_save_sharedstatedir="${sharedstatedir}"
+  gl_save_localstatedir="${localstatedir}"
+  gl_save_runstatedir="${runstatedir}"
+  gl_save_includedir="${includedir}"
+  gl_save_oldincludedir="${oldincludedir}"
+  gl_save_docdir="${docdir}"
+  gl_save_infodir="${infodir}"
+  gl_save_htmldir="${htmldir}"
+  gl_save_dvidir="${dvidir}"
+  gl_save_pdfdir="${pdfdir}"
+  gl_save_psdir="${psdir}"
+  gl_save_libdir="${libdir}"
+  gl_save_lispdir="${lispdir}"
+  gl_save_localedir="${localedir}"
+  gl_save_mandir="${mandir}"
+  gl_save_pkgdatadir="${pkgdatadir}"
+  gl_save_pkgincludedir="${pkgincludedir}"
+  gl_save_pkglibdir="${pkglibdir}"
+  gl_save_pkglibexecdir="${pkglibexecdir}"
+
+        if test "X$prefix" = "XNONE"; then
+    prefix="$ac_default_prefix"
+  fi
+      if test "X$exec_prefix" = "XNONE"; then
+    exec_prefix='${prefix}'
+  fi
+  eval exec_prefix="$exec_prefix"
+  eval bindir="$bindir"
+  eval sbindir="$sbindir"
+  eval libexecdir="$libexecdir"
+  eval datarootdir="$datarootdir"
+  eval datadir="$datadir"
+  eval sysconfdir="$sysconfdir"
+  eval sharedstatedir="$sharedstatedir"
+  eval localstatedir="$localstatedir"
+  eval runstatedir="$runstatedir"
+  eval includedir="$includedir"
+  eval oldincludedir="$oldincludedir"
+  eval docdir="$docdir"
+  eval infodir="$infodir"
+  eval htmldir="$htmldir"
+  eval dvidir="$dvidir"
+  eval pdfdir="$pdfdir"
+  eval psdir="$psdir"
+  eval libdir="$libdir"
+  eval lispdir="$lispdir"
+  eval localedir="$localedir"
+  eval mandir="$mandir"
+  eval pkgdatadir="$pkgdatadir"
+  eval pkgincludedir="$pkgincludedir"
+  eval pkglibdir="$pkglibdir"
+  eval pkglibexecdir="$pkglibexecdir"
+
+
+
+
+
+
+    gl_final_prefix="$prefix"
+    case "$build_os" in
+    cygwin*)
+      case "$host_os" in
+        mingw*)
+          gl_final_prefix=`cygpath -w "$gl_final_prefix"` ;;
+      esac
+      ;;
+  esac
+    prefix_c=`echo "$gl_final_prefix" | sed -e "$gl_sed_double_backslashes" -e "$gl_sed_escape_doublequotes"`
+  prefix_c='"'"$prefix_c"'"'
+
+
+    prefix_c_make=`echo "$prefix_c" | sed -e "$gl_sed_escape_for_make_1" -e "$gl_sed_escape_for_make_2"`
+      if test "$prefix_c_make" = '\"'"${gl_final_prefix}"'\"'; then
+    prefix_c_make='\"$(prefix)\"'
   fi
 
-      pkglibexecdir='${libexecdir}/${PACKAGE}'
 
 
 
 
 
 
+    gl_final_exec_prefix="$exec_prefix"
+    case "$build_os" in
+    cygwin*)
+      case "$host_os" in
+        mingw*)
+          gl_final_exec_prefix=`cygpath -w "$gl_final_exec_prefix"` ;;
+      esac
+      ;;
+  esac
+    exec_prefix_c=`echo "$gl_final_exec_prefix" | sed -e "$gl_sed_double_backslashes" -e "$gl_sed_escape_doublequotes"`
+  exec_prefix_c='"'"$exec_prefix_c"'"'
 
 
+    exec_prefix_c_make=`echo "$exec_prefix_c" | sed -e "$gl_sed_escape_for_make_1" -e "$gl_sed_escape_for_make_2"`
+      if test "$exec_prefix_c_make" = '\"'"${gl_final_exec_prefix}"'\"'; then
+    exec_prefix_c_make='\"$(exec_prefix)\"'
+  fi
 
 
-  :
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
-printf %s "checking for d_ino member in directory struct... " >&6; }
-if test ${gl_cv_struct_dirent_d_ino+y}
-then :
-  printf %s "(cached) " >&6
-else case e in #(
-  e) if test "$cross_compiling" = yes
-then :
-  case "$host_os" in
-                            # Guess yes on glibc systems with Linux kernel.
-              linux*-gnu*)  gl_cv_struct_dirent_d_ino="guessing yes" ;;
-                            # Guess yes on musl systems with Linux kernel.
-              linux*-musl*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
-                            # Guess no on native Windows.
-              mingw*)       gl_cv_struct_dirent_d_ino="guessing no" ;;
-                            # If we don't know, obey --enable-cross-guesses.
-              *)            gl_cv_struct_dirent_d_ino="$gl_cross_guess_normal" ;;
-            esac
 
-else case e in #(
-  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
-             #include <sys/stat.h>
-             #include <dirent.h>
 
-int
-main (void)
-{
-DIR *dp = opendir (".");
-             struct dirent *e;
-             struct stat st;
-             if (! dp)
-               return 1;
-             e = readdir (dp);
-             if (! e)
-               { closedir (dp); return 2; }
-             if (lstat (e->d_name, &st) != 0)
-               { closedir (dp); return 3; }
-             if (e->d_ino != st.st_ino)
-               { closedir (dp); return 4; }
-             closedir (dp);
-             return 0;
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"
-then :
-  gl_cv_struct_dirent_d_ino=yes
-else case e in #(
-  e) gl_cv_struct_dirent_d_ino=no ;;
-esac
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
-esac
-fi
- ;;
-esac
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
-printf "%s\n" "$gl_cv_struct_dirent_d_ino" >&6; }
-   case "$gl_cv_struct_dirent_d_ino" in
-     *yes)
 
-printf "%s\n" "#define D_INO_IN_DIRENT 1" >>confdefs.h
 
-       ;;
-   esac
+    gl_final_bindir="$bindir"
+    case "$build_os" in
+    cygwin*)
+      case "$host_os" in
+        mingw*)
+          gl_final_bindir=`cygpath -w "$gl_final_bindir"` ;;
+      esac
+      ;;
+  esac
+    bindir_c=`echo "$gl_final_bindir" | sed -e "$gl_sed_double_backslashes" -e "$gl_sed_escape_doublequotes"`
+  bindir_c='"'"$bindir_c"'"'
 
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for d_type member in directory struct" >&5
-printf %s "checking for d_type member in directory struct... " >&6; }
-if test ${gl_cv_struct_dirent_d_type+y}
-then :
-  printf %s "(cached) " >&6
-else case e in #(
-  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+    bindir_c_make=`echo "$bindir_c" | sed -e "$gl_sed_escape_for_make_1" -e "$gl_sed_escape_for_make_2"`
+      if test "$bindir_c_make" = '\"'"${gl_final_bindir}"'\"'; then
+    bindir_c_make='\"$(bindir)\"'
+  fi
 
-#include <sys/types.h>
-#include <dirent.h>
 
-int
-main (void)
-{
-struct dirent dp; dp.d_type = 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"
-then :
-  gl_cv_struct_dirent_d_type=yes
-else case e in #(
-  e) gl_cv_struct_dirent_d_type=no ;;
-esac
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam \
-    conftest$ac_exeext conftest.$ac_ext
 
-    ;;
-esac
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_type" >&5
-printf "%s\n" "$gl_cv_struct_dirent_d_type" >&6; }
-   if test $gl_cv_struct_dirent_d_type = yes; then
 
-printf "%s\n" "#define HAVE_STRUCT_DIRENT_D_TYPE 1" >>confdefs.h
 
-   fi
 
 
+    gl_final_sbindir="$sbindir"
+    case "$build_os" in
+    cygwin*)
+      case "$host_os" in
+        mingw*)
+          gl_final_sbindir=`cygpath -w "$gl_final_sbindir"` ;;
+      esac
+      ;;
+  esac
+    sbindir_c=`echo "$gl_final_sbindir" | sed -e "$gl_sed_double_backslashes" -e "$gl_sed_escape_doublequotes"`
+  sbindir_c='"'"$sbindir_c"'"'
 
 
+    sbindir_c_make=`echo "$sbindir_c" | sed -e "$gl_sed_escape_for_make_1" -e "$gl_sed_escape_for_make_2"`
+      if test "$sbindir_c_make" = '\"'"${gl_final_sbindir}"'\"'; then
+    sbindir_c_make='\"$(sbindir)\"'
+  fi
 
 
 
@@ -29016,48 +30665,760 @@ printf "%s\n" "#define HAVE_STRUCT_DIRENT_D_TYPE 1" >>confdefs.h
 
 
 
+    gl_final_libexecdir="$libexecdir"
+    case "$build_os" in
+    cygwin*)
+      case "$host_os" in
+        mingw*)
+          gl_final_libexecdir=`cygpath -w "$gl_final_libexecdir"` ;;
+      esac
+      ;;
+  esac
+    libexecdir_c=`echo "$gl_final_libexecdir" | sed -e "$gl_sed_double_backslashes" -e "$gl_sed_escape_doublequotes"`
+  libexecdir_c='"'"$libexecdir_c"'"'
 
 
+    libexecdir_c_make=`echo "$libexecdir_c" | sed -e "$gl_sed_escape_for_make_1" -e "$gl_sed_escape_for_make_2"`
+      if test "$libexecdir_c_make" = '\"'"${gl_final_libexecdir}"'\"'; then
+    libexecdir_c_make='\"$(libexecdir)\"'
+  fi
 
 
-  ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
-if test "x$ac_cv_func_dirfd" = xyes
-then :
-  printf "%s\n" "#define HAVE_DIRFD 1" >>confdefs.h
 
-fi
 
-  ac_fn_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
-      #include <dirent.h>
-" "$ac_c_undeclared_builtin_options" "CFLAGS"
-if test "x$ac_cv_have_decl_dirfd" = xyes
-then :
-  ac_have_decl=1
-else case e in #(
-  e) ac_have_decl=0 ;;
-esac
-fi
-printf "%s\n" "#define HAVE_DECL_DIRFD $ac_have_decl" >>confdefs.h
 
-  if test $ac_cv_have_decl_dirfd = no; then
-    HAVE_DECL_DIRFD=0
-  fi
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
-printf %s "checking whether dirfd is a macro... " >&6; }
-if test ${gl_cv_func_dirfd_macro+y}
-then :
-  printf %s "(cached) " >&6
-else case e in #(
-  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-#include <sys/types.h>
-#include <dirent.h>
-#ifdef dirfd
- dirent_header_defines_dirfd
-#endif
-_ACEOF
+    gl_final_datarootdir="$datarootdir"
+    case "$build_os" in
+    cygwin*)
+      case "$host_os" in
+        mingw*)
+          gl_final_datarootdir=`cygpath -w "$gl_final_datarootdir"` ;;
+      esac
+      ;;
+  esac
+    datarootdir_c=`echo "$gl_final_datarootdir" | sed -e "$gl_sed_double_backslashes" -e "$gl_sed_escape_doublequotes"`
+  datarootdir_c='"'"$datarootdir_c"'"'
+
+
+    datarootdir_c_make=`echo "$datarootdir_c" | sed -e "$gl_sed_escape_for_make_1" -e "$gl_sed_escape_for_make_2"`
+      if test "$datarootdir_c_make" = '\"'"${gl_final_datarootdir}"'\"'; then
+    datarootdir_c_make='\"$(datarootdir)\"'
+  fi
+
+
+
+
+
+
+
+    gl_final_datadir="$datadir"
+    case "$build_os" in
+    cygwin*)
+      case "$host_os" in
+        mingw*)
+          gl_final_datadir=`cygpath -w "$gl_final_datadir"` ;;
+      esac
+      ;;
+  esac
+    datadir_c=`echo "$gl_final_datadir" | sed -e "$gl_sed_double_backslashes" -e "$gl_sed_escape_doublequotes"`
+  datadir_c='"'"$datadir_c"'"'
+
+
+    datadir_c_make=`echo "$datadir_c" | sed -e "$gl_sed_escape_for_make_1" -e "$gl_sed_escape_for_make_2"`
+      if test "$datadir_c_make" = '\"'"${gl_final_datadir}"'\"'; then
+    datadir_c_make='\"$(datadir)\"'
+  fi
+
+
+
+
+
+
+
+    gl_final_sysconfdir="$sysconfdir"
+    case "$build_os" in
+    cygwin*)
+      case "$host_os" in
+        mingw*)
+          gl_final_sysconfdir=`cygpath -w "$gl_final_sysconfdir"` ;;
+      esac
+      ;;
+  esac
+    sysconfdir_c=`echo "$gl_final_sysconfdir" | sed -e "$gl_sed_double_backslashes" -e "$gl_sed_escape_doublequotes"`
+  sysconfdir_c='"'"$sysconfdir_c"'"'
+
+
+    sysconfdir_c_make=`echo "$sysconfdir_c" | sed -e "$gl_sed_escape_for_make_1" -e "$gl_sed_escape_for_make_2"`
+      if test "$sysconfdir_c_make" = '\"'"${gl_final_sysconfdir}"'\"'; then
+    sysconfdir_c_make='\"$(sysconfdir)\"'
+  fi
+
+
+
+
+
+
+
+    gl_final_sharedstatedir="$sharedstatedir"
+    case "$build_os" in
+    cygwin*)
+      case "$host_os" in
+        mingw*)
+          gl_final_sharedstatedir=`cygpath -w "$gl_final_sharedstatedir"` ;;
+      esac
+      ;;
+  esac
+    sharedstatedir_c=`echo "$gl_final_sharedstatedir" | sed -e "$gl_sed_double_backslashes" -e "$gl_sed_escape_doublequotes"`
+  sharedstatedir_c='"'"$sharedstatedir_c"'"'
+
+
+    sharedstatedir_c_make=`echo "$sharedstatedir_c" | sed -e "$gl_sed_escape_for_make_1" -e "$gl_sed_escape_for_make_2"`
+      if test "$sharedstatedir_c_make" = '\"'"${gl_final_sharedstatedir}"'\"'; then
+    sharedstatedir_c_make='\"$(sharedstatedir)\"'
+  fi
+
+
+
+
+
+
+
+    gl_final_localstatedir="$localstatedir"
+    case "$build_os" in
+    cygwin*)
+      case "$host_os" in
+        mingw*)
+          gl_final_localstatedir=`cygpath -w "$gl_final_localstatedir"` ;;
+      esac
+      ;;
+  esac
+    localstatedir_c=`echo "$gl_final_localstatedir" | sed -e "$gl_sed_double_backslashes" -e "$gl_sed_escape_doublequotes"`
+  localstatedir_c='"'"$localstatedir_c"'"'
+
+
+    localstatedir_c_make=`echo "$localstatedir_c" | sed -e "$gl_sed_escape_for_make_1" -e "$gl_sed_escape_for_make_2"`
+      if test "$localstatedir_c_make" = '\"'"${gl_final_localstatedir}"'\"'; then
+    localstatedir_c_make='\"$(localstatedir)\"'
+  fi
+
+
+
+
+
+
+
+    gl_final_runstatedir="$runstatedir"
+    case "$build_os" in
+    cygwin*)
+      case "$host_os" in
+        mingw*)
+          gl_final_runstatedir=`cygpath -w "$gl_final_runstatedir"` ;;
+      esac
+      ;;
+  esac
+    runstatedir_c=`echo "$gl_final_runstatedir" | sed -e "$gl_sed_double_backslashes" -e "$gl_sed_escape_doublequotes"`
+  runstatedir_c='"'"$runstatedir_c"'"'
+
+
+    runstatedir_c_make=`echo "$runstatedir_c" | sed -e "$gl_sed_escape_for_make_1" -e "$gl_sed_escape_for_make_2"`
+      if test "$runstatedir_c_make" = '\"'"${gl_final_runstatedir}"'\"'; then
+    runstatedir_c_make='\"$(runstatedir)\"'
+  fi
+
+
+
+
+
+
+
+    gl_final_includedir="$includedir"
+    case "$build_os" in
+    cygwin*)
+      case "$host_os" in
+        mingw*)
+          gl_final_includedir=`cygpath -w "$gl_final_includedir"` ;;
+      esac
+      ;;
+  esac
+    includedir_c=`echo "$gl_final_includedir" | sed -e "$gl_sed_double_backslashes" -e "$gl_sed_escape_doublequotes"`
+  includedir_c='"'"$includedir_c"'"'
+
+
+    includedir_c_make=`echo "$includedir_c" | sed -e "$gl_sed_escape_for_make_1" -e "$gl_sed_escape_for_make_2"`
+      if test "$includedir_c_make" = '\"'"${gl_final_includedir}"'\"'; then
+    includedir_c_make='\"$(includedir)\"'
+  fi
+
+
+
+
+
+
+
+    gl_final_oldincludedir="$oldincludedir"
+    case "$build_os" in
+    cygwin*)
+      case "$host_os" in
+        mingw*)
+          gl_final_oldincludedir=`cygpath -w "$gl_final_oldincludedir"` ;;
+      esac
+      ;;
+  esac
+    oldincludedir_c=`echo "$gl_final_oldincludedir" | sed -e "$gl_sed_double_backslashes" -e "$gl_sed_escape_doublequotes"`
+  oldincludedir_c='"'"$oldincludedir_c"'"'
+
+
+    oldincludedir_c_make=`echo "$oldincludedir_c" | sed -e "$gl_sed_escape_for_make_1" -e "$gl_sed_escape_for_make_2"`
+      if test "$oldincludedir_c_make" = '\"'"${gl_final_oldincludedir}"'\"'; then
+    oldincludedir_c_make='\"$(oldincludedir)\"'
+  fi
+
+
+
+
+
+
+
+    gl_final_docdir="$docdir"
+    case "$build_os" in
+    cygwin*)
+      case "$host_os" in
+        mingw*)
+          gl_final_docdir=`cygpath -w "$gl_final_docdir"` ;;
+      esac
+      ;;
+  esac
+    docdir_c=`echo "$gl_final_docdir" | sed -e "$gl_sed_double_backslashes" -e "$gl_sed_escape_doublequotes"`
+  docdir_c='"'"$docdir_c"'"'
+
+
+    docdir_c_make=`echo "$docdir_c" | sed -e "$gl_sed_escape_for_make_1" -e "$gl_sed_escape_for_make_2"`
+      if test "$docdir_c_make" = '\"'"${gl_final_docdir}"'\"'; then
+    docdir_c_make='\"$(docdir)\"'
+  fi
+
+
+
+
+
+
+
+    gl_final_infodir="$infodir"
+    case "$build_os" in
+    cygwin*)
+      case "$host_os" in
+        mingw*)
+          gl_final_infodir=`cygpath -w "$gl_final_infodir"` ;;
+      esac
+      ;;
+  esac
+    infodir_c=`echo "$gl_final_infodir" | sed -e "$gl_sed_double_backslashes" -e "$gl_sed_escape_doublequotes"`
+  infodir_c='"'"$infodir_c"'"'
+
+
+    infodir_c_make=`echo "$infodir_c" | sed -e "$gl_sed_escape_for_make_1" -e "$gl_sed_escape_for_make_2"`
+      if test "$infodir_c_make" = '\"'"${gl_final_infodir}"'\"'; then
+    infodir_c_make='\"$(infodir)\"'
+  fi
+
+
+
+
+
+
+
+    gl_final_htmldir="$htmldir"
+    case "$build_os" in
+    cygwin*)
+      case "$host_os" in
+        mingw*)
+          gl_final_htmldir=`cygpath -w "$gl_final_htmldir"` ;;
+      esac
+      ;;
+  esac
+    htmldir_c=`echo "$gl_final_htmldir" | sed -e "$gl_sed_double_backslashes" -e "$gl_sed_escape_doublequotes"`
+  htmldir_c='"'"$htmldir_c"'"'
+
+
+    htmldir_c_make=`echo "$htmldir_c" | sed -e "$gl_sed_escape_for_make_1" -e "$gl_sed_escape_for_make_2"`
+      if test "$htmldir_c_make" = '\"'"${gl_final_htmldir}"'\"'; then
+    htmldir_c_make='\"$(htmldir)\"'
+  fi
+
+
+
+
+
+
+
+    gl_final_dvidir="$dvidir"
+    case "$build_os" in
+    cygwin*)
+      case "$host_os" in
+        mingw*)
+          gl_final_dvidir=`cygpath -w "$gl_final_dvidir"` ;;
+      esac
+      ;;
+  esac
+    dvidir_c=`echo "$gl_final_dvidir" | sed -e "$gl_sed_double_backslashes" -e "$gl_sed_escape_doublequotes"`
+  dvidir_c='"'"$dvidir_c"'"'
+
+
+    dvidir_c_make=`echo "$dvidir_c" | sed -e "$gl_sed_escape_for_make_1" -e "$gl_sed_escape_for_make_2"`
+      if test "$dvidir_c_make" = '\"'"${gl_final_dvidir}"'\"'; then
+    dvidir_c_make='\"$(dvidir)\"'
+  fi
+
+
+
+
+
+
+
+    gl_final_pdfdir="$pdfdir"
+    case "$build_os" in
+    cygwin*)
+      case "$host_os" in
+        mingw*)
+          gl_final_pdfdir=`cygpath -w "$gl_final_pdfdir"` ;;
+      esac
+      ;;
+  esac
+    pdfdir_c=`echo "$gl_final_pdfdir" | sed -e "$gl_sed_double_backslashes" -e "$gl_sed_escape_doublequotes"`
+  pdfdir_c='"'"$pdfdir_c"'"'
+
+
+    pdfdir_c_make=`echo "$pdfdir_c" | sed -e "$gl_sed_escape_for_make_1" -e "$gl_sed_escape_for_make_2"`
+      if test "$pdfdir_c_make" = '\"'"${gl_final_pdfdir}"'\"'; then
+    pdfdir_c_make='\"$(pdfdir)\"'
+  fi
+
+
+
+
+
+
+
+    gl_final_psdir="$psdir"
+    case "$build_os" in
+    cygwin*)
+      case "$host_os" in
+        mingw*)
+          gl_final_psdir=`cygpath -w "$gl_final_psdir"` ;;
+      esac
+      ;;
+  esac
+    psdir_c=`echo "$gl_final_psdir" | sed -e "$gl_sed_double_backslashes" -e "$gl_sed_escape_doublequotes"`
+  psdir_c='"'"$psdir_c"'"'
+
+
+    psdir_c_make=`echo "$psdir_c" | sed -e "$gl_sed_escape_for_make_1" -e "$gl_sed_escape_for_make_2"`
+      if test "$psdir_c_make" = '\"'"${gl_final_psdir}"'\"'; then
+    psdir_c_make='\"$(psdir)\"'
+  fi
+
+
+
+
+
+
+
+    gl_final_libdir="$libdir"
+    case "$build_os" in
+    cygwin*)
+      case "$host_os" in
+        mingw*)
+          gl_final_libdir=`cygpath -w "$gl_final_libdir"` ;;
+      esac
+      ;;
+  esac
+    libdir_c=`echo "$gl_final_libdir" | sed -e "$gl_sed_double_backslashes" -e "$gl_sed_escape_doublequotes"`
+  libdir_c='"'"$libdir_c"'"'
+
+
+    libdir_c_make=`echo "$libdir_c" | sed -e "$gl_sed_escape_for_make_1" -e "$gl_sed_escape_for_make_2"`
+      if test "$libdir_c_make" = '\"'"${gl_final_libdir}"'\"'; then
+    libdir_c_make='\"$(libdir)\"'
+  fi
+
+
+
+
+
+
+
+    gl_final_lispdir="$lispdir"
+    case "$build_os" in
+    cygwin*)
+      case "$host_os" in
+        mingw*)
+          gl_final_lispdir=`cygpath -w "$gl_final_lispdir"` ;;
+      esac
+      ;;
+  esac
+    lispdir_c=`echo "$gl_final_lispdir" | sed -e "$gl_sed_double_backslashes" -e "$gl_sed_escape_doublequotes"`
+  lispdir_c='"'"$lispdir_c"'"'
+
+
+    lispdir_c_make=`echo "$lispdir_c" | sed -e "$gl_sed_escape_for_make_1" -e "$gl_sed_escape_for_make_2"`
+      if test "$lispdir_c_make" = '\"'"${gl_final_lispdir}"'\"'; then
+    lispdir_c_make='\"$(lispdir)\"'
+  fi
+
+
+
+
+
+
+
+    gl_final_localedir="$localedir"
+    case "$build_os" in
+    cygwin*)
+      case "$host_os" in
+        mingw*)
+          gl_final_localedir=`cygpath -w "$gl_final_localedir"` ;;
+      esac
+      ;;
+  esac
+    localedir_c=`echo "$gl_final_localedir" | sed -e "$gl_sed_double_backslashes" -e "$gl_sed_escape_doublequotes"`
+  localedir_c='"'"$localedir_c"'"'
+
+
+    localedir_c_make=`echo "$localedir_c" | sed -e "$gl_sed_escape_for_make_1" -e "$gl_sed_escape_for_make_2"`
+      if test "$localedir_c_make" = '\"'"${gl_final_localedir}"'\"'; then
+    localedir_c_make='\"$(localedir)\"'
+  fi
+
+
+
+
+
+
+
+    gl_final_mandir="$mandir"
+    case "$build_os" in
+    cygwin*)
+      case "$host_os" in
+        mingw*)
+          gl_final_mandir=`cygpath -w "$gl_final_mandir"` ;;
+      esac
+      ;;
+  esac
+    mandir_c=`echo "$gl_final_mandir" | sed -e "$gl_sed_double_backslashes" -e "$gl_sed_escape_doublequotes"`
+  mandir_c='"'"$mandir_c"'"'
+
+
+    mandir_c_make=`echo "$mandir_c" | sed -e "$gl_sed_escape_for_make_1" -e "$gl_sed_escape_for_make_2"`
+      if test "$mandir_c_make" = '\"'"${gl_final_mandir}"'\"'; then
+    mandir_c_make='\"$(mandir)\"'
+  fi
+
+
+
+
+
+
+
+    gl_final_pkgdatadir="$pkgdatadir"
+    case "$build_os" in
+    cygwin*)
+      case "$host_os" in
+        mingw*)
+          gl_final_pkgdatadir=`cygpath -w "$gl_final_pkgdatadir"` ;;
+      esac
+      ;;
+  esac
+    pkgdatadir_c=`echo "$gl_final_pkgdatadir" | sed -e "$gl_sed_double_backslashes" -e "$gl_sed_escape_doublequotes"`
+  pkgdatadir_c='"'"$pkgdatadir_c"'"'
+
+
+    pkgdatadir_c_make=`echo "$pkgdatadir_c" | sed -e "$gl_sed_escape_for_make_1" -e "$gl_sed_escape_for_make_2"`
+      if test "$pkgdatadir_c_make" = '\"'"${gl_final_pkgdatadir}"'\"'; then
+    pkgdatadir_c_make='\"$(pkgdatadir)\"'
+  fi
+
+
+
+
+
+
+
+    gl_final_pkgincludedir="$pkgincludedir"
+    case "$build_os" in
+    cygwin*)
+      case "$host_os" in
+        mingw*)
+          gl_final_pkgincludedir=`cygpath -w "$gl_final_pkgincludedir"` ;;
+      esac
+      ;;
+  esac
+    pkgincludedir_c=`echo "$gl_final_pkgincludedir" | sed -e "$gl_sed_double_backslashes" -e "$gl_sed_escape_doublequotes"`
+  pkgincludedir_c='"'"$pkgincludedir_c"'"'
+
+
+    pkgincludedir_c_make=`echo "$pkgincludedir_c" | sed -e "$gl_sed_escape_for_make_1" -e "$gl_sed_escape_for_make_2"`
+      if test "$pkgincludedir_c_make" = '\"'"${gl_final_pkgincludedir}"'\"'; then
+    pkgincludedir_c_make='\"$(pkgincludedir)\"'
+  fi
+
+
+
+
+
+
+
+    gl_final_pkglibdir="$pkglibdir"
+    case "$build_os" in
+    cygwin*)
+      case "$host_os" in
+        mingw*)
+          gl_final_pkglibdir=`cygpath -w "$gl_final_pkglibdir"` ;;
+      esac
+      ;;
+  esac
+    pkglibdir_c=`echo "$gl_final_pkglibdir" | sed -e "$gl_sed_double_backslashes" -e "$gl_sed_escape_doublequotes"`
+  pkglibdir_c='"'"$pkglibdir_c"'"'
+
+
+    pkglibdir_c_make=`echo "$pkglibdir_c" | sed -e "$gl_sed_escape_for_make_1" -e "$gl_sed_escape_for_make_2"`
+      if test "$pkglibdir_c_make" = '\"'"${gl_final_pkglibdir}"'\"'; then
+    pkglibdir_c_make='\"$(pkglibdir)\"'
+  fi
+
+
+
+
+
+
+
+    gl_final_pkglibexecdir="$pkglibexecdir"
+    case "$build_os" in
+    cygwin*)
+      case "$host_os" in
+        mingw*)
+          gl_final_pkglibexecdir=`cygpath -w "$gl_final_pkglibexecdir"` ;;
+      esac
+      ;;
+  esac
+    pkglibexecdir_c=`echo "$gl_final_pkglibexecdir" | sed -e "$gl_sed_double_backslashes" -e "$gl_sed_escape_doublequotes"`
+  pkglibexecdir_c='"'"$pkglibexecdir_c"'"'
+
+
+    pkglibexecdir_c_make=`echo "$pkglibexecdir_c" | sed -e "$gl_sed_escape_for_make_1" -e "$gl_sed_escape_for_make_2"`
+      if test "$pkglibexecdir_c_make" = '\"'"${gl_final_pkglibexecdir}"'\"'; then
+    pkglibexecdir_c_make='\"$(pkglibexecdir)\"'
+  fi
+
+
+
+    pkglibexecdir="${gl_save_pkglibexecdir}"
+  pkglibdir="${gl_save_pkglibdir}"
+  pkgincludedir="${gl_save_pkgincludedir}"
+  pkgdatadir="${gl_save_pkgdatadir}"
+  mandir="${gl_save_mandir}"
+  localedir="${gl_save_localedir}"
+  lispdir="${gl_save_lispdir}"
+  libdir="${gl_save_libdir}"
+  psdir="${gl_save_psdir}"
+  pdfdir="${gl_save_pdfdir}"
+  dvidir="${gl_save_dvidir}"
+  htmldir="${gl_save_htmldir}"
+  infodir="${gl_save_infodir}"
+  docdir="${gl_save_docdir}"
+  oldincludedir="${gl_save_oldincludedir}"
+  includedir="${gl_save_includedir}"
+  runstatedir="${gl_save_runstatedir}"
+  localstatedir="${gl_save_localstatedir}"
+  sharedstatedir="${gl_save_sharedstatedir}"
+  sysconfdir="${gl_save_sysconfdir}"
+  datadir="${gl_save_datadir}"
+  datarootdir="${gl_save_datarootdir}"
+  libexecdir="${gl_save_libexecdir}"
+  sbindir="${gl_save_sbindir}"
+  bindir="${gl_save_bindir}"
+  exec_prefix="${gl_save_exec_prefix}"
+  prefix="${gl_save_prefix}"
+
+
+
+
+
+
+
+
+
+  :
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
+printf %s "checking for d_ino member in directory struct... " >&6; }
+if test ${gl_cv_struct_dirent_d_ino+y}
+then :
+  printf %s "(cached) " >&6
+else case e in #(
+  e) if test "$cross_compiling" = yes
+then :
+  case "$host_os" in
+                            # Guess yes on glibc systems with Linux kernel.
+              linux*-gnu*)  gl_cv_struct_dirent_d_ino="guessing yes" ;;
+                            # Guess yes on musl systems with Linux kernel.
+              linux*-musl*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
+                            # Guess yes on systems that emulate the Linux system calls.
+              midipix*)     gl_cv_struct_dirent_d_ino="guessing yes" ;;
+                            # Guess no on native Windows.
+              mingw*)       gl_cv_struct_dirent_d_ino="guessing no" ;;
+                            # If we don't know, obey --enable-cross-guesses.
+              *)            gl_cv_struct_dirent_d_ino="$gl_cross_guess_normal" ;;
+            esac
+
+else case e in #(
+  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+             #include <sys/stat.h>
+             #include <dirent.h>
+
+int
+main (void)
+{
+DIR *dp = opendir (".");
+             struct dirent *e;
+             struct stat st;
+             if (! dp)
+               return 1;
+             e = readdir (dp);
+             if (! e)
+               { closedir (dp); return 2; }
+             if (lstat (e->d_name, &st) != 0)
+               { closedir (dp); return 3; }
+             if (e->d_ino != st.st_ino)
+               { closedir (dp); return 4; }
+             closedir (dp);
+             return 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  gl_cv_struct_dirent_d_ino=yes
+else case e in #(
+  e) gl_cv_struct_dirent_d_ino=no ;;
+esac
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
+fi
+ ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
+printf "%s\n" "$gl_cv_struct_dirent_d_ino" >&6; }
+   case "$gl_cv_struct_dirent_d_ino" in
+     *yes)
+
+printf "%s\n" "#define D_INO_IN_DIRENT 1" >>confdefs.h
+
+       ;;
+   esac
+
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for d_type member in directory struct" >&5
+printf %s "checking for d_type member in directory struct... " >&6; }
+if test ${gl_cv_struct_dirent_d_type+y}
+then :
+  printf %s "(cached) " >&6
+else case e in #(
+  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <sys/types.h>
+#include <dirent.h>
+
+int
+main (void)
+{
+struct dirent dp; dp.d_type = 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+  gl_cv_struct_dirent_d_type=yes
+else case e in #(
+  e) gl_cv_struct_dirent_d_type=no ;;
+esac
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+
+    ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_type" >&5
+printf "%s\n" "$gl_cv_struct_dirent_d_type" >&6; }
+   if test $gl_cv_struct_dirent_d_type = yes; then
+
+printf "%s\n" "#define HAVE_STRUCT_DIRENT_D_TYPE 1" >>confdefs.h
+
+   fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
+if test "x$ac_cv_func_dirfd" = xyes
+then :
+  printf "%s\n" "#define HAVE_DIRFD 1" >>confdefs.h
+
+fi
+
+  ac_fn_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
+      #include <dirent.h>
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_dirfd" = xyes
+then :
+  ac_have_decl=1
+else case e in #(
+  e) ac_have_decl=0 ;;
+esac
+fi
+printf "%s\n" "#define HAVE_DECL_DIRFD $ac_have_decl" >>confdefs.h
+
+  if test $ac_cv_have_decl_dirfd = no; then
+    HAVE_DECL_DIRFD=0
+  fi
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
+printf %s "checking whether dirfd is a macro... " >&6; }
+if test ${gl_cv_func_dirfd_macro+y}
+then :
+  printf %s "(cached) " >&6
+else case e in #(
+  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <sys/types.h>
+#include <dirent.h>
+#ifdef dirfd
+ dirent_header_defines_dirfd
+#endif
+_ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
   $EGREP_TRADITIONAL "dirent_header_defines_dirfd" >/dev/null 2>&1
 then :
@@ -29073,19 +31434,24 @@ fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
 printf "%s\n" "$gl_cv_func_dirfd_macro" >&6; }
 
-  # Use the replacement if we have no function or macro with that name,
-  # or if OS/2 kLIBC whose dirfd() does not work.
-  # Replace only if the system declares dirfd already.
-  case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
-    no,no,*,yes | *,*,os2*,yes)
+  if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then
+    HAVE_DIRFD=0
+  else
+    HAVE_DIRFD=1
+        if test $ac_cv_have_decl_dirfd = yes; then
       REPLACE_DIRFD=1
+    fi
 
-printf "%s\n" "#define REPLACE_DIRFD 1" >>confdefs.h
-;;
-  esac
+    if test $DIR_HAS_FD_MEMBER = 0; then
+      REPLACE_DIRFD=1
+    fi
+        case "$host_os" in
+      os2*) REPLACE_DIRFD=1 ;;
+    esac
+  fi
 
 
-     if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no || test $REPLACE_DIRFD = 1; then
+     if test $HAVE_DIRFD = 0 || test $REPLACE_DIRFD = 1; then
   GL_COND_OBJ_DIRFD_TRUE=
   GL_COND_OBJ_DIRFD_FALSE='#'
 else
@@ -29512,7 +31878,6 @@ printf "%s\n" "#define GNULIB_TEST_DUP2 1" >>confdefs.h
 
 
 
-
   case "$GL_GENERATE_ERRNO_H" in
     false) ERRNO_H='' ;;
     true)
@@ -29543,39 +31908,10 @@ fi
 
 
 
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
-printf %s "checking for error_at_line... " >&6; }
-if test ${ac_cv_lib_error_at_line+y}
-then :
-  printf %s "(cached) " >&6
-else case e in #(
-  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <error.h>
-int
-main (void)
-{
-error_at_line (0, 0, "", 0, "an error occurred");
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"
-then :
-  ac_cv_lib_error_at_line=yes
-else case e in #(
-  e) ac_cv_lib_error_at_line=no ;;
-esac
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam \
-    conftest$ac_exeext conftest.$ac_ext ;;
-esac
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
-printf "%s\n" "$ac_cv_lib_error_at_line" >&6; }
 
 
-     if test "$ac_cv_lib_error_at_line" = no; then
+
+     if test $GL_GENERATE_ERROR_H = true; then
   GL_COND_OBJ_ERROR_TRUE=
   GL_COND_OBJ_ERROR_FALSE='#'
 else
@@ -29611,6 +31947,40 @@ fi
 
 
 
+  case "$GL_GENERATE_ERROR_H" in
+    false) ERROR_H='' ;;
+    true)
+                  if test -z "$ERROR_H"; then
+        ERROR_H="${gl_source_base_prefix}error.h"
+      fi
+      ;;
+    *) echo "*** GL_GENERATE_ERROR_H is not set correctly" 1>&2; exit 1 ;;
+  esac
+
+
+     if $GL_GENERATE_ERROR_H; then
+  GL_GENERATE_ERROR_H_TRUE=
+  GL_GENERATE_ERROR_H_FALSE='#'
+else
+  GL_GENERATE_ERROR_H_TRUE='#'
+  GL_GENERATE_ERROR_H_FALSE=
+fi
+:
+    if test -z "${GL_GENERATE_ERROR_H_TRUE}" && test -z "${GL_GENERATE_ERROR_H_FALSE}"; then
+    GL_GENERATE_ERROR_H_TRUE='#'
+    GL_GENERATE_ERROR_H_FALSE='#'
+  fi
+
+
+
+
+
+
+
+
+
+
+
 
   if test $ac_cv_have_decl_fchdir = no; then
     HAVE_DECL_FCHDIR=0
@@ -29632,6 +32002,8 @@ then :
   case "$host_os" in
                              # Guess yes on Linux systems.
             linux-* | linux) gl_cv_func_open_directory_works="guessing yes" ;;
+                             # Guess yes on systems that emulate the Linux system calls.
+            midipix*)        gl_cv_func_open_directory_works="guessing yes" ;;
                              # Guess yes on glibc systems.
             *-gnu* | gnu*)   gl_cv_func_open_directory_works="guessing yes" ;;
                              # Guess no on native Windows.
@@ -30035,12 +32407,12 @@ else case e in #(
   e) if test "$cross_compiling" = yes
 then :
   case "$host_os" in
-                     # Guess yes on glibc systems.
-            *-gnu*)  gl_cv_func_fdopendir_works="guessing yes" ;;
-                     # Guess yes on musl systems.
-            *-musl*) gl_cv_func_fdopendir_works="guessing yes" ;;
-                     # If we don't know, obey --enable-cross-guesses.
-            *)       gl_cv_func_fdopendir_works="$gl_cross_guess_normal" ;;
+                                # Guess yes on glibc systems.
+            *-gnu*)             gl_cv_func_fdopendir_works="guessing yes" ;;
+                                # Guess yes on musl systems.
+            *-musl* | midipix*) gl_cv_func_fdopendir_works="guessing yes" ;;
+                                # If we don't know, obey --enable-cross-guesses.
+            *)                  gl_cv_func_fdopendir_works="$gl_cross_guess_normal" ;;
           esac
 
 else case e in #(
@@ -30141,6 +32513,74 @@ printf "%s\n" "#define GNULIB_FDOPENDIR 1" >>confdefs.h
 
 
 
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mempcpy" >&5
+printf %s "checking for mempcpy... " >&6; }
+if test ${gl_cv_onwards_func_mempcpy+y}
+then :
+  printf %s "(cached) " >&6
+else case e in #(
+  e)
+  exec 9>&6 6>/dev/null
+
+       case "$host_os" in
+
+         linux*-android*)
+           ac_fn_check_decl "$LINENO" "mempcpy" "ac_cv_have_decl_mempcpy" "#include <string.h>
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_mempcpy" = xyes
+then :
+
+fi
+           if test $ac_cv_have_decl_mempcpy = yes; then
+             ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
+if test "x$ac_cv_func_mempcpy" = xyes
+then :
+
+fi
+
+             if test $ac_cv_func_mempcpy = yes; then
+               gl_cv_onwards_func_mempcpy=yes
+             else
+                                                            gl_cv_onwards_func_mempcpy='future OS version'
+             fi
+           else
+             gl_cv_onwards_func_mempcpy='future OS version'
+           fi
+           ;;
+
+
+         *)
+           ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
+if test "x$ac_cv_func_mempcpy" = xyes
+then :
+
+fi
+
+           gl_cv_onwards_func_mempcpy=$ac_cv_func_mempcpy
+           ;;
+
+       esac
+
+  exec 6>&9 9>&-
+
+     ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_mempcpy" >&5
+printf "%s\n" "$gl_cv_onwards_func_mempcpy" >&6; }
+
+  case "$gl_cv_onwards_func_mempcpy" in
+    future*) ac_cv_func_mempcpy=no ;;
+    *)       ac_cv_func_mempcpy=$gl_cv_onwards_func_mempcpy ;;
+  esac
+  if test $ac_cv_func_mempcpy = yes; then
+
+printf "%s\n" "#define HAVE_MEMPCPY 1" >>confdefs.h
+
+  fi
+
+
+
 
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
 printf %s "checking for flexible array member... " >&6; }
@@ -30220,10 +32660,10 @@ else case e in #(
        if test "$cross_compiling" = yes
 then :
   case "$host_os" in
-                     # Guess yes on musl systems.
-            *-musl*) eval "$gl_fnmatch_cache_var=\"guessing yes\"" ;;
-                     # Guess no otherwise, even on glibc systems.
-            *)       eval "$gl_fnmatch_cache_var=\"guessing no\"" ;;
+                                # Guess yes on musl systems.
+            *-musl* | midipix*) eval "$gl_fnmatch_cache_var=\"guessing yes\"" ;;
+                                # Guess no otherwise, even on glibc systems.
+            *)                  eval "$gl_fnmatch_cache_var=\"guessing no\"" ;;
           esac
 
 else case e in #(
@@ -30457,72 +32897,9 @@ fi
 
 
 
-  case "$host_os" in
-    mingw* | pw*)
-            REPLACE_FOPEN=1
-            gl_cv_func_fopen_slash="guessing no"
-      ;;
-    *)
-                  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fopen recognizes a trailing slash" >&5
-printf %s "checking whether fopen recognizes a trailing slash... " >&6; }
-if test ${gl_cv_func_fopen_slash+y}
-then :
-  printf %s "(cached) " >&6
-else case e in #(
-  e)
-          if test "$cross_compiling" = yes
-then :
-
-             case "$host_os" in
-               aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
-                 gl_cv_func_fopen_slash="guessing no" ;;
-               *)
-                 gl_cv_func_fopen_slash="guessing yes" ;;
-             esac
-
-else case e in #(
-  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stddef.h>
-#include <stdio.h>
-int main ()
-{
-  FILE *fp = fopen ("conftest.sl/", "w");
-  int result = (fp != NULL);
-  if (fp != NULL)
-    fclose (fp);
-  return result;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"
-then :
-  gl_cv_func_fopen_slash=yes
-else case e in #(
-  e) gl_cv_func_fopen_slash=no ;;
-esac
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
-esac
-fi
-
-          rm -f conftest.sl
-         ;;
-esac
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_slash" >&5
-printf "%s\n" "$gl_cv_func_fopen_slash" >&6; }
-      ;;
-  esac
-  case "$gl_cv_func_fopen_slash" in
-    *no)
-
-printf "%s\n" "#define FOPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
-
-      REPLACE_FOPEN=1
-      ;;
-  esac
+  if test $REPLACE_FCLOSE = 1; then
+    REPLACE_FOPEN=1
+  fi
 
   if test $REPLACE_FOPEN = 1; then
 
@@ -30569,7 +32946,7 @@ else case e in #(
 then :
   case "$host_os" in
           # Guess yes on glibc and musl systems.
-          linux*-gnu* | gnu* | kfreebsd*-gnu | *-musl*)
+          linux*-gnu* | gnu* | kfreebsd*-gnu | *-musl* | midipix*)
             gl_cv_func_fopen_mode_x="guessing yes" ;;
           # If we don't know, obey --enable-cross-guesses.
           *)
@@ -30627,7 +33004,7 @@ else case e in #(
 then :
   case "$host_os" in
           # Guess yes on glibc and musl systems.
-          linux*-gnu* | gnu* | kfreebsd*-gnu | *-musl*)
+          linux*-gnu* | gnu* | kfreebsd*-gnu | *-musl* | midipix*)
             gl_cv_func_fopen_mode_e="guessing yes" ;;
           # Guess no on native Windows.
           mingw*)
@@ -31127,14 +33504,80 @@ fi
     fi
   fi
 
-  ac_fn_c_check_func "$LINENO" "fts_open" "ac_cv_func_fts_open"
+
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fts_open" >&5
+printf %s "checking for fts_open... " >&6; }
+if test ${gl_cv_onwards_func_fts_open+y}
+then :
+  printf %s "(cached) " >&6
+else case e in #(
+  e)
+  exec 9>&6 6>/dev/null
+
+       case "$host_os" in
+
+         linux*-android*)
+           ac_fn_check_decl "$LINENO" "fts_open" "ac_cv_have_decl_fts_open" "#include <fts.h>
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_fts_open" = xyes
+then :
+
+fi
+           if test $ac_cv_have_decl_fts_open = yes; then
+             ac_fn_c_check_func "$LINENO" "fts_open" "ac_cv_func_fts_open"
+if test "x$ac_cv_func_fts_open" = xyes
+then :
+
+fi
+
+             if test $ac_cv_func_fts_open = yes; then
+               gl_cv_onwards_func_fts_open=yes
+             else
+                                                            gl_cv_onwards_func_fts_open='future OS version'
+             fi
+           else
+             gl_cv_onwards_func_fts_open='future OS version'
+           fi
+           ;;
+
+
+         *)
+           ac_fn_c_check_func "$LINENO" "fts_open" "ac_cv_func_fts_open"
 if test "x$ac_cv_func_fts_open" = xyes
 then :
 
 fi
 
+           gl_cv_onwards_func_fts_open=$ac_cv_func_fts_open
+           ;;
+
+       esac
+
+  exec 6>&9 9>&-
+
+     ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_fts_open" >&5
+printf "%s\n" "$gl_cv_onwards_func_fts_open" >&6; }
+
+  case "$gl_cv_onwards_func_fts_open" in
+    future*) ac_cv_func_fts_open=no ;;
+    *)       ac_cv_func_fts_open=$gl_cv_onwards_func_fts_open ;;
+  esac
   if test $ac_cv_func_fts_open = yes; then
 
+printf "%s\n" "#define HAVE_FTS_OPEN 1" >>confdefs.h
+
+  fi
+
+
+  if case "$gl_cv_onwards_func_fts_open" in \
+       yes | future*) true ;; \
+       *) false ;; \
+     esac; then
+
 printf "%s\n" "#define fts_open rpl_fts_open" >>confdefs.h
 
 
@@ -31581,6 +34024,119 @@ printf "%s\n" "#define GNULIB_TEST_GETPAGESIZE 1" >>confdefs.h
 
 
 
+
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getprogname" >&5
+printf %s "checking for getprogname... " >&6; }
+if test ${gl_cv_onwards_func_getprogname+y}
+then :
+  printf %s "(cached) " >&6
+else case e in #(
+  e)
+  exec 9>&6 6>/dev/null
+
+       case "$host_os" in
+
+         linux*-android*)
+           ac_fn_check_decl "$LINENO" "getprogname" "ac_cv_have_decl_getprogname" "#include <stdlib.h>
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_getprogname" = xyes
+then :
+
+fi
+           if test $ac_cv_have_decl_getprogname = yes; then
+             ac_fn_c_check_func "$LINENO" "getprogname" "ac_cv_func_getprogname"
+if test "x$ac_cv_func_getprogname" = xyes
+then :
+
+fi
+
+             if test $ac_cv_func_getprogname = yes; then
+               gl_cv_onwards_func_getprogname=yes
+             else
+                                                            gl_cv_onwards_func_getprogname='future OS version'
+             fi
+           else
+             gl_cv_onwards_func_getprogname='future OS version'
+           fi
+           ;;
+
+
+         *)
+           ac_fn_c_check_func "$LINENO" "getprogname" "ac_cv_func_getprogname"
+if test "x$ac_cv_func_getprogname" = xyes
+then :
+
+fi
+
+           gl_cv_onwards_func_getprogname=$ac_cv_func_getprogname
+           ;;
+
+       esac
+
+  exec 6>&9 9>&-
+
+     ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_getprogname" >&5
+printf "%s\n" "$gl_cv_onwards_func_getprogname" >&6; }
+
+  case "$gl_cv_onwards_func_getprogname" in
+    future*) ac_cv_func_getprogname=no ;;
+    *)       ac_cv_func_getprogname=$gl_cv_onwards_func_getprogname ;;
+  esac
+  if test $ac_cv_func_getprogname = yes; then
+
+printf "%s\n" "#define HAVE_GETPROGNAME 1" >>confdefs.h
+
+  fi
+
+
+  if test $ac_cv_func_getprogname = no; then
+    HAVE_GETPROGNAME=0
+    case "$gl_cv_onwards_func_getprogname" in
+      future*) REPLACE_GETPROGNAME=1 ;;
+    esac
+  fi
+  ac_fn_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_program_invocation_name" = xyes
+then :
+  ac_have_decl=1
+else case e in #(
+  e) ac_have_decl=0 ;;
+esac
+fi
+printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl" >>confdefs.h
+if test $ac_have_decl = 1
+then :
+
+else case e in #(
+  e) HAVE_DECL_PROGRAM_INVOCATION_NAME=0 ;;
+esac
+fi
+
+
+
+     if test $HAVE_GETPROGNAME = 0 || test $REPLACE_GETPROGNAME = 1; then
+  GL_COND_OBJ_GETPROGNAME_TRUE=
+  GL_COND_OBJ_GETPROGNAME_FALSE='#'
+else
+  GL_COND_OBJ_GETPROGNAME_TRUE='#'
+  GL_COND_OBJ_GETPROGNAME_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_GETPROGNAME_TRUE}" && test -z "${GL_COND_OBJ_GETPROGNAME_FALSE}"; then
+    GL_COND_OBJ_GETPROGNAME_TRUE='#'
+    GL_COND_OBJ_GETPROGNAME_FALSE='#'
+  fi
+
+  if test -z "$GL_COND_OBJ_GETPROGNAME_TRUE"; then :
+
+
+
+
   ac_found=0
   ac_fn_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
 " "$ac_c_undeclared_builtin_options" "CFLAGS"
@@ -31673,6 +34229,28 @@ printf "%s\n" "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
   fi
 
 
+fi
+
+
+
+
+
+
+
+
+
+          GL_GNULIB_GETPROGNAME=1
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_GETPROGNAME 1" >>confdefs.h
+
+
+
+
+
 
   # Autoconf 2.61a.99 and earlier don't support linking a file only
   # in VPATH builds.  But since GNUmakefile is for maintainer use
@@ -31683,7 +34261,9 @@ printf "%s\n" "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
   ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
 
 
-  LIB_HARD_LOCALE="$LIB_SETLOCALE_NULL"
+  HARD_LOCALE_LIB="$SETLOCALE_NULL_LIB"
+
+    LIB_HARD_LOCALE="$HARD_LOCALE_LIB"
 
 
 
@@ -32009,6 +34589,74 @@ printf "%s\n" "#define GNULIB_ISBLANK 1" >>confdefs.h
 
 
 
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iswblank" >&5
+printf %s "checking for iswblank... " >&6; }
+if test ${gl_cv_onwards_func_iswblank+y}
+then :
+  printf %s "(cached) " >&6
+else case e in #(
+  e)
+  exec 9>&6 6>/dev/null
+
+       case "$host_os" in
+
+         linux*-android*)
+           ac_fn_check_decl "$LINENO" "iswblank" "ac_cv_have_decl_iswblank" "#include <wctype.h>
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_iswblank" = xyes
+then :
+
+fi
+           if test $ac_cv_have_decl_iswblank = yes; then
+             ac_fn_c_check_func "$LINENO" "iswblank" "ac_cv_func_iswblank"
+if test "x$ac_cv_func_iswblank" = xyes
+then :
+
+fi
+
+             if test $ac_cv_func_iswblank = yes; then
+               gl_cv_onwards_func_iswblank=yes
+             else
+                                                            gl_cv_onwards_func_iswblank='future OS version'
+             fi
+           else
+             gl_cv_onwards_func_iswblank='future OS version'
+           fi
+           ;;
+
+
+         *)
+           ac_fn_c_check_func "$LINENO" "iswblank" "ac_cv_func_iswblank"
+if test "x$ac_cv_func_iswblank" = xyes
+then :
+
+fi
+
+           gl_cv_onwards_func_iswblank=$ac_cv_func_iswblank
+           ;;
+
+       esac
+
+  exec 6>&9 9>&-
+
+     ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_iswblank" >&5
+printf "%s\n" "$gl_cv_onwards_func_iswblank" >&6; }
+
+  case "$gl_cv_onwards_func_iswblank" in
+    future*) ac_cv_func_iswblank=no ;;
+    *)       ac_cv_func_iswblank=$gl_cv_onwards_func_iswblank ;;
+  esac
+  if test $ac_cv_func_iswblank = yes; then
+
+printf "%s\n" "#define HAVE_ISWBLANK 1" >>confdefs.h
+
+  fi
+
+
   ac_fn_check_decl "$LINENO" "iswblank" "ac_cv_have_decl_iswblank" "
     #include <wchar.h>
     #include <wctype.h>
@@ -32025,7 +34673,11 @@ printf "%s\n" "#define HAVE_DECL_ISWBLANK $ac_have_decl" >>confdefs.h
 
   if test $ac_cv_func_iswblank = no; then
     HAVE_ISWBLANK=0
-    if test $ac_cv_have_decl_iswblank = yes; then
+    if test $ac_cv_have_decl_iswblank = yes \
+       || case "$gl_cv_onwards_func_iswblank" in \
+            future*) true ;; \
+            *) false ;; \
+          esac; then
       REPLACE_ISWBLANK=1
     fi
   fi
@@ -32478,6 +35130,61 @@ fi
   if test $REPLACE_STRUCT_LCONV = 1; then
     REPLACE_LOCALECONV=1
   fi
+  if test $REPLACE_LOCALECONV = 0; then
+            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether localeconv works" >&5
+printf %s "checking whether localeconv works... " >&6; }
+if test ${gl_cv_func_localeconv_works+y}
+then :
+  printf %s "(cached) " >&6
+else case e in #(
+  e) if test "$cross_compiling" = yes
+then :
+  case "$host_os" in
+                                # Guess yes on glibc systems.
+            *-gnu* | gnu*)      gl_cv_func_localeconv_works="guessing yes" ;;
+                                # Guess yes on musl systems.
+            *-musl* | midipix*) gl_cv_func_localeconv_works="guessing yes" ;;
+                                # Guess no on native Windows.
+            mingw*)             gl_cv_func_localeconv_works="guessing no" ;;
+                                # If we don't know, obey --enable-cross-guesses.
+            *)                  gl_cv_func_localeconv_works="$gl_cross_guess_normal" ;;
+          esac
+
+else case e in #(
+  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+            #include <locale.h>
+            #include <limits.h>
+            int main ()
+            {
+              struct lconv *l = localeconv ();
+              return l->frac_digits != CHAR_MAX && l->frac_digits < 0;
+            }
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  gl_cv_func_localeconv_works=yes
+else case e in #(
+  e) gl_cv_func_localeconv_works=no ;;
+esac
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
+fi
+
+       ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_localeconv_works" >&5
+printf "%s\n" "$gl_cv_func_localeconv_works" >&6; }
+    case "$gl_cv_func_localeconv_works" in
+      *yes) ;;
+      *) REPLACE_LOCALECONV=1 ;;
+    esac
+  fi
 
 
      if test $REPLACE_LOCALECONV = 1; then
@@ -32504,6 +35211,16 @@ then :
 printf "%s\n" "#define HAVE_STRUCT_LCONV_DECIMAL_POINT 1" >>confdefs.h
 
 
+fi
+
+  ac_fn_c_check_member "$LINENO" "struct lconv" "int_p_cs_precedes" "ac_cv_member_struct_lconv_int_p_cs_precedes" "#include <locale.h>
+"
+if test "x$ac_cv_member_struct_lconv_int_p_cs_precedes" = xyes
+then :
+
+printf "%s\n" "#define HAVE_STRUCT_LCONV_INT_P_CS_PRECEDES 1" >>confdefs.h
+
+
 fi
 
 
@@ -32558,22 +35275,22 @@ else case e in #(
      if test "$cross_compiling" = yes
 then :
   case "$host_os" in
-                         # Guess no on glibc systems.
-          *-gnu* | gnu*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
-                         # Guess no on musl systems.
-          *-musl*)       gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
-                         # Guess no on bionic systems.
-          *-android*)    gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
-                         # Guess yes on native Windows with the mingw-w64 winpthreads library.
-                         # Guess no on native Windows with the gnulib windows-rwlock module.
-          mingw*)        if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
-                           gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes"
-                         else
-                           gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no"
-                         fi
-                         ;;
-                         # If we don't know, obey --enable-cross-guesses.
-          *)             gl_cv_pthread_rwlock_rdlock_prefer_writer="$gl_cross_guess_normal" ;;
+                              # Guess no on glibc systems.
+          *-gnu* | gnu*)      gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
+                              # Guess no on musl systems.
+          *-musl* | midipix*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
+                              # Guess no on bionic systems.
+          *-android*)         gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
+                              # Guess yes on native Windows with the mingw-w64 winpthreads library.
+                              # Guess no on native Windows with the gnulib windows-rwlock module.
+          mingw*)             if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
+                                gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes"
+                              else
+                                gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no"
+                              fi
+                              ;;
+                              # If we don't know, obey --enable-cross-guesses.
+          *)                  gl_cv_pthread_rwlock_rdlock_prefer_writer="$gl_cross_guess_normal" ;;
          esac
 
 else case e in #(
@@ -32771,7 +35488,7 @@ then :
 else case e in #(
   e) case "$host_os" in
        mingw*)
-                                                               gl_cv_func_lseek_pipe=no
+                                                                                 gl_cv_func_lseek_pipe=no
          ;;
        *)
          if test $cross_compiling = no; then
@@ -32854,10 +35571,46 @@ printf "%s\n" "#define LSEEK_PIPE_BROKEN 1" >>confdefs.h
     REPLACE_LSEEK=1
   fi
 
-    case $host_os in
-    darwin*)
-      REPLACE_LSEEK=1;;
-  esac
+  if test $REPLACE_LSEEK = 0
+then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether SEEK_DATA works but is incompatible with GNU" >&5
+printf %s "checking whether SEEK_DATA works but is incompatible with GNU... " >&6; }
+if test ${gl_cv_func_lseek_works_but_incompatible+y}
+then :
+  printf %s "(cached) " >&6
+else case e in #(
+  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+                          #include <unistd.h>
+               #if defined __APPLE__ && defined __MACH__ && defined SEEK_DATA
+               # ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
+               #  include <AvailabilityMacros.h>
+               # endif
+               # if 99990000 <= MAC_OS_X_VERSION_MIN_REQUIRED
+               #  define LSEEK_WORKS_BUT_IS_INCOMPATIBLE_WITH_GNU
+               # endif
+               #endif
+               #ifndef LSEEK_WORKS_BUT_IS_INCOMPATIBLE_WITH_GNU
+                #error "No need to work around the bug"
+               #endif
+
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"
+then :
+  gl_cv_func_lseek_works_but_incompatible=yes
+else case e in #(
+  e) gl_cv_func_lseek_works_but_incompatible=no ;;
+esac
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lseek_works_but_incompatible" >&5
+printf "%s\n" "$gl_cv_func_lseek_works_but_incompatible" >&6; }
+     if test "$gl_cv_func_lseek_works_but_incompatible" = yes; then
+       REPLACE_LSEEK=1
+     fi
+fi
 
 
      if test $REPLACE_LSEEK = 1; then
@@ -32965,7 +35718,7 @@ then :
   case "$host_os" in
           # Guess yes on platforms where we know the result.
           *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
-          | gnu* | *-musl* | midnightbsd* \
+          | gnu* | *-musl* | midipix* | midnightbsd* \
           | hpux* | solaris* | cygwin* | mingw* | msys* )
             ac_cv_func_malloc_0_nonnull="guessing yes" ;;
           # If we don't know, obey --enable-cross-guesses.
@@ -33172,200 +35925,6 @@ printf "%s\n" "#define GNULIB_TEST_MBRLEN 1" >>confdefs.h
 
 
 
-
-
-
-
-        if case "$host_os" in
-       mingw*) true ;;
-       *) test $ac_cv_func_mbsinit = yes ;;
-     esac \
-    && test $ac_cv_func_mbrtowc = yes; then
-
-
-
-
-     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
-printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
-if test ${gl_cv_func_mbrtowc_incomplete_state+y}
-then :
-  printf %s "(cached) " >&6
-else case e in #(
-  e)
-                  case "$host_os" in
-                     # Guess no on AIX and OSF/1.
-        aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
-                     # Guess yes otherwise.
-        *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
-      esac
-      if test $LOCALE_JA != none; then
-        if test "$cross_compiling" = yes
-then :
-  :
-else case e in #(
-  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <locale.h>
-#include <string.h>
-#include <wchar.h>
-int main ()
-{
-  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
-    {
-      const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
-      mbstate_t state;
-      wchar_t wc;
-
-      memset (&state, '\0', sizeof (mbstate_t));
-      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
-        if (mbsinit (&state))
-          return 2;
-    }
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"
-then :
-  gl_cv_func_mbrtowc_incomplete_state=yes
-else case e in #(
-  e) gl_cv_func_mbrtowc_incomplete_state=no ;;
-esac
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
-esac
-fi
-
-      else
-        if test $LOCALE_FR_UTF8 != none; then
-          if test "$cross_compiling" = yes
-then :
-  :
-else case e in #(
-  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <locale.h>
-#include <string.h>
-#include <wchar.h>
-int main ()
-{
-  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
-    {
-      const char input[] = "B\303\274\303\237er"; /* "Büßer" */
-      mbstate_t state;
-      wchar_t wc;
-
-      memset (&state, '\0', sizeof (mbstate_t));
-      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
-        if (mbsinit (&state))
-          return 2;
-    }
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"
-then :
-  gl_cv_func_mbrtowc_incomplete_state=yes
-else case e in #(
-  e) gl_cv_func_mbrtowc_incomplete_state=no ;;
-esac
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
-esac
-fi
-
-        fi
-      fi
-     ;;
-esac
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
-printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
-
-
-
-
-     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
-printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
-if test ${gl_cv_func_mbrtowc_sanitycheck+y}
-then :
-  printf %s "(cached) " >&6
-else case e in #(
-  e)
-                  case "$host_os" in
-                    # Guess no on Solaris 8.
-        solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
-                    # Guess yes otherwise.
-        *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
-      esac
-      if test $LOCALE_ZH_CN != none; then
-        if test "$cross_compiling" = yes
-then :
-  :
-else case e in #(
-  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <locale.h>
-#include <stdlib.h>
-#include <string.h>
-#include <wchar.h>
-int main ()
-{
-  /* This fails on Solaris 8:
-     mbrtowc returns 2, and sets wc to 0x00F0.
-     mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
-  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
-    {
-      char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
-      mbstate_t state;
-      wchar_t wc;
-
-      memset (&state, '\0', sizeof (mbstate_t));
-      if (mbrtowc (&wc, input + 3, 6, &state) != 4
-          && mbtowc (&wc, input + 3, 6) == 4)
-        return 2;
-    }
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"
-then :
-  gl_cv_func_mbrtowc_sanitycheck=yes
-else case e in #(
-  e) gl_cv_func_mbrtowc_sanitycheck=no ;;
-esac
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
-esac
-fi
-
-      fi
-     ;;
-esac
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
-printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
-
-    REPLACE_MBSTATE_T=0
-    case "$gl_cv_func_mbrtowc_incomplete_state" in
-      *yes) ;;
-      *) REPLACE_MBSTATE_T=1 ;;
-    esac
-    case "$gl_cv_func_mbrtowc_sanitycheck" in
-      *yes) ;;
-      *) REPLACE_MBSTATE_T=1 ;;
-    esac
-  else
-    REPLACE_MBSTATE_T=1
-  fi
-
-
-
   if test $ac_cv_func_mbrtowc = no; then
     HAVE_MBRTOWC=0
     ac_fn_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
@@ -34035,7 +36594,7 @@ printf "%s\n" "#define MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
   fi
   if test $REPLACE_MBSTATE_T = 1; then
     case "$host_os" in
-      mingw*) LIB_MBRTOWC= ;;
+      mingw*) MBRTOWC_LIB= ;;
       *)
 
 
@@ -34046,8 +36605,8 @@ then :
   printf %s "(cached) " >&6
 else case e in #(
   e) case "$host_os" in
-       cygwin*)
-                                    gl_cv_have_weak="guessing no"
+       cygwin* | mingw*)
+                                             gl_cv_have_weak="guessing no"
          ;;
        *)
          gl_cv_have_weak=no
@@ -34154,15 +36713,17 @@ printf "%s\n" "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
   esac
 
         case "$gl_cv_have_weak" in
-          *yes) LIB_MBRTOWC= ;;
-          *)    LIB_MBRTOWC="$LIBPTHREAD" ;;
+          *yes) MBRTOWC_LIB= ;;
+          *)    MBRTOWC_LIB="$LIBPTHREAD" ;;
         esac
         ;;
     esac
   else
-    LIB_MBRTOWC=
+    MBRTOWC_LIB=
   fi
 
+    LIB_MBRTOWC="$MBRTOWC_LIB"
+
 
 
      if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
@@ -34361,200 +36922,6 @@ printf "%s\n" "#define GNULIB_TEST_MBSCASECMP 1" >>confdefs.h
 
 
 
-
-
-
-
-        if case "$host_os" in
-       mingw*) true ;;
-       *) test $ac_cv_func_mbsinit = yes ;;
-     esac \
-    && test $ac_cv_func_mbrtowc = yes; then
-
-
-
-
-     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
-printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
-if test ${gl_cv_func_mbrtowc_incomplete_state+y}
-then :
-  printf %s "(cached) " >&6
-else case e in #(
-  e)
-                  case "$host_os" in
-                     # Guess no on AIX and OSF/1.
-        aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
-                     # Guess yes otherwise.
-        *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
-      esac
-      if test $LOCALE_JA != none; then
-        if test "$cross_compiling" = yes
-then :
-  :
-else case e in #(
-  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <locale.h>
-#include <string.h>
-#include <wchar.h>
-int main ()
-{
-  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
-    {
-      const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
-      mbstate_t state;
-      wchar_t wc;
-
-      memset (&state, '\0', sizeof (mbstate_t));
-      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
-        if (mbsinit (&state))
-          return 2;
-    }
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"
-then :
-  gl_cv_func_mbrtowc_incomplete_state=yes
-else case e in #(
-  e) gl_cv_func_mbrtowc_incomplete_state=no ;;
-esac
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
-esac
-fi
-
-      else
-        if test $LOCALE_FR_UTF8 != none; then
-          if test "$cross_compiling" = yes
-then :
-  :
-else case e in #(
-  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <locale.h>
-#include <string.h>
-#include <wchar.h>
-int main ()
-{
-  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
-    {
-      const char input[] = "B\303\274\303\237er"; /* "Büßer" */
-      mbstate_t state;
-      wchar_t wc;
-
-      memset (&state, '\0', sizeof (mbstate_t));
-      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
-        if (mbsinit (&state))
-          return 2;
-    }
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"
-then :
-  gl_cv_func_mbrtowc_incomplete_state=yes
-else case e in #(
-  e) gl_cv_func_mbrtowc_incomplete_state=no ;;
-esac
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
-esac
-fi
-
-        fi
-      fi
-     ;;
-esac
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
-printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
-
-
-
-
-     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
-printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
-if test ${gl_cv_func_mbrtowc_sanitycheck+y}
-then :
-  printf %s "(cached) " >&6
-else case e in #(
-  e)
-                  case "$host_os" in
-                    # Guess no on Solaris 8.
-        solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
-                    # Guess yes otherwise.
-        *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
-      esac
-      if test $LOCALE_ZH_CN != none; then
-        if test "$cross_compiling" = yes
-then :
-  :
-else case e in #(
-  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <locale.h>
-#include <stdlib.h>
-#include <string.h>
-#include <wchar.h>
-int main ()
-{
-  /* This fails on Solaris 8:
-     mbrtowc returns 2, and sets wc to 0x00F0.
-     mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
-  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
-    {
-      char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
-      mbstate_t state;
-      wchar_t wc;
-
-      memset (&state, '\0', sizeof (mbstate_t));
-      if (mbrtowc (&wc, input + 3, 6, &state) != 4
-          && mbtowc (&wc, input + 3, 6) == 4)
-        return 2;
-    }
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"
-then :
-  gl_cv_func_mbrtowc_sanitycheck=yes
-else case e in #(
-  e) gl_cv_func_mbrtowc_sanitycheck=no ;;
-esac
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
-esac
-fi
-
-      fi
-     ;;
-esac
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
-printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
-
-    REPLACE_MBSTATE_T=0
-    case "$gl_cv_func_mbrtowc_incomplete_state" in
-      *yes) ;;
-      *) REPLACE_MBSTATE_T=1 ;;
-    esac
-    case "$gl_cv_func_mbrtowc_sanitycheck" in
-      *yes) ;;
-      *) REPLACE_MBSTATE_T=1 ;;
-    esac
-  else
-    REPLACE_MBSTATE_T=1
-  fi
-
-
-
   if test $ac_cv_func_mbsinit = no; then
     HAVE_MBSINIT=0
     ac_fn_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
@@ -34668,200 +37035,6 @@ printf "%s\n" "#define GNULIB_TEST_MBSLEN 1" >>confdefs.h
 
 
 
-
-
-
-
-        if case "$host_os" in
-       mingw*) true ;;
-       *) test $ac_cv_func_mbsinit = yes ;;
-     esac \
-    && test $ac_cv_func_mbrtowc = yes; then
-
-
-
-
-     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
-printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
-if test ${gl_cv_func_mbrtowc_incomplete_state+y}
-then :
-  printf %s "(cached) " >&6
-else case e in #(
-  e)
-                  case "$host_os" in
-                     # Guess no on AIX and OSF/1.
-        aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
-                     # Guess yes otherwise.
-        *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
-      esac
-      if test $LOCALE_JA != none; then
-        if test "$cross_compiling" = yes
-then :
-  :
-else case e in #(
-  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <locale.h>
-#include <string.h>
-#include <wchar.h>
-int main ()
-{
-  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
-    {
-      const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
-      mbstate_t state;
-      wchar_t wc;
-
-      memset (&state, '\0', sizeof (mbstate_t));
-      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
-        if (mbsinit (&state))
-          return 2;
-    }
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"
-then :
-  gl_cv_func_mbrtowc_incomplete_state=yes
-else case e in #(
-  e) gl_cv_func_mbrtowc_incomplete_state=no ;;
-esac
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
-esac
-fi
-
-      else
-        if test $LOCALE_FR_UTF8 != none; then
-          if test "$cross_compiling" = yes
-then :
-  :
-else case e in #(
-  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <locale.h>
-#include <string.h>
-#include <wchar.h>
-int main ()
-{
-  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
-    {
-      const char input[] = "B\303\274\303\237er"; /* "Büßer" */
-      mbstate_t state;
-      wchar_t wc;
-
-      memset (&state, '\0', sizeof (mbstate_t));
-      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
-        if (mbsinit (&state))
-          return 2;
-    }
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"
-then :
-  gl_cv_func_mbrtowc_incomplete_state=yes
-else case e in #(
-  e) gl_cv_func_mbrtowc_incomplete_state=no ;;
-esac
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
-esac
-fi
-
-        fi
-      fi
-     ;;
-esac
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
-printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
-
-
-
-
-     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
-printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
-if test ${gl_cv_func_mbrtowc_sanitycheck+y}
-then :
-  printf %s "(cached) " >&6
-else case e in #(
-  e)
-                  case "$host_os" in
-                    # Guess no on Solaris 8.
-        solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
-                    # Guess yes otherwise.
-        *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
-      esac
-      if test $LOCALE_ZH_CN != none; then
-        if test "$cross_compiling" = yes
-then :
-  :
-else case e in #(
-  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <locale.h>
-#include <stdlib.h>
-#include <string.h>
-#include <wchar.h>
-int main ()
-{
-  /* This fails on Solaris 8:
-     mbrtowc returns 2, and sets wc to 0x00F0.
-     mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
-  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
-    {
-      char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
-      mbstate_t state;
-      wchar_t wc;
-
-      memset (&state, '\0', sizeof (mbstate_t));
-      if (mbrtowc (&wc, input + 3, 6, &state) != 4
-          && mbtowc (&wc, input + 3, 6) == 4)
-        return 2;
-    }
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"
-then :
-  gl_cv_func_mbrtowc_sanitycheck=yes
-else case e in #(
-  e) gl_cv_func_mbrtowc_sanitycheck=no ;;
-esac
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
-esac
-fi
-
-      fi
-     ;;
-esac
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
-printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
-
-    REPLACE_MBSTATE_T=0
-    case "$gl_cv_func_mbrtowc_incomplete_state" in
-      *yes) ;;
-      *) REPLACE_MBSTATE_T=1 ;;
-    esac
-    case "$gl_cv_func_mbrtowc_sanitycheck" in
-      *yes) ;;
-      *) REPLACE_MBSTATE_T=1 ;;
-    esac
-  else
-    REPLACE_MBSTATE_T=1
-  fi
-
-
-
   if test $ac_cv_func_mbsrtowcs = no; then
     HAVE_MBSRTOWCS=0
     ac_fn_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
@@ -35000,6 +37173,77 @@ printf "%s\n" "$gl_cv_func_mbsrtowcs_works" >&6; }
         *yes) ;;
         *) REPLACE_MBSRTOWCS=1 ;;
       esac
+      if test $REPLACE_MBSRTOWCS = 0; then
+
+     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
+printf %s "checking whether the C locale is free of encoding errors... " >&6; }
+if test ${gl_cv_func_mbrtowc_C_locale_sans_EILSEQ+y}
+then :
+  printf %s "(cached) " >&6
+else case e in #(
+  e)
+               gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="$gl_cross_guess_normal"
+
+     if test "$cross_compiling" = yes
+then :
+  case "$host_os" in
+                 # Guess yes on native Windows.
+         mingw*) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="guessing yes" ;;
+       esac
+
+else case e in #(
+  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <limits.h>
+            #include <locale.h>
+            #include <wchar.h>
+
+int
+main (void)
+{
+
+            int i;
+            char *locale = setlocale (LC_ALL, "C");
+            if (! locale)
+              return 2;
+            for (i = CHAR_MIN; i <= CHAR_MAX; i++)
+              {
+                char c = i;
+                wchar_t wc;
+                mbstate_t mbs = { 0, };
+                size_t ss = mbrtowc (&wc, &c, 1, &mbs);
+                if (1 < ss)
+                  return 3;
+              }
+            return 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=yes
+else case e in #(
+  e) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=no ;;
+esac
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
+fi
+
+     ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&5
+printf "%s\n" "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&6; }
+
+        case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in
+          *yes) ;;
+          *) REPLACE_MBSRTOWCS=1 ;;
+        esac
+      fi
     fi
   fi
 
@@ -35085,15 +37329,80 @@ printf "%s\n" "#define GNULIB_TEST_MBSSTR 1" >>confdefs.h
 
 
 
-  ac_fn_c_check_func "$LINENO" "mbtowc" "ac_cv_func_mbtowc"
+
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mbtowc" >&5
+printf %s "checking for mbtowc... " >&6; }
+if test ${gl_cv_onwards_func_mbtowc+y}
+then :
+  printf %s "(cached) " >&6
+else case e in #(
+  e)
+  exec 9>&6 6>/dev/null
+
+       case "$host_os" in
+
+         linux*-android*)
+           ac_fn_check_decl "$LINENO" "mbtowc" "ac_cv_have_decl_mbtowc" "#include <stdlib.h>
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_mbtowc" = xyes
+then :
+
+fi
+           if test $ac_cv_have_decl_mbtowc = yes; then
+             ac_fn_c_check_func "$LINENO" "mbtowc" "ac_cv_func_mbtowc"
+if test "x$ac_cv_func_mbtowc" = xyes
+then :
+
+fi
+
+             if test $ac_cv_func_mbtowc = yes; then
+               gl_cv_onwards_func_mbtowc=yes
+             else
+                                                            gl_cv_onwards_func_mbtowc='future OS version'
+             fi
+           else
+             gl_cv_onwards_func_mbtowc='future OS version'
+           fi
+           ;;
+
+
+         *)
+           ac_fn_c_check_func "$LINENO" "mbtowc" "ac_cv_func_mbtowc"
 if test "x$ac_cv_func_mbtowc" = xyes
 then :
-  printf "%s\n" "#define HAVE_MBTOWC 1" >>confdefs.h
 
 fi
 
+           gl_cv_onwards_func_mbtowc=$ac_cv_func_mbtowc
+           ;;
+
+       esac
+
+  exec 6>&9 9>&-
+
+     ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_mbtowc" >&5
+printf "%s\n" "$gl_cv_onwards_func_mbtowc" >&6; }
+
+  case "$gl_cv_onwards_func_mbtowc" in
+    future*) ac_cv_func_mbtowc=no ;;
+    *)       ac_cv_func_mbtowc=$gl_cv_onwards_func_mbtowc ;;
+  esac
+  if test $ac_cv_func_mbtowc = yes; then
+
+printf "%s\n" "#define HAVE_MBTOWC 1" >>confdefs.h
+
+  fi
+
+
   if test $ac_cv_func_mbtowc = no; then
     HAVE_MBTOWC=0
+    case "$gl_cv_onwards_func_mbtowc" in
+      future*) REPLACE_MBTOWC=1 ;;
+    esac
   else
     if false; then
       REPLACE_MBTOWC=1
@@ -35202,19 +37511,84 @@ printf "%s\n" "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
 
 
 
-  ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
-if test "x$ac_cv_func_mempcpy" = xyes
-then :
-  printf "%s\n" "#define HAVE_MEMPCPY 1" >>confdefs.h
 
-fi
 
-  if test $ac_cv_func_mempcpy = no; then
-    HAVE_MEMPCPY=0
-  fi
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mempcpy" >&5
+printf %s "checking for mempcpy... " >&6; }
+if test ${gl_cv_onwards_func_mempcpy+y}
+then :
+  printf %s "(cached) " >&6
+else case e in #(
+  e)
+  exec 9>&6 6>/dev/null
 
+       case "$host_os" in
+
+         linux*-android*)
+           ac_fn_check_decl "$LINENO" "mempcpy" "ac_cv_have_decl_mempcpy" "#include <string.h>
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_mempcpy" = xyes
+then :
+
+fi
+           if test $ac_cv_have_decl_mempcpy = yes; then
+             ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
+if test "x$ac_cv_func_mempcpy" = xyes
+then :
+
+fi
+
+             if test $ac_cv_func_mempcpy = yes; then
+               gl_cv_onwards_func_mempcpy=yes
+             else
+                                                            gl_cv_onwards_func_mempcpy='future OS version'
+             fi
+           else
+             gl_cv_onwards_func_mempcpy='future OS version'
+           fi
+           ;;
+
+
+         *)
+           ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
+if test "x$ac_cv_func_mempcpy" = xyes
+then :
+
+fi
+
+           gl_cv_onwards_func_mempcpy=$ac_cv_func_mempcpy
+           ;;
+
+       esac
+
+  exec 6>&9 9>&-
+
+     ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_mempcpy" >&5
+printf "%s\n" "$gl_cv_onwards_func_mempcpy" >&6; }
+
+  case "$gl_cv_onwards_func_mempcpy" in
+    future*) ac_cv_func_mempcpy=no ;;
+    *)       ac_cv_func_mempcpy=$gl_cv_onwards_func_mempcpy ;;
+  esac
+  if test $ac_cv_func_mempcpy = yes; then
+
+printf "%s\n" "#define HAVE_MEMPCPY 1" >>confdefs.h
 
-     if test $HAVE_MEMPCPY = 0; then
+  fi
+
+
+  if test $ac_cv_func_mempcpy = no; then
+    HAVE_MEMPCPY=0
+    case "$gl_cv_onwards_func_mempcpy" in
+      future*) REPLACE_MEMPCPY=1 ;;
+    esac
+  fi
+
+
+     if test $HAVE_MEMPCPY = 0 || test $REPLACE_MEMPCPY = 1; then
   GL_COND_OBJ_MEMPCPY_TRUE=
   GL_COND_OBJ_MEMPCPY_FALSE='#'
 else
@@ -35362,6 +37736,74 @@ printf "%s\n" "#define GNULIB_MSVC_NOTHROW 1" >>confdefs.h
 
 
 
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo" >&5
+printf %s "checking for nl_langinfo... " >&6; }
+if test ${gl_cv_onwards_func_nl_langinfo+y}
+then :
+  printf %s "(cached) " >&6
+else case e in #(
+  e)
+  exec 9>&6 6>/dev/null
+
+       case "$host_os" in
+
+         linux*-android*)
+           ac_fn_check_decl "$LINENO" "nl_langinfo" "ac_cv_have_decl_nl_langinfo" "#include <langinfo.h>
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_nl_langinfo" = xyes
+then :
+
+fi
+           if test $ac_cv_have_decl_nl_langinfo = yes; then
+             ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
+if test "x$ac_cv_func_nl_langinfo" = xyes
+then :
+
+fi
+
+             if test $ac_cv_func_nl_langinfo = yes; then
+               gl_cv_onwards_func_nl_langinfo=yes
+             else
+                                                            gl_cv_onwards_func_nl_langinfo='future OS version'
+             fi
+           else
+             gl_cv_onwards_func_nl_langinfo='future OS version'
+           fi
+           ;;
+
+
+         *)
+           ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
+if test "x$ac_cv_func_nl_langinfo" = xyes
+then :
+
+fi
+
+           gl_cv_onwards_func_nl_langinfo=$ac_cv_func_nl_langinfo
+           ;;
+
+       esac
+
+  exec 6>&9 9>&-
+
+     ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_nl_langinfo" >&5
+printf "%s\n" "$gl_cv_onwards_func_nl_langinfo" >&6; }
+
+  case "$gl_cv_onwards_func_nl_langinfo" in
+    future*) ac_cv_func_nl_langinfo=no ;;
+    *)       ac_cv_func_nl_langinfo=$gl_cv_onwards_func_nl_langinfo ;;
+  esac
+  if test $ac_cv_func_nl_langinfo = yes; then
+
+printf "%s\n" "#define HAVE_NL_LANGINFO 1" >>confdefs.h
+
+  fi
+
+
+
 
 
 
@@ -35444,9 +37886,12 @@ printf "%s\n" "#define REPLACE_NL_LANGINFO 1" >>confdefs.h
     fi
   else
     HAVE_NL_LANGINFO=0
+    case "$gl_cv_onwards_func_nl_langinfo" in
+      future*) REPLACE_NL_LANGINFO=1 ;;
+    esac
   fi
   if test $HAVE_NL_LANGINFO = 0 || test $HAVE_LANGINFO_CODESET = 0; then
-    LIB_NL_LANGINFO="$LIB_SETLOCALE_NULL"
+    LIB_NL_LANGINFO="$SETLOCALE_NULL_LIB"
   else
     LIB_NL_LANGINFO=
   fi
@@ -35891,7 +38336,14 @@ fi
 
   if test $ac_cv_func_opendir = no; then
     HAVE_OPENDIR=0
-  fi
+  else
+
+    if test $DIR_HAS_FD_MEMBER = 0; then
+      REPLACE_OPENDIR=1
+    fi
+            case $host_os in
+      os2*) REPLACE_OPENDIR=1 ;;
+    esac
 
 
 
@@ -35900,16 +38352,11 @@ fi
     HAVE_FCHDIR=0
   fi
 
-    if test $HAVE_FCHDIR = 0; then
-      if test $HAVE_OPENDIR = 1; then
+      if test $HAVE_FCHDIR = 0; then
         REPLACE_OPENDIR=1
       fi
-    fi
 
-      case $host_os,$HAVE_OPENDIR in
-    os2*,1)
-      REPLACE_OPENDIR=1;;
-  esac
+  fi
 
 
      if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
@@ -36251,10 +38698,15 @@ fi
 
   if test $ac_cv_func_readdir = no; then
     HAVE_READDIR=0
+  else
+
+    if test $DIR_HAS_FD_MEMBER = 0; then
+      REPLACE_READDIR=1
+    fi
   fi
 
 
-     if test $HAVE_READDIR = 0; then
+     if test $HAVE_READDIR = 0 || test $REPLACE_READDIR = 1; then
   GL_COND_OBJ_READDIR_TRUE=
   GL_COND_OBJ_READDIR_FALSE='#'
 else
@@ -36302,7 +38754,7 @@ then :
   case "$host_os" in
           # Guess yes on platforms where we know the result.
           *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
-          | gnu* | *-musl* | midnightbsd* \
+          | gnu* | *-musl* | midipix* | midnightbsd* \
           | hpux* | solaris* | cygwin* | mingw* | msys* )
             ac_cv_func_realloc_0_nonnull="guessing yes" ;;
           # If we don't know, obey --enable-cross-guesses.
@@ -36426,15 +38878,80 @@ printf "%s\n" "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
 
 
 
-  ac_fn_c_check_func "$LINENO" "reallocarray" "ac_cv_func_reallocarray"
+
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for reallocarray" >&5
+printf %s "checking for reallocarray... " >&6; }
+if test ${gl_cv_onwards_func_reallocarray+y}
+then :
+  printf %s "(cached) " >&6
+else case e in #(
+  e)
+  exec 9>&6 6>/dev/null
+
+       case "$host_os" in
+
+         linux*-android*)
+           ac_fn_check_decl "$LINENO" "reallocarray" "ac_cv_have_decl_reallocarray" "#include <stdlib.h>
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_reallocarray" = xyes
+then :
+
+fi
+           if test $ac_cv_have_decl_reallocarray = yes; then
+             ac_fn_c_check_func "$LINENO" "reallocarray" "ac_cv_func_reallocarray"
 if test "x$ac_cv_func_reallocarray" = xyes
 then :
-  printf "%s\n" "#define HAVE_REALLOCARRAY 1" >>confdefs.h
 
 fi
 
+             if test $ac_cv_func_reallocarray = yes; then
+               gl_cv_onwards_func_reallocarray=yes
+             else
+                                                            gl_cv_onwards_func_reallocarray='future OS version'
+             fi
+           else
+             gl_cv_onwards_func_reallocarray='future OS version'
+           fi
+           ;;
+
+
+         *)
+           ac_fn_c_check_func "$LINENO" "reallocarray" "ac_cv_func_reallocarray"
+if test "x$ac_cv_func_reallocarray" = xyes
+then :
+
+fi
+
+           gl_cv_onwards_func_reallocarray=$ac_cv_func_reallocarray
+           ;;
+
+       esac
+
+  exec 6>&9 9>&-
+
+     ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_reallocarray" >&5
+printf "%s\n" "$gl_cv_onwards_func_reallocarray" >&6; }
+
+  case "$gl_cv_onwards_func_reallocarray" in
+    future*) ac_cv_func_reallocarray=no ;;
+    *)       ac_cv_func_reallocarray=$gl_cv_onwards_func_reallocarray ;;
+  esac
+  if test $ac_cv_func_reallocarray = yes; then
+
+printf "%s\n" "#define HAVE_REALLOCARRAY 1" >>confdefs.h
+
+  fi
+
+
   if test "$ac_cv_func_reallocarray" = no; then
     HAVE_REALLOCARRAY=0
+    case "$gl_cv_onwards_func_reallocarray" in
+      future*) REPLACE_REALLOCARRAY=1 ;;
+    esac
   elif test "$gl_cv_malloc_ptrdiff" = no; then
     REPLACE_REALLOCARRAY=1
   fi
@@ -36958,9 +39475,33 @@ then :
   printf %s "(cached) " >&6
 else case e in #(
   e) case "$host_os" in
-       # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
-       *-musl* | darwin* | freebsd* | midnightbsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
+       # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku.
+       *-musl* | midipix* | darwin* | freebsd* | midnightbsd* | netbsd* | openbsd* | aix* | haiku*)
          gl_cv_func_setlocale_null_all_mtsafe=no ;;
+       # Guess no on Cygwin < 3.4.6.
+       cygwin*)
+         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#if defined __CYGWIN__
+ #include <cygwin/version.h>
+ #if CYGWIN_VERSION_DLL_COMBINED >= CYGWIN_VERSION_DLL_MAKE_COMBINED (3004, 6)
+  Lucky user
+ #endif
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP_TRADITIONAL "Lucky user" >/dev/null 2>&1
+then :
+  gl_cv_func_setlocale_null_all_mtsafe=yes
+else case e in #(
+  e) gl_cv_func_setlocale_null_all_mtsafe=no ;;
+esac
+fi
+rm -rf conftest*
+
+        ;;
        # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
        *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
          gl_cv_func_setlocale_null_all_mtsafe=yes ;;
@@ -37000,7 +39541,7 @@ else case e in #(
        openbsd* | aix*)
          gl_cv_func_setlocale_null_one_mtsafe=no ;;
        # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
-       *-gnu* | gnu* | *-musl* | darwin* | freebsd* | midnightbsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
+       *-gnu* | gnu* | *-musl* | midipix* | darwin* | freebsd* | midnightbsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
          gl_cv_func_setlocale_null_one_mtsafe=yes ;;
        # If we don't know, obey --enable-cross-guesses.
        *)
@@ -37029,7 +39570,7 @@ printf "%s\n" "#define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE" >>c
 
     if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
     case "$host_os" in
-      mingw*) LIB_SETLOCALE_NULL= ;;
+      mingw*) SETLOCALE_NULL_LIB= ;;
       *)
 
 
@@ -37040,8 +39581,8 @@ then :
   printf %s "(cached) " >&6
 else case e in #(
   e) case "$host_os" in
-       cygwin*)
-                                    gl_cv_have_weak="guessing no"
+       cygwin* | mingw*)
+                                             gl_cv_have_weak="guessing no"
          ;;
        *)
          gl_cv_have_weak=no
@@ -37148,15 +39689,17 @@ printf "%s\n" "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
   esac
 
         case "$gl_cv_have_weak" in
-          *yes) LIB_SETLOCALE_NULL= ;;
-          *)    LIB_SETLOCALE_NULL="$LIBPTHREAD" ;;
+          *yes) SETLOCALE_NULL_LIB= ;;
+          *)    SETLOCALE_NULL_LIB="$LIBPTHREAD" ;;
         esac
         ;;
     esac
   else
-    LIB_SETLOCALE_NULL=
+    SETLOCALE_NULL_LIB=
   fi
 
+    LIB_SETLOCALE_NULL="$SETLOCALE_NULL_LIB"
+
 
 
      if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
@@ -37810,6 +40353,8 @@ then :
   case "$host_os" in
                                # Guess yes on Linux systems.
               linux-* | linux) gl_cv_func_stat_file_slash="guessing yes" ;;
+                               # Guess yes on systems that emulate the Linux system calls.
+              midipix*)        gl_cv_func_stat_file_slash="guessing yes" ;;
                                # Guess yes on glibc systems.
               *-gnu* | gnu*)   gl_cv_func_stat_file_slash="guessing yes" ;;
                                # If we don't know, obey --enable-cross-guesses.
@@ -38066,107 +40611,6 @@ fi
 
 
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
-printf %s "checking for working stdalign.h... " >&6; }
-if test ${gl_cv_header_working_stdalign_h+y}
-then :
-  printf %s "(cached) " >&6
-else case e in #(
-  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdint.h>
-            #include <stdalign.h>
-            #include <stddef.h>
-
-            /* Test that alignof yields a result consistent with offsetof.
-               This catches GCC bug 52023
-               <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>.  */
-            #ifdef __cplusplus
-               template <class t> struct alignof_helper { char a; t b; };
-            # define ao(type) offsetof (alignof_helper<type>, b)
-            #else
-            # define ao(type) offsetof (struct { char a; type b; }, b)
-            #endif
-            char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
-            char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
-            char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
-
-            /* Test _Alignas only on platforms where gnulib can help.  */
-            #if \
-                ((defined __cplusplus && 201103 <= __cplusplus) \
-                 || (__TINYC__ && defined __attribute__) \
-                 || (defined __APPLE__ && defined __MACH__ \
-                     ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
-                     : __GNUC__) \
-                 || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \
-                 || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__ \
-                 || 1300 <= _MSC_VER)
-              struct alignas_test { char c; char alignas (8) alignas_8; };
-              char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
-                                ? 1 : -1];
-            #endif
-
-int
-main (void)
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-  gl_cv_header_working_stdalign_h=yes
-else case e in #(
-  e) gl_cv_header_working_stdalign_h=no ;;
-esac
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
-esac
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
-printf "%s\n" "$gl_cv_header_working_stdalign_h" >&6; }
-
-  if test $gl_cv_header_working_stdalign_h = yes; then
-    GL_GENERATE_STDALIGN_H=false
-  else
-    GL_GENERATE_STDALIGN_H=true
-  fi
-
-
-
-
-
-  case "$GL_GENERATE_STDALIGN_H" in
-    false) STDALIGN_H='' ;;
-    true)
-                  if test -z "$STDALIGN_H"; then
-        STDALIGN_H="${gl_source_base_prefix}stdalign.h"
-      fi
-      ;;
-    *) echo "*** GL_GENERATE_STDALIGN_H is not set correctly" 1>&2; exit 1 ;;
-  esac
-
-
-     if $GL_GENERATE_STDALIGN_H; then
-  GL_GENERATE_STDALIGN_H_TRUE=
-  GL_GENERATE_STDALIGN_H_FALSE='#'
-else
-  GL_GENERATE_STDALIGN_H_TRUE='#'
-  GL_GENERATE_STDALIGN_H_FALSE=
-fi
-:
-    if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
-    GL_GENERATE_STDALIGN_H_TRUE='#'
-    GL_GENERATE_STDALIGN_H_FALSE='#'
-  fi
-
-
-
-
-
-
-
   GL_GENERATE_STDARG_H=false
   NEXT_STDARG_H='<stdarg.h>'
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
@@ -38388,59 +40832,75 @@ fi
 
 
 
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bool, true, false" >&5
+printf %s "checking for bool, true, false... " >&6; }
+if test ${gl_cv_c_bool+y}
+then :
+  printf %s "(cached) " >&6
+else case e in #(
+  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+          #if true == false
+           #error "true == false"
+          #endif
+          extern bool b;
+          bool b = true == false;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  gl_cv_c_bool=yes
+else case e in #(
+  e) gl_cv_c_bool=no ;;
+esac
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_bool" >&5
+printf "%s\n" "$gl_cv_c_bool" >&6; }
+  if test "$gl_cv_c_bool" = yes; then
 
+printf "%s\n" "#define HAVE_C_BOOL 1" >>confdefs.h
 
-          if test "$ac_cv_header_stdbool_h" = yes; then
-    case "$host_os" in
-      solaris*)
-        if test -z "$GCC"; then
-          GL_GENERATE_STDBOOL_H=true
-        else
-          GL_GENERATE_STDBOOL_H=false
-        fi
-        ;;
-      *)
-        GL_GENERATE_STDBOOL_H=false
-        ;;
-    esac
-  else
-    GL_GENERATE_STDBOOL_H=true
   fi
 
-  if test "$ac_cv_type__Bool" = yes; then
-    HAVE__BOOL=1
-  else
-    HAVE__BOOL=0
-  fi
 
 
 
 
 
+  if test $ac_cv_header_stdckdint_h = yes; then
+    GL_GENERATE_STDCKDINT_H=false
+  else
+    GL_GENERATE_STDCKDINT_H=true
+  fi
+
+
+
 
-  case "$GL_GENERATE_STDBOOL_H" in
-    false) STDBOOL_H='' ;;
+  case "$GL_GENERATE_STDCKDINT_H" in
+    false) STDCKDINT_H='' ;;
     true)
-                  if test -z "$STDBOOL_H"; then
-        STDBOOL_H="${gl_source_base_prefix}stdbool.h"
+                  if test -z "$STDCKDINT_H"; then
+        STDCKDINT_H="${gl_source_base_prefix}stdckdint.h"
       fi
       ;;
-    *) echo "*** GL_GENERATE_STDBOOL_H is not set correctly" 1>&2; exit 1 ;;
+    *) echo "*** GL_GENERATE_STDCKDINT_H is not set correctly" 1>&2; exit 1 ;;
   esac
 
 
-     if $GL_GENERATE_STDBOOL_H; then
-  GL_GENERATE_STDBOOL_H_TRUE=
-  GL_GENERATE_STDBOOL_H_FALSE='#'
+     if $GL_GENERATE_STDCKDINT_H; then
+  GL_GENERATE_STDCKDINT_H_TRUE=
+  GL_GENERATE_STDCKDINT_H_FALSE='#'
 else
-  GL_GENERATE_STDBOOL_H_TRUE='#'
-  GL_GENERATE_STDBOOL_H_FALSE=
+  GL_GENERATE_STDCKDINT_H_TRUE='#'
+  GL_GENERATE_STDCKDINT_H_FALSE=
 fi
 :
-    if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
-    GL_GENERATE_STDBOOL_H_TRUE='#'
-    GL_GENERATE_STDBOOL_H_FALSE='#'
+    if test -z "${GL_GENERATE_STDCKDINT_H_TRUE}" && test -z "${GL_GENERATE_STDCKDINT_H_FALSE}"; then
+    GL_GENERATE_STDCKDINT_H_TRUE='#'
+    GL_GENERATE_STDCKDINT_H_FALSE='#'
   fi
 
 
@@ -38934,19 +41394,84 @@ printf "%s\n" "#define GNULIB_TEST_FWRITE 1" >>confdefs.h
 
 
 
-  ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy"
+
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stpcpy" >&5
+printf %s "checking for stpcpy... " >&6; }
+if test ${gl_cv_onwards_func_stpcpy+y}
+then :
+  printf %s "(cached) " >&6
+else case e in #(
+  e)
+  exec 9>&6 6>/dev/null
+
+       case "$host_os" in
+
+         linux*-android*)
+           ac_fn_check_decl "$LINENO" "stpcpy" "ac_cv_have_decl_stpcpy" "#include <string.h>
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_stpcpy" = xyes
+then :
+
+fi
+           if test $ac_cv_have_decl_stpcpy = yes; then
+             ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy"
 if test "x$ac_cv_func_stpcpy" = xyes
 then :
-  printf "%s\n" "#define HAVE_STPCPY 1" >>confdefs.h
 
 fi
 
+             if test $ac_cv_func_stpcpy = yes; then
+               gl_cv_onwards_func_stpcpy=yes
+             else
+                                                            gl_cv_onwards_func_stpcpy='future OS version'
+             fi
+           else
+             gl_cv_onwards_func_stpcpy='future OS version'
+           fi
+           ;;
+
+
+         *)
+           ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy"
+if test "x$ac_cv_func_stpcpy" = xyes
+then :
+
+fi
+
+           gl_cv_onwards_func_stpcpy=$ac_cv_func_stpcpy
+           ;;
+
+       esac
+
+  exec 6>&9 9>&-
+
+     ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_stpcpy" >&5
+printf "%s\n" "$gl_cv_onwards_func_stpcpy" >&6; }
+
+  case "$gl_cv_onwards_func_stpcpy" in
+    future*) ac_cv_func_stpcpy=no ;;
+    *)       ac_cv_func_stpcpy=$gl_cv_onwards_func_stpcpy ;;
+  esac
+  if test $ac_cv_func_stpcpy = yes; then
+
+printf "%s\n" "#define HAVE_STPCPY 1" >>confdefs.h
+
+  fi
+
+
   if test $ac_cv_func_stpcpy = no; then
     HAVE_STPCPY=0
+    case "$gl_cv_onwards_func_stpcpy" in
+      future*) REPLACE_STPCPY=1 ;;
+    esac
   fi
 
 
-     if test $HAVE_STPCPY = 0; then
+     if test $HAVE_STPCPY = 0 || test $REPLACE_STPCPY = 1; then
   GL_COND_OBJ_STPCPY_TRUE=
   GL_COND_OBJ_STPCPY_FALSE='#'
 else
@@ -39061,12 +41586,12 @@ else case e in #(
   e) if test "$cross_compiling" = yes
 then :
   case "$host_os" in
-                          # Guess yes on glibc systems.
-           *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;;
-                          # Guess yes on musl systems.
-           *-musl*)       gl_cv_func_working_strerror="guessing yes" ;;
-                          # If we don't know, obey --enable-cross-guesses.
-           *)             gl_cv_func_working_strerror="$gl_cross_guess_normal" ;;
+                               # Guess yes on glibc systems.
+           *-gnu* | gnu*)      gl_cv_func_working_strerror="guessing yes" ;;
+                               # Guess yes on musl systems.
+           *-musl* | midipix*) gl_cv_func_working_strerror="guessing yes" ;;
+                               # If we don't know, obey --enable-cross-guesses.
+           *)                  gl_cv_func_working_strerror="$gl_cross_guess_normal" ;;
          esac
 
 else case e in #(
@@ -39750,9 +42275,13 @@ else case e in #(
   e) if test "$cross_compiling" = yes
 then :
   case "$host_os" in
-                    # Guess no on native Windows.
-            mingw*) gl_cv_func_strtoll_works="guessing no" ;;
-            *)      gl_cv_func_strtoll_works="$gl_cross_guess_normal" ;;
+                                # Guess no on native Windows.
+            mingw*)             gl_cv_func_strtoll_works="guessing no" ;;
+                                # Guess no on glibc systems.
+            *-gnu* | gnu*)      gl_cv_func_strtoll_works="guessing no" ;;
+                                # Guess no on musl systems.
+            *-musl* | midipix*) gl_cv_func_strtoll_works="guessing no" ;;
+            *)                  gl_cv_func_strtoll_works="$gl_cross_guess_normal" ;;
           esac
 
 else case e in #(
@@ -39771,6 +42300,13 @@ int result = 0;
                 if (term != input + 1)
                   result |= 1;
               }
+              /* This test fails on pre-C23 platforms.  */
+              {
+                const char input[] = "0b1";
+                (void) strtoll (input, &term, 2);
+                if (term != input + 3)
+                  result |= 2;
+              }
               return result;
 
   ;
@@ -39863,9 +42399,13 @@ else case e in #(
   e) if test "$cross_compiling" = yes
 then :
   case "$host_os" in
-                    # Guess no on native Windows.
-            mingw*) gl_cv_func_strtoull_works="guessing no" ;;
-            *)      gl_cv_func_strtoull_works="$gl_cross_guess_normal" ;;
+                                # Guess no on native Windows.
+            mingw*)             gl_cv_func_strtoull_works="guessing no" ;;
+                                # Guess no on glibc systems.
+            *-gnu* | gnu*)      gl_cv_func_strtoull_works="guessing no" ;;
+                                # Guess no on musl systems.
+            *-musl* | midipix*) gl_cv_func_strtoull_works="guessing no" ;;
+            *)                  gl_cv_func_strtoull_works="$gl_cross_guess_normal" ;;
           esac
 
 else case e in #(
@@ -39884,6 +42424,13 @@ int result = 0;
                 if (term != input + 1)
                   result |= 1;
               }
+              /* This test fails on pre-C23 platforms.  */
+              {
+                const char input[] = "0b1";
+                (void) strtoull (input, &term, 2);
+                if (term != input + 3)
+                  result |= 2;
+              }
               return result;
 
   ;
@@ -40225,11 +42772,11 @@ fi
 
 
 
-            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
-            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
-                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
-                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
-                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 11
+            test $LIBUNISTRING_VERSION_MAJOR -lt 1 \
+            || { test $LIBUNISTRING_VERSION_MAJOR -eq 1 \
+                 && { test $LIBUNISTRING_VERSION_MINOR -lt 1 \
+                      || { test $LIBUNISTRING_VERSION_MINOR -eq 1 \
+                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
                          }
                     }
                }
@@ -40284,13 +42831,12 @@ then :
 else case e in #(
   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#ifdef __STDC_NO_VLA__
-	defined
+	#ifndef __STDC_NO_VLA__
+	#error __STDC_NO_VLA__ not defined
 	#endif
 
 _ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP_TRADITIONAL "defined" >/dev/null 2>&1
+if ac_fn_c_try_compile "$LINENO"
 then :
   ac_cv_c_vararrays='no: __STDC_NO_VLA__ is defined'
 else case e in #(
@@ -40344,8 +42890,7 @@ fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
 esac
 fi
-rm -rf conftest*
- ;;
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
 esac
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_vararrays" >&5
@@ -40427,200 +42972,6 @@ fi
 
 
 
-
-
-
-
-        if case "$host_os" in
-       mingw*) true ;;
-       *) test $ac_cv_func_mbsinit = yes ;;
-     esac \
-    && test $ac_cv_func_mbrtowc = yes; then
-
-
-
-
-     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
-printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
-if test ${gl_cv_func_mbrtowc_incomplete_state+y}
-then :
-  printf %s "(cached) " >&6
-else case e in #(
-  e)
-                  case "$host_os" in
-                     # Guess no on AIX and OSF/1.
-        aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
-                     # Guess yes otherwise.
-        *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
-      esac
-      if test $LOCALE_JA != none; then
-        if test "$cross_compiling" = yes
-then :
-  :
-else case e in #(
-  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <locale.h>
-#include <string.h>
-#include <wchar.h>
-int main ()
-{
-  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
-    {
-      const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
-      mbstate_t state;
-      wchar_t wc;
-
-      memset (&state, '\0', sizeof (mbstate_t));
-      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
-        if (mbsinit (&state))
-          return 2;
-    }
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"
-then :
-  gl_cv_func_mbrtowc_incomplete_state=yes
-else case e in #(
-  e) gl_cv_func_mbrtowc_incomplete_state=no ;;
-esac
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
-esac
-fi
-
-      else
-        if test $LOCALE_FR_UTF8 != none; then
-          if test "$cross_compiling" = yes
-then :
-  :
-else case e in #(
-  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <locale.h>
-#include <string.h>
-#include <wchar.h>
-int main ()
-{
-  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
-    {
-      const char input[] = "B\303\274\303\237er"; /* "Büßer" */
-      mbstate_t state;
-      wchar_t wc;
-
-      memset (&state, '\0', sizeof (mbstate_t));
-      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
-        if (mbsinit (&state))
-          return 2;
-    }
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"
-then :
-  gl_cv_func_mbrtowc_incomplete_state=yes
-else case e in #(
-  e) gl_cv_func_mbrtowc_incomplete_state=no ;;
-esac
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
-esac
-fi
-
-        fi
-      fi
-     ;;
-esac
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
-printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
-
-
-
-
-     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
-printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
-if test ${gl_cv_func_mbrtowc_sanitycheck+y}
-then :
-  printf %s "(cached) " >&6
-else case e in #(
-  e)
-                  case "$host_os" in
-                    # Guess no on Solaris 8.
-        solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
-                    # Guess yes otherwise.
-        *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
-      esac
-      if test $LOCALE_ZH_CN != none; then
-        if test "$cross_compiling" = yes
-then :
-  :
-else case e in #(
-  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <locale.h>
-#include <stdlib.h>
-#include <string.h>
-#include <wchar.h>
-int main ()
-{
-  /* This fails on Solaris 8:
-     mbrtowc returns 2, and sets wc to 0x00F0.
-     mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
-  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
-    {
-      char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
-      mbstate_t state;
-      wchar_t wc;
-
-      memset (&state, '\0', sizeof (mbstate_t));
-      if (mbrtowc (&wc, input + 3, 6, &state) != 4
-          && mbtowc (&wc, input + 3, 6) == 4)
-        return 2;
-    }
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"
-then :
-  gl_cv_func_mbrtowc_sanitycheck=yes
-else case e in #(
-  e) gl_cv_func_mbrtowc_sanitycheck=no ;;
-esac
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
-esac
-fi
-
-      fi
-     ;;
-esac
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
-printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
-
-    REPLACE_MBSTATE_T=0
-    case "$gl_cv_func_mbrtowc_incomplete_state" in
-      *yes) ;;
-      *) REPLACE_MBSTATE_T=1 ;;
-    esac
-    case "$gl_cv_func_mbrtowc_sanitycheck" in
-      *yes) ;;
-      *) REPLACE_MBSTATE_T=1 ;;
-    esac
-  else
-    REPLACE_MBSTATE_T=1
-  fi
-
-
-
   if test $ac_cv_func_wcrtomb = no; then
     HAVE_WCRTOMB=0
     ac_fn_check_decl "$LINENO" "wcrtomb" "ac_cv_have_decl_wcrtomb" "
@@ -41143,13 +43494,13 @@ else case e in #(
 then :
 
            case "$host_os" in
-                            # Guess yes on glibc systems.
-             *-gnu* | gnu*) gl_cv_func_wcwidth_works="guessing yes";;
-                            # Guess yes on musl systems.
-             *-musl*)       gl_cv_func_wcwidth_works="guessing yes";;
-                            # Guess yes on AIX 7 systems.
-             aix[7-9]*)     gl_cv_func_wcwidth_works="guessing yes";;
-             *)             gl_cv_func_wcwidth_works="$gl_cross_guess_normal";;
+                                 # Guess yes on glibc systems.
+             *-gnu* | gnu*)      gl_cv_func_wcwidth_works="guessing yes";;
+                                 # Guess yes on musl systems.
+             *-musl* | midipix*) gl_cv_func_wcwidth_works="guessing yes";;
+                                 # Guess yes on AIX 7 systems.
+             aix[7-9]*)          gl_cv_func_wcwidth_works="guessing yes";;
+             *)                  gl_cv_func_wcwidth_works="$gl_cross_guess_normal";;
            esac
 
 else case e in #(
@@ -41413,12 +43764,83 @@ printf "%s\n" "#define GNULIB_TEST_WMEMCHR 1" >>confdefs.h
 
 
 
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wmempcpy" >&5
+printf %s "checking for wmempcpy... " >&6; }
+if test ${gl_cv_onwards_func_wmempcpy+y}
+then :
+  printf %s "(cached) " >&6
+else case e in #(
+  e)
+  exec 9>&6 6>/dev/null
+
+       case "$host_os" in
+
+         linux*-android*)
+           ac_fn_check_decl "$LINENO" "wmempcpy" "ac_cv_have_decl_wmempcpy" "#include <wchar.h>
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_wmempcpy" = xyes
+then :
+
+fi
+           if test $ac_cv_have_decl_wmempcpy = yes; then
+             ac_fn_c_check_func "$LINENO" "wmempcpy" "ac_cv_func_wmempcpy"
+if test "x$ac_cv_func_wmempcpy" = xyes
+then :
+
+fi
+
+             if test $ac_cv_func_wmempcpy = yes; then
+               gl_cv_onwards_func_wmempcpy=yes
+             else
+                                                            gl_cv_onwards_func_wmempcpy='future OS version'
+             fi
+           else
+             gl_cv_onwards_func_wmempcpy='future OS version'
+           fi
+           ;;
+
+
+         *)
+           ac_fn_c_check_func "$LINENO" "wmempcpy" "ac_cv_func_wmempcpy"
+if test "x$ac_cv_func_wmempcpy" = xyes
+then :
+
+fi
+
+           gl_cv_onwards_func_wmempcpy=$ac_cv_func_wmempcpy
+           ;;
+
+       esac
+
+  exec 6>&9 9>&-
+
+     ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_wmempcpy" >&5
+printf "%s\n" "$gl_cv_onwards_func_wmempcpy" >&6; }
+
+  case "$gl_cv_onwards_func_wmempcpy" in
+    future*) ac_cv_func_wmempcpy=no ;;
+    *)       ac_cv_func_wmempcpy=$gl_cv_onwards_func_wmempcpy ;;
+  esac
+  if test $ac_cv_func_wmempcpy = yes; then
+
+printf "%s\n" "#define HAVE_WMEMPCPY 1" >>confdefs.h
+
+  fi
+
+
   if test $ac_cv_func_wmempcpy = no; then
     HAVE_WMEMPCPY=0
+    case "$gl_cv_onwards_func_wmempcpy" in
+      future*) REPLACE_WMEMPCPY=1 ;;
+    esac
   fi
 
 
-     if test $HAVE_WMEMPCPY = 0; then
+     if test $HAVE_WMEMPCPY = 0 || test $REPLACE_WMEMPCPY = 1; then
   GL_COND_OBJ_WMEMPCPY_TRUE=
   GL_COND_OBJ_WMEMPCPY_FALSE='#'
 else
@@ -41593,645 +44015,98 @@ printf "%s\n" "#define GNULIB_TEST_BIND 1" >>confdefs.h
 
 
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
-printf %s "checking for a traditional french locale... " >&6; }
-if test ${gt_cv_locale_fr+y}
-then :
-  printf %s "(cached) " >&6
-else case e in #(
-  e)
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-#include <locale.h>
-#include <time.h>
-#if HAVE_LANGINFO_CODESET
-# include <langinfo.h>
-#endif
-#include <stdlib.h>
-#include <string.h>
-struct tm t;
-char buf[16];
-int main () {
-  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
-     imitates locale dependent behaviour by looking at the environment
-     variables, and all locales use the UTF-8 encoding.  */
-#if defined __BEOS__ || defined __HAIKU__
-  return 1;
-#else
-  /* Check whether the given locale name is recognized by the system.  */
-# if defined _WIN32 && !defined __CYGWIN__
-  /* On native Windows, setlocale(category, "") looks at the system settings,
-     not at the environment variables.  Also, when an encoding suffix such
-     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
-     category of the locale to "C".  */
-  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
-      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
-    return 1;
-# else
-  if (setlocale (LC_ALL, "") == NULL) return 1;
-# endif
-  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
-     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
-     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
-     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
-     some unit tests fail.
-     On MirBSD 10, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
-# if HAVE_LANGINFO_CODESET
-  {
-    const char *cs = nl_langinfo (CODESET);
-    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
-        || strcmp (cs, "UTF-8") == 0)
-      return 1;
-  }
-# endif
-# ifdef __CYGWIN__
-  /* On Cygwin, avoid locale names without encoding suffix, because the
-     locale_charset() function relies on the encoding suffix.  Note that
-     LC_ALL is set on the command line.  */
-  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-# endif
-  /* Check whether in the abbreviation of the second month, the second
-     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
-     one byte long. This excludes the UTF-8 encoding.  */
-  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
-  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
-# if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
-  /* Check whether the decimal separator is a comma.
-     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
-     are nl_langinfo(RADIXCHAR) are both ".".  */
-  if (localeconv () ->decimal_point[0] != ',') return 1;
-# endif
-  return 0;
-#endif
-}
 
-_ACEOF
-    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && test -s conftest$ac_exeext; then
-      case "$host_os" in
-        # Handle native Windows specially, because there setlocale() interprets
-        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
-        # "fr" or "fra" as "French" or "French_France.1252",
-        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
-        # "ja" as "Japanese" or "Japanese_Japan.932",
-        # and similar.
-        mingw*)
-          # Test for the native Windows locale name.
-          if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_fr=French_France.1252
-          else
-            # None found.
-            gt_cv_locale_fr=none
-          fi
-          ;;
-        *)
-          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
-          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
-          # configure script would override the LC_ALL setting. Likewise for
-          # LC_CTYPE, which is also set at the beginning of the configure script.
-          # Test for the usual locale name.
-          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_fr=fr_FR
-          else
-            # Test for the locale name with explicit encoding suffix.
-            if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-              gt_cv_locale_fr=fr_FR.ISO-8859-1
-            else
-              # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
-              if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                gt_cv_locale_fr=fr_FR.ISO8859-1
-              else
-                # Test for the HP-UX locale name.
-                if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                  gt_cv_locale_fr=fr_FR.iso88591
-                else
-                  # Test for the Solaris 7 locale name.
-                  if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                    gt_cv_locale_fr=fr
-                  else
-                    # None found.
-                    gt_cv_locale_fr=none
-                  fi
-                fi
-              fi
-            fi
-          fi
-          ;;
-      esac
-    fi
-    rm -fr conftest*
-   ;;
-esac
+
+     if test "$ac_cv_header_winsock2_h" = yes; then
+  GL_COND_OBJ_CONNECT_TRUE=
+  GL_COND_OBJ_CONNECT_FALSE='#'
+else
+  GL_COND_OBJ_CONNECT_TRUE='#'
+  GL_COND_OBJ_CONNECT_FALSE=
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
-printf "%s\n" "$gt_cv_locale_fr" >&6; }
-  LOCALE_FR=$gt_cv_locale_fr
+:
+    if test -z "${GL_COND_OBJ_CONNECT_TRUE}" && test -z "${GL_COND_OBJ_CONNECT_FALSE}"; then
+    GL_COND_OBJ_CONNECT_TRUE='#'
+    GL_COND_OBJ_CONNECT_FALSE='#'
+  fi
 
 
 
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
-printf %s "checking for a french Unicode locale... " >&6; }
-if test ${gt_cv_locale_fr_utf8+y}
-then :
-  printf %s "(cached) " >&6
-else case e in #(
-  e)
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-#include <locale.h>
-#include <time.h>
-#if HAVE_LANGINFO_CODESET
-# include <langinfo.h>
-#endif
-#include <stdlib.h>
-#include <string.h>
-struct tm t;
-char buf[16];
-int main () {
-  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
-     imitates locale dependent behaviour by looking at the environment
-     variables, and all locales use the UTF-8 encoding.  */
-#if !(defined __BEOS__ || defined __HAIKU__)
-  /* Check whether the given locale name is recognized by the system.  */
-# if defined _WIN32 && !defined __CYGWIN__
-  /* On native Windows, setlocale(category, "") looks at the system settings,
-     not at the environment variables.  Also, when an encoding suffix such
-     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
-     category of the locale to "C".  */
-  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
-      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
-    return 1;
-# else
-  if (setlocale (LC_ALL, "") == NULL) return 1;
-# endif
-  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
-     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
-     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
-     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
-     some unit tests fail.  */
-# if HAVE_LANGINFO_CODESET
-  {
-    const char *cs = nl_langinfo (CODESET);
-    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
-      return 1;
-  }
-# endif
-# ifdef __CYGWIN__
-  /* On Cygwin, avoid locale names without encoding suffix, because the
-     locale_charset() function relies on the encoding suffix.  Note that
-     LC_ALL is set on the command line.  */
-  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-# endif
-  /* Check whether in the abbreviation of the second month, the second
-     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
-     two bytes long, with UTF-8 encoding.  */
-  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
-  if (strftime (buf, sizeof (buf), "%b", &t) < 4
-      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
-    return 1;
-#endif
-#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
-  /* Check whether the decimal separator is a comma.
-     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
-     are nl_langinfo(RADIXCHAR) are both ".".  */
-  if (localeconv () ->decimal_point[0] != ',') return 1;
-#endif
-  return 0;
-}
 
-_ACEOF
-    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && test -s conftest$ac_exeext; then
-      case "$host_os" in
-        # Handle native Windows specially, because there setlocale() interprets
-        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
-        # "fr" or "fra" as "French" or "French_France.1252",
-        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
-        # "ja" as "Japanese" or "Japanese_Japan.932",
-        # and similar.
-        mingw*)
-          # Test for the hypothetical native Windows locale name.
-          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_fr_utf8=French_France.65001
-          else
-            # None found.
-            gt_cv_locale_fr_utf8=none
-          fi
-          ;;
-        *)
-          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
-          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
-          # configure script would override the LC_ALL setting. Likewise for
-          # LC_CTYPE, which is also set at the beginning of the configure script.
-          # Test for the usual locale name.
-          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_fr_utf8=fr_FR
-          else
-            # Test for the locale name with explicit encoding suffix.
-            if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-              gt_cv_locale_fr_utf8=fr_FR.UTF-8
-            else
-              # Test for the Solaris 7 locale name.
-              if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                gt_cv_locale_fr_utf8=fr.UTF-8
-              else
-                # None found.
-                gt_cv_locale_fr_utf8=none
-              fi
-            fi
-          fi
-          ;;
-      esac
+
+
+
+
+    if test "$GL_GNULIB_CONNECT" != 1; then
+        if test "$GL_GNULIB_CONNECT" = 0; then
+      GL_GNULIB_CONNECT=$gl_module_indicator_condition
+    else
+      GL_GNULIB_CONNECT="($GL_GNULIB_CONNECT || $gl_module_indicator_condition)"
     fi
-    rm -fr conftest*
-   ;;
-esac
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
-printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
-  LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+  fi
 
 
 
 
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
-printf %s "checking for a traditional french locale... " >&6; }
-if test ${gt_cv_locale_fr+y}
-then :
-  printf %s "(cached) " >&6
-else case e in #(
-  e)
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+printf "%s\n" "#define GNULIB_TEST_CONNECT 1" >>confdefs.h
 
-#include <locale.h>
-#include <time.h>
-#if HAVE_LANGINFO_CODESET
-# include <langinfo.h>
-#endif
-#include <stdlib.h>
-#include <string.h>
-struct tm t;
-char buf[16];
-int main () {
-  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
-     imitates locale dependent behaviour by looking at the environment
-     variables, and all locales use the UTF-8 encoding.  */
-#if defined __BEOS__ || defined __HAIKU__
-  return 1;
-#else
-  /* Check whether the given locale name is recognized by the system.  */
-# if defined _WIN32 && !defined __CYGWIN__
-  /* On native Windows, setlocale(category, "") looks at the system settings,
-     not at the environment variables.  Also, when an encoding suffix such
-     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
-     category of the locale to "C".  */
-  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
-      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
-    return 1;
-# else
-  if (setlocale (LC_ALL, "") == NULL) return 1;
-# endif
-  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
-     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
-     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
-     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
-     some unit tests fail.
-     On MirBSD 10, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
-# if HAVE_LANGINFO_CODESET
-  {
-    const char *cs = nl_langinfo (CODESET);
-    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
-        || strcmp (cs, "UTF-8") == 0)
-      return 1;
-  }
-# endif
-# ifdef __CYGWIN__
-  /* On Cygwin, avoid locale names without encoding suffix, because the
-     locale_charset() function relies on the encoding suffix.  Note that
-     LC_ALL is set on the command line.  */
-  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-# endif
-  /* Check whether in the abbreviation of the second month, the second
-     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
-     one byte long. This excludes the UTF-8 encoding.  */
-  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
-  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
-# if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
-  /* Check whether the decimal separator is a comma.
-     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
-     are nl_langinfo(RADIXCHAR) are both ".".  */
-  if (localeconv () ->decimal_point[0] != ',') return 1;
-# endif
-  return 0;
-#endif
-}
 
-_ACEOF
-    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && test -s conftest$ac_exeext; then
-      case "$host_os" in
-        # Handle native Windows specially, because there setlocale() interprets
-        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
-        # "fr" or "fra" as "French" or "French_France.1252",
-        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
-        # "ja" as "Japanese" or "Japanese_Japan.932",
-        # and similar.
-        mingw*)
-          # Test for the native Windows locale name.
-          if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_fr=French_France.1252
-          else
-            # None found.
-            gt_cv_locale_fr=none
-          fi
-          ;;
-        *)
-          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
-          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
-          # configure script would override the LC_ALL setting. Likewise for
-          # LC_CTYPE, which is also set at the beginning of the configure script.
-          # Test for the usual locale name.
-          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_fr=fr_FR
-          else
-            # Test for the locale name with explicit encoding suffix.
-            if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-              gt_cv_locale_fr=fr_FR.ISO-8859-1
-            else
-              # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
-              if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                gt_cv_locale_fr=fr_FR.ISO8859-1
-              else
-                # Test for the HP-UX locale name.
-                if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                  gt_cv_locale_fr=fr_FR.iso88591
-                else
-                  # Test for the Solaris 7 locale name.
-                  if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                    gt_cv_locale_fr=fr
-                  else
-                    # None found.
-                    gt_cv_locale_fr=none
-                  fi
-                fi
-              fi
-            fi
-          fi
-          ;;
-      esac
+
+
+
+
+
+
+
+
+
+
+
+    if test "$GL_GNULIB_ENVIRON" != 1; then
+        if test "$GL_GNULIB_ENVIRON" = 0; then
+      GL_GNULIB_ENVIRON=$gl_module_indicator_condition
+    else
+      GL_GNULIB_ENVIRON="($GL_GNULIB_ENVIRON || $gl_module_indicator_condition)"
     fi
-    rm -fr conftest*
-   ;;
-esac
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
-printf "%s\n" "$gt_cv_locale_fr" >&6; }
-  LOCALE_FR=$gt_cv_locale_fr
+  fi
 
 
 
 
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a turkish Unicode locale" >&5
-printf %s "checking for a turkish Unicode locale... " >&6; }
-if test ${gt_cv_locale_tr_utf8+y}
+printf "%s\n" "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
+
+
+
+
+
+
+
+    if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
+      REPLACE_FDOPEN=1
+    fi
+
+  if test $REPLACE_FDOPEN = 0; then
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fdopen sets errno" >&5
+printf %s "checking whether fdopen sets errno... " >&6; }
+if test ${gl_cv_func_fdopen_works+y}
 then :
   printf %s "(cached) " >&6
 else case e in #(
   e)
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <locale.h>
-#include <time.h>
-#if HAVE_LANGINFO_CODESET
-# include <langinfo.h>
-#endif
-#include <stdlib.h>
-#include <string.h>
-#include <wctype.h>
-struct tm t;
-char buf[16];
-int main () {
-  /* On BeOS, locales are not implemented in libc.  Rather, libintl
-     imitates locale dependent behaviour by looking at the environment
-     variables, and all locales use the UTF-8 encoding.  But BeOS does not
-     implement the Turkish upper-/lowercase mappings.  Therefore, let this
-     program return 1 on BeOS.  */
-  /* Check whether the given locale name is recognized by the system.  */
-#if defined _WIN32 && !defined __CYGWIN__
-  /* On native Windows, setlocale(category, "") looks at the system settings,
-     not at the environment variables.  Also, when an encoding suffix such
-     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
-     category of the locale to "C".  */
-  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
-      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
-    return 1;
-#else
-  if (setlocale (LC_ALL, "") == NULL) return 1;
-#endif
-  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
-     On Mac OS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET)
-     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
-     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
-     some unit tests fail.  */
-#if HAVE_LANGINFO_CODESET
-  {
-    const char *cs = nl_langinfo (CODESET);
-    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
-      return 1;
-  }
-#endif
-#ifdef __CYGWIN__
-  /* On Cygwin, avoid locale names without encoding suffix, because the
-     locale_charset() function relies on the encoding suffix.  Note that
-     LC_ALL is set on the command line.  */
-  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-#endif
-  /* Check whether in the abbreviation of the eighth month, the second
-     character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is
-     two bytes long, with UTF-8 encoding.  */
-  t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19;
-  if (strftime (buf, sizeof (buf), "%b", &t) < 4
-      || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f)
-    return 1;
-  /* Check whether the upper-/lowercase mappings are as expected for
-     Turkish.  */
-  if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i'
-      || towupper(0x0131) != 'I' || towlower ('I') != 0x0131)
-    return 1;
-  return 0;
-}
-
-_ACEOF
-    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && test -s conftest$ac_exeext; then
-      case "$host_os" in
-        # Handle native Windows specially, because there setlocale() interprets
-        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
-        # "fr" or "fra" as "French" or "French_France.1252",
-        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
-        # "ja" as "Japanese" or "Japanese_Japan.932",
-        # and similar.
-        mingw*)
-          # Test for the hypothetical native Windows locale name.
-          if (LC_ALL=Turkish_Turkey.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_tr_utf8=Turkish_Turkey.65001
-          else
-            # None found.
-            gt_cv_locale_tr_utf8=none
-          fi
-          ;;
-        *)
-          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
-          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
-          # configure script would override the LC_ALL setting. Likewise for
-          # LC_CTYPE, which is also set at the beginning of the configure script.
-          # Test for the usual locale name.
-          if (LC_ALL=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_tr_utf8=tr_TR
-          else
-            # Test for the locale name with explicit encoding suffix.
-            if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-              gt_cv_locale_tr_utf8=tr_TR.UTF-8
-            else
-              # Test for the Solaris 7 locale name.
-              if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                gt_cv_locale_tr_utf8=tr.UTF-8
-              else
-                # None found.
-                gt_cv_locale_tr_utf8=none
-              fi
-            fi
-          fi
-          ;;
-      esac
-    else
-      gt_cv_locale_tr_utf8=none
-    fi
-    rm -fr conftest*
-   ;;
-esac
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_tr_utf8" >&5
-printf "%s\n" "$gt_cv_locale_tr_utf8" >&6; }
-  LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8
-
-
-
-
-     if test "$ac_cv_header_winsock2_h" = yes; then
-  GL_COND_OBJ_CONNECT_TRUE=
-  GL_COND_OBJ_CONNECT_FALSE='#'
-else
-  GL_COND_OBJ_CONNECT_TRUE='#'
-  GL_COND_OBJ_CONNECT_FALSE=
-fi
-:
-    if test -z "${GL_COND_OBJ_CONNECT_TRUE}" && test -z "${GL_COND_OBJ_CONNECT_FALSE}"; then
-    GL_COND_OBJ_CONNECT_TRUE='#'
-    GL_COND_OBJ_CONNECT_FALSE='#'
-  fi
-
-
-
-
-
-
-
-
-
-
-    if test "$GL_GNULIB_CONNECT" != 1; then
-        if test "$GL_GNULIB_CONNECT" = 0; then
-      GL_GNULIB_CONNECT=$gl_module_indicator_condition
-    else
-      GL_GNULIB_CONNECT="($GL_GNULIB_CONNECT || $gl_module_indicator_condition)"
-    fi
-  fi
-
-
-
-
-
-printf "%s\n" "#define GNULIB_TEST_CONNECT 1" >>confdefs.h
-
-
-
-
-
-
-
-
-
-
-
-
-
-    if test "$GL_GNULIB_ENVIRON" != 1; then
-        if test "$GL_GNULIB_ENVIRON" = 0; then
-      GL_GNULIB_ENVIRON=$gl_module_indicator_condition
-    else
-      GL_GNULIB_ENVIRON="($GL_GNULIB_ENVIRON || $gl_module_indicator_condition)"
-    fi
-  fi
-
-
-
-
-
-printf "%s\n" "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
-
-
-
-
-
-
-
-    if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
-      REPLACE_FDOPEN=1
-    fi
-
-  if test $REPLACE_FDOPEN = 0; then
-        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fdopen sets errno" >&5
-printf %s "checking whether fdopen sets errno... " >&6; }
-if test ${gl_cv_func_fdopen_works+y}
-then :
-  printf %s "(cached) " >&6
-else case e in #(
-  e)
-        if test "$cross_compiling" = yes
-then :
-  case "$host_os" in
-             mingw*) gl_cv_func_fdopen_works="guessing no" ;;
-             *)      gl_cv_func_fdopen_works="guessing yes" ;;
-           esac
-
-else case e in #(
-  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+        if test "$cross_compiling" = yes
+then :
+  case "$host_os" in
+             mingw*) gl_cv_func_fdopen_works="guessing no" ;;
+             *)      gl_cv_func_fdopen_works="guessing yes" ;;
+           esac
+
+else case e in #(
+  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 #include <stdio.h>
@@ -42584,6 +44459,74 @@ fi
 
 
 
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ftruncate" >&5
+printf %s "checking for ftruncate... " >&6; }
+if test ${gl_cv_onwards_func_ftruncate+y}
+then :
+  printf %s "(cached) " >&6
+else case e in #(
+  e)
+  exec 9>&6 6>/dev/null
+
+       case "$host_os" in
+
+         linux*-android*)
+           ac_fn_check_decl "$LINENO" "ftruncate" "ac_cv_have_decl_ftruncate" "#include <unistd.h>
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_ftruncate" = xyes
+then :
+
+fi
+           if test $ac_cv_have_decl_ftruncate = yes; then
+             ac_fn_c_check_func "$LINENO" "ftruncate" "ac_cv_func_ftruncate"
+if test "x$ac_cv_func_ftruncate" = xyes
+then :
+
+fi
+
+             if test $ac_cv_func_ftruncate = yes; then
+               gl_cv_onwards_func_ftruncate=yes
+             else
+                                                            gl_cv_onwards_func_ftruncate='future OS version'
+             fi
+           else
+             gl_cv_onwards_func_ftruncate='future OS version'
+           fi
+           ;;
+
+
+         *)
+           ac_fn_c_check_func "$LINENO" "ftruncate" "ac_cv_func_ftruncate"
+if test "x$ac_cv_func_ftruncate" = xyes
+then :
+
+fi
+
+           gl_cv_onwards_func_ftruncate=$ac_cv_func_ftruncate
+           ;;
+
+       esac
+
+  exec 6>&9 9>&-
+
+     ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_ftruncate" >&5
+printf "%s\n" "$gl_cv_onwards_func_ftruncate" >&6; }
+
+  case "$gl_cv_onwards_func_ftruncate" in
+    future*) ac_cv_func_ftruncate=no ;;
+    *)       ac_cv_func_ftruncate=$gl_cv_onwards_func_ftruncate ;;
+  esac
+  if test $ac_cv_func_ftruncate = yes; then
+
+printf "%s\n" "#define HAVE_FTRUNCATE 1" >>confdefs.h
+
+  fi
+
+
   if test $ac_cv_func_ftruncate = yes; then
 
 
@@ -42595,6 +44538,9 @@ fi
 
   else
     HAVE_FTRUNCATE=0
+    case "$gl_cv_onwards_func_ftruncate" in
+      future*) REPLACE_FTRUNCATE=1 ;;
+    esac
   fi
 
 
@@ -42784,6 +44730,74 @@ printf "%s\n" "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
 
 
 
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for duplocale" >&5
+printf %s "checking for duplocale... " >&6; }
+if test ${gl_cv_onwards_func_duplocale+y}
+then :
+  printf %s "(cached) " >&6
+else case e in #(
+  e)
+  exec 9>&6 6>/dev/null
+
+       case "$host_os" in
+
+         linux*-android*)
+           ac_fn_check_decl "$LINENO" "duplocale" "ac_cv_have_decl_duplocale" "#include <locale.h>
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_duplocale" = xyes
+then :
+
+fi
+           if test $ac_cv_have_decl_duplocale = yes; then
+             ac_fn_c_check_func "$LINENO" "duplocale" "ac_cv_func_duplocale"
+if test "x$ac_cv_func_duplocale" = xyes
+then :
+
+fi
+
+             if test $ac_cv_func_duplocale = yes; then
+               gl_cv_onwards_func_duplocale=yes
+             else
+                                                            gl_cv_onwards_func_duplocale='future OS version'
+             fi
+           else
+             gl_cv_onwards_func_duplocale='future OS version'
+           fi
+           ;;
+
+
+         *)
+           ac_fn_c_check_func "$LINENO" "duplocale" "ac_cv_func_duplocale"
+if test "x$ac_cv_func_duplocale" = xyes
+then :
+
+fi
+
+           gl_cv_onwards_func_duplocale=$ac_cv_func_duplocale
+           ;;
+
+       esac
+
+  exec 6>&9 9>&-
+
+     ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_duplocale" >&5
+printf "%s\n" "$gl_cv_onwards_func_duplocale" >&6; }
+
+  case "$gl_cv_onwards_func_duplocale" in
+    future*) ac_cv_func_duplocale=no ;;
+    *)       ac_cv_func_duplocale=$gl_cv_onwards_func_duplocale ;;
+  esac
+  if test $ac_cv_func_duplocale = yes; then
+
+printf "%s\n" "#define HAVE_DUPLOCALE 1" >>confdefs.h
+
+  fi
+
+
+
 
 
 
@@ -42848,12 +44862,12 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    Use char because int might match the return type of a GCC
    builtin and then its argument prototype would still apply.
    The 'extern "C"' is for builds by C++ compilers;
-   although this is not generally supported in C code, supporting it here
+   although this is not generally supported in C code supporting it here
    has little cost and some practical benefit (sr 110532).  */
 #ifdef __cplusplus
 extern "C"
 #endif
-char inet_pton ();
+char inet_pton (void);
 int
 main (void)
 {
@@ -43334,2385 +45348,518 @@ printf "%s\n" "#define GNULIB_TEST_IOCTL 1" >>confdefs.h
 
 
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
-printf %s "checking for a traditional french locale... " >&6; }
-if test ${gt_cv_locale_fr+y}
+
+
+
+
+
+
+
+     if test "$ac_cv_header_winsock2_h" = yes; then
+  GL_COND_OBJ_LISTEN_TRUE=
+  GL_COND_OBJ_LISTEN_FALSE='#'
+else
+  GL_COND_OBJ_LISTEN_TRUE='#'
+  GL_COND_OBJ_LISTEN_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_LISTEN_TRUE}" && test -z "${GL_COND_OBJ_LISTEN_FALSE}"; then
+    GL_COND_OBJ_LISTEN_TRUE='#'
+    GL_COND_OBJ_LISTEN_FALSE='#'
+  fi
+
+
+
+
+
+
+
+
+
+
+    if test "$GL_GNULIB_LISTEN" != 1; then
+        if test "$GL_GNULIB_LISTEN" = 0; then
+      GL_GNULIB_LISTEN=$gl_module_indicator_condition
+    else
+      GL_GNULIB_LISTEN="($GL_GNULIB_LISTEN || $gl_module_indicator_condition)"
+    fi
+  fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_LISTEN 1" >>confdefs.h
+
+
+
+
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for newlocale" >&5
+printf %s "checking for newlocale... " >&6; }
+if test ${gl_cv_onwards_func_newlocale+y}
 then :
   printf %s "(cached) " >&6
 else case e in #(
   e)
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+  exec 9>&6 6>/dev/null
 
-#include <locale.h>
-#include <time.h>
-#if HAVE_LANGINFO_CODESET
-# include <langinfo.h>
-#endif
-#include <stdlib.h>
-#include <string.h>
-struct tm t;
-char buf[16];
-int main () {
-  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
-     imitates locale dependent behaviour by looking at the environment
-     variables, and all locales use the UTF-8 encoding.  */
-#if defined __BEOS__ || defined __HAIKU__
-  return 1;
-#else
-  /* Check whether the given locale name is recognized by the system.  */
-# if defined _WIN32 && !defined __CYGWIN__
-  /* On native Windows, setlocale(category, "") looks at the system settings,
-     not at the environment variables.  Also, when an encoding suffix such
-     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
-     category of the locale to "C".  */
-  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
-      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
-    return 1;
-# else
-  if (setlocale (LC_ALL, "") == NULL) return 1;
-# endif
-  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
-     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
-     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
-     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
-     some unit tests fail.
-     On MirBSD 10, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
-# if HAVE_LANGINFO_CODESET
-  {
-    const char *cs = nl_langinfo (CODESET);
-    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
-        || strcmp (cs, "UTF-8") == 0)
-      return 1;
-  }
-# endif
-# ifdef __CYGWIN__
-  /* On Cygwin, avoid locale names without encoding suffix, because the
-     locale_charset() function relies on the encoding suffix.  Note that
-     LC_ALL is set on the command line.  */
-  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-# endif
-  /* Check whether in the abbreviation of the second month, the second
-     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
-     one byte long. This excludes the UTF-8 encoding.  */
-  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
-  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
-# if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
-  /* Check whether the decimal separator is a comma.
-     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
-     are nl_langinfo(RADIXCHAR) are both ".".  */
-  if (localeconv () ->decimal_point[0] != ',') return 1;
-# endif
-  return 0;
-#endif
-}
+       case "$host_os" in
 
-_ACEOF
-    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && test -s conftest$ac_exeext; then
-      case "$host_os" in
-        # Handle native Windows specially, because there setlocale() interprets
-        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
-        # "fr" or "fra" as "French" or "French_France.1252",
-        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
-        # "ja" as "Japanese" or "Japanese_Japan.932",
-        # and similar.
-        mingw*)
-          # Test for the native Windows locale name.
-          if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_fr=French_France.1252
-          else
-            # None found.
-            gt_cv_locale_fr=none
-          fi
-          ;;
-        *)
-          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
-          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
-          # configure script would override the LC_ALL setting. Likewise for
-          # LC_CTYPE, which is also set at the beginning of the configure script.
-          # Test for the usual locale name.
-          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_fr=fr_FR
-          else
-            # Test for the locale name with explicit encoding suffix.
-            if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-              gt_cv_locale_fr=fr_FR.ISO-8859-1
-            else
-              # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
-              if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                gt_cv_locale_fr=fr_FR.ISO8859-1
-              else
-                # Test for the HP-UX locale name.
-                if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                  gt_cv_locale_fr=fr_FR.iso88591
-                else
-                  # Test for the Solaris 7 locale name.
-                  if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                    gt_cv_locale_fr=fr
-                  else
-                    # None found.
-                    gt_cv_locale_fr=none
-                  fi
-                fi
-              fi
-            fi
-          fi
-          ;;
-      esac
-    fi
-    rm -fr conftest*
-   ;;
+         linux*-android*)
+           ac_fn_check_decl "$LINENO" "newlocale" "ac_cv_have_decl_newlocale" "#include <locale.h>
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_newlocale" = xyes
+then :
+
+fi
+           if test $ac_cv_have_decl_newlocale = yes; then
+             ac_fn_c_check_func "$LINENO" "newlocale" "ac_cv_func_newlocale"
+if test "x$ac_cv_func_newlocale" = xyes
+then :
+
+fi
+
+             if test $ac_cv_func_newlocale = yes; then
+               gl_cv_onwards_func_newlocale=yes
+             else
+                                                            gl_cv_onwards_func_newlocale='future OS version'
+             fi
+           else
+             gl_cv_onwards_func_newlocale='future OS version'
+           fi
+           ;;
+
+
+         *)
+           ac_fn_c_check_func "$LINENO" "newlocale" "ac_cv_func_newlocale"
+if test "x$ac_cv_func_newlocale" = xyes
+then :
+
+fi
+
+           gl_cv_onwards_func_newlocale=$ac_cv_func_newlocale
+           ;;
+
+       esac
+
+  exec 6>&9 9>&-
+
+     ;;
 esac
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
-printf "%s\n" "$gt_cv_locale_fr" >&6; }
-  LOCALE_FR=$gt_cv_locale_fr
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_newlocale" >&5
+printf "%s\n" "$gl_cv_onwards_func_newlocale" >&6; }
 
+  case "$gl_cv_onwards_func_newlocale" in
+    future*) ac_cv_func_newlocale=no ;;
+    *)       ac_cv_func_newlocale=$gl_cv_onwards_func_newlocale ;;
+  esac
+  if test $ac_cv_func_newlocale = yes; then
 
+printf "%s\n" "#define HAVE_NEWLOCALE 1" >>confdefs.h
 
+  fi
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
-printf %s "checking for a french Unicode locale... " >&6; }
-if test ${gt_cv_locale_fr_utf8+y}
+
+
+
+
+
+
+
+
+  if test $HAVE_LOCALE_T = 1; then
+
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for newlocale" >&5
+printf %s "checking for newlocale... " >&6; }
+if test ${gl_cv_onwards_func_newlocale+y}
 then :
   printf %s "(cached) " >&6
 else case e in #(
   e)
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+  exec 9>&6 6>/dev/null
 
-#include <locale.h>
-#include <time.h>
-#if HAVE_LANGINFO_CODESET
-# include <langinfo.h>
-#endif
-#include <stdlib.h>
-#include <string.h>
-struct tm t;
-char buf[16];
-int main () {
-  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
-     imitates locale dependent behaviour by looking at the environment
-     variables, and all locales use the UTF-8 encoding.  */
-#if !(defined __BEOS__ || defined __HAIKU__)
-  /* Check whether the given locale name is recognized by the system.  */
-# if defined _WIN32 && !defined __CYGWIN__
-  /* On native Windows, setlocale(category, "") looks at the system settings,
-     not at the environment variables.  Also, when an encoding suffix such
-     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
-     category of the locale to "C".  */
-  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
-      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
-    return 1;
-# else
-  if (setlocale (LC_ALL, "") == NULL) return 1;
-# endif
-  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
-     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
-     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
-     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
-     some unit tests fail.  */
-# if HAVE_LANGINFO_CODESET
-  {
-    const char *cs = nl_langinfo (CODESET);
-    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
-      return 1;
-  }
-# endif
-# ifdef __CYGWIN__
-  /* On Cygwin, avoid locale names without encoding suffix, because the
-     locale_charset() function relies on the encoding suffix.  Note that
-     LC_ALL is set on the command line.  */
-  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-# endif
-  /* Check whether in the abbreviation of the second month, the second
-     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
-     two bytes long, with UTF-8 encoding.  */
-  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
-  if (strftime (buf, sizeof (buf), "%b", &t) < 4
-      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
-    return 1;
-#endif
-#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
-  /* Check whether the decimal separator is a comma.
-     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
-     are nl_langinfo(RADIXCHAR) are both ".".  */
-  if (localeconv () ->decimal_point[0] != ',') return 1;
-#endif
-  return 0;
-}
+       case "$host_os" in
 
-_ACEOF
-    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && test -s conftest$ac_exeext; then
-      case "$host_os" in
-        # Handle native Windows specially, because there setlocale() interprets
-        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
-        # "fr" or "fra" as "French" or "French_France.1252",
-        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
-        # "ja" as "Japanese" or "Japanese_Japan.932",
-        # and similar.
-        mingw*)
-          # Test for the hypothetical native Windows locale name.
-          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_fr_utf8=French_France.65001
-          else
-            # None found.
-            gt_cv_locale_fr_utf8=none
-          fi
-          ;;
-        *)
-          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
-          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
-          # configure script would override the LC_ALL setting. Likewise for
-          # LC_CTYPE, which is also set at the beginning of the configure script.
-          # Test for the usual locale name.
-          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_fr_utf8=fr_FR
-          else
-            # Test for the locale name with explicit encoding suffix.
-            if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-              gt_cv_locale_fr_utf8=fr_FR.UTF-8
-            else
-              # Test for the Solaris 7 locale name.
-              if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                gt_cv_locale_fr_utf8=fr.UTF-8
-              else
-                # None found.
-                gt_cv_locale_fr_utf8=none
-              fi
-            fi
-          fi
-          ;;
-      esac
-    fi
-    rm -fr conftest*
-   ;;
+         linux*-android*)
+           ac_fn_check_decl "$LINENO" "newlocale" "ac_cv_have_decl_newlocale" "#include <locale.h>
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_newlocale" = xyes
+then :
+
+fi
+           if test $ac_cv_have_decl_newlocale = yes; then
+             ac_fn_c_check_func "$LINENO" "newlocale" "ac_cv_func_newlocale"
+if test "x$ac_cv_func_newlocale" = xyes
+then :
+
+fi
+
+             if test $ac_cv_func_newlocale = yes; then
+               gl_cv_onwards_func_newlocale=yes
+             else
+                                                            gl_cv_onwards_func_newlocale='future OS version'
+             fi
+           else
+             gl_cv_onwards_func_newlocale='future OS version'
+           fi
+           ;;
+
+
+         *)
+           ac_fn_c_check_func "$LINENO" "newlocale" "ac_cv_func_newlocale"
+if test "x$ac_cv_func_newlocale" = xyes
+then :
+
+fi
+
+           gl_cv_onwards_func_newlocale=$ac_cv_func_newlocale
+           ;;
+
+       esac
+
+  exec 6>&9 9>&-
+
+     ;;
 esac
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
-printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
-  LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_newlocale" >&5
+printf "%s\n" "$gl_cv_onwards_func_newlocale" >&6; }
 
+  case "$gl_cv_onwards_func_newlocale" in
+    future*) ac_cv_func_newlocale=no ;;
+    *)       ac_cv_func_newlocale=$gl_cv_onwards_func_newlocale ;;
+  esac
+  if test $ac_cv_func_newlocale = yes; then
 
+printf "%s\n" "#define HAVE_NEWLOCALE 1" >>confdefs.h
 
+  fi
 
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
-printf %s "checking for a traditional japanese locale... " >&6; }
-if test ${gt_cv_locale_ja+y}
+
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for duplocale" >&5
+printf %s "checking for duplocale... " >&6; }
+if test ${gl_cv_onwards_func_duplocale+y}
 then :
   printf %s "(cached) " >&6
 else case e in #(
   e)
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+  exec 9>&6 6>/dev/null
 
-#include <locale.h>
-#include <time.h>
-#if HAVE_LANGINFO_CODESET
-# include <langinfo.h>
-#endif
-#include <stdlib.h>
-#include <string.h>
-struct tm t;
-char buf[16];
-int main ()
-{
-  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
-     imitates locale dependent behaviour by looking at the environment
-     variables, and all locales use the UTF-8 encoding.  */
-#if defined __BEOS__ || defined __HAIKU__
-  return 1;
-#else
-  /* Check whether the given locale name is recognized by the system.  */
-# if defined _WIN32 && !defined __CYGWIN__
-  /* On native Windows, setlocale(category, "") looks at the system settings,
-     not at the environment variables.  Also, when an encoding suffix such
-     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
-     category of the locale to "C".  */
-  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
-      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
-    return 1;
-# else
-  if (setlocale (LC_ALL, "") == NULL) return 1;
-# endif
-  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
-     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
-     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
-     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
-     some unit tests fail.
-     On MirBSD 10, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
-# if HAVE_LANGINFO_CODESET
-  {
-    const char *cs = nl_langinfo (CODESET);
-    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
-        || strcmp (cs, "UTF-8") == 0)
-      return 1;
-  }
-# endif
-# ifdef __CYGWIN__
-  /* On Cygwin, avoid locale names without encoding suffix, because the
-     locale_charset() function relies on the encoding suffix.  Note that
-     LC_ALL is set on the command line.  */
-  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-# endif
-  /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
-     on Cygwin 1.5.x.  */
-  if (MB_CUR_MAX == 1)
-    return 1;
-  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
-     This excludes the UTF-8 encoding (except on MirBSD).  */
-  {
-    const char *p;
-    t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
-    if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
-    for (p = buf; *p != '\0'; p++)
-      if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
-        return 1;
-  }
-  return 0;
-#endif
-}
+       case "$host_os" in
 
-_ACEOF
-    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && test -s conftest$ac_exeext; then
-      case "$host_os" in
-        # Handle native Windows specially, because there setlocale() interprets
-        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
-        # "fr" or "fra" as "French" or "French_France.1252",
-        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
-        # "ja" as "Japanese" or "Japanese_Japan.932",
-        # and similar.
-        mingw*)
-          # Note that on native Windows, the Japanese locale is
-          # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
-          # cannot use it here.
-          gt_cv_locale_ja=none
-          ;;
-        *)
-          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
-          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
-          # configure script would override the LC_ALL setting. Likewise for
-          # LC_CTYPE, which is also set at the beginning of the configure script.
-          # Test for the AIX locale name.
-          if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_ja=ja_JP
-          else
-            # Test for the locale name with explicit encoding suffix.
-            if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-              gt_cv_locale_ja=ja_JP.EUC-JP
-            else
-              # Test for the HP-UX, OSF/1, NetBSD locale name.
-              if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                gt_cv_locale_ja=ja_JP.eucJP
-              else
-                # Test for the IRIX, FreeBSD locale name.
-                if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                  gt_cv_locale_ja=ja_JP.EUC
-                else
-                  # Test for the Solaris 7 locale name.
-                  if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                    gt_cv_locale_ja=ja
-                  else
-                    # Special test for NetBSD 1.6.
-                    if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
-                      gt_cv_locale_ja=ja_JP.eucJP
-                    else
-                      # None found.
-                      gt_cv_locale_ja=none
-                    fi
-                  fi
-                fi
-              fi
-            fi
-          fi
-          ;;
-      esac
-    fi
-    rm -fr conftest*
-   ;;
+         linux*-android*)
+           ac_fn_check_decl "$LINENO" "duplocale" "ac_cv_have_decl_duplocale" "#include <locale.h>
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_duplocale" = xyes
+then :
+
+fi
+           if test $ac_cv_have_decl_duplocale = yes; then
+             ac_fn_c_check_func "$LINENO" "duplocale" "ac_cv_func_duplocale"
+if test "x$ac_cv_func_duplocale" = xyes
+then :
+
+fi
+
+             if test $ac_cv_func_duplocale = yes; then
+               gl_cv_onwards_func_duplocale=yes
+             else
+                                                            gl_cv_onwards_func_duplocale='future OS version'
+             fi
+           else
+             gl_cv_onwards_func_duplocale='future OS version'
+           fi
+           ;;
+
+
+         *)
+           ac_fn_c_check_func "$LINENO" "duplocale" "ac_cv_func_duplocale"
+if test "x$ac_cv_func_duplocale" = xyes
+then :
+
+fi
+
+           gl_cv_onwards_func_duplocale=$ac_cv_func_duplocale
+           ;;
+
+       esac
+
+  exec 6>&9 9>&-
+
+     ;;
 esac
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
-printf "%s\n" "$gt_cv_locale_ja" >&6; }
-  LOCALE_JA=$gt_cv_locale_ja
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_duplocale" >&5
+printf "%s\n" "$gl_cv_onwards_func_duplocale" >&6; }
+
+  case "$gl_cv_onwards_func_duplocale" in
+    future*) ac_cv_func_duplocale=no ;;
+    *)       ac_cv_func_duplocale=$gl_cv_onwards_func_duplocale ;;
+  esac
+  if test $ac_cv_func_duplocale = yes; then
 
+printf "%s\n" "#define HAVE_DUPLOCALE 1" >>confdefs.h
 
+  fi
 
 
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
-printf %s "checking for a transitional chinese locale... " >&6; }
-if test ${gt_cv_locale_zh_CN+y}
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for freelocale" >&5
+printf %s "checking for freelocale... " >&6; }
+if test ${gl_cv_onwards_func_freelocale+y}
 then :
   printf %s "(cached) " >&6
 else case e in #(
   e)
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+  exec 9>&6 6>/dev/null
 
-#include <locale.h>
-#include <stdlib.h>
-#include <time.h>
-#if HAVE_LANGINFO_CODESET
-# include <langinfo.h>
-#endif
-#include <stdlib.h>
-#include <string.h>
-struct tm t;
-char buf[16];
-int main ()
-{
-  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
-     imitates locale dependent behaviour by looking at the environment
-     variables, and all locales use the UTF-8 encoding.  */
-#if defined __BEOS__ || defined __HAIKU__
-  return 1;
-#else
-  /* Check whether the given locale name is recognized by the system.  */
-# if defined _WIN32 && !defined __CYGWIN__
-  /* On native Windows, setlocale(category, "") looks at the system settings,
-     not at the environment variables.  Also, when an encoding suffix such
-     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
-     category of the locale to "C".  */
-  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
-      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
-    return 1;
-# else
-  if (setlocale (LC_ALL, "") == NULL) return 1;
-# endif
-  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
-     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
-     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
-     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
-     some unit tests fail.
-     On MirBSD 10, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
-# if HAVE_LANGINFO_CODESET
-  {
-    const char *cs = nl_langinfo (CODESET);
-    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
-        || strcmp (cs, "UTF-8") == 0)
-      return 1;
-  }
-# endif
-# ifdef __CYGWIN__
-  /* On Cygwin, avoid locale names without encoding suffix, because the
-     locale_charset() function relies on the encoding suffix.  Note that
-     LC_ALL is set on the command line.  */
-  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-# endif
-  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
-     This excludes the UTF-8 encoding (except on MirBSD).  */
-  {
-    const char *p;
-    t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
-    if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
-    for (p = buf; *p != '\0'; p++)
-      if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
-        return 1;
-  }
-  /* Check whether a typical GB18030 multibyte sequence is recognized as a
-     single wide character.  This excludes the GB2312 and GBK encodings.  */
-  if (mblen ("\203\062\332\066", 5) != 4)
-    return 1;
-  return 0;
-#endif
-}
+       case "$host_os" in
 
-_ACEOF
-    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && test -s conftest$ac_exeext; then
-      case "$host_os" in
-        # Handle native Windows specially, because there setlocale() interprets
-        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
-        # "fr" or "fra" as "French" or "French_France.1252",
-        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
-        # "ja" as "Japanese" or "Japanese_Japan.932",
-        # and similar.
-        mingw*)
-          # Test for the hypothetical native Windows locale name.
-          if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_zh_CN=Chinese_China.54936
-          else
-            # None found.
-            gt_cv_locale_zh_CN=none
-          fi
-          ;;
-        solaris2.8)
-          # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
-          # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
-          # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
-          gt_cv_locale_zh_CN=none
-          ;;
-        *)
-          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
-          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
-          # configure script would override the LC_ALL setting. Likewise for
-          # LC_CTYPE, which is also set at the beginning of the configure script.
-          # Test for the locale name without encoding suffix.
-          if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_zh_CN=zh_CN
-          else
-            # Test for the locale name with explicit encoding suffix.
-            if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-              gt_cv_locale_zh_CN=zh_CN.GB18030
-            else
-              # None found.
-              gt_cv_locale_zh_CN=none
-            fi
-          fi
-          ;;
-      esac
-    else
-      # If there was a link error, due to mblen(), the system is so old that
-      # it certainly doesn't have a chinese locale.
-      gt_cv_locale_zh_CN=none
-    fi
-    rm -fr conftest*
-   ;;
+         linux*-android*)
+           ac_fn_check_decl "$LINENO" "freelocale" "ac_cv_have_decl_freelocale" "#include <locale.h>
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_freelocale" = xyes
+then :
+
+fi
+           if test $ac_cv_have_decl_freelocale = yes; then
+             ac_fn_c_check_func "$LINENO" "freelocale" "ac_cv_func_freelocale"
+if test "x$ac_cv_func_freelocale" = xyes
+then :
+
+fi
+
+             if test $ac_cv_func_freelocale = yes; then
+               gl_cv_onwards_func_freelocale=yes
+             else
+                                                            gl_cv_onwards_func_freelocale='future OS version'
+             fi
+           else
+             gl_cv_onwards_func_freelocale='future OS version'
+           fi
+           ;;
+
+
+         *)
+           ac_fn_c_check_func "$LINENO" "freelocale" "ac_cv_func_freelocale"
+if test "x$ac_cv_func_freelocale" = xyes
+then :
+
+fi
+
+           gl_cv_onwards_func_freelocale=$ac_cv_func_freelocale
+           ;;
+
+       esac
+
+  exec 6>&9 9>&-
+
+     ;;
 esac
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
-printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
-  LOCALE_ZH_CN=$gt_cv_locale_zh_CN
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_freelocale" >&5
+printf "%s\n" "$gl_cv_onwards_func_freelocale" >&6; }
 
+  case "$gl_cv_onwards_func_freelocale" in
+    future*) ac_cv_func_freelocale=no ;;
+    *)       ac_cv_func_freelocale=$gl_cv_onwards_func_freelocale ;;
+  esac
+  if test $ac_cv_func_freelocale = yes; then
 
+printf "%s\n" "#define HAVE_FREELOCALE 1" >>confdefs.h
 
+  fi
 
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
-printf %s "checking for a traditional french locale... " >&6; }
-if test ${gt_cv_locale_fr+y}
+    gl_func_newlocale="$ac_cv_func_newlocale"
+    gl_func_duplocale="$ac_cv_func_duplocale"
+    gl_func_freelocale="$ac_cv_func_freelocale"
+  else
+            gl_cv_onwards_func_newlocale='future OS version'
+    gl_cv_onwards_func_duplocale='future OS version'
+    gl_cv_onwards_func_freelocale='future OS version'
+    gl_func_newlocale=no
+    gl_func_duplocale=no
+    gl_func_freelocale=no
+  fi
+  if test $gl_func_newlocale != yes; then
+    HAVE_NEWLOCALE=0
+    case "$gl_cv_onwards_func_newlocale" in
+      future*) REPLACE_NEWLOCALE=1 ;;
+    esac
+  fi
+  if test $gl_func_duplocale != yes; then
+    HAVE_DUPLOCALE=0
+    case "$gl_cv_onwards_func_duplocale" in
+      future*) REPLACE_DUPLOCALE=1 ;;
+    esac
+  fi
+  if test $gl_func_freelocale != yes; then
+    HAVE_FREELOCALE=0
+    case "$gl_cv_onwards_func_freelocale" in
+      future*) REPLACE_FREELOCALE=1 ;;
+    esac
+  fi
+  if test $gt_localename_enhances_locale_funcs = yes; then
+    REPLACE_NEWLOCALE=1
+    REPLACE_DUPLOCALE=1
+    REPLACE_FREELOCALE=1
+  fi
+
+
+
+
+
+
+
+
+
+
+    if test "$GL_GNULIB_LOCALENAME" != 1; then
+        if test "$GL_GNULIB_LOCALENAME" = 0; then
+      GL_GNULIB_LOCALENAME=$gl_module_indicator_condition
+    else
+      GL_GNULIB_LOCALENAME="($GL_GNULIB_LOCALENAME || $gl_module_indicator_condition)"
+    fi
+  fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_LOCALENAME 1" >>confdefs.h
+
+
+
+
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for newlocale" >&5
+printf %s "checking for newlocale... " >&6; }
+if test ${gl_cv_onwards_func_newlocale+y}
 then :
   printf %s "(cached) " >&6
 else case e in #(
   e)
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+  exec 9>&6 6>/dev/null
 
-#include <locale.h>
-#include <time.h>
-#if HAVE_LANGINFO_CODESET
-# include <langinfo.h>
-#endif
-#include <stdlib.h>
-#include <string.h>
-struct tm t;
-char buf[16];
-int main () {
-  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
-     imitates locale dependent behaviour by looking at the environment
-     variables, and all locales use the UTF-8 encoding.  */
-#if defined __BEOS__ || defined __HAIKU__
-  return 1;
-#else
-  /* Check whether the given locale name is recognized by the system.  */
-# if defined _WIN32 && !defined __CYGWIN__
-  /* On native Windows, setlocale(category, "") looks at the system settings,
-     not at the environment variables.  Also, when an encoding suffix such
-     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
-     category of the locale to "C".  */
-  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
-      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
-    return 1;
-# else
-  if (setlocale (LC_ALL, "") == NULL) return 1;
-# endif
-  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
-     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
-     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
-     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
-     some unit tests fail.
-     On MirBSD 10, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
-# if HAVE_LANGINFO_CODESET
-  {
-    const char *cs = nl_langinfo (CODESET);
-    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
-        || strcmp (cs, "UTF-8") == 0)
-      return 1;
-  }
-# endif
-# ifdef __CYGWIN__
-  /* On Cygwin, avoid locale names without encoding suffix, because the
-     locale_charset() function relies on the encoding suffix.  Note that
-     LC_ALL is set on the command line.  */
-  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-# endif
-  /* Check whether in the abbreviation of the second month, the second
-     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
-     one byte long. This excludes the UTF-8 encoding.  */
-  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
-  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
-# if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
-  /* Check whether the decimal separator is a comma.
-     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
-     are nl_langinfo(RADIXCHAR) are both ".".  */
-  if (localeconv () ->decimal_point[0] != ',') return 1;
-# endif
-  return 0;
-#endif
-}
+       case "$host_os" in
 
-_ACEOF
-    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && test -s conftest$ac_exeext; then
-      case "$host_os" in
-        # Handle native Windows specially, because there setlocale() interprets
-        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
-        # "fr" or "fra" as "French" or "French_France.1252",
-        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
-        # "ja" as "Japanese" or "Japanese_Japan.932",
-        # and similar.
-        mingw*)
-          # Test for the native Windows locale name.
-          if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_fr=French_France.1252
-          else
-            # None found.
-            gt_cv_locale_fr=none
-          fi
-          ;;
-        *)
-          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
-          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
-          # configure script would override the LC_ALL setting. Likewise for
-          # LC_CTYPE, which is also set at the beginning of the configure script.
-          # Test for the usual locale name.
-          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_fr=fr_FR
-          else
-            # Test for the locale name with explicit encoding suffix.
-            if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-              gt_cv_locale_fr=fr_FR.ISO-8859-1
-            else
-              # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
-              if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                gt_cv_locale_fr=fr_FR.ISO8859-1
-              else
-                # Test for the HP-UX locale name.
-                if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                  gt_cv_locale_fr=fr_FR.iso88591
-                else
-                  # Test for the Solaris 7 locale name.
-                  if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                    gt_cv_locale_fr=fr
-                  else
-                    # None found.
-                    gt_cv_locale_fr=none
-                  fi
-                fi
-              fi
-            fi
-          fi
-          ;;
-      esac
-    fi
-    rm -fr conftest*
-   ;;
+         linux*-android*)
+           ac_fn_check_decl "$LINENO" "newlocale" "ac_cv_have_decl_newlocale" "#include <locale.h>
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_newlocale" = xyes
+then :
+
+fi
+           if test $ac_cv_have_decl_newlocale = yes; then
+             ac_fn_c_check_func "$LINENO" "newlocale" "ac_cv_func_newlocale"
+if test "x$ac_cv_func_newlocale" = xyes
+then :
+
+fi
+
+             if test $ac_cv_func_newlocale = yes; then
+               gl_cv_onwards_func_newlocale=yes
+             else
+                                                            gl_cv_onwards_func_newlocale='future OS version'
+             fi
+           else
+             gl_cv_onwards_func_newlocale='future OS version'
+           fi
+           ;;
+
+
+         *)
+           ac_fn_c_check_func "$LINENO" "newlocale" "ac_cv_func_newlocale"
+if test "x$ac_cv_func_newlocale" = xyes
+then :
+
+fi
+
+           gl_cv_onwards_func_newlocale=$ac_cv_func_newlocale
+           ;;
+
+       esac
+
+  exec 6>&9 9>&-
+
+     ;;
 esac
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
-printf "%s\n" "$gt_cv_locale_fr" >&6; }
-  LOCALE_FR=$gt_cv_locale_fr
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_newlocale" >&5
+printf "%s\n" "$gl_cv_onwards_func_newlocale" >&6; }
 
+  case "$gl_cv_onwards_func_newlocale" in
+    future*) ac_cv_func_newlocale=no ;;
+    *)       ac_cv_func_newlocale=$gl_cv_onwards_func_newlocale ;;
+  esac
+  if test $ac_cv_func_newlocale = yes; then
 
+printf "%s\n" "#define HAVE_NEWLOCALE 1" >>confdefs.h
 
+  fi
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
-printf %s "checking for a french Unicode locale... " >&6; }
-if test ${gt_cv_locale_fr_utf8+y}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ nanosleep_save_libs=$LIBS
+
+ # Solaris 2.5.1 needs -lposix4 to get the nanosleep function.
+ # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
+ NANOSLEEP_LIB=
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing nanosleep" >&5
+printf %s "checking for library containing nanosleep... " >&6; }
+if test ${ac_cv_search_nanosleep+y}
 then :
   printf %s "(cached) " >&6
 else case e in #(
-  e)
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  e) ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#include <locale.h>
-#include <time.h>
-#if HAVE_LANGINFO_CODESET
-# include <langinfo.h>
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.
+   The 'extern "C"' is for builds by C++ compilers;
+   although this is not generally supported in C code supporting it here
+   has little cost and some practical benefit (sr 110532).  */
+#ifdef __cplusplus
+extern "C"
 #endif
-#include <stdlib.h>
-#include <string.h>
-struct tm t;
-char buf[16];
-int main () {
-  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
-     imitates locale dependent behaviour by looking at the environment
-     variables, and all locales use the UTF-8 encoding.  */
-#if !(defined __BEOS__ || defined __HAIKU__)
-  /* Check whether the given locale name is recognized by the system.  */
-# if defined _WIN32 && !defined __CYGWIN__
-  /* On native Windows, setlocale(category, "") looks at the system settings,
-     not at the environment variables.  Also, when an encoding suffix such
-     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
-     category of the locale to "C".  */
-  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
-      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
-    return 1;
-# else
-  if (setlocale (LC_ALL, "") == NULL) return 1;
-# endif
-  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
-     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
-     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
-     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
-     some unit tests fail.  */
-# if HAVE_LANGINFO_CODESET
-  {
-    const char *cs = nl_langinfo (CODESET);
-    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
-      return 1;
-  }
-# endif
-# ifdef __CYGWIN__
-  /* On Cygwin, avoid locale names without encoding suffix, because the
-     locale_charset() function relies on the encoding suffix.  Note that
-     LC_ALL is set on the command line.  */
-  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-# endif
-  /* Check whether in the abbreviation of the second month, the second
-     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
-     two bytes long, with UTF-8 encoding.  */
-  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
-  if (strftime (buf, sizeof (buf), "%b", &t) < 4
-      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
-    return 1;
-#endif
-#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
-  /* Check whether the decimal separator is a comma.
-     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
-     are nl_langinfo(RADIXCHAR) are both ".".  */
-  if (localeconv () ->decimal_point[0] != ',') return 1;
-#endif
-  return 0;
-}
-
-_ACEOF
-    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && test -s conftest$ac_exeext; then
-      case "$host_os" in
-        # Handle native Windows specially, because there setlocale() interprets
-        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
-        # "fr" or "fra" as "French" or "French_France.1252",
-        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
-        # "ja" as "Japanese" or "Japanese_Japan.932",
-        # and similar.
-        mingw*)
-          # Test for the hypothetical native Windows locale name.
-          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_fr_utf8=French_France.65001
-          else
-            # None found.
-            gt_cv_locale_fr_utf8=none
-          fi
-          ;;
-        *)
-          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
-          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
-          # configure script would override the LC_ALL setting. Likewise for
-          # LC_CTYPE, which is also set at the beginning of the configure script.
-          # Test for the usual locale name.
-          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_fr_utf8=fr_FR
-          else
-            # Test for the locale name with explicit encoding suffix.
-            if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-              gt_cv_locale_fr_utf8=fr_FR.UTF-8
-            else
-              # Test for the Solaris 7 locale name.
-              if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                gt_cv_locale_fr_utf8=fr.UTF-8
-              else
-                # None found.
-                gt_cv_locale_fr_utf8=none
-              fi
-            fi
-          fi
-          ;;
-      esac
-    fi
-    rm -fr conftest*
-   ;;
-esac
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
-printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
-  LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
-
-
-
-
-
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
-printf %s "checking for a traditional japanese locale... " >&6; }
-if test ${gt_cv_locale_ja+y}
-then :
-  printf %s "(cached) " >&6
-else case e in #(
-  e)
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <locale.h>
-#include <time.h>
-#if HAVE_LANGINFO_CODESET
-# include <langinfo.h>
-#endif
-#include <stdlib.h>
-#include <string.h>
-struct tm t;
-char buf[16];
-int main ()
-{
-  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
-     imitates locale dependent behaviour by looking at the environment
-     variables, and all locales use the UTF-8 encoding.  */
-#if defined __BEOS__ || defined __HAIKU__
-  return 1;
-#else
-  /* Check whether the given locale name is recognized by the system.  */
-# if defined _WIN32 && !defined __CYGWIN__
-  /* On native Windows, setlocale(category, "") looks at the system settings,
-     not at the environment variables.  Also, when an encoding suffix such
-     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
-     category of the locale to "C".  */
-  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
-      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
-    return 1;
-# else
-  if (setlocale (LC_ALL, "") == NULL) return 1;
-# endif
-  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
-     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
-     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
-     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
-     some unit tests fail.
-     On MirBSD 10, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
-# if HAVE_LANGINFO_CODESET
-  {
-    const char *cs = nl_langinfo (CODESET);
-    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
-        || strcmp (cs, "UTF-8") == 0)
-      return 1;
-  }
-# endif
-# ifdef __CYGWIN__
-  /* On Cygwin, avoid locale names without encoding suffix, because the
-     locale_charset() function relies on the encoding suffix.  Note that
-     LC_ALL is set on the command line.  */
-  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-# endif
-  /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
-     on Cygwin 1.5.x.  */
-  if (MB_CUR_MAX == 1)
-    return 1;
-  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
-     This excludes the UTF-8 encoding (except on MirBSD).  */
-  {
-    const char *p;
-    t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
-    if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
-    for (p = buf; *p != '\0'; p++)
-      if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
-        return 1;
-  }
-  return 0;
-#endif
-}
-
-_ACEOF
-    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && test -s conftest$ac_exeext; then
-      case "$host_os" in
-        # Handle native Windows specially, because there setlocale() interprets
-        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
-        # "fr" or "fra" as "French" or "French_France.1252",
-        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
-        # "ja" as "Japanese" or "Japanese_Japan.932",
-        # and similar.
-        mingw*)
-          # Note that on native Windows, the Japanese locale is
-          # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
-          # cannot use it here.
-          gt_cv_locale_ja=none
-          ;;
-        *)
-          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
-          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
-          # configure script would override the LC_ALL setting. Likewise for
-          # LC_CTYPE, which is also set at the beginning of the configure script.
-          # Test for the AIX locale name.
-          if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_ja=ja_JP
-          else
-            # Test for the locale name with explicit encoding suffix.
-            if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-              gt_cv_locale_ja=ja_JP.EUC-JP
-            else
-              # Test for the HP-UX, OSF/1, NetBSD locale name.
-              if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                gt_cv_locale_ja=ja_JP.eucJP
-              else
-                # Test for the IRIX, FreeBSD locale name.
-                if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                  gt_cv_locale_ja=ja_JP.EUC
-                else
-                  # Test for the Solaris 7 locale name.
-                  if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                    gt_cv_locale_ja=ja
-                  else
-                    # Special test for NetBSD 1.6.
-                    if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
-                      gt_cv_locale_ja=ja_JP.eucJP
-                    else
-                      # None found.
-                      gt_cv_locale_ja=none
-                    fi
-                  fi
-                fi
-              fi
-            fi
-          fi
-          ;;
-      esac
-    fi
-    rm -fr conftest*
-   ;;
-esac
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
-printf "%s\n" "$gt_cv_locale_ja" >&6; }
-  LOCALE_JA=$gt_cv_locale_ja
-
-
-
-
-
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
-printf %s "checking for a transitional chinese locale... " >&6; }
-if test ${gt_cv_locale_zh_CN+y}
-then :
-  printf %s "(cached) " >&6
-else case e in #(
-  e)
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <locale.h>
-#include <stdlib.h>
-#include <time.h>
-#if HAVE_LANGINFO_CODESET
-# include <langinfo.h>
-#endif
-#include <stdlib.h>
-#include <string.h>
-struct tm t;
-char buf[16];
-int main ()
-{
-  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
-     imitates locale dependent behaviour by looking at the environment
-     variables, and all locales use the UTF-8 encoding.  */
-#if defined __BEOS__ || defined __HAIKU__
-  return 1;
-#else
-  /* Check whether the given locale name is recognized by the system.  */
-# if defined _WIN32 && !defined __CYGWIN__
-  /* On native Windows, setlocale(category, "") looks at the system settings,
-     not at the environment variables.  Also, when an encoding suffix such
-     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
-     category of the locale to "C".  */
-  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
-      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
-    return 1;
-# else
-  if (setlocale (LC_ALL, "") == NULL) return 1;
-# endif
-  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
-     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
-     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
-     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
-     some unit tests fail.
-     On MirBSD 10, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
-# if HAVE_LANGINFO_CODESET
-  {
-    const char *cs = nl_langinfo (CODESET);
-    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
-        || strcmp (cs, "UTF-8") == 0)
-      return 1;
-  }
-# endif
-# ifdef __CYGWIN__
-  /* On Cygwin, avoid locale names without encoding suffix, because the
-     locale_charset() function relies on the encoding suffix.  Note that
-     LC_ALL is set on the command line.  */
-  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-# endif
-  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
-     This excludes the UTF-8 encoding (except on MirBSD).  */
-  {
-    const char *p;
-    t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
-    if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
-    for (p = buf; *p != '\0'; p++)
-      if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
-        return 1;
-  }
-  /* Check whether a typical GB18030 multibyte sequence is recognized as a
-     single wide character.  This excludes the GB2312 and GBK encodings.  */
-  if (mblen ("\203\062\332\066", 5) != 4)
-    return 1;
-  return 0;
-#endif
-}
-
-_ACEOF
-    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && test -s conftest$ac_exeext; then
-      case "$host_os" in
-        # Handle native Windows specially, because there setlocale() interprets
-        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
-        # "fr" or "fra" as "French" or "French_France.1252",
-        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
-        # "ja" as "Japanese" or "Japanese_Japan.932",
-        # and similar.
-        mingw*)
-          # Test for the hypothetical native Windows locale name.
-          if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_zh_CN=Chinese_China.54936
-          else
-            # None found.
-            gt_cv_locale_zh_CN=none
-          fi
-          ;;
-        solaris2.8)
-          # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
-          # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
-          # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
-          gt_cv_locale_zh_CN=none
-          ;;
-        *)
-          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
-          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
-          # configure script would override the LC_ALL setting. Likewise for
-          # LC_CTYPE, which is also set at the beginning of the configure script.
-          # Test for the locale name without encoding suffix.
-          if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_zh_CN=zh_CN
-          else
-            # Test for the locale name with explicit encoding suffix.
-            if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-              gt_cv_locale_zh_CN=zh_CN.GB18030
-            else
-              # None found.
-              gt_cv_locale_zh_CN=none
-            fi
-          fi
-          ;;
-      esac
-    else
-      # If there was a link error, due to mblen(), the system is so old that
-      # it certainly doesn't have a chinese locale.
-      gt_cv_locale_zh_CN=none
-    fi
-    rm -fr conftest*
-   ;;
-esac
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
-printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
-  LOCALE_ZH_CN=$gt_cv_locale_zh_CN
-
-
-
-
-     if test "$ac_cv_header_winsock2_h" = yes; then
-  GL_COND_OBJ_LISTEN_TRUE=
-  GL_COND_OBJ_LISTEN_FALSE='#'
-else
-  GL_COND_OBJ_LISTEN_TRUE='#'
-  GL_COND_OBJ_LISTEN_FALSE=
-fi
-:
-    if test -z "${GL_COND_OBJ_LISTEN_TRUE}" && test -z "${GL_COND_OBJ_LISTEN_FALSE}"; then
-    GL_COND_OBJ_LISTEN_TRUE='#'
-    GL_COND_OBJ_LISTEN_FALSE='#'
-  fi
-
-
-
-
-
-
-
-
-
-
-    if test "$GL_GNULIB_LISTEN" != 1; then
-        if test "$GL_GNULIB_LISTEN" = 0; then
-      GL_GNULIB_LISTEN=$gl_module_indicator_condition
-    else
-      GL_GNULIB_LISTEN="($GL_GNULIB_LISTEN || $gl_module_indicator_condition)"
-    fi
-  fi
-
-
-
-
-
-printf "%s\n" "#define GNULIB_TEST_LISTEN 1" >>confdefs.h
-
-
-
-
-
-
-
-
-
-
-
-  if test $HAVE_LOCALE_T = 1; then
-
-    gl_func_newlocale="$ac_cv_func_newlocale"
-    gl_func_duplocale="$ac_cv_func_duplocale"
-    gl_func_freelocale="$ac_cv_func_freelocale"
-  else
-            gl_func_newlocale=no
-    gl_func_duplocale=no
-    gl_func_freelocale=no
-  fi
-  if test $gl_func_newlocale != yes; then
-    HAVE_NEWLOCALE=0
-  fi
-  if test $gl_func_duplocale != yes; then
-    HAVE_DUPLOCALE=0
-  fi
-  if test $gl_func_freelocale != yes; then
-    HAVE_FREELOCALE=0
-  fi
-  if test $gt_localename_enhances_locale_funcs = yes; then
-    REPLACE_NEWLOCALE=1
-    REPLACE_DUPLOCALE=1
-    REPLACE_FREELOCALE=1
-  fi
-
-
-
-
-
-
-
-
-
-
-    if test "$GL_GNULIB_LOCALENAME" != 1; then
-        if test "$GL_GNULIB_LOCALENAME" = 0; then
-      GL_GNULIB_LOCALENAME=$gl_module_indicator_condition
-    else
-      GL_GNULIB_LOCALENAME="($GL_GNULIB_LOCALENAME || $gl_module_indicator_condition)"
-    fi
-  fi
-
-
-
-
-
-printf "%s\n" "#define GNULIB_TEST_LOCALENAME 1" >>confdefs.h
-
-
-
-
-
-
-
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a turkish Unicode locale" >&5
-printf %s "checking for a turkish Unicode locale... " >&6; }
-if test ${gt_cv_locale_tr_utf8+y}
-then :
-  printf %s "(cached) " >&6
-else case e in #(
-  e)
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <locale.h>
-#include <time.h>
-#if HAVE_LANGINFO_CODESET
-# include <langinfo.h>
-#endif
-#include <stdlib.h>
-#include <string.h>
-#include <wctype.h>
-struct tm t;
-char buf[16];
-int main () {
-  /* On BeOS, locales are not implemented in libc.  Rather, libintl
-     imitates locale dependent behaviour by looking at the environment
-     variables, and all locales use the UTF-8 encoding.  But BeOS does not
-     implement the Turkish upper-/lowercase mappings.  Therefore, let this
-     program return 1 on BeOS.  */
-  /* Check whether the given locale name is recognized by the system.  */
-#if defined _WIN32 && !defined __CYGWIN__
-  /* On native Windows, setlocale(category, "") looks at the system settings,
-     not at the environment variables.  Also, when an encoding suffix such
-     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
-     category of the locale to "C".  */
-  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
-      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
-    return 1;
-#else
-  if (setlocale (LC_ALL, "") == NULL) return 1;
-#endif
-  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
-     On Mac OS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET)
-     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
-     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
-     some unit tests fail.  */
-#if HAVE_LANGINFO_CODESET
-  {
-    const char *cs = nl_langinfo (CODESET);
-    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
-      return 1;
-  }
-#endif
-#ifdef __CYGWIN__
-  /* On Cygwin, avoid locale names without encoding suffix, because the
-     locale_charset() function relies on the encoding suffix.  Note that
-     LC_ALL is set on the command line.  */
-  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-#endif
-  /* Check whether in the abbreviation of the eighth month, the second
-     character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is
-     two bytes long, with UTF-8 encoding.  */
-  t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19;
-  if (strftime (buf, sizeof (buf), "%b", &t) < 4
-      || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f)
-    return 1;
-  /* Check whether the upper-/lowercase mappings are as expected for
-     Turkish.  */
-  if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i'
-      || towupper(0x0131) != 'I' || towlower ('I') != 0x0131)
-    return 1;
-  return 0;
-}
-
-_ACEOF
-    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && test -s conftest$ac_exeext; then
-      case "$host_os" in
-        # Handle native Windows specially, because there setlocale() interprets
-        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
-        # "fr" or "fra" as "French" or "French_France.1252",
-        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
-        # "ja" as "Japanese" or "Japanese_Japan.932",
-        # and similar.
-        mingw*)
-          # Test for the hypothetical native Windows locale name.
-          if (LC_ALL=Turkish_Turkey.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_tr_utf8=Turkish_Turkey.65001
-          else
-            # None found.
-            gt_cv_locale_tr_utf8=none
-          fi
-          ;;
-        *)
-          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
-          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
-          # configure script would override the LC_ALL setting. Likewise for
-          # LC_CTYPE, which is also set at the beginning of the configure script.
-          # Test for the usual locale name.
-          if (LC_ALL=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_tr_utf8=tr_TR
-          else
-            # Test for the locale name with explicit encoding suffix.
-            if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-              gt_cv_locale_tr_utf8=tr_TR.UTF-8
-            else
-              # Test for the Solaris 7 locale name.
-              if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                gt_cv_locale_tr_utf8=tr.UTF-8
-              else
-                # None found.
-                gt_cv_locale_tr_utf8=none
-              fi
-            fi
-          fi
-          ;;
-      esac
-    else
-      gt_cv_locale_tr_utf8=none
-    fi
-    rm -fr conftest*
-   ;;
-esac
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_tr_utf8" >&5
-printf "%s\n" "$gt_cv_locale_tr_utf8" >&6; }
-  LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8
-
-
-
-
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
-printf %s "checking for a french Unicode locale... " >&6; }
-if test ${gt_cv_locale_fr_utf8+y}
-then :
-  printf %s "(cached) " >&6
-else case e in #(
-  e)
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <locale.h>
-#include <time.h>
-#if HAVE_LANGINFO_CODESET
-# include <langinfo.h>
-#endif
-#include <stdlib.h>
-#include <string.h>
-struct tm t;
-char buf[16];
-int main () {
-  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
-     imitates locale dependent behaviour by looking at the environment
-     variables, and all locales use the UTF-8 encoding.  */
-#if !(defined __BEOS__ || defined __HAIKU__)
-  /* Check whether the given locale name is recognized by the system.  */
-# if defined _WIN32 && !defined __CYGWIN__
-  /* On native Windows, setlocale(category, "") looks at the system settings,
-     not at the environment variables.  Also, when an encoding suffix such
-     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
-     category of the locale to "C".  */
-  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
-      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
-    return 1;
-# else
-  if (setlocale (LC_ALL, "") == NULL) return 1;
-# endif
-  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
-     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
-     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
-     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
-     some unit tests fail.  */
-# if HAVE_LANGINFO_CODESET
-  {
-    const char *cs = nl_langinfo (CODESET);
-    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
-      return 1;
-  }
-# endif
-# ifdef __CYGWIN__
-  /* On Cygwin, avoid locale names without encoding suffix, because the
-     locale_charset() function relies on the encoding suffix.  Note that
-     LC_ALL is set on the command line.  */
-  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-# endif
-  /* Check whether in the abbreviation of the second month, the second
-     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
-     two bytes long, with UTF-8 encoding.  */
-  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
-  if (strftime (buf, sizeof (buf), "%b", &t) < 4
-      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
-    return 1;
-#endif
-#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
-  /* Check whether the decimal separator is a comma.
-     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
-     are nl_langinfo(RADIXCHAR) are both ".".  */
-  if (localeconv () ->decimal_point[0] != ',') return 1;
-#endif
-  return 0;
-}
-
-_ACEOF
-    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && test -s conftest$ac_exeext; then
-      case "$host_os" in
-        # Handle native Windows specially, because there setlocale() interprets
-        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
-        # "fr" or "fra" as "French" or "French_France.1252",
-        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
-        # "ja" as "Japanese" or "Japanese_Japan.932",
-        # and similar.
-        mingw*)
-          # Test for the hypothetical native Windows locale name.
-          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_fr_utf8=French_France.65001
-          else
-            # None found.
-            gt_cv_locale_fr_utf8=none
-          fi
-          ;;
-        *)
-          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
-          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
-          # configure script would override the LC_ALL setting. Likewise for
-          # LC_CTYPE, which is also set at the beginning of the configure script.
-          # Test for the usual locale name.
-          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_fr_utf8=fr_FR
-          else
-            # Test for the locale name with explicit encoding suffix.
-            if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-              gt_cv_locale_fr_utf8=fr_FR.UTF-8
-            else
-              # Test for the Solaris 7 locale name.
-              if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                gt_cv_locale_fr_utf8=fr.UTF-8
-              else
-                # None found.
-                gt_cv_locale_fr_utf8=none
-              fi
-            fi
-          fi
-          ;;
-      esac
-    fi
-    rm -fr conftest*
-   ;;
-esac
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
-printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
-  LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
-
-
-
-
-
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
-printf %s "checking for a traditional french locale... " >&6; }
-if test ${gt_cv_locale_fr+y}
-then :
-  printf %s "(cached) " >&6
-else case e in #(
-  e)
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <locale.h>
-#include <time.h>
-#if HAVE_LANGINFO_CODESET
-# include <langinfo.h>
-#endif
-#include <stdlib.h>
-#include <string.h>
-struct tm t;
-char buf[16];
-int main () {
-  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
-     imitates locale dependent behaviour by looking at the environment
-     variables, and all locales use the UTF-8 encoding.  */
-#if defined __BEOS__ || defined __HAIKU__
-  return 1;
-#else
-  /* Check whether the given locale name is recognized by the system.  */
-# if defined _WIN32 && !defined __CYGWIN__
-  /* On native Windows, setlocale(category, "") looks at the system settings,
-     not at the environment variables.  Also, when an encoding suffix such
-     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
-     category of the locale to "C".  */
-  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
-      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
-    return 1;
-# else
-  if (setlocale (LC_ALL, "") == NULL) return 1;
-# endif
-  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
-     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
-     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
-     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
-     some unit tests fail.
-     On MirBSD 10, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
-# if HAVE_LANGINFO_CODESET
-  {
-    const char *cs = nl_langinfo (CODESET);
-    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
-        || strcmp (cs, "UTF-8") == 0)
-      return 1;
-  }
-# endif
-# ifdef __CYGWIN__
-  /* On Cygwin, avoid locale names without encoding suffix, because the
-     locale_charset() function relies on the encoding suffix.  Note that
-     LC_ALL is set on the command line.  */
-  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-# endif
-  /* Check whether in the abbreviation of the second month, the second
-     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
-     one byte long. This excludes the UTF-8 encoding.  */
-  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
-  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
-# if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
-  /* Check whether the decimal separator is a comma.
-     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
-     are nl_langinfo(RADIXCHAR) are both ".".  */
-  if (localeconv () ->decimal_point[0] != ',') return 1;
-# endif
-  return 0;
-#endif
-}
-
-_ACEOF
-    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && test -s conftest$ac_exeext; then
-      case "$host_os" in
-        # Handle native Windows specially, because there setlocale() interprets
-        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
-        # "fr" or "fra" as "French" or "French_France.1252",
-        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
-        # "ja" as "Japanese" or "Japanese_Japan.932",
-        # and similar.
-        mingw*)
-          # Test for the native Windows locale name.
-          if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_fr=French_France.1252
-          else
-            # None found.
-            gt_cv_locale_fr=none
-          fi
-          ;;
-        *)
-          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
-          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
-          # configure script would override the LC_ALL setting. Likewise for
-          # LC_CTYPE, which is also set at the beginning of the configure script.
-          # Test for the usual locale name.
-          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_fr=fr_FR
-          else
-            # Test for the locale name with explicit encoding suffix.
-            if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-              gt_cv_locale_fr=fr_FR.ISO-8859-1
-            else
-              # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
-              if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                gt_cv_locale_fr=fr_FR.ISO8859-1
-              else
-                # Test for the HP-UX locale name.
-                if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                  gt_cv_locale_fr=fr_FR.iso88591
-                else
-                  # Test for the Solaris 7 locale name.
-                  if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                    gt_cv_locale_fr=fr
-                  else
-                    # None found.
-                    gt_cv_locale_fr=none
-                  fi
-                fi
-              fi
-            fi
-          fi
-          ;;
-      esac
-    fi
-    rm -fr conftest*
-   ;;
-esac
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
-printf "%s\n" "$gt_cv_locale_fr" >&6; }
-  LOCALE_FR=$gt_cv_locale_fr
-
-
-
-
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
-printf %s "checking for a french Unicode locale... " >&6; }
-if test ${gt_cv_locale_fr_utf8+y}
-then :
-  printf %s "(cached) " >&6
-else case e in #(
-  e)
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <locale.h>
-#include <time.h>
-#if HAVE_LANGINFO_CODESET
-# include <langinfo.h>
-#endif
-#include <stdlib.h>
-#include <string.h>
-struct tm t;
-char buf[16];
-int main () {
-  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
-     imitates locale dependent behaviour by looking at the environment
-     variables, and all locales use the UTF-8 encoding.  */
-#if !(defined __BEOS__ || defined __HAIKU__)
-  /* Check whether the given locale name is recognized by the system.  */
-# if defined _WIN32 && !defined __CYGWIN__
-  /* On native Windows, setlocale(category, "") looks at the system settings,
-     not at the environment variables.  Also, when an encoding suffix such
-     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
-     category of the locale to "C".  */
-  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
-      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
-    return 1;
-# else
-  if (setlocale (LC_ALL, "") == NULL) return 1;
-# endif
-  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
-     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
-     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
-     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
-     some unit tests fail.  */
-# if HAVE_LANGINFO_CODESET
-  {
-    const char *cs = nl_langinfo (CODESET);
-    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
-      return 1;
-  }
-# endif
-# ifdef __CYGWIN__
-  /* On Cygwin, avoid locale names without encoding suffix, because the
-     locale_charset() function relies on the encoding suffix.  Note that
-     LC_ALL is set on the command line.  */
-  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-# endif
-  /* Check whether in the abbreviation of the second month, the second
-     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
-     two bytes long, with UTF-8 encoding.  */
-  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
-  if (strftime (buf, sizeof (buf), "%b", &t) < 4
-      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
-    return 1;
-#endif
-#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
-  /* Check whether the decimal separator is a comma.
-     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
-     are nl_langinfo(RADIXCHAR) are both ".".  */
-  if (localeconv () ->decimal_point[0] != ',') return 1;
-#endif
-  return 0;
-}
-
-_ACEOF
-    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && test -s conftest$ac_exeext; then
-      case "$host_os" in
-        # Handle native Windows specially, because there setlocale() interprets
-        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
-        # "fr" or "fra" as "French" or "French_France.1252",
-        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
-        # "ja" as "Japanese" or "Japanese_Japan.932",
-        # and similar.
-        mingw*)
-          # Test for the hypothetical native Windows locale name.
-          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_fr_utf8=French_France.65001
-          else
-            # None found.
-            gt_cv_locale_fr_utf8=none
-          fi
-          ;;
-        *)
-          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
-          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
-          # configure script would override the LC_ALL setting. Likewise for
-          # LC_CTYPE, which is also set at the beginning of the configure script.
-          # Test for the usual locale name.
-          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_fr_utf8=fr_FR
-          else
-            # Test for the locale name with explicit encoding suffix.
-            if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-              gt_cv_locale_fr_utf8=fr_FR.UTF-8
-            else
-              # Test for the Solaris 7 locale name.
-              if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                gt_cv_locale_fr_utf8=fr.UTF-8
-              else
-                # None found.
-                gt_cv_locale_fr_utf8=none
-              fi
-            fi
-          fi
-          ;;
-      esac
-    fi
-    rm -fr conftest*
-   ;;
-esac
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
-printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
-  LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
-
-
-
-
-
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
-printf %s "checking for a traditional japanese locale... " >&6; }
-if test ${gt_cv_locale_ja+y}
-then :
-  printf %s "(cached) " >&6
-else case e in #(
-  e)
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <locale.h>
-#include <time.h>
-#if HAVE_LANGINFO_CODESET
-# include <langinfo.h>
-#endif
-#include <stdlib.h>
-#include <string.h>
-struct tm t;
-char buf[16];
-int main ()
-{
-  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
-     imitates locale dependent behaviour by looking at the environment
-     variables, and all locales use the UTF-8 encoding.  */
-#if defined __BEOS__ || defined __HAIKU__
-  return 1;
-#else
-  /* Check whether the given locale name is recognized by the system.  */
-# if defined _WIN32 && !defined __CYGWIN__
-  /* On native Windows, setlocale(category, "") looks at the system settings,
-     not at the environment variables.  Also, when an encoding suffix such
-     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
-     category of the locale to "C".  */
-  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
-      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
-    return 1;
-# else
-  if (setlocale (LC_ALL, "") == NULL) return 1;
-# endif
-  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
-     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
-     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
-     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
-     some unit tests fail.
-     On MirBSD 10, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
-# if HAVE_LANGINFO_CODESET
-  {
-    const char *cs = nl_langinfo (CODESET);
-    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
-        || strcmp (cs, "UTF-8") == 0)
-      return 1;
-  }
-# endif
-# ifdef __CYGWIN__
-  /* On Cygwin, avoid locale names without encoding suffix, because the
-     locale_charset() function relies on the encoding suffix.  Note that
-     LC_ALL is set on the command line.  */
-  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-# endif
-  /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
-     on Cygwin 1.5.x.  */
-  if (MB_CUR_MAX == 1)
-    return 1;
-  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
-     This excludes the UTF-8 encoding (except on MirBSD).  */
-  {
-    const char *p;
-    t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
-    if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
-    for (p = buf; *p != '\0'; p++)
-      if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
-        return 1;
-  }
-  return 0;
-#endif
-}
-
-_ACEOF
-    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && test -s conftest$ac_exeext; then
-      case "$host_os" in
-        # Handle native Windows specially, because there setlocale() interprets
-        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
-        # "fr" or "fra" as "French" or "French_France.1252",
-        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
-        # "ja" as "Japanese" or "Japanese_Japan.932",
-        # and similar.
-        mingw*)
-          # Note that on native Windows, the Japanese locale is
-          # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
-          # cannot use it here.
-          gt_cv_locale_ja=none
-          ;;
-        *)
-          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
-          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
-          # configure script would override the LC_ALL setting. Likewise for
-          # LC_CTYPE, which is also set at the beginning of the configure script.
-          # Test for the AIX locale name.
-          if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_ja=ja_JP
-          else
-            # Test for the locale name with explicit encoding suffix.
-            if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-              gt_cv_locale_ja=ja_JP.EUC-JP
-            else
-              # Test for the HP-UX, OSF/1, NetBSD locale name.
-              if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                gt_cv_locale_ja=ja_JP.eucJP
-              else
-                # Test for the IRIX, FreeBSD locale name.
-                if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                  gt_cv_locale_ja=ja_JP.EUC
-                else
-                  # Test for the Solaris 7 locale name.
-                  if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                    gt_cv_locale_ja=ja
-                  else
-                    # Special test for NetBSD 1.6.
-                    if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
-                      gt_cv_locale_ja=ja_JP.eucJP
-                    else
-                      # None found.
-                      gt_cv_locale_ja=none
-                    fi
-                  fi
-                fi
-              fi
-            fi
-          fi
-          ;;
-      esac
-    fi
-    rm -fr conftest*
-   ;;
-esac
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
-printf "%s\n" "$gt_cv_locale_ja" >&6; }
-  LOCALE_JA=$gt_cv_locale_ja
-
-
-
-
-
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
-printf %s "checking for a transitional chinese locale... " >&6; }
-if test ${gt_cv_locale_zh_CN+y}
-then :
-  printf %s "(cached) " >&6
-else case e in #(
-  e)
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <locale.h>
-#include <stdlib.h>
-#include <time.h>
-#if HAVE_LANGINFO_CODESET
-# include <langinfo.h>
-#endif
-#include <stdlib.h>
-#include <string.h>
-struct tm t;
-char buf[16];
-int main ()
-{
-  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
-     imitates locale dependent behaviour by looking at the environment
-     variables, and all locales use the UTF-8 encoding.  */
-#if defined __BEOS__ || defined __HAIKU__
-  return 1;
-#else
-  /* Check whether the given locale name is recognized by the system.  */
-# if defined _WIN32 && !defined __CYGWIN__
-  /* On native Windows, setlocale(category, "") looks at the system settings,
-     not at the environment variables.  Also, when an encoding suffix such
-     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
-     category of the locale to "C".  */
-  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
-      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
-    return 1;
-# else
-  if (setlocale (LC_ALL, "") == NULL) return 1;
-# endif
-  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
-     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
-     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
-     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
-     some unit tests fail.
-     On MirBSD 10, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
-# if HAVE_LANGINFO_CODESET
-  {
-    const char *cs = nl_langinfo (CODESET);
-    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
-        || strcmp (cs, "UTF-8") == 0)
-      return 1;
-  }
-# endif
-# ifdef __CYGWIN__
-  /* On Cygwin, avoid locale names without encoding suffix, because the
-     locale_charset() function relies on the encoding suffix.  Note that
-     LC_ALL is set on the command line.  */
-  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-# endif
-  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
-     This excludes the UTF-8 encoding (except on MirBSD).  */
-  {
-    const char *p;
-    t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
-    if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
-    for (p = buf; *p != '\0'; p++)
-      if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
-        return 1;
-  }
-  /* Check whether a typical GB18030 multibyte sequence is recognized as a
-     single wide character.  This excludes the GB2312 and GBK encodings.  */
-  if (mblen ("\203\062\332\066", 5) != 4)
-    return 1;
-  return 0;
-#endif
-}
-
-_ACEOF
-    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && test -s conftest$ac_exeext; then
-      case "$host_os" in
-        # Handle native Windows specially, because there setlocale() interprets
-        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
-        # "fr" or "fra" as "French" or "French_France.1252",
-        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
-        # "ja" as "Japanese" or "Japanese_Japan.932",
-        # and similar.
-        mingw*)
-          # Test for the hypothetical native Windows locale name.
-          if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_zh_CN=Chinese_China.54936
-          else
-            # None found.
-            gt_cv_locale_zh_CN=none
-          fi
-          ;;
-        solaris2.8)
-          # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
-          # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
-          # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
-          gt_cv_locale_zh_CN=none
-          ;;
-        *)
-          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
-          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
-          # configure script would override the LC_ALL setting. Likewise for
-          # LC_CTYPE, which is also set at the beginning of the configure script.
-          # Test for the locale name without encoding suffix.
-          if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_zh_CN=zh_CN
-          else
-            # Test for the locale name with explicit encoding suffix.
-            if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-              gt_cv_locale_zh_CN=zh_CN.GB18030
-            else
-              # None found.
-              gt_cv_locale_zh_CN=none
-            fi
-          fi
-          ;;
-      esac
-    else
-      # If there was a link error, due to mblen(), the system is so old that
-      # it certainly doesn't have a chinese locale.
-      gt_cv_locale_zh_CN=none
-    fi
-    rm -fr conftest*
-   ;;
-esac
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
-printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
-  LOCALE_ZH_CN=$gt_cv_locale_zh_CN
-
-
-
-
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
-printf %s "checking for a french Unicode locale... " >&6; }
-if test ${gt_cv_locale_fr_utf8+y}
-then :
-  printf %s "(cached) " >&6
-else case e in #(
-  e)
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <locale.h>
-#include <time.h>
-#if HAVE_LANGINFO_CODESET
-# include <langinfo.h>
-#endif
-#include <stdlib.h>
-#include <string.h>
-struct tm t;
-char buf[16];
-int main () {
-  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
-     imitates locale dependent behaviour by looking at the environment
-     variables, and all locales use the UTF-8 encoding.  */
-#if !(defined __BEOS__ || defined __HAIKU__)
-  /* Check whether the given locale name is recognized by the system.  */
-# if defined _WIN32 && !defined __CYGWIN__
-  /* On native Windows, setlocale(category, "") looks at the system settings,
-     not at the environment variables.  Also, when an encoding suffix such
-     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
-     category of the locale to "C".  */
-  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
-      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
-    return 1;
-# else
-  if (setlocale (LC_ALL, "") == NULL) return 1;
-# endif
-  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
-     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
-     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
-     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
-     some unit tests fail.  */
-# if HAVE_LANGINFO_CODESET
-  {
-    const char *cs = nl_langinfo (CODESET);
-    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
-      return 1;
-  }
-# endif
-# ifdef __CYGWIN__
-  /* On Cygwin, avoid locale names without encoding suffix, because the
-     locale_charset() function relies on the encoding suffix.  Note that
-     LC_ALL is set on the command line.  */
-  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-# endif
-  /* Check whether in the abbreviation of the second month, the second
-     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
-     two bytes long, with UTF-8 encoding.  */
-  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
-  if (strftime (buf, sizeof (buf), "%b", &t) < 4
-      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
-    return 1;
-#endif
-#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
-  /* Check whether the decimal separator is a comma.
-     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
-     are nl_langinfo(RADIXCHAR) are both ".".  */
-  if (localeconv () ->decimal_point[0] != ',') return 1;
-#endif
-  return 0;
-}
-
-_ACEOF
-    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && test -s conftest$ac_exeext; then
-      case "$host_os" in
-        # Handle native Windows specially, because there setlocale() interprets
-        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
-        # "fr" or "fra" as "French" or "French_France.1252",
-        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
-        # "ja" as "Japanese" or "Japanese_Japan.932",
-        # and similar.
-        mingw*)
-          # Test for the hypothetical native Windows locale name.
-          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_fr_utf8=French_France.65001
-          else
-            # None found.
-            gt_cv_locale_fr_utf8=none
-          fi
-          ;;
-        *)
-          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
-          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
-          # configure script would override the LC_ALL setting. Likewise for
-          # LC_CTYPE, which is also set at the beginning of the configure script.
-          # Test for the usual locale name.
-          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_fr_utf8=fr_FR
-          else
-            # Test for the locale name with explicit encoding suffix.
-            if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-              gt_cv_locale_fr_utf8=fr_FR.UTF-8
-            else
-              # Test for the Solaris 7 locale name.
-              if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                gt_cv_locale_fr_utf8=fr.UTF-8
-              else
-                # None found.
-                gt_cv_locale_fr_utf8=none
-              fi
-            fi
-          fi
-          ;;
-      esac
-    fi
-    rm -fr conftest*
-   ;;
-esac
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
-printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
-  LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
-
-
-
-
-
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
-printf %s "checking for a transitional chinese locale... " >&6; }
-if test ${gt_cv_locale_zh_CN+y}
-then :
-  printf %s "(cached) " >&6
-else case e in #(
-  e)
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <locale.h>
-#include <stdlib.h>
-#include <time.h>
-#if HAVE_LANGINFO_CODESET
-# include <langinfo.h>
-#endif
-#include <stdlib.h>
-#include <string.h>
-struct tm t;
-char buf[16];
-int main ()
-{
-  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
-     imitates locale dependent behaviour by looking at the environment
-     variables, and all locales use the UTF-8 encoding.  */
-#if defined __BEOS__ || defined __HAIKU__
-  return 1;
-#else
-  /* Check whether the given locale name is recognized by the system.  */
-# if defined _WIN32 && !defined __CYGWIN__
-  /* On native Windows, setlocale(category, "") looks at the system settings,
-     not at the environment variables.  Also, when an encoding suffix such
-     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
-     category of the locale to "C".  */
-  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
-      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
-    return 1;
-# else
-  if (setlocale (LC_ALL, "") == NULL) return 1;
-# endif
-  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
-     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
-     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
-     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
-     some unit tests fail.
-     On MirBSD 10, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
-# if HAVE_LANGINFO_CODESET
-  {
-    const char *cs = nl_langinfo (CODESET);
-    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
-        || strcmp (cs, "UTF-8") == 0)
-      return 1;
-  }
-# endif
-# ifdef __CYGWIN__
-  /* On Cygwin, avoid locale names without encoding suffix, because the
-     locale_charset() function relies on the encoding suffix.  Note that
-     LC_ALL is set on the command line.  */
-  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-# endif
-  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
-     This excludes the UTF-8 encoding (except on MirBSD).  */
-  {
-    const char *p;
-    t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
-    if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
-    for (p = buf; *p != '\0'; p++)
-      if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
-        return 1;
-  }
-  /* Check whether a typical GB18030 multibyte sequence is recognized as a
-     single wide character.  This excludes the GB2312 and GBK encodings.  */
-  if (mblen ("\203\062\332\066", 5) != 4)
-    return 1;
-  return 0;
-#endif
-}
-
-_ACEOF
-    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && test -s conftest$ac_exeext; then
-      case "$host_os" in
-        # Handle native Windows specially, because there setlocale() interprets
-        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
-        # "fr" or "fra" as "French" or "French_France.1252",
-        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
-        # "ja" as "Japanese" or "Japanese_Japan.932",
-        # and similar.
-        mingw*)
-          # Test for the hypothetical native Windows locale name.
-          if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_zh_CN=Chinese_China.54936
-          else
-            # None found.
-            gt_cv_locale_zh_CN=none
-          fi
-          ;;
-        solaris2.8)
-          # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
-          # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
-          # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
-          gt_cv_locale_zh_CN=none
-          ;;
-        *)
-          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
-          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
-          # configure script would override the LC_ALL setting. Likewise for
-          # LC_CTYPE, which is also set at the beginning of the configure script.
-          # Test for the locale name without encoding suffix.
-          if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_zh_CN=zh_CN
-          else
-            # Test for the locale name with explicit encoding suffix.
-            if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-              gt_cv_locale_zh_CN=zh_CN.GB18030
-            else
-              # None found.
-              gt_cv_locale_zh_CN=none
-            fi
-          fi
-          ;;
-      esac
-    else
-      # If there was a link error, due to mblen(), the system is so old that
-      # it certainly doesn't have a chinese locale.
-      gt_cv_locale_zh_CN=none
-    fi
-    rm -fr conftest*
-   ;;
-esac
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
-printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
-  LOCALE_ZH_CN=$gt_cv_locale_zh_CN
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- nanosleep_save_libs=$LIBS
-
- # Solaris 2.5.1 needs -lposix4 to get the nanosleep function.
- # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
- LIB_NANOSLEEP=
-
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing nanosleep" >&5
-printf %s "checking for library containing nanosleep... " >&6; }
-if test ${ac_cv_search_nanosleep+y}
-then :
-  printf %s "(cached) " >&6
-else case e in #(
-  e) ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.
-   The 'extern "C"' is for builds by C++ compilers;
-   although this is not generally supported in C code, supporting it here
-   has little cost and some practical benefit (sr 110532).  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char nanosleep ();
+char nanosleep (void);
 int
 main (void)
 {
@@ -45758,7 +45905,7 @@ if test "$ac_res" != no
 then :
   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
   test "$ac_cv_search_nanosleep" = "none required" ||
-                 LIB_NANOSLEEP=$ac_cv_search_nanosleep
+                 NANOSLEEP_LIB=$ac_cv_search_nanosleep
 fi
 
  if test "x$ac_cv_search_nanosleep" != xno; then
@@ -45781,7 +45928,8 @@ else case e in #(
   e)
      if test "$cross_compiling" = yes
 then :
-  case "$host_os" in           linux*) # Guess it halfway works when the kernel is Linux.
+  case "$host_os" in
+          linux*) # Guess it halfway works when the kernel is Linux.
             gl_cv_func_nanosleep='guessing no (mishandles large arguments)' ;;
           mingw*) # Guess no on native Windows.
             gl_cv_func_nanosleep='guessing no' ;;
@@ -45846,6 +45994,12 @@ else case e in #(
             #else /* A simpler test for native Windows.  */
             if (nanosleep (&ts_sleep, &ts_remaining) < 0)
               return 3;
+            /* Test for 32-bit mingw bug: negative nanosecond values do not
+               cause failure.  */
+            ts_sleep.tv_sec = 1;
+            ts_sleep.tv_nsec = -1;
+            if (nanosleep (&ts_sleep, &ts_remaining) != -1)
+              return 7;
             #endif
             return 0;
           }
@@ -45854,7 +46008,10 @@ if ac_fn_c_try_run "$LINENO"
 then :
   gl_cv_func_nanosleep=yes
 else case e in #(
-  e) case $? in         4|5|6) gl_cv_func_nanosleep='no (mishandles large arguments)';;         *)   gl_cv_func_nanosleep=no;;
+  e) case $? in
+        4|5|6) gl_cv_func_nanosleep='no (mishandles large arguments)' ;;
+        7)     gl_cv_func_nanosleep='no (mishandles negative tv_nsec)' ;;
+        *)     gl_cv_func_nanosleep=no ;;
         esac ;;
 esac
 fi
@@ -45888,6 +46045,10 @@ printf "%s\n" "#define HAVE_BUG_BIG_NANOSLEEP 1" >>confdefs.h
  fi
  LIBS=$nanosleep_save_libs
 
+ # For backward compatibility.
+ LIB_NANOSLEEP="$NANOSLEEP_LIB"
+
+
 
      if test $HAVE_NANOSLEEP = 0 || test $REPLACE_NANOSLEEP = 1; then
   GL_COND_OBJ_NANOSLEEP_TRUE=
@@ -46095,275 +46256,142 @@ fi
 
 
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
-printf %s "checking for a traditional french locale... " >&6; }
-if test ${gt_cv_locale_fr+y}
+
+
+
+
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uselocale" >&5
+printf %s "checking for uselocale... " >&6; }
+if test ${gl_cv_onwards_func_uselocale+y}
 then :
   printf %s "(cached) " >&6
 else case e in #(
   e)
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+  exec 9>&6 6>/dev/null
 
-#include <locale.h>
-#include <time.h>
-#if HAVE_LANGINFO_CODESET
-# include <langinfo.h>
-#endif
-#include <stdlib.h>
-#include <string.h>
-struct tm t;
-char buf[16];
-int main () {
-  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
-     imitates locale dependent behaviour by looking at the environment
-     variables, and all locales use the UTF-8 encoding.  */
-#if defined __BEOS__ || defined __HAIKU__
-  return 1;
-#else
-  /* Check whether the given locale name is recognized by the system.  */
-# if defined _WIN32 && !defined __CYGWIN__
-  /* On native Windows, setlocale(category, "") looks at the system settings,
-     not at the environment variables.  Also, when an encoding suffix such
-     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
-     category of the locale to "C".  */
-  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
-      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
-    return 1;
-# else
-  if (setlocale (LC_ALL, "") == NULL) return 1;
-# endif
-  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
-     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
-     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
-     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
-     some unit tests fail.
-     On MirBSD 10, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
-# if HAVE_LANGINFO_CODESET
-  {
-    const char *cs = nl_langinfo (CODESET);
-    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
-        || strcmp (cs, "UTF-8") == 0)
-      return 1;
-  }
-# endif
-# ifdef __CYGWIN__
-  /* On Cygwin, avoid locale names without encoding suffix, because the
-     locale_charset() function relies on the encoding suffix.  Note that
-     LC_ALL is set on the command line.  */
-  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-# endif
-  /* Check whether in the abbreviation of the second month, the second
-     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
-     one byte long. This excludes the UTF-8 encoding.  */
-  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
-  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
-# if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
-  /* Check whether the decimal separator is a comma.
-     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
-     are nl_langinfo(RADIXCHAR) are both ".".  */
-  if (localeconv () ->decimal_point[0] != ',') return 1;
-# endif
-  return 0;
-#endif
-}
+       case "$host_os" in
 
-_ACEOF
-    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && test -s conftest$ac_exeext; then
-      case "$host_os" in
-        # Handle native Windows specially, because there setlocale() interprets
-        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
-        # "fr" or "fra" as "French" or "French_France.1252",
-        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
-        # "ja" as "Japanese" or "Japanese_Japan.932",
-        # and similar.
-        mingw*)
-          # Test for the native Windows locale name.
-          if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_fr=French_France.1252
-          else
-            # None found.
-            gt_cv_locale_fr=none
-          fi
-          ;;
-        *)
-          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
-          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
-          # configure script would override the LC_ALL setting. Likewise for
-          # LC_CTYPE, which is also set at the beginning of the configure script.
-          # Test for the usual locale name.
-          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_fr=fr_FR
-          else
-            # Test for the locale name with explicit encoding suffix.
-            if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-              gt_cv_locale_fr=fr_FR.ISO-8859-1
-            else
-              # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
-              if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                gt_cv_locale_fr=fr_FR.ISO8859-1
-              else
-                # Test for the HP-UX locale name.
-                if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                  gt_cv_locale_fr=fr_FR.iso88591
-                else
-                  # Test for the Solaris 7 locale name.
-                  if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                    gt_cv_locale_fr=fr
-                  else
-                    # None found.
-                    gt_cv_locale_fr=none
-                  fi
-                fi
-              fi
-            fi
-          fi
-          ;;
-      esac
-    fi
-    rm -fr conftest*
-   ;;
+         linux*-android*)
+           ac_fn_check_decl "$LINENO" "uselocale" "ac_cv_have_decl_uselocale" "#include <locale.h>
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_uselocale" = xyes
+then :
+
+fi
+           if test $ac_cv_have_decl_uselocale = yes; then
+             ac_fn_c_check_func "$LINENO" "uselocale" "ac_cv_func_uselocale"
+if test "x$ac_cv_func_uselocale" = xyes
+then :
+
+fi
+
+             if test $ac_cv_func_uselocale = yes; then
+               gl_cv_onwards_func_uselocale=yes
+             else
+                                                            gl_cv_onwards_func_uselocale='future OS version'
+             fi
+           else
+             gl_cv_onwards_func_uselocale='future OS version'
+           fi
+           ;;
+
+
+         *)
+           ac_fn_c_check_func "$LINENO" "uselocale" "ac_cv_func_uselocale"
+if test "x$ac_cv_func_uselocale" = xyes
+then :
+
+fi
+
+           gl_cv_onwards_func_uselocale=$ac_cv_func_uselocale
+           ;;
+
+       esac
+
+  exec 6>&9 9>&-
+
+     ;;
 esac
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
-printf "%s\n" "$gt_cv_locale_fr" >&6; }
-  LOCALE_FR=$gt_cv_locale_fr
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_uselocale" >&5
+printf "%s\n" "$gl_cv_onwards_func_uselocale" >&6; }
 
+  case "$gl_cv_onwards_func_uselocale" in
+    future*) ac_cv_func_uselocale=no ;;
+    *)       ac_cv_func_uselocale=$gl_cv_onwards_func_uselocale ;;
+  esac
+  if test $ac_cv_func_uselocale = yes; then
 
+printf "%s\n" "#define HAVE_USELOCALE 1" >>confdefs.h
 
+  fi
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
-printf %s "checking for a french Unicode locale... " >&6; }
-if test ${gt_cv_locale_fr_utf8+y}
+
+
+          if test $ac_cv_func_uselocale = yes; then
+
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether uselocale works" >&5
+printf %s "checking whether uselocale works... " >&6; }
+if test ${gt_cv_func_uselocale_works+y}
 then :
   printf %s "(cached) " >&6
 else case e in #(
-  e)
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  e) if test "$cross_compiling" = yes
+then :
+  # Guess no on AIX and z/OS, yes otherwise.
+          case "$host_os" in
+            aix* | openedition*) gt_cv_func_uselocale_works="guessing no" ;;
+            *)                   gt_cv_func_uselocale_works="guessing yes" ;;
+          esac
+
+else case e in #(
+  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 #include <locale.h>
-#include <time.h>
-#if HAVE_LANGINFO_CODESET
-# include <langinfo.h>
-#endif
-#include <stdlib.h>
-#include <string.h>
-struct tm t;
-char buf[16];
-int main () {
-  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
-     imitates locale dependent behaviour by looking at the environment
-     variables, and all locales use the UTF-8 encoding.  */
-#if !(defined __BEOS__ || defined __HAIKU__)
-  /* Check whether the given locale name is recognized by the system.  */
-# if defined _WIN32 && !defined __CYGWIN__
-  /* On native Windows, setlocale(category, "") looks at the system settings,
-     not at the environment variables.  Also, when an encoding suffix such
-     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
-     category of the locale to "C".  */
-  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
-      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
-    return 1;
-# else
-  if (setlocale (LC_ALL, "") == NULL) return 1;
-# endif
-  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
-     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
-     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
-     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
-     some unit tests fail.  */
-# if HAVE_LANGINFO_CODESET
-  {
-    const char *cs = nl_langinfo (CODESET);
-    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
-      return 1;
-  }
-# endif
-# ifdef __CYGWIN__
-  /* On Cygwin, avoid locale names without encoding suffix, because the
-     locale_charset() function relies on the encoding suffix.  Note that
-     LC_ALL is set on the command line.  */
-  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-# endif
-  /* Check whether in the abbreviation of the second month, the second
-     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
-     two bytes long, with UTF-8 encoding.  */
-  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
-  if (strftime (buf, sizeof (buf), "%b", &t) < 4
-      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
-    return 1;
-#endif
-#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
-  /* Check whether the decimal separator is a comma.
-     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
-     are nl_langinfo(RADIXCHAR) are both ".".  */
-  if (localeconv () ->decimal_point[0] != ',') return 1;
+#if HAVE_XLOCALE_H
+# include <xlocale.h>
 #endif
+locale_t loc1;
+int main ()
+{
+  uselocale (NULL);
+  setlocale (LC_ALL, "en_US.UTF-8");
   return 0;
 }
-
 _ACEOF
-    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && test -s conftest$ac_exeext; then
-      case "$host_os" in
-        # Handle native Windows specially, because there setlocale() interprets
-        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
-        # "fr" or "fra" as "French" or "French_France.1252",
-        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
-        # "ja" as "Japanese" or "Japanese_Japan.932",
-        # and similar.
-        mingw*)
-          # Test for the hypothetical native Windows locale name.
-          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_fr_utf8=French_France.65001
-          else
-            # None found.
-            gt_cv_locale_fr_utf8=none
-          fi
-          ;;
-        *)
-          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
-          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
-          # configure script would override the LC_ALL setting. Likewise for
-          # LC_CTYPE, which is also set at the beginning of the configure script.
-          # Test for the usual locale name.
-          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_fr_utf8=fr_FR
-          else
-            # Test for the locale name with explicit encoding suffix.
-            if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-              gt_cv_locale_fr_utf8=fr_FR.UTF-8
-            else
-              # Test for the Solaris 7 locale name.
-              if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                gt_cv_locale_fr_utf8=fr.UTF-8
-              else
-                # None found.
-                gt_cv_locale_fr_utf8=none
-              fi
-            fi
-          fi
-          ;;
-      esac
-    fi
-    rm -fr conftest*
-   ;;
+if ac_fn_c_try_run "$LINENO"
+then :
+  gt_cv_func_uselocale_works=yes
+else case e in #(
+  e) gt_cv_func_uselocale_works=no ;;
 esac
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
-printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
-  LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
+fi
+
+       ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_uselocale_works" >&5
+printf "%s\n" "$gt_cv_func_uselocale_works" >&6; }
+  else
+    gt_cv_func_uselocale_works=no
+  fi
+  case "$gt_cv_func_uselocale_works" in
+    *yes)
+      gt_working_uselocale=yes
+
+printf "%s\n" "#define HAVE_WORKING_USELOCALE 1" >>confdefs.h
+
+      ;;
+    *)
+      gt_working_uselocale=no
+      ;;
+  esac
 
 
 
@@ -46371,7 +46399,7 @@ printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
 
 
 
-             if test "$GL_GENERATE_ERRNO_H:$REPLACE_STRERROR_0" != false:0; then
+          if test "$GL_GENERATE_ERRNO_H:$REPLACE_STRERROR_0" != false:0; then
             REPLACE_PERROR=1
   fi
   case ${gl_cv_func_strerror_r_works-unset} in
@@ -46385,12 +46413,12 @@ else case e in #(
   e) if test "$cross_compiling" = yes
 then :
   case "$host_os" in
-                       # Guess yes on musl systems.
-              *-musl*) gl_cv_func_perror_works="guessing yes" ;;
-                       # Guess yes on native Windows.
-              mingw*)  gl_cv_func_perror_works="guessing yes" ;;
-                       # Otherwise obey --enable-cross-guesses.
-              *)       gl_cv_func_perror_works="$gl_cross_guess_normal" ;;
+                                  # Guess yes on musl systems.
+              *-musl* | midipix*) gl_cv_func_perror_works="guessing yes" ;;
+                                  # Guess yes on native Windows.
+              mingw*)             gl_cv_func_perror_works="guessing yes" ;;
+                                  # Otherwise obey --enable-cross-guesses.
+              *)                  gl_cv_func_perror_works="$gl_cross_guess_normal" ;;
             esac
 
 else case e in #(
@@ -46448,6 +46476,10 @@ printf "%s\n" "$gl_cv_func_perror_works" >&6; }
                   REPLACE_PERROR=1
       ;;
   esac
+    case "$host_os" in
+                     # Yes on Android 11.
+    linux*-android*) REPLACE_PERROR=1 ;;
+  esac
 
 
      if test $REPLACE_PERROR = 1; then
@@ -46547,6 +46579,8 @@ then :
            case "$host_os" in
                              # Guess yes on Linux systems.
             linux-* | linux) gl_cv_func_pselect_detects_ebadf="guessing yes" ;;
+                             # Guess yes on systems that emulate the Linux system calls.
+            midipix*)        gl_cv_func_pselect_detects_ebadf="guessing yes" ;;
                              # Guess yes on glibc systems.
             *-gnu* | gnu*)   gl_cv_func_pselect_detects_ebadf="guessing yes" ;;
                              # If we don't know, obey --enable-cross-guesses.
@@ -46810,7 +46844,7 @@ fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_macro" >&5
 printf "%s\n" "$gl_cv_func_pthread_sigmask_macro" >&6; }
 
-  LIB_PTHREAD_SIGMASK=
+  PTHREAD_SIGMASK_LIB=
 
   if test $gl_cv_func_pthread_sigmask_macro = yes; then
         HAVE_PTHREAD_SIGMASK=0
@@ -46862,7 +46896,7 @@ fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&5
 printf "%s\n" "$gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&6; }
             if test $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD = yes; then
-                            LIB_PTHREAD_SIGMASK="$LIBMULTITHREAD"
+                            PTHREAD_SIGMASK_LIB="$LIBMULTITHREAD"
             else
                             HAVE_PTHREAD_SIGMASK=0
             fi
@@ -46881,11 +46915,13 @@ printf "%s\n" "$gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&6; }
   fi
 
 
+    LIB_PTHREAD_SIGMASK="$PTHREAD_SIGMASK_LIB"
+
 
     if test $HAVE_PTHREAD_SIGMASK = 1; then
 
 
-                if test -z "$LIB_PTHREAD_SIGMASK"; then
+                if test -z "$PTHREAD_SIGMASK_LIB"; then
       case " $LIBS " in
         *' -pthread '*) ;;
         *' -lpthread '*) ;;
@@ -46957,7 +46993,7 @@ then :
 else case e in #(
   e)
         gl_save_LIBS="$LIBS"
-        LIBS="$LIBS $LIB_PTHREAD_SIGMASK"
+        LIBS="$LIBS $PTHREAD_SIGMASK_LIB"
         if test "$cross_compiling" = yes
 then :
   case "$host_os" in
@@ -47032,6 +47068,7 @@ else case e in #(
   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
+#include <limits.h>
 #include <pthread.h>
 #include <signal.h>
 #include <stdio.h>
@@ -47050,14 +47087,16 @@ sigint_handler (int sig)
 int main ()
 {
   sigset_t set;
-  int pid = getpid ();
+  pid_t pid = getpid ();
   char command[80];
+  if (LONG_MAX < pid)
+    return 6;
   signal (SIGINT, sigint_handler);
   sigemptyset (&set);
   sigaddset (&set, SIGINT);
   if (!(pthread_sigmask (SIG_BLOCK, &set, NULL) == 0))
     return 1;
-  sprintf (command, "sh -c 'sleep 1; kill -%d %d' &", SIGINT, pid);
+  sprintf (command, "sh -c 'sleep 1; kill -INT %ld' &", (long) pid);
   if (!(system (command) == 0))
     return 2;
   sleep (2);
@@ -47143,523 +47182,67 @@ fi
 
 
 
-
-printf "%s\n" "#define GNULIB_TEST_PTHREAD_SIGMASK 1" >>confdefs.h
-
-
-
-
-
-     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for putenv compatible with GNU and SVID" >&5
-printf %s "checking for putenv compatible with GNU and SVID... " >&6; }
-if test ${gl_cv_func_svid_putenv+y}
-then :
-  printf %s "(cached) " >&6
-else case e in #(
-  e) if test "$cross_compiling" = yes
-then :
-          case "$host_os" in
-                         # Guess yes on glibc systems.
-          *-gnu* | gnu*) gl_cv_func_svid_putenv="guessing yes" ;;
-                         # Guess yes on musl systems.
-          *-musl*)       gl_cv_func_svid_putenv="guessing yes" ;;
-                         # Guess no on native Windows.
-          mingw*)        gl_cv_func_svid_putenv="guessing no" ;;
-                         # If we don't know, obey --enable-cross-guesses.
-          *)             gl_cv_func_svid_putenv="$gl_cross_guess_normal" ;;
-        esac
-
-else case e in #(
-  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$ac_includes_default
-
-
-$gl_mda_defines
-
-int
-main (void)
-{
-
-            /* Put it in env.  */
-            if (putenv ("CONFTEST_putenv=val"))
-              return 1;
-
-            /* Try to remove it.  */
-            if (putenv ("CONFTEST_putenv"))
-              return 2;
-
-            /* Make sure it was deleted.  */
-            if (getenv ("CONFTEST_putenv") != 0)
-              return 3;
-
-            return 0;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"
-then :
-  gl_cv_func_svid_putenv=yes
-else case e in #(
-  e) gl_cv_func_svid_putenv=no ;;
-esac
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
-esac
-fi
-
-     ;;
-esac
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_svid_putenv" >&5
-printf "%s\n" "$gl_cv_func_svid_putenv" >&6; }
-  case "$gl_cv_func_svid_putenv" in
-    *yes) ;;
-    *)
-      REPLACE_PUTENV=1
-      ;;
-  esac
-
-
-     if test $REPLACE_PUTENV = 1; then
-  GL_COND_OBJ_PUTENV_TRUE=
-  GL_COND_OBJ_PUTENV_FALSE='#'
-else
-  GL_COND_OBJ_PUTENV_TRUE='#'
-  GL_COND_OBJ_PUTENV_FALSE=
-fi
-:
-    if test -z "${GL_COND_OBJ_PUTENV_TRUE}" && test -z "${GL_COND_OBJ_PUTENV_FALSE}"; then
-    GL_COND_OBJ_PUTENV_TRUE='#'
-    GL_COND_OBJ_PUTENV_FALSE='#'
-  fi
-
-  if test -z "$GL_COND_OBJ_PUTENV_TRUE"; then :
-
-
-  ac_fn_check_decl "$LINENO" "_putenv" "ac_cv_have_decl__putenv" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
-if test "x$ac_cv_have_decl__putenv" = xyes
-then :
-  ac_have_decl=1
-else case e in #(
-  e) ac_have_decl=0 ;;
-esac
-fi
-printf "%s\n" "#define HAVE_DECL__PUTENV $ac_have_decl" >>confdefs.h
-
-
-
-fi
-
-
-
-
-
-
-
-
-
-    if test "$GL_GNULIB_PUTENV" != 1; then
-        if test "$GL_GNULIB_PUTENV" = 0; then
-      GL_GNULIB_PUTENV=$gl_module_indicator_condition
-    else
-      GL_GNULIB_PUTENV="($GL_GNULIB_PUTENV || $gl_module_indicator_condition)"
-    fi
-  fi
-
-
-
-
-
-printf "%s\n" "#define GNULIB_TEST_PUTENV 1" >>confdefs.h
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-  if test "$ac_cv_header_winsock2_h" = yes; then
-    REPLACE_SELECT=1
-  else
-
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether select supports a 0 argument" >&5
-printf %s "checking whether select supports a 0 argument... " >&6; }
-if test ${gl_cv_func_select_supports0+y}
-then :
-  printf %s "(cached) " >&6
-else case e in #(
-  e)
-        if test "$cross_compiling" = yes
-then :
-
-           case "$host_os" in
-                       # Guess no on Interix.
-             interix*) gl_cv_func_select_supports0="guessing no";;
-                       # Guess yes otherwise.
-             *)        gl_cv_func_select_supports0="guessing yes";;
-           esac
-
-else case e in #(
-  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <sys/types.h>
-#include <sys/time.h>
-#if HAVE_SYS_SELECT_H
-#include <sys/select.h>
-#endif
-int main ()
-{
-  struct timeval timeout;
-  timeout.tv_sec = 0;
-  timeout.tv_usec = 5;
-  return select (0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &timeout) < 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"
-then :
-  gl_cv_func_select_supports0=yes
-else case e in #(
-  e) gl_cv_func_select_supports0=no ;;
-esac
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
-esac
-fi
-
-       ;;
-esac
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_supports0" >&5
-printf "%s\n" "$gl_cv_func_select_supports0" >&6; }
-    case "$gl_cv_func_select_supports0" in
-      *yes) ;;
-      *) REPLACE_SELECT=1 ;;
-    esac
-
-        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether select detects invalid fds" >&5
-printf %s "checking whether select detects invalid fds... " >&6; }
-if test ${gl_cv_func_select_detects_ebadf+y}
-then :
-  printf %s "(cached) " >&6
-else case e in #(
-  e)
-        if test "$cross_compiling" = yes
-then :
-
-           case "$host_os" in
-                             # Guess yes on Linux systems.
-            linux-* | linux) gl_cv_func_select_detects_ebadf="guessing yes" ;;
-                             # Guess yes on glibc systems.
-            *-gnu* | gnu*)   gl_cv_func_select_detects_ebadf="guessing yes" ;;
-                             # If we don't know, obey --enable-cross-guesses.
-            *)               gl_cv_func_select_detects_ebadf="$gl_cross_guess_normal" ;;
-           esac
-
-else case e in #(
-  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <sys/types.h>
-#include <sys/time.h>
-#if HAVE_SYS_SELECT_H
-# include <sys/select.h>
-#endif
-#include <unistd.h>
-#include <errno.h>
-
-
-$gl_mda_defines
-
-int
-main (void)
-{
-
-  fd_set set;
-  dup2(0, 16);
-  FD_ZERO(&set);
-  FD_SET(16, &set);
-  close(16);
-  struct timeval timeout;
-  timeout.tv_sec = 0;
-  timeout.tv_usec = 5;
-  return select (17, &set, NULL, NULL, &timeout) != -1 || errno != EBADF;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"
-then :
-  gl_cv_func_select_detects_ebadf=yes
-else case e in #(
-  e) gl_cv_func_select_detects_ebadf=no ;;
-esac
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
-esac
-fi
-
-       ;;
-esac
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_detects_ebadf" >&5
-printf "%s\n" "$gl_cv_func_select_detects_ebadf" >&6; }
-    case $gl_cv_func_select_detects_ebadf in
-      *yes) ;;
-      *) REPLACE_SELECT=1 ;;
-    esac
-  fi
-
-    LIB_SELECT="$LIBSOCKET"
-  if test $REPLACE_SELECT = 1; then
-    case "$host_os" in
-      mingw*)
-                                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-int
-main ()
-{
-  MsgWaitForMultipleObjects (0, NULL, 0, 0, 0);
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"
-then :
-
-else case e in #(
-  e) LIB_SELECT="$LIB_SELECT -luser32" ;;
-esac
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam \
-    conftest$ac_exeext conftest.$ac_ext
-        ;;
-    esac
-  fi
-
-
-
-     if test $REPLACE_SELECT = 1; then
-  GL_COND_OBJ_SELECT_TRUE=
-  GL_COND_OBJ_SELECT_FALSE='#'
-else
-  GL_COND_OBJ_SELECT_TRUE='#'
-  GL_COND_OBJ_SELECT_FALSE=
-fi
-:
-    if test -z "${GL_COND_OBJ_SELECT_TRUE}" && test -z "${GL_COND_OBJ_SELECT_FALSE}"; then
-    GL_COND_OBJ_SELECT_TRUE='#'
-    GL_COND_OBJ_SELECT_FALSE='#'
-  fi
-
-
-
-
-
-
-
-
-
-
-    if test "$GL_GNULIB_SELECT" != 1; then
-        if test "$GL_GNULIB_SELECT" = 0; then
-      GL_GNULIB_SELECT=$gl_module_indicator_condition
-    else
-      GL_GNULIB_SELECT="($GL_GNULIB_SELECT || $gl_module_indicator_condition)"
-    fi
-  fi
-
-
-
-
-
-printf "%s\n" "#define GNULIB_TEST_SELECT 1" >>confdefs.h
-
-
-
-
-
-
-     if test $ac_cv_func_setenv = no; then
-    HAVE_SETENV=0
-  else
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
-printf %s "checking whether setenv validates arguments... " >&6; }
-if test ${gl_cv_func_setenv_works+y}
-then :
-  printf %s "(cached) " >&6
-else case e in #(
-  e) if test "$cross_compiling" = yes
-then :
-  case "$host_os" in
-                        # Guess yes on glibc systems.
-         *-gnu* | gnu*) gl_cv_func_setenv_works="guessing yes" ;;
-                        # Guess yes on musl systems.
-         *-musl*)       gl_cv_func_setenv_works="guessing yes" ;;
-                        # If we don't know, obey --enable-cross-guesses.
-         *)             gl_cv_func_setenv_works="$gl_cross_guess_normal" ;;
-       esac
-
-else case e in #(
-  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-       #include <stdlib.h>
-       #include <errno.h>
-       #include <string.h>
-
-int
-main (void)
-{
-
-       int result = 0;
-       {
-         if (setenv ("", "", 0) != -1)
-           result |= 1;
-         else if (errno != EINVAL)
-           result |= 2;
-       }
-       {
-         if (setenv ("a", "=", 1) != 0)
-           result |= 4;
-         else if (strcmp (getenv ("a"), "=") != 0)
-           result |= 8;
-       }
-       return result;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"
-then :
-  gl_cv_func_setenv_works=yes
-else case e in #(
-  e) gl_cv_func_setenv_works=no ;;
-esac
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
-esac
-fi
- ;;
-esac
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
-printf "%s\n" "$gl_cv_func_setenv_works" >&6; }
-    case "$gl_cv_func_setenv_works" in
-      *yes) ;;
-      *)
-        REPLACE_SETENV=1
-        ;;
-    esac
-  fi
-
-
-     if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
-  GL_COND_OBJ_SETENV_TRUE=
-  GL_COND_OBJ_SETENV_FALSE='#'
-else
-  GL_COND_OBJ_SETENV_TRUE='#'
-  GL_COND_OBJ_SETENV_FALSE=
-fi
-:
-    if test -z "${GL_COND_OBJ_SETENV_TRUE}" && test -z "${GL_COND_OBJ_SETENV_FALSE}"; then
-    GL_COND_OBJ_SETENV_TRUE='#'
-    GL_COND_OBJ_SETENV_FALSE='#'
-  fi
-
-
-
-
-
-
-
-
-
-
-    if test "$GL_GNULIB_SETENV" != 1; then
-        if test "$GL_GNULIB_SETENV" = 0; then
-      GL_GNULIB_SETENV=$gl_module_indicator_condition
-    else
-      GL_GNULIB_SETENV="($GL_GNULIB_SETENV || $gl_module_indicator_condition)"
-    fi
-  fi
-
-
-
-
-
-printf "%s\n" "#define GNULIB_TEST_SETENV 1" >>confdefs.h
-
-
-
-
-
-
-
-
-    NEED_SETLOCALE_IMPROVED=0
-  case "$host_os" in
-            mingw*) NEED_SETLOCALE_IMPROVED=1 ;;
-            cygwin*)
-      case `uname -r` in
-        1.5.*) NEED_SETLOCALE_IMPROVED=1 ;;
-      esac
-      ;;
-        *)
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setlocale supports the C locale" >&5
-printf %s "checking whether setlocale supports the C locale... " >&6; }
-if test ${gl_cv_func_setlocale_works+y}
+
+printf "%s\n" "#define GNULIB_TEST_PTHREAD_SIGMASK 1" >>confdefs.h
+
+
+
+
+
+     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for putenv compatible with GNU and SVID" >&5
+printf %s "checking for putenv compatible with GNU and SVID... " >&6; }
+if test ${gl_cv_func_svid_putenv+y}
 then :
   printf %s "(cached) " >&6
 else case e in #(
   e) if test "$cross_compiling" = yes
 then :
-  case "$host_os" in
-                               # Guess no on Android.
-              linux*-android*) gl_cv_func_setlocale_works="guessing no";;
-                               # Guess yes otherwise.
-              *)               gl_cv_func_setlocale_works="guessing yes";;
-            esac
+          case "$host_os" in
+                              # Guess yes on glibc systems.
+          *-gnu* | gnu*)      gl_cv_func_svid_putenv="guessing yes" ;;
+                              # Guess yes on musl systems.
+          *-musl* | midipix*) gl_cv_func_svid_putenv="guessing yes" ;;
+                              # Guess no on native Windows.
+          mingw*)             gl_cv_func_svid_putenv="guessing no" ;;
+                              # If we don't know, obey --enable-cross-guesses.
+          *)                  gl_cv_func_svid_putenv="$gl_cross_guess_normal" ;;
+        esac
 
 else case e in #(
   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+$ac_includes_default
 
-#include <locale.h>
-int main ()
+
+$gl_mda_defines
+
+int
+main (void)
 {
-  return setlocale (LC_ALL, "C") == NULL;
+
+            /* Put it in env.  */
+            if (putenv ("CONFTEST_putenv=val"))
+              return 1;
+
+            /* Try to remove it.  */
+            if (putenv ("CONFTEST_putenv"))
+              return 2;
+
+            /* Make sure it was deleted.  */
+            if (getenv ("CONFTEST_putenv") != 0)
+              return 3;
+
+            return 0;
+
+  ;
+  return 0;
 }
 _ACEOF
 if ac_fn_c_try_run "$LINENO"
 then :
-  gl_cv_func_setlocale_works=yes
+  gl_cv_func_svid_putenv=yes
 else case e in #(
-  e) gl_cv_func_setlocale_works=no ;;
+  e) gl_cv_func_svid_putenv=no ;;
 esac
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -47667,61 +47250,70 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 esac
 fi
 
-         ;;
+     ;;
 esac
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_works" >&5
-printf "%s\n" "$gl_cv_func_setlocale_works" >&6; }
-      case "$gl_cv_func_setlocale_works" in
-        *yes) ;;
-        *) NEED_SETLOCALE_IMPROVED=1 ;;
-      esac
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_svid_putenv" >&5
+printf "%s\n" "$gl_cv_func_svid_putenv" >&6; }
+  case "$gl_cv_func_svid_putenv" in
+    *yes) ;;
+    *)
+      REPLACE_PUTENV=1
       ;;
   esac
 
-printf "%s\n" "#define NEED_SETLOCALE_IMPROVED $NEED_SETLOCALE_IMPROVED" >>confdefs.h
-
 
-    NEED_SETLOCALE_MTSAFE=0
-  if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
-    NEED_SETLOCALE_MTSAFE=1
+     if test $REPLACE_PUTENV = 1; then
+  GL_COND_OBJ_PUTENV_TRUE=
+  GL_COND_OBJ_PUTENV_FALSE='#'
+else
+  GL_COND_OBJ_PUTENV_TRUE='#'
+  GL_COND_OBJ_PUTENV_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_PUTENV_TRUE}" && test -z "${GL_COND_OBJ_PUTENV_FALSE}"; then
+    GL_COND_OBJ_PUTENV_TRUE='#'
+    GL_COND_OBJ_PUTENV_FALSE='#'
   fi
 
-printf "%s\n" "#define NEED_SETLOCALE_MTSAFE $NEED_SETLOCALE_MTSAFE" >>confdefs.h
-
+  if test -z "$GL_COND_OBJ_PUTENV_TRUE"; then :
 
-  if test $NEED_SETLOCALE_IMPROVED = 1 || test $NEED_SETLOCALE_MTSAFE = 1; then
-    REPLACE_SETLOCALE=1
-  fi
 
-  if test $NEED_SETLOCALE_MTSAFE = 1; then
-    LIB_SETLOCALE="$LIB_SETLOCALE_NULL"
-  else
-    LIB_SETLOCALE=
-  fi
+  ac_fn_check_decl "$LINENO" "_putenv" "ac_cv_have_decl__putenv" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl__putenv" = xyes
+then :
+  ac_have_decl=1
+else case e in #(
+  e) ac_have_decl=0 ;;
+esac
+fi
+printf "%s\n" "#define HAVE_DECL__PUTENV $ac_have_decl" >>confdefs.h
 
 
 
-     if test $REPLACE_SETLOCALE = 1; then
-  GL_COND_OBJ_SETLOCALE_TRUE=
-  GL_COND_OBJ_SETLOCALE_FALSE='#'
-else
-  GL_COND_OBJ_SETLOCALE_TRUE='#'
-  GL_COND_OBJ_SETLOCALE_FALSE=
 fi
-:
-    if test -z "${GL_COND_OBJ_SETLOCALE_TRUE}" && test -z "${GL_COND_OBJ_SETLOCALE_FALSE}"; then
-    GL_COND_OBJ_SETLOCALE_TRUE='#'
-    GL_COND_OBJ_SETLOCALE_FALSE='#'
+
+
+
+
+
+
+
+
+
+    if test "$GL_GNULIB_PUTENV" != 1; then
+        if test "$GL_GNULIB_PUTENV" = 0; then
+      GL_GNULIB_PUTENV=$gl_module_indicator_condition
+    else
+      GL_GNULIB_PUTENV="($GL_GNULIB_PUTENV || $gl_module_indicator_condition)"
+    fi
   fi
 
-  if test -z "$GL_COND_OBJ_SETLOCALE_TRUE"; then :
 
 
-        :
 
 
-fi
+printf "%s\n" "#define GNULIB_TEST_PUTENV 1" >>confdefs.h
 
 
 
@@ -47731,588 +47323,477 @@ fi
 
 
 
-    if test "$GL_GNULIB_SETLOCALE" != 1; then
-        if test "$GL_GNULIB_SETLOCALE" = 0; then
-      GL_GNULIB_SETLOCALE=$gl_module_indicator_condition
-    else
-      GL_GNULIB_SETLOCALE="($GL_GNULIB_SETLOCALE || $gl_module_indicator_condition)"
-    fi
-  fi
 
 
 
 
 
-printf "%s\n" "#define GNULIB_TEST_SETLOCALE 1" >>confdefs.h
 
 
 
 
 
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
-printf %s "checking for a traditional french locale... " >&6; }
-if test ${gt_cv_locale_fr+y}
+  if test "$ac_cv_header_winsock2_h" = yes; then
+    REPLACE_SELECT=1
+  else
+
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether select supports a 0 argument" >&5
+printf %s "checking whether select supports a 0 argument... " >&6; }
+if test ${gl_cv_func_select_supports0+y}
 then :
   printf %s "(cached) " >&6
 else case e in #(
   e)
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+        if test "$cross_compiling" = yes
+then :
+
+           case "$host_os" in
+                       # Guess no on Interix.
+             interix*) gl_cv_func_select_supports0="guessing no";;
+                       # Guess yes otherwise.
+             *)        gl_cv_func_select_supports0="guessing yes";;
+           esac
+
+else case e in #(
+  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#include <locale.h>
-#include <time.h>
-#if HAVE_LANGINFO_CODESET
-# include <langinfo.h>
-#endif
-#include <stdlib.h>
-#include <string.h>
-struct tm t;
-char buf[16];
-int main () {
-  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
-     imitates locale dependent behaviour by looking at the environment
-     variables, and all locales use the UTF-8 encoding.  */
-#if defined __BEOS__ || defined __HAIKU__
-  return 1;
-#else
-  /* Check whether the given locale name is recognized by the system.  */
-# if defined _WIN32 && !defined __CYGWIN__
-  /* On native Windows, setlocale(category, "") looks at the system settings,
-     not at the environment variables.  Also, when an encoding suffix such
-     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
-     category of the locale to "C".  */
-  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
-      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
-    return 1;
-# else
-  if (setlocale (LC_ALL, "") == NULL) return 1;
-# endif
-  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
-     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
-     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
-     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
-     some unit tests fail.
-     On MirBSD 10, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
-# if HAVE_LANGINFO_CODESET
-  {
-    const char *cs = nl_langinfo (CODESET);
-    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
-        || strcmp (cs, "UTF-8") == 0)
-      return 1;
-  }
-# endif
-# ifdef __CYGWIN__
-  /* On Cygwin, avoid locale names without encoding suffix, because the
-     locale_charset() function relies on the encoding suffix.  Note that
-     LC_ALL is set on the command line.  */
-  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-# endif
-  /* Check whether in the abbreviation of the second month, the second
-     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
-     one byte long. This excludes the UTF-8 encoding.  */
-  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
-  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
-# if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
-  /* Check whether the decimal separator is a comma.
-     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
-     are nl_langinfo(RADIXCHAR) are both ".".  */
-  if (localeconv () ->decimal_point[0] != ',') return 1;
-# endif
-  return 0;
+#include <sys/types.h>
+#include <sys/time.h>
+#if HAVE_SYS_SELECT_H
+#include <sys/select.h>
 #endif
+int main ()
+{
+  struct timeval timeout;
+  timeout.tv_sec = 0;
+  timeout.tv_usec = 5;
+  return select (0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &timeout) < 0;
 }
-
 _ACEOF
-    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && test -s conftest$ac_exeext; then
-      case "$host_os" in
-        # Handle native Windows specially, because there setlocale() interprets
-        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
-        # "fr" or "fra" as "French" or "French_France.1252",
-        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
-        # "ja" as "Japanese" or "Japanese_Japan.932",
-        # and similar.
-        mingw*)
-          # Test for the native Windows locale name.
-          if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_fr=French_France.1252
-          else
-            # None found.
-            gt_cv_locale_fr=none
-          fi
-          ;;
-        *)
-          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
-          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
-          # configure script would override the LC_ALL setting. Likewise for
-          # LC_CTYPE, which is also set at the beginning of the configure script.
-          # Test for the usual locale name.
-          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_fr=fr_FR
-          else
-            # Test for the locale name with explicit encoding suffix.
-            if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-              gt_cv_locale_fr=fr_FR.ISO-8859-1
-            else
-              # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
-              if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                gt_cv_locale_fr=fr_FR.ISO8859-1
-              else
-                # Test for the HP-UX locale name.
-                if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                  gt_cv_locale_fr=fr_FR.iso88591
-                else
-                  # Test for the Solaris 7 locale name.
-                  if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                    gt_cv_locale_fr=fr
-                  else
-                    # None found.
-                    gt_cv_locale_fr=none
-                  fi
-                fi
-              fi
-            fi
-          fi
-          ;;
-      esac
-    fi
-    rm -fr conftest*
-   ;;
+if ac_fn_c_try_run "$LINENO"
+then :
+  gl_cv_func_select_supports0=yes
+else case e in #(
+  e) gl_cv_func_select_supports0=no ;;
+esac
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
 esac
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
-printf "%s\n" "$gt_cv_locale_fr" >&6; }
-  LOCALE_FR=$gt_cv_locale_fr
-
-
 
+       ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_supports0" >&5
+printf "%s\n" "$gl_cv_func_select_supports0" >&6; }
+    case "$gl_cv_func_select_supports0" in
+      *yes) ;;
+      *) REPLACE_SELECT=1 ;;
+    esac
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
-printf %s "checking for a french Unicode locale... " >&6; }
-if test ${gt_cv_locale_fr_utf8+y}
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether select detects invalid fds" >&5
+printf %s "checking whether select detects invalid fds... " >&6; }
+if test ${gl_cv_func_select_detects_ebadf+y}
 then :
   printf %s "(cached) " >&6
 else case e in #(
   e)
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+        if test "$cross_compiling" = yes
+then :
+
+           case "$host_os" in
+                             # Guess yes on Linux systems.
+            linux-* | linux) gl_cv_func_select_detects_ebadf="guessing yes" ;;
+                             # Guess yes on systems that emulate the Linux system calls.
+            midipix*)        gl_cv_func_select_detects_ebadf="guessing yes" ;;
+                             # Guess yes on glibc systems.
+            *-gnu* | gnu*)   gl_cv_func_select_detects_ebadf="guessing yes" ;;
+                             # If we don't know, obey --enable-cross-guesses.
+            *)               gl_cv_func_select_detects_ebadf="$gl_cross_guess_normal" ;;
+           esac
+
+else case e in #(
+  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#include <locale.h>
-#include <time.h>
-#if HAVE_LANGINFO_CODESET
-# include <langinfo.h>
-#endif
-#include <stdlib.h>
-#include <string.h>
-struct tm t;
-char buf[16];
-int main () {
-  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
-     imitates locale dependent behaviour by looking at the environment
-     variables, and all locales use the UTF-8 encoding.  */
-#if !(defined __BEOS__ || defined __HAIKU__)
-  /* Check whether the given locale name is recognized by the system.  */
-# if defined _WIN32 && !defined __CYGWIN__
-  /* On native Windows, setlocale(category, "") looks at the system settings,
-     not at the environment variables.  Also, when an encoding suffix such
-     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
-     category of the locale to "C".  */
-  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
-      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
-    return 1;
-# else
-  if (setlocale (LC_ALL, "") == NULL) return 1;
-# endif
-  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
-     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
-     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
-     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
-     some unit tests fail.  */
-# if HAVE_LANGINFO_CODESET
-  {
-    const char *cs = nl_langinfo (CODESET);
-    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
-      return 1;
-  }
-# endif
-# ifdef __CYGWIN__
-  /* On Cygwin, avoid locale names without encoding suffix, because the
-     locale_charset() function relies on the encoding suffix.  Note that
-     LC_ALL is set on the command line.  */
-  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-# endif
-  /* Check whether in the abbreviation of the second month, the second
-     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
-     two bytes long, with UTF-8 encoding.  */
-  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
-  if (strftime (buf, sizeof (buf), "%b", &t) < 4
-      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
-    return 1;
-#endif
-#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
-  /* Check whether the decimal separator is a comma.
-     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
-     are nl_langinfo(RADIXCHAR) are both ".".  */
-  if (localeconv () ->decimal_point[0] != ',') return 1;
+#include <sys/types.h>
+#include <sys/time.h>
+#if HAVE_SYS_SELECT_H
+# include <sys/select.h>
 #endif
+#include <unistd.h>
+#include <errno.h>
+
+
+$gl_mda_defines
+
+int
+main (void)
+{
+
+  fd_set set;
+  dup2(0, 16);
+  FD_ZERO(&set);
+  FD_SET(16, &set);
+  close(16);
+  struct timeval timeout;
+  timeout.tv_sec = 0;
+  timeout.tv_usec = 5;
+  return select (17, &set, NULL, NULL, &timeout) != -1 || errno != EBADF;
+
+  ;
   return 0;
 }
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  gl_cv_func_select_detects_ebadf=yes
+else case e in #(
+  e) gl_cv_func_select_detects_ebadf=no ;;
+esac
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
+fi
+
+       ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_detects_ebadf" >&5
+printf "%s\n" "$gl_cv_func_select_detects_ebadf" >&6; }
+    case $gl_cv_func_select_detects_ebadf in
+      *yes) ;;
+      *) REPLACE_SELECT=1 ;;
+    esac
+  fi
+
+    SELECT_LIB="$LIBSOCKET"
+  if test $REPLACE_SELECT = 1; then
+    case "$host_os" in
+      mingw*)
+                                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+int
+main ()
+{
+  MsgWaitForMultipleObjects (0, NULL, 0, 0, 0);
+  return 0;
+}
 _ACEOF
-    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && test -s conftest$ac_exeext; then
-      case "$host_os" in
-        # Handle native Windows specially, because there setlocale() interprets
-        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
-        # "fr" or "fra" as "French" or "French_France.1252",
-        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
-        # "ja" as "Japanese" or "Japanese_Japan.932",
-        # and similar.
-        mingw*)
-          # Test for the hypothetical native Windows locale name.
-          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_fr_utf8=French_France.65001
-          else
-            # None found.
-            gt_cv_locale_fr_utf8=none
-          fi
-          ;;
-        *)
-          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
-          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
-          # configure script would override the LC_ALL setting. Likewise for
-          # LC_CTYPE, which is also set at the beginning of the configure script.
-          # Test for the usual locale name.
-          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_fr_utf8=fr_FR
-          else
-            # Test for the locale name with explicit encoding suffix.
-            if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-              gt_cv_locale_fr_utf8=fr_FR.UTF-8
-            else
-              # Test for the Solaris 7 locale name.
-              if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                gt_cv_locale_fr_utf8=fr.UTF-8
-              else
-                # None found.
-                gt_cv_locale_fr_utf8=none
-              fi
-            fi
-          fi
-          ;;
-      esac
-    fi
-    rm -fr conftest*
-   ;;
+if ac_fn_c_try_link "$LINENO"
+then :
+
+else case e in #(
+  e) SELECT_LIB="$SELECT_LIB -luser32" ;;
 esac
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
-printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
-  LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+        ;;
+    esac
+  fi
+
+    LIB_SELECT="$LIB_SELECT"
+
+
+
+     if test $REPLACE_SELECT = 1; then
+  GL_COND_OBJ_SELECT_TRUE=
+  GL_COND_OBJ_SELECT_FALSE='#'
+else
+  GL_COND_OBJ_SELECT_TRUE='#'
+  GL_COND_OBJ_SELECT_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_SELECT_TRUE}" && test -z "${GL_COND_OBJ_SELECT_FALSE}"; then
+    GL_COND_OBJ_SELECT_TRUE='#'
+    GL_COND_OBJ_SELECT_FALSE='#'
+  fi
 
 
 
 
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
-printf %s "checking for a traditional japanese locale... " >&6; }
-if test ${gt_cv_locale_ja+y}
+
+
+
+
+
+    if test "$GL_GNULIB_SELECT" != 1; then
+        if test "$GL_GNULIB_SELECT" = 0; then
+      GL_GNULIB_SELECT=$gl_module_indicator_condition
+    else
+      GL_GNULIB_SELECT="($GL_GNULIB_SELECT || $gl_module_indicator_condition)"
+    fi
+  fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_SELECT 1" >>confdefs.h
+
+
+
+
+
+
+     if test $ac_cv_func_setenv = no; then
+    HAVE_SETENV=0
+  else
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
+printf %s "checking whether setenv validates arguments... " >&6; }
+if test ${gl_cv_func_setenv_works+y}
 then :
   printf %s "(cached) " >&6
 else case e in #(
-  e)
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  e) if test "$cross_compiling" = yes
+then :
+  case "$host_os" in
+                             # Guess yes on glibc systems.
+         *-gnu* | gnu*)      gl_cv_func_setenv_works="guessing yes" ;;
+                             # Guess yes on musl systems.
+         *-musl* | midipix*) gl_cv_func_setenv_works="guessing yes" ;;
+                             # If we don't know, obey --enable-cross-guesses.
+         *)                  gl_cv_func_setenv_works="$gl_cross_guess_normal" ;;
+       esac
+
+else case e in #(
+  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#include <locale.h>
-#include <time.h>
-#if HAVE_LANGINFO_CODESET
-# include <langinfo.h>
-#endif
-#include <stdlib.h>
-#include <string.h>
-struct tm t;
-char buf[16];
-int main ()
+       #include <stdlib.h>
+       #include <errno.h>
+       #include <string.h>
+
+int
+main (void)
 {
-  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
-     imitates locale dependent behaviour by looking at the environment
-     variables, and all locales use the UTF-8 encoding.  */
-#if defined __BEOS__ || defined __HAIKU__
-  return 1;
-#else
-  /* Check whether the given locale name is recognized by the system.  */
-# if defined _WIN32 && !defined __CYGWIN__
-  /* On native Windows, setlocale(category, "") looks at the system settings,
-     not at the environment variables.  Also, when an encoding suffix such
-     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
-     category of the locale to "C".  */
-  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
-      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
-    return 1;
-# else
-  if (setlocale (LC_ALL, "") == NULL) return 1;
-# endif
-  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
-     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
-     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
-     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
-     some unit tests fail.
-     On MirBSD 10, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
-# if HAVE_LANGINFO_CODESET
-  {
-    const char *cs = nl_langinfo (CODESET);
-    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
-        || strcmp (cs, "UTF-8") == 0)
-      return 1;
-  }
-# endif
-# ifdef __CYGWIN__
-  /* On Cygwin, avoid locale names without encoding suffix, because the
-     locale_charset() function relies on the encoding suffix.  Note that
-     LC_ALL is set on the command line.  */
-  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-# endif
-  /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
-     on Cygwin 1.5.x.  */
-  if (MB_CUR_MAX == 1)
-    return 1;
-  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
-     This excludes the UTF-8 encoding (except on MirBSD).  */
-  {
-    const char *p;
-    t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
-    if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
-    for (p = buf; *p != '\0'; p++)
-      if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
-        return 1;
-  }
+
+       int result = 0;
+       {
+         if (setenv ("", "", 0) != -1)
+           result |= 1;
+         else if (errno != EINVAL)
+           result |= 2;
+       }
+       {
+         if (setenv ("a", "=", 1) != 0)
+           result |= 4;
+         else if (strcmp (getenv ("a"), "=") != 0)
+           result |= 8;
+       }
+       return result;
+
+  ;
   return 0;
-#endif
 }
-
 _ACEOF
-    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && test -s conftest$ac_exeext; then
-      case "$host_os" in
-        # Handle native Windows specially, because there setlocale() interprets
-        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
-        # "fr" or "fra" as "French" or "French_France.1252",
-        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
-        # "ja" as "Japanese" or "Japanese_Japan.932",
-        # and similar.
-        mingw*)
-          # Note that on native Windows, the Japanese locale is
-          # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
-          # cannot use it here.
-          gt_cv_locale_ja=none
-          ;;
-        *)
-          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
-          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
-          # configure script would override the LC_ALL setting. Likewise for
-          # LC_CTYPE, which is also set at the beginning of the configure script.
-          # Test for the AIX locale name.
-          if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_ja=ja_JP
-          else
-            # Test for the locale name with explicit encoding suffix.
-            if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-              gt_cv_locale_ja=ja_JP.EUC-JP
-            else
-              # Test for the HP-UX, OSF/1, NetBSD locale name.
-              if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                gt_cv_locale_ja=ja_JP.eucJP
-              else
-                # Test for the IRIX, FreeBSD locale name.
-                if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                  gt_cv_locale_ja=ja_JP.EUC
-                else
-                  # Test for the Solaris 7 locale name.
-                  if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                    gt_cv_locale_ja=ja
-                  else
-                    # Special test for NetBSD 1.6.
-                    if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
-                      gt_cv_locale_ja=ja_JP.eucJP
-                    else
-                      # None found.
-                      gt_cv_locale_ja=none
-                    fi
-                  fi
-                fi
-              fi
-            fi
-          fi
-          ;;
-      esac
-    fi
-    rm -fr conftest*
-   ;;
+if ac_fn_c_try_run "$LINENO"
+then :
+  gl_cv_func_setenv_works=yes
+else case e in #(
+  e) gl_cv_func_setenv_works=no ;;
 esac
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
-printf "%s\n" "$gt_cv_locale_ja" >&6; }
-  LOCALE_JA=$gt_cv_locale_ja
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
+fi
+ ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
+printf "%s\n" "$gl_cv_func_setenv_works" >&6; }
+    case "$gl_cv_func_setenv_works" in
+      *yes) ;;
+      *)
+        REPLACE_SETENV=1
+        ;;
+    esac
+  fi
+
+
+     if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
+  GL_COND_OBJ_SETENV_TRUE=
+  GL_COND_OBJ_SETENV_FALSE='#'
+else
+  GL_COND_OBJ_SETENV_TRUE='#'
+  GL_COND_OBJ_SETENV_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_SETENV_TRUE}" && test -z "${GL_COND_OBJ_SETENV_FALSE}"; then
+    GL_COND_OBJ_SETENV_TRUE='#'
+    GL_COND_OBJ_SETENV_FALSE='#'
+  fi
 
 
 
 
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
-printf %s "checking for a transitional chinese locale... " >&6; }
-if test ${gt_cv_locale_zh_CN+y}
+
+
+
+
+
+    if test "$GL_GNULIB_SETENV" != 1; then
+        if test "$GL_GNULIB_SETENV" = 0; then
+      GL_GNULIB_SETENV=$gl_module_indicator_condition
+    else
+      GL_GNULIB_SETENV="($GL_GNULIB_SETENV || $gl_module_indicator_condition)"
+    fi
+  fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_SETENV 1" >>confdefs.h
+
+
+
+
+
+
+
+
+    NEED_SETLOCALE_IMPROVED=0
+  case "$host_os" in
+            mingw*) NEED_SETLOCALE_IMPROVED=1 ;;
+            cygwin*)
+      case `uname -r` in
+        1.5.*) NEED_SETLOCALE_IMPROVED=1 ;;
+      esac
+      ;;
+        *)
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setlocale supports the C locale" >&5
+printf %s "checking whether setlocale supports the C locale... " >&6; }
+if test ${gl_cv_func_setlocale_works+y}
 then :
   printf %s "(cached) " >&6
 else case e in #(
-  e)
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  e) if test "$cross_compiling" = yes
+then :
+  case "$host_os" in
+                               # Guess no on Android.
+              linux*-android*) gl_cv_func_setlocale_works="guessing no";;
+                               # Guess yes otherwise.
+              *)               gl_cv_func_setlocale_works="guessing yes";;
+            esac
+
+else case e in #(
+  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 #include <locale.h>
-#include <stdlib.h>
-#include <time.h>
-#if HAVE_LANGINFO_CODESET
-# include <langinfo.h>
-#endif
-#include <stdlib.h>
-#include <string.h>
-struct tm t;
-char buf[16];
 int main ()
 {
-  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
-     imitates locale dependent behaviour by looking at the environment
-     variables, and all locales use the UTF-8 encoding.  */
-#if defined __BEOS__ || defined __HAIKU__
-  return 1;
-#else
-  /* Check whether the given locale name is recognized by the system.  */
-# if defined _WIN32 && !defined __CYGWIN__
-  /* On native Windows, setlocale(category, "") looks at the system settings,
-     not at the environment variables.  Also, when an encoding suffix such
-     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
-     category of the locale to "C".  */
-  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
-      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
-    return 1;
-# else
-  if (setlocale (LC_ALL, "") == NULL) return 1;
-# endif
-  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
-     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
-     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
-     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
-     some unit tests fail.
-     On MirBSD 10, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
-# if HAVE_LANGINFO_CODESET
-  {
-    const char *cs = nl_langinfo (CODESET);
-    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
-        || strcmp (cs, "UTF-8") == 0)
-      return 1;
-  }
-# endif
-# ifdef __CYGWIN__
-  /* On Cygwin, avoid locale names without encoding suffix, because the
-     locale_charset() function relies on the encoding suffix.  Note that
-     LC_ALL is set on the command line.  */
-  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-# endif
-  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
-     This excludes the UTF-8 encoding (except on MirBSD).  */
-  {
-    const char *p;
-    t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
-    if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
-    for (p = buf; *p != '\0'; p++)
-      if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
-        return 1;
-  }
-  /* Check whether a typical GB18030 multibyte sequence is recognized as a
-     single wide character.  This excludes the GB2312 and GBK encodings.  */
-  if (mblen ("\203\062\332\066", 5) != 4)
-    return 1;
-  return 0;
-#endif
+  return setlocale (LC_ALL, "C") == NULL;
 }
-
 _ACEOF
-    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && test -s conftest$ac_exeext; then
-      case "$host_os" in
-        # Handle native Windows specially, because there setlocale() interprets
-        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
-        # "fr" or "fra" as "French" or "French_France.1252",
-        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
-        # "ja" as "Japanese" or "Japanese_Japan.932",
-        # and similar.
-        mingw*)
-          # Test for the hypothetical native Windows locale name.
-          if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_zh_CN=Chinese_China.54936
-          else
-            # None found.
-            gt_cv_locale_zh_CN=none
-          fi
-          ;;
-        solaris2.8)
-          # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
-          # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
-          # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
-          gt_cv_locale_zh_CN=none
-          ;;
-        *)
-          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
-          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
-          # configure script would override the LC_ALL setting. Likewise for
-          # LC_CTYPE, which is also set at the beginning of the configure script.
-          # Test for the locale name without encoding suffix.
-          if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_zh_CN=zh_CN
-          else
-            # Test for the locale name with explicit encoding suffix.
-            if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-              gt_cv_locale_zh_CN=zh_CN.GB18030
-            else
-              # None found.
-              gt_cv_locale_zh_CN=none
-            fi
-          fi
-          ;;
+if ac_fn_c_try_run "$LINENO"
+then :
+  gl_cv_func_setlocale_works=yes
+else case e in #(
+  e) gl_cv_func_setlocale_works=no ;;
+esac
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
+fi
+
+         ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_works" >&5
+printf "%s\n" "$gl_cv_func_setlocale_works" >&6; }
+      case "$gl_cv_func_setlocale_works" in
+        *yes) ;;
+        *) NEED_SETLOCALE_IMPROVED=1 ;;
       esac
+      ;;
+  esac
+
+printf "%s\n" "#define NEED_SETLOCALE_IMPROVED $NEED_SETLOCALE_IMPROVED" >>confdefs.h
+
+
+    NEED_SETLOCALE_MTSAFE=0
+  if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
+    NEED_SETLOCALE_MTSAFE=1
+  fi
+
+printf "%s\n" "#define NEED_SETLOCALE_MTSAFE $NEED_SETLOCALE_MTSAFE" >>confdefs.h
+
+
+  if test $NEED_SETLOCALE_IMPROVED = 1 || test $NEED_SETLOCALE_MTSAFE = 1; then
+    REPLACE_SETLOCALE=1
+  fi
+
+  if test $NEED_SETLOCALE_MTSAFE = 1; then
+    SETLOCALE_LIB="$SETLOCALE_NULL_LIB"
+  else
+    SETLOCALE_LIB=
+  fi
+
+    LIB_SETLOCALE="$SETLOCALE_LIB"
+
+
+
+     if test $REPLACE_SETLOCALE = 1; then
+  GL_COND_OBJ_SETLOCALE_TRUE=
+  GL_COND_OBJ_SETLOCALE_FALSE='#'
+else
+  GL_COND_OBJ_SETLOCALE_TRUE='#'
+  GL_COND_OBJ_SETLOCALE_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_SETLOCALE_TRUE}" && test -z "${GL_COND_OBJ_SETLOCALE_FALSE}"; then
+    GL_COND_OBJ_SETLOCALE_TRUE='#'
+    GL_COND_OBJ_SETLOCALE_FALSE='#'
+  fi
+
+  if test -z "$GL_COND_OBJ_SETLOCALE_TRUE"; then :
+
+
+        :
+
+
+fi
+
+
+
+
+
+
+
+
+
+    if test "$GL_GNULIB_SETLOCALE" != 1; then
+        if test "$GL_GNULIB_SETLOCALE" = 0; then
+      GL_GNULIB_SETLOCALE=$gl_module_indicator_condition
     else
-      # If there was a link error, due to mblen(), the system is so old that
-      # it certainly doesn't have a chinese locale.
-      gt_cv_locale_zh_CN=none
+      GL_GNULIB_SETLOCALE="($GL_GNULIB_SETLOCALE || $gl_module_indicator_condition)"
     fi
-    rm -fr conftest*
-   ;;
-esac
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
-printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
-  LOCALE_ZH_CN=$gt_cv_locale_zh_CN
+  fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_SETLOCALE 1" >>confdefs.h
+
+
+
+
+
 
 
 
@@ -48540,6 +48021,8 @@ then :
          *-gnu* | gnu*) gl_cv_func_sleep_works="guessing yes" ;;
                         # Guess yes on musl systems.
          *-musl*)       gl_cv_func_sleep_works="guessing yes" ;;
+                        # Guess yes on systems that emulate the Linux system calls.
+         midipix*)      gl_cv_func_sleep_works="guessing yes" ;;
                         # Guess no on native Windows.
          mingw*)        gl_cv_func_sleep_works="guessing no" ;;
                         # If we don't know, obey --enable-cross-guesses.
@@ -48726,62 +48209,6 @@ printf "%s\n" "$gl_cv_func_snprintf_size1" >&6; }
         case "$gl_cv_func_snprintf_retval_c99" in
           *yes)
 
-
-     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
-printf %s "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
-if test ${gl_cv_func_printf_positions+y}
-then :
-  printf %s "(cached) " >&6
-else case e in #(
-  e)
-      if test "$cross_compiling" = yes
-then :
-
-         case "$host_os" in
-           netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
-                            gl_cv_func_printf_positions="guessing no";;
-           beos*)           gl_cv_func_printf_positions="guessing no";;
-                            # Guess yes on Android.
-           linux*-android*) gl_cv_func_printf_positions="guessing yes";;
-                            # Guess no on native Windows.
-           mingw* | pw*)    gl_cv_func_printf_positions="guessing no";;
-           *)               gl_cv_func_printf_positions="guessing yes";;
-         esac
-
-else case e in #(
-  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdio.h>
-#include <string.h>
-/* The string "%2$d %1$d", with dollar characters protected from the shell's
-   dollar expansion (possibly an autoconf bug).  */
-static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
-static char buf[100];
-int main ()
-{
-  sprintf (buf, format, 33, 55);
-  return (strcmp (buf, "55 33") != 0);
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"
-then :
-  gl_cv_func_printf_positions=yes
-else case e in #(
-  e) gl_cv_func_printf_positions=no ;;
-esac
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
-esac
-fi
-
-     ;;
-esac
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
-printf "%s\n" "$gl_cv_func_printf_positions" >&6; }
-
             case "$gl_cv_func_printf_positions" in
               *yes)
                 gl_cv_func_snprintf_usable=yes
@@ -48982,6 +48409,7 @@ fi
 
 
 
+
   if test $ac_cv_have_decl_strerror_r = no; then
     HAVE_DECL_STRERROR_R=0
   fi
@@ -49018,179 +48446,77 @@ then :
 
 
 
-
-
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-    if test "$GL_GNULIB_STRERROR_R" != 1; then
-        if test "$GL_GNULIB_STRERROR_R" = 0; then
-      GL_GNULIB_STRERROR_R=$gl_module_indicator_condition
-    else
-      GL_GNULIB_STRERROR_R="($GL_GNULIB_STRERROR_R || $gl_module_indicator_condition)"
-    fi
-  fi
-
-
-
-
-
-printf "%s\n" "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h
-
-
-
-
-
-printf "%s\n" "#define GNULIB_STRERROR_R_POSIX $gl_module_indicator_condition" >>confdefs.h
-
-
-
-
-
-
-
-
-
-
-
-
-        if test $ac_cv_func_symlink = no; then
-    HAVE_SYMLINK=0
-  else
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
-printf %s "checking whether symlink handles trailing slash correctly... " >&6; }
-if test ${gl_cv_func_symlink_works+y}
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for catgets" >&5
+printf %s "checking for catgets... " >&6; }
+if test ${gl_cv_onwards_func_catgets+y}
 then :
   printf %s "(cached) " >&6
 else case e in #(
-  e) if test "$cross_compiling" = yes
-then :
-  case "$host_os" in
-                             # Guess yes on Linux systems.
-            linux-* | linux) gl_cv_func_symlink_works="guessing yes" ;;
-                             # Guess yes on glibc systems.
-            *-gnu* | gnu*)   gl_cv_func_symlink_works="guessing yes" ;;
-                             # If we don't know, obey --enable-cross-guesses.
-            *)               gl_cv_func_symlink_works="$gl_cross_guess_normal" ;;
-          esac
-
-else case e in #(
-  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <unistd.h>
+  e)
+  exec 9>&6 6>/dev/null
 
-int
-main (void)
-{
-int result = 0;
-             if (!symlink ("a", "conftest.link/"))
-               result |= 1;
-             if (symlink ("conftest.f", "conftest.lnk2"))
-               result |= 2;
-             else if (!symlink ("a", "conftest.lnk2/"))
-               result |= 4;
-             return result;
+       case "$host_os" in
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"
+         linux*-android*)
+           ac_fn_check_decl "$LINENO" "catgets" "ac_cv_have_decl_catgets" "#include <nl_types.h>
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_catgets" = xyes
 then :
-  gl_cv_func_symlink_works=yes
-else case e in #(
-  e) gl_cv_func_symlink_works=no ;;
-esac
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
-esac
-fi
 
-      rm -f conftest.f conftest.link conftest.lnk2 ;;
-esac
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
-printf "%s\n" "$gl_cv_func_symlink_works" >&6; }
-    case "$gl_cv_func_symlink_works" in
-      *yes) ;;
-      *)
-        REPLACE_SYMLINK=1
-        ;;
-    esac
-  fi
-
+           if test $ac_cv_have_decl_catgets = yes; then
+             ac_fn_c_check_func "$LINENO" "catgets" "ac_cv_func_catgets"
+if test "x$ac_cv_func_catgets" = xyes
+then :
 
-     if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
-  GL_COND_OBJ_SYMLINK_TRUE=
-  GL_COND_OBJ_SYMLINK_FALSE='#'
-else
-  GL_COND_OBJ_SYMLINK_TRUE='#'
-  GL_COND_OBJ_SYMLINK_FALSE=
 fi
-:
-    if test -z "${GL_COND_OBJ_SYMLINK_TRUE}" && test -z "${GL_COND_OBJ_SYMLINK_FALSE}"; then
-    GL_COND_OBJ_SYMLINK_TRUE='#'
-    GL_COND_OBJ_SYMLINK_FALSE='#'
-  fi
-
-
-
-
-
-
-
-
-
-
-    if test "$GL_GNULIB_SYMLINK" != 1; then
-        if test "$GL_GNULIB_SYMLINK" = 0; then
-      GL_GNULIB_SYMLINK=$gl_module_indicator_condition
-    else
-      GL_GNULIB_SYMLINK="($GL_GNULIB_SYMLINK || $gl_module_indicator_condition)"
-    fi
-  fi
-
-
-
-
-
-printf "%s\n" "#define GNULIB_TEST_SYMLINK 1" >>confdefs.h
-
-
-
-
-
-
-
 
+             if test $ac_cv_func_catgets = yes; then
+               gl_cv_onwards_func_catgets=yes
+             else
+                                                            gl_cv_onwards_func_catgets='future OS version'
+             fi
+           else
+             gl_cv_onwards_func_catgets='future OS version'
+           fi
+           ;;
 
 
+         *)
+           ac_fn_c_check_func "$LINENO" "catgets" "ac_cv_func_catgets"
+if test "x$ac_cv_func_catgets" = xyes
+then :
 
+fi
 
+           gl_cv_onwards_func_catgets=$ac_cv_func_catgets
+           ;;
 
+       esac
 
+  exec 6>&9 9>&-
 
+     ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_catgets" >&5
+printf "%s\n" "$gl_cv_onwards_func_catgets" >&6; }
 
+  case "$gl_cv_onwards_func_catgets" in
+    future*) ac_cv_func_catgets=no ;;
+    *)       ac_cv_func_catgets=$gl_cv_onwards_func_catgets ;;
+  esac
+  if test $ac_cv_func_catgets = yes; then
 
+printf "%s\n" "#define HAVE_CATGETS 1" >>confdefs.h
 
+  fi
 
 
 
 
 
+fi
 
 
 
@@ -49205,138 +48531,75 @@ printf "%s\n" "#define GNULIB_TEST_SYMLINK 1" >>confdefs.h
 
 
 
+    if test "$GL_GNULIB_STRERROR_R" != 1; then
+        if test "$GL_GNULIB_STRERROR_R" = 0; then
+      GL_GNULIB_STRERROR_R=$gl_module_indicator_condition
+    else
+      GL_GNULIB_STRERROR_R="($GL_GNULIB_STRERROR_R || $gl_module_indicator_condition)"
+    fi
+  fi
 
 
 
 
 
-  if test $gl_threads_api = posix; then
-    gl_save_LIBS="$LIBS"
-    LIBS="$LIBS $LIBMULTITHREAD"
-    ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
-if test "x$ac_cv_func_pthread_atfork" = xyes
-then :
-  printf "%s\n" "#define HAVE_PTHREAD_ATFORK 1" >>confdefs.h
+printf "%s\n" "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h
 
-fi
 
-    LIBS="$gl_save_LIBS"
-  fi
 
-  ac_fn_c_check_header_compile "$LINENO" "sys/single_threaded.h" "ac_cv_header_sys_single_threaded_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_single_threaded_h" = xyes
-then :
-  printf "%s\n" "#define HAVE_SYS_SINGLE_THREADED_H 1" >>confdefs.h
 
-fi
 
+printf "%s\n" "#define GNULIB_STRERROR_R_POSIX $gl_module_indicator_condition" >>confdefs.h
 
 
 
-  if test $ac_cv_have_decl_unsetenv = no; then
-    HAVE_DECL_UNSETENV=0
-  fi
-  ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
-if test "x$ac_cv_func_unsetenv" = xyes
-then :
-  printf "%s\n" "#define HAVE_UNSETENV 1" >>confdefs.h
-
-fi
-
-  if test $ac_cv_func_unsetenv = no; then
-    HAVE_UNSETENV=0
-  else
-    HAVE_UNSETENV=1
-        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
-printf %s "checking for unsetenv() return type... " >&6; }
-if test ${gt_cv_func_unsetenv_ret+y}
-then :
-  printf %s "(cached) " >&6
-else case e in #(
-  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-#undef _BSD
-#define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
-#include <stdlib.h>
-extern
-#ifdef __cplusplus
-"C"
-#endif
-int unsetenv (const char *name);
 
-int
-main (void)
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-  gt_cv_func_unsetenv_ret='int'
-else case e in #(
-  e) gt_cv_func_unsetenv_ret='void' ;;
-esac
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
-esac
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
-printf "%s\n" "$gt_cv_func_unsetenv_ret" >&6; }
-    if test $gt_cv_func_unsetenv_ret = 'void'; then
 
-printf "%s\n" "#define VOID_UNSETENV 1" >>confdefs.h
 
-      REPLACE_UNSETENV=1
-    fi
 
-                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
-printf %s "checking whether unsetenv obeys POSIX... " >&6; }
-if test ${gl_cv_func_unsetenv_works+y}
+
+
+
+        if test $ac_cv_func_symlink = no; then
+    HAVE_SYMLINK=0
+  else
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
+printf %s "checking whether symlink handles trailing slash correctly... " >&6; }
+if test ${gl_cv_func_symlink_works+y}
 then :
   printf %s "(cached) " >&6
 else case e in #(
   e) if test "$cross_compiling" = yes
 then :
   case "$host_os" in
-                    # Guess yes on glibc systems.
-            *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
-                    # If we don't know, obey --enable-cross-guesses.
-            *)      gl_cv_func_unsetenv_works="$gl_cross_guess_normal" ;;
+                             # Guess yes on Linux systems.
+            linux-* | linux) gl_cv_func_symlink_works="guessing yes" ;;
+                             # Guess yes on systems that emulate the Linux system calls.
+            midipix*)        gl_cv_func_symlink_works="guessing yes" ;;
+                             # Guess yes on glibc systems.
+            *-gnu* | gnu*)   gl_cv_func_symlink_works="guessing yes" ;;
+                             # If we don't know, obey --enable-cross-guesses.
+            *)               gl_cv_func_symlink_works="$gl_cross_guess_normal" ;;
           esac
 
 else case e in #(
   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-            #include <stdlib.h>
-            #include <errno.h>
-            extern char **environ;
-
-
-$gl_mda_defines
+#include <unistd.h>
 
 int
 main (void)
 {
-
-            char entry1[] = "a=1";
-            char entry2[] = "b=2";
-            char *env[] = { entry1, entry2, NULL };
-            if (putenv ((char *) "a=1")) return 1;
-            if (putenv (entry2)) return 2;
-            entry2[0] = 'a';
-            unsetenv ("a");
-            if (getenv ("a")) return 3;
-            if (!unsetenv ("") || errno != EINVAL) return 4;
-            entry2[0] = 'b';
-            environ = env;
-            if (!getenv ("a")) return 5;
-            entry2[0] = 'a';
-            unsetenv ("a");
-            if (getenv ("a")) return 6;
+int result = 0;
+             if (!symlink ("a", "conftest.link/"))
+               result |= 1;
+             if (symlink ("conftest.f", "conftest.lnk2"))
+               result |= 2;
+             else if (!symlink ("a", "conftest.lnk2/"))
+               result |= 4;
+             return result;
 
   ;
   return 0;
@@ -49344,9 +48607,9 @@ main (void)
 _ACEOF
 if ac_fn_c_try_run "$LINENO"
 then :
-  gl_cv_func_unsetenv_works=yes
+  gl_cv_func_symlink_works=yes
 else case e in #(
-  e) gl_cv_func_unsetenv_works=no ;;
+  e) gl_cv_func_symlink_works=no ;;
 esac
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -49354,70 +48617,67 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 esac
 fi
 
-       ;;
+      rm -f conftest.f conftest.link conftest.lnk2 ;;
 esac
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
-printf "%s\n" "$gl_cv_func_unsetenv_works" >&6; }
-    case "$gl_cv_func_unsetenv_works" in
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
+printf "%s\n" "$gl_cv_func_symlink_works" >&6; }
+    case "$gl_cv_func_symlink_works" in
       *yes) ;;
       *)
-        REPLACE_UNSETENV=1
+        REPLACE_SYMLINK=1
         ;;
     esac
   fi
 
 
-     if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
-  GL_COND_OBJ_UNSETENV_TRUE=
-  GL_COND_OBJ_UNSETENV_FALSE='#'
+     if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
+  GL_COND_OBJ_SYMLINK_TRUE=
+  GL_COND_OBJ_SYMLINK_FALSE='#'
 else
-  GL_COND_OBJ_UNSETENV_TRUE='#'
-  GL_COND_OBJ_UNSETENV_FALSE=
+  GL_COND_OBJ_SYMLINK_TRUE='#'
+  GL_COND_OBJ_SYMLINK_FALSE=
 fi
 :
-    if test -z "${GL_COND_OBJ_UNSETENV_TRUE}" && test -z "${GL_COND_OBJ_UNSETENV_FALSE}"; then
-    GL_COND_OBJ_UNSETENV_TRUE='#'
-    GL_COND_OBJ_UNSETENV_FALSE='#'
+    if test -z "${GL_COND_OBJ_SYMLINK_TRUE}" && test -z "${GL_COND_OBJ_SYMLINK_FALSE}"; then
+    GL_COND_OBJ_SYMLINK_TRUE='#'
+    GL_COND_OBJ_SYMLINK_FALSE='#'
   fi
 
-  if test -z "$GL_COND_OBJ_UNSETENV_TRUE"; then :
 
 
 
 
 
 
-fi
 
 
 
+    if test "$GL_GNULIB_SYMLINK" != 1; then
+        if test "$GL_GNULIB_SYMLINK" = 0; then
+      GL_GNULIB_SYMLINK=$gl_module_indicator_condition
+    else
+      GL_GNULIB_SYMLINK="($GL_GNULIB_SYMLINK || $gl_module_indicator_condition)"
+    fi
+  fi
 
 
 
 
 
+printf "%s\n" "#define GNULIB_TEST_SYMLINK 1" >>confdefs.h
 
-    if test "$GL_GNULIB_UNSETENV" != 1; then
-        if test "$GL_GNULIB_UNSETENV" = 0; then
-      GL_GNULIB_UNSETENV=$gl_module_indicator_condition
-    else
-      GL_GNULIB_UNSETENV="($GL_GNULIB_UNSETENV || $gl_module_indicator_condition)"
-    fi
-  fi
 
 
 
 
 
-printf "%s\n" "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
 
 
 
 
 
 
-  if test $ac_cv_func_vasnprintf = no; then
 
 
 
@@ -49428,7 +48688,6 @@ printf "%s\n" "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
 
 
 
-  gltests_LIBOBJS="$gltests_LIBOBJS vasnprintf.$ac_objext"
 
 
 
@@ -49438,7 +48697,6 @@ printf "%s\n" "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
 
 
 
-  gltests_LIBOBJS="$gltests_LIBOBJS printf-args.$ac_objext"
 
 
 
@@ -49448,620 +48706,449 @@ printf "%s\n" "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
 
 
 
-  gltests_LIBOBJS="$gltests_LIBOBJS printf-parse.$ac_objext"
 
 
+  if test $gl_threads_api = posix; then
+    gl_save_LIBS="$LIBS"
+    LIBS="$LIBS $LIBMULTITHREAD"
 
 
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_atfork" >&5
+printf %s "checking for pthread_atfork... " >&6; }
+if test ${gl_cv_onwards_func_pthread_atfork+y}
+then :
+  printf %s "(cached) " >&6
+else case e in #(
+  e)
+  exec 9>&6 6>/dev/null
 
+       case "$host_os" in
 
+         linux*-android*)
+           ac_fn_check_decl "$LINENO" "pthread_atfork" "ac_cv_have_decl_pthread_atfork" "#include <pthread.h>
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_pthread_atfork" = xyes
+then :
 
+fi
+           if test $ac_cv_have_decl_pthread_atfork = yes; then
+             ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
+if test "x$ac_cv_func_pthread_atfork" = xyes
+then :
 
+fi
 
-  gltests_LIBOBJS="$gltests_LIBOBJS asnprintf.$ac_objext"
+             if test $ac_cv_func_pthread_atfork = yes; then
+               gl_cv_onwards_func_pthread_atfork=yes
+             else
+                                                            gl_cv_onwards_func_pthread_atfork='future OS version'
+             fi
+           else
+             gl_cv_onwards_func_pthread_atfork='future OS version'
+           fi
+           ;;
 
-  if test $ac_cv_func_vasnprintf = yes; then
 
-printf "%s\n" "#define REPLACE_VASNPRINTF 1" >>confdefs.h
+         *)
+           ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
+if test "x$ac_cv_func_pthread_atfork" = xyes
+then :
 
-  fi
+fi
 
+           gl_cv_onwards_func_pthread_atfork=$ac_cv_func_pthread_atfork
+           ;;
 
+       esac
 
+  exec 6>&9 9>&-
 
+     ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_pthread_atfork" >&5
+printf "%s\n" "$gl_cv_onwards_func_pthread_atfork" >&6; }
 
+  case "$gl_cv_onwards_func_pthread_atfork" in
+    future*) ac_cv_func_pthread_atfork=no ;;
+    *)       ac_cv_func_pthread_atfork=$gl_cv_onwards_func_pthread_atfork ;;
+  esac
+  if test $ac_cv_func_pthread_atfork = yes; then
 
+printf "%s\n" "#define HAVE_PTHREAD_ATFORK 1" >>confdefs.h
 
+  fi
 
 
-  ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
-if test "x$ac_cv_type_ptrdiff_t" = xyes
+    LIBS="$gl_save_LIBS"
+  fi
+
+  ac_fn_c_check_header_compile "$LINENO" "sys/single_threaded.h" "ac_cv_header_sys_single_threaded_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_single_threaded_h" = xyes
 then :
+  printf "%s\n" "#define HAVE_SYS_SINGLE_THREADED_H 1" >>confdefs.h
+
+fi
+
 
+
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether time() works" >&5
+printf %s "checking whether time() works... " >&6; }
+if test ${gl_cv_func_time_works+y}
+then :
+  printf %s "(cached) " >&6
 else case e in #(
-  e)
-printf "%s\n" "#define ptrdiff_t long" >>confdefs.h
+  e)                               case "$host_os" in
+       linux*-gnu*)
+         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+           #include <features.h>
+           #ifdef __GNU_LIBRARY__
+            #if __GLIBC__ == 2
+             Unlucky GNU user
+            #endif
+           #endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP_TRADITIONAL "Unlucky" >/dev/null 2>&1
+then :
+  gl_cv_func_time_works="guessing no"
+else case e in #(
+  e) gl_cv_func_time_works="guessing yes" ;;
+esac
+fi
+rm -rf conftest*
 
+         ;;
+       aix*)   gl_cv_func_time_works="guessing no";;
+       mingw*) gl_cv_func_time_works="guessing no";;
+       *) gl_cv_func_time_works="guessing yes";;
+     esac
      ;;
 esac
 fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_time_works" >&5
+printf "%s\n" "$gl_cv_func_time_works" >&6; }
+  case "$gl_cv_func_time_works" in
+    *no) REPLACE_TIME=1 ;;
+  esac
 
 
+     if test $REPLACE_TIME = 1; then
+  GL_COND_OBJ_TIME_TRUE=
+  GL_COND_OBJ_TIME_FALSE='#'
+else
+  GL_COND_OBJ_TIME_TRUE='#'
+  GL_COND_OBJ_TIME_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_TIME_TRUE}" && test -z "${GL_COND_OBJ_TIME_FALSE}"; then
+    GL_COND_OBJ_TIME_TRUE='#'
+    GL_COND_OBJ_TIME_FALSE='#'
+  fi
 
+  if test -z "$GL_COND_OBJ_TIME_TRUE"; then :
 
 
+  :
 
 
-  fi
+fi
 
-  abs_aux_dir=`cd "$ac_aux_dir"; pwd`
 
 
 
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
-printf %s "checking for a traditional french locale... " >&6; }
-if test ${gt_cv_locale_fr+y}
-then :
-  printf %s "(cached) " >&6
-else case e in #(
-  e)
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-#include <locale.h>
-#include <time.h>
-#if HAVE_LANGINFO_CODESET
-# include <langinfo.h>
-#endif
-#include <stdlib.h>
-#include <string.h>
-struct tm t;
-char buf[16];
-int main () {
-  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
-     imitates locale dependent behaviour by looking at the environment
-     variables, and all locales use the UTF-8 encoding.  */
-#if defined __BEOS__ || defined __HAIKU__
-  return 1;
-#else
-  /* Check whether the given locale name is recognized by the system.  */
-# if defined _WIN32 && !defined __CYGWIN__
-  /* On native Windows, setlocale(category, "") looks at the system settings,
-     not at the environment variables.  Also, when an encoding suffix such
-     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
-     category of the locale to "C".  */
-  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
-      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
-    return 1;
-# else
-  if (setlocale (LC_ALL, "") == NULL) return 1;
-# endif
-  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
-     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
-     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
-     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
-     some unit tests fail.
-     On MirBSD 10, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
-# if HAVE_LANGINFO_CODESET
-  {
-    const char *cs = nl_langinfo (CODESET);
-    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
-        || strcmp (cs, "UTF-8") == 0)
-      return 1;
-  }
-# endif
-# ifdef __CYGWIN__
-  /* On Cygwin, avoid locale names without encoding suffix, because the
-     locale_charset() function relies on the encoding suffix.  Note that
-     LC_ALL is set on the command line.  */
-  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-# endif
-  /* Check whether in the abbreviation of the second month, the second
-     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
-     one byte long. This excludes the UTF-8 encoding.  */
-  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
-  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
-# if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
-  /* Check whether the decimal separator is a comma.
-     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
-     are nl_langinfo(RADIXCHAR) are both ".".  */
-  if (localeconv () ->decimal_point[0] != ',') return 1;
-# endif
-  return 0;
-#endif
-}
 
-_ACEOF
-    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && test -s conftest$ac_exeext; then
-      case "$host_os" in
-        # Handle native Windows specially, because there setlocale() interprets
-        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
-        # "fr" or "fra" as "French" or "French_France.1252",
-        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
-        # "ja" as "Japanese" or "Japanese_Japan.932",
-        # and similar.
-        mingw*)
-          # Test for the native Windows locale name.
-          if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_fr=French_France.1252
-          else
-            # None found.
-            gt_cv_locale_fr=none
-          fi
-          ;;
-        *)
-          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
-          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
-          # configure script would override the LC_ALL setting. Likewise for
-          # LC_CTYPE, which is also set at the beginning of the configure script.
-          # Test for the usual locale name.
-          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_fr=fr_FR
-          else
-            # Test for the locale name with explicit encoding suffix.
-            if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-              gt_cv_locale_fr=fr_FR.ISO-8859-1
-            else
-              # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
-              if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                gt_cv_locale_fr=fr_FR.ISO8859-1
-              else
-                # Test for the HP-UX locale name.
-                if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                  gt_cv_locale_fr=fr_FR.iso88591
-                else
-                  # Test for the Solaris 7 locale name.
-                  if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                    gt_cv_locale_fr=fr
-                  else
-                    # None found.
-                    gt_cv_locale_fr=none
-                  fi
-                fi
-              fi
-            fi
-          fi
-          ;;
-      esac
+
+
+    if test "$GL_GNULIB_TIME" != 1; then
+        if test "$GL_GNULIB_TIME" = 0; then
+      GL_GNULIB_TIME=$gl_module_indicator_condition
+    else
+      GL_GNULIB_TIME="($GL_GNULIB_TIME || $gl_module_indicator_condition)"
     fi
-    rm -fr conftest*
-   ;;
-esac
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
-printf "%s\n" "$gt_cv_locale_fr" >&6; }
-  LOCALE_FR=$gt_cv_locale_fr
+  fi
 
 
 
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
-printf %s "checking for a french Unicode locale... " >&6; }
-if test ${gt_cv_locale_fr_utf8+y}
+
+printf "%s\n" "#define GNULIB_TEST_TIME 1" >>confdefs.h
+
+
+
+
+
+
+  if test $ac_cv_have_decl_unsetenv = no; then
+    HAVE_DECL_UNSETENV=0
+  fi
+  ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
+if test "x$ac_cv_func_unsetenv" = xyes
+then :
+  printf "%s\n" "#define HAVE_UNSETENV 1" >>confdefs.h
+
+fi
+
+  if test $ac_cv_func_unsetenv = no; then
+    HAVE_UNSETENV=0
+  else
+    HAVE_UNSETENV=1
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
+printf %s "checking for unsetenv() return type... " >&6; }
+if test ${gt_cv_func_unsetenv_ret+y}
 then :
   printf %s "(cached) " >&6
 else case e in #(
-  e)
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#include <locale.h>
-#include <time.h>
-#if HAVE_LANGINFO_CODESET
-# include <langinfo.h>
-#endif
+#undef _BSD
+#define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
 #include <stdlib.h>
-#include <string.h>
-struct tm t;
-char buf[16];
-int main () {
-  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
-     imitates locale dependent behaviour by looking at the environment
-     variables, and all locales use the UTF-8 encoding.  */
-#if !(defined __BEOS__ || defined __HAIKU__)
-  /* Check whether the given locale name is recognized by the system.  */
-# if defined _WIN32 && !defined __CYGWIN__
-  /* On native Windows, setlocale(category, "") looks at the system settings,
-     not at the environment variables.  Also, when an encoding suffix such
-     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
-     category of the locale to "C".  */
-  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
-      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
-    return 1;
-# else
-  if (setlocale (LC_ALL, "") == NULL) return 1;
-# endif
-  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
-     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
-     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
-     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
-     some unit tests fail.  */
-# if HAVE_LANGINFO_CODESET
-  {
-    const char *cs = nl_langinfo (CODESET);
-    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
-      return 1;
-  }
-# endif
-# ifdef __CYGWIN__
-  /* On Cygwin, avoid locale names without encoding suffix, because the
-     locale_charset() function relies on the encoding suffix.  Note that
-     LC_ALL is set on the command line.  */
-  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-# endif
-  /* Check whether in the abbreviation of the second month, the second
-     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
-     two bytes long, with UTF-8 encoding.  */
-  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
-  if (strftime (buf, sizeof (buf), "%b", &t) < 4
-      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
-    return 1;
-#endif
-#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
-  /* Check whether the decimal separator is a comma.
-     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
-     are nl_langinfo(RADIXCHAR) are both ".".  */
-  if (localeconv () ->decimal_point[0] != ',') return 1;
+extern
+#ifdef __cplusplus
+"C"
 #endif
+int unsetenv (const char *name);
+
+int
+main (void)
+{
+
+  ;
   return 0;
 }
-
 _ACEOF
-    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && test -s conftest$ac_exeext; then
-      case "$host_os" in
-        # Handle native Windows specially, because there setlocale() interprets
-        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
-        # "fr" or "fra" as "French" or "French_France.1252",
-        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
-        # "ja" as "Japanese" or "Japanese_Japan.932",
-        # and similar.
-        mingw*)
-          # Test for the hypothetical native Windows locale name.
-          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_fr_utf8=French_France.65001
-          else
-            # None found.
-            gt_cv_locale_fr_utf8=none
-          fi
-          ;;
-        *)
-          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
-          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
-          # configure script would override the LC_ALL setting. Likewise for
-          # LC_CTYPE, which is also set at the beginning of the configure script.
-          # Test for the usual locale name.
-          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_fr_utf8=fr_FR
-          else
-            # Test for the locale name with explicit encoding suffix.
-            if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-              gt_cv_locale_fr_utf8=fr_FR.UTF-8
-            else
-              # Test for the Solaris 7 locale name.
-              if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                gt_cv_locale_fr_utf8=fr.UTF-8
-              else
-                # None found.
-                gt_cv_locale_fr_utf8=none
-              fi
-            fi
-          fi
-          ;;
-      esac
-    fi
-    rm -fr conftest*
-   ;;
+if ac_fn_c_try_compile "$LINENO"
+then :
+  gt_cv_func_unsetenv_ret='int'
+else case e in #(
+  e) gt_cv_func_unsetenv_ret='void' ;;
 esac
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
-printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
-  LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
-
-
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
+printf "%s\n" "$gt_cv_func_unsetenv_ret" >&6; }
+    if test $gt_cv_func_unsetenv_ret = 'void'; then
 
+printf "%s\n" "#define VOID_UNSETENV 1" >>confdefs.h
 
+      REPLACE_UNSETENV=1
+    fi
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
-printf %s "checking for a traditional japanese locale... " >&6; }
-if test ${gt_cv_locale_ja+y}
+                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
+printf %s "checking whether unsetenv obeys POSIX... " >&6; }
+if test ${gl_cv_func_unsetenv_works+y}
 then :
   printf %s "(cached) " >&6
 else case e in #(
-  e)
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  e) if test "$cross_compiling" = yes
+then :
+  case "$host_os" in
+                    # Guess yes on glibc systems.
+            *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
+                    # If we don't know, obey --enable-cross-guesses.
+            *)      gl_cv_func_unsetenv_works="$gl_cross_guess_normal" ;;
+          esac
+
+else case e in #(
+  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#include <locale.h>
-#include <time.h>
-#if HAVE_LANGINFO_CODESET
-# include <langinfo.h>
-#endif
-#include <stdlib.h>
-#include <string.h>
-struct tm t;
-char buf[16];
-int main ()
+            #include <stdlib.h>
+            #include <errno.h>
+            extern char **environ;
+
+
+$gl_mda_defines
+
+int
+main (void)
 {
-  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
-     imitates locale dependent behaviour by looking at the environment
-     variables, and all locales use the UTF-8 encoding.  */
-#if defined __BEOS__ || defined __HAIKU__
-  return 1;
-#else
-  /* Check whether the given locale name is recognized by the system.  */
-# if defined _WIN32 && !defined __CYGWIN__
-  /* On native Windows, setlocale(category, "") looks at the system settings,
-     not at the environment variables.  Also, when an encoding suffix such
-     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
-     category of the locale to "C".  */
-  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
-      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
-    return 1;
-# else
-  if (setlocale (LC_ALL, "") == NULL) return 1;
-# endif
-  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
-     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
-     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
-     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
-     some unit tests fail.
-     On MirBSD 10, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
-# if HAVE_LANGINFO_CODESET
-  {
-    const char *cs = nl_langinfo (CODESET);
-    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
-        || strcmp (cs, "UTF-8") == 0)
-      return 1;
-  }
-# endif
-# ifdef __CYGWIN__
-  /* On Cygwin, avoid locale names without encoding suffix, because the
-     locale_charset() function relies on the encoding suffix.  Note that
-     LC_ALL is set on the command line.  */
-  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-# endif
-  /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
-     on Cygwin 1.5.x.  */
-  if (MB_CUR_MAX == 1)
-    return 1;
-  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
-     This excludes the UTF-8 encoding (except on MirBSD).  */
-  {
-    const char *p;
-    t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
-    if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
-    for (p = buf; *p != '\0'; p++)
-      if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
-        return 1;
-  }
+
+            char entry1[] = "a=1";
+            char entry2[] = "b=2";
+            char *env[] = { entry1, entry2, NULL };
+            if (putenv ((char *) "a=1")) return 1;
+            if (putenv (entry2)) return 2;
+            entry2[0] = 'a';
+            unsetenv ("a");
+            if (getenv ("a")) return 3;
+            if (!unsetenv ("") || errno != EINVAL) return 4;
+            entry2[0] = 'b';
+            environ = env;
+            if (!getenv ("a")) return 5;
+            entry2[0] = 'a';
+            unsetenv ("a");
+            if (getenv ("a")) return 6;
+
+  ;
   return 0;
-#endif
 }
-
 _ACEOF
-    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && test -s conftest$ac_exeext; then
-      case "$host_os" in
-        # Handle native Windows specially, because there setlocale() interprets
-        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
-        # "fr" or "fra" as "French" or "French_France.1252",
-        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
-        # "ja" as "Japanese" or "Japanese_Japan.932",
-        # and similar.
-        mingw*)
-          # Note that on native Windows, the Japanese locale is
-          # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
-          # cannot use it here.
-          gt_cv_locale_ja=none
-          ;;
-        *)
-          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
-          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
-          # configure script would override the LC_ALL setting. Likewise for
-          # LC_CTYPE, which is also set at the beginning of the configure script.
-          # Test for the AIX locale name.
-          if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_ja=ja_JP
-          else
-            # Test for the locale name with explicit encoding suffix.
-            if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-              gt_cv_locale_ja=ja_JP.EUC-JP
-            else
-              # Test for the HP-UX, OSF/1, NetBSD locale name.
-              if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                gt_cv_locale_ja=ja_JP.eucJP
-              else
-                # Test for the IRIX, FreeBSD locale name.
-                if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                  gt_cv_locale_ja=ja_JP.EUC
-                else
-                  # Test for the Solaris 7 locale name.
-                  if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                    gt_cv_locale_ja=ja
-                  else
-                    # Special test for NetBSD 1.6.
-                    if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
-                      gt_cv_locale_ja=ja_JP.eucJP
-                    else
-                      # None found.
-                      gt_cv_locale_ja=none
-                    fi
-                  fi
-                fi
-              fi
-            fi
-          fi
-          ;;
-      esac
-    fi
-    rm -fr conftest*
-   ;;
+if ac_fn_c_try_run "$LINENO"
+then :
+  gl_cv_func_unsetenv_works=yes
+else case e in #(
+  e) gl_cv_func_unsetenv_works=no ;;
+esac
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
 esac
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
-printf "%s\n" "$gt_cv_locale_ja" >&6; }
-  LOCALE_JA=$gt_cv_locale_ja
 
+       ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
+printf "%s\n" "$gl_cv_func_unsetenv_works" >&6; }
+    case "$gl_cv_func_unsetenv_works" in
+      *yes) ;;
+      *)
+        REPLACE_UNSETENV=1
+        ;;
+    esac
+  fi
 
 
+     if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
+  GL_COND_OBJ_UNSETENV_TRUE=
+  GL_COND_OBJ_UNSETENV_FALSE='#'
+else
+  GL_COND_OBJ_UNSETENV_TRUE='#'
+  GL_COND_OBJ_UNSETENV_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_UNSETENV_TRUE}" && test -z "${GL_COND_OBJ_UNSETENV_FALSE}"; then
+    GL_COND_OBJ_UNSETENV_TRUE='#'
+    GL_COND_OBJ_UNSETENV_FALSE='#'
+  fi
 
+  if test -z "$GL_COND_OBJ_UNSETENV_TRUE"; then :
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
-printf %s "checking for a transitional chinese locale... " >&6; }
-if test ${gt_cv_locale_zh_CN+y}
-then :
-  printf %s "(cached) " >&6
-else case e in #(
-  e)
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-#include <locale.h>
-#include <stdlib.h>
-#include <time.h>
-#if HAVE_LANGINFO_CODESET
-# include <langinfo.h>
-#endif
-#include <stdlib.h>
-#include <string.h>
-struct tm t;
-char buf[16];
-int main ()
-{
-  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
-     imitates locale dependent behaviour by looking at the environment
-     variables, and all locales use the UTF-8 encoding.  */
-#if defined __BEOS__ || defined __HAIKU__
-  return 1;
-#else
-  /* Check whether the given locale name is recognized by the system.  */
-# if defined _WIN32 && !defined __CYGWIN__
-  /* On native Windows, setlocale(category, "") looks at the system settings,
-     not at the environment variables.  Also, when an encoding suffix such
-     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
-     category of the locale to "C".  */
-  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
-      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
-    return 1;
-# else
-  if (setlocale (LC_ALL, "") == NULL) return 1;
-# endif
-  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
-     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
-     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
-     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
-     some unit tests fail.
-     On MirBSD 10, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
-# if HAVE_LANGINFO_CODESET
-  {
-    const char *cs = nl_langinfo (CODESET);
-    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
-        || strcmp (cs, "UTF-8") == 0)
-      return 1;
-  }
-# endif
-# ifdef __CYGWIN__
-  /* On Cygwin, avoid locale names without encoding suffix, because the
-     locale_charset() function relies on the encoding suffix.  Note that
-     LC_ALL is set on the command line.  */
-  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-# endif
-  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
-     This excludes the UTF-8 encoding (except on MirBSD).  */
-  {
-    const char *p;
-    t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
-    if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
-    for (p = buf; *p != '\0'; p++)
-      if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
-        return 1;
-  }
-  /* Check whether a typical GB18030 multibyte sequence is recognized as a
-     single wide character.  This excludes the GB2312 and GBK encodings.  */
-  if (mblen ("\203\062\332\066", 5) != 4)
-    return 1;
-  return 0;
-#endif
-}
 
-_ACEOF
-    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && test -s conftest$ac_exeext; then
-      case "$host_os" in
-        # Handle native Windows specially, because there setlocale() interprets
-        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
-        # "fr" or "fra" as "French" or "French_France.1252",
-        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
-        # "ja" as "Japanese" or "Japanese_Japan.932",
-        # and similar.
-        mingw*)
-          # Test for the hypothetical native Windows locale name.
-          if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_zh_CN=Chinese_China.54936
-          else
-            # None found.
-            gt_cv_locale_zh_CN=none
-          fi
-          ;;
-        solaris2.8)
-          # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
-          # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
-          # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
-          gt_cv_locale_zh_CN=none
-          ;;
-        *)
-          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
-          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
-          # configure script would override the LC_ALL setting. Likewise for
-          # LC_CTYPE, which is also set at the beginning of the configure script.
-          # Test for the locale name without encoding suffix.
-          if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_zh_CN=zh_CN
-          else
-            # Test for the locale name with explicit encoding suffix.
-            if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-              gt_cv_locale_zh_CN=zh_CN.GB18030
-            else
-              # None found.
-              gt_cv_locale_zh_CN=none
-            fi
-          fi
-          ;;
-      esac
+
+
+
+fi
+
+
+
+
+
+
+
+
+
+    if test "$GL_GNULIB_UNSETENV" != 1; then
+        if test "$GL_GNULIB_UNSETENV" = 0; then
+      GL_GNULIB_UNSETENV=$gl_module_indicator_condition
     else
-      # If there was a link error, due to mblen(), the system is so old that
-      # it certainly doesn't have a chinese locale.
-      gt_cv_locale_zh_CN=none
+      GL_GNULIB_UNSETENV="($GL_GNULIB_UNSETENV || $gl_module_indicator_condition)"
     fi
-    rm -fr conftest*
-   ;;
+  fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
+
+
+
+
+
+
+  if test $ac_cv_func_vasnprintf = no; then
+
+
+
+
+
+
+
+
+
+
+  gltests_LIBOBJS="$gltests_LIBOBJS vasnprintf.$ac_objext"
+
+
+
+
+
+
+
+
+
+  gltests_LIBOBJS="$gltests_LIBOBJS printf-args.$ac_objext"
+
+
+
+
+
+
+
+
+
+  gltests_LIBOBJS="$gltests_LIBOBJS printf-parse.$ac_objext"
+
+
+
+
+
+
+
+
+
+  gltests_LIBOBJS="$gltests_LIBOBJS asnprintf.$ac_objext"
+
+  if test $ac_cv_func_vasnprintf = yes; then
+
+printf "%s\n" "#define REPLACE_VASNPRINTF 1" >>confdefs.h
+
+  fi
+
+
+
+
+
+
+
+
+
+  ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
+if test "x$ac_cv_type_ptrdiff_t" = xyes
+then :
+
+else case e in #(
+  e)
+printf "%s\n" "#define ptrdiff_t long" >>confdefs.h
+
+     ;;
 esac
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
-printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
-  LOCALE_ZH_CN=$gt_cv_locale_zh_CN
+
+
+
+
+
+
+
+  fi
+
+  abs_aux_dir=`cd "$ac_aux_dir"; pwd`
+
+
+
 
 
 
@@ -50322,7 +49409,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
-  if test -n "$GCC"; then
+  if test -n "$GCC"
+then :
 
             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
 printf %s "checking whether -Wno-missing-field-initializers is supported... " >&6; }
@@ -50358,7 +49446,9 @@ fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
 printf "%s\n" "$gl_cv_cc_nomfi_supported" >&6; }
 
-    if test "$gl_cv_cc_nomfi_supported" = yes; then
+    if test "$gl_cv_cc_nomfi_supported" = yes
+then :
+
                   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
 printf %s "checking whether -Wno-missing-field-initializers is needed... " >&6; }
 if test ${gl_cv_cc_nomfi_needed+y}
@@ -50398,7 +49488,8 @@ esac
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
 printf "%s\n" "$gl_cv_cc_nomfi_needed" >&6; }
-    fi
+
+fi
 
                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5
 printf %s "checking whether -Wuninitialized is supported... " >&6; }
@@ -50434,7 +49525,7 @@ fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
 printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6; }
 
-  fi
+fi
 
   # List all gcc warning categories.
   # To compare this list to your installed GCC's, run this Bash command:
@@ -50445,7 +49536,7 @@ printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6; }
   #  <(LC_ALL=C gcc --help=warnings | sed -n 's/^  \(-[^ ]*\) .*/\1/p' | sort)
 
   ws=
-  for gl_manywarn_item in -fanalyzer -fno-common \
+  for gl_manywarn_item in -fanalyzer -fstrict-flex-arrays \
     -Wall \
     -Warith-conversion \
     -Wbad-function-cast \
@@ -50473,6 +49564,7 @@ printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6; }
     -Wpointer-arith \
     -Wshadow \
     -Wstack-protector \
+    -Wstrict-flex-arrays \
     -Wstrict-overflow \
     -Wstrict-prototypes \
     -Wsuggest-attribute=cold \
@@ -50514,14 +49606,19 @@ printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6; }
   as_fn_append ws ' -Wvla-larger-than=4031'
 
   # These are needed for older GCC versions.
-  if test -n "$GCC"; then
-    case `($CC --version) 2>/dev/null` in
+  if test -n "$GCC" && gl_gcc_version=`($CC --version) 2>/dev/null`; then
+    case $gl_gcc_version in
       'gcc (GCC) '[0-3].* | \
       'gcc (GCC) '4.[0-7].*)
         as_fn_append ws ' -fdiagnostics-show-option'
         as_fn_append ws ' -funit-at-a-time'
           ;;
     esac
+    case $gl_gcc_version in
+      'gcc (GCC) '[0-9].*)
+        as_fn_append ws ' -fno-common'
+          ;;
+    esac
   fi
 
   # Disable specific options as needed.
@@ -50783,6 +49880,49 @@ fi
 
  # sig-handler.h's sa_handler_t cast
 
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-deprecated-declarations" >&5
+printf %s "checking whether C compiler handles -Wno-deprecated-declarations... " >&6; }
+if test ${gl_cv_warn_c__Wno_deprecated_declarations+y}
+then :
+  printf %s "(cached) " >&6
+else case e in #(
+  e)
+  gl_save_compiler_FLAGS="$CFLAGS"
+  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wdeprecated-declarations"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main (void)
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+  gl_cv_warn_c__Wno_deprecated_declarations=yes
+else case e in #(
+  e) gl_cv_warn_c__Wno_deprecated_declarations=no ;;
+esac
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+  CFLAGS="$gl_save_compiler_FLAGS"
+ ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_deprecated_declarations" >&5
+printf "%s\n" "$gl_cv_warn_c__Wno_deprecated_declarations" >&6; }
+if test "x$gl_cv_warn_c__Wno_deprecated_declarations" = xyes
+then :
+  as_fn_append WARN_CFLAGS " -Wno-deprecated-declarations"
+fi
+
+ # clang complains about sprintf
+
   # In spite of excluding -Wlogical-op above, it is enabled, as of
   # gcc 4.5.0 20090517, and it provokes warnings in cat.c, dd.c, truncate.c
 
@@ -51050,12 +50190,12 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    Use char because int might match the return type of a GCC
    builtin and then its argument prototype would still apply.
    The 'extern "C"' is for builds by C++ compilers;
-   although this is not generally supported in C code, supporting it here
+   although this is not generally supported in C code supporting it here
    has little cost and some practical benefit (sr 110532).  */
 #ifdef __cplusplus
 extern "C"
 #endif
-char opendir ();
+char opendir (void);
 int
 main (void)
 {
@@ -51118,12 +50258,12 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    Use char because int might match the return type of a GCC
    builtin and then its argument prototype would still apply.
    The 'extern "C"' is for builds by C++ compilers;
-   although this is not generally supported in C code, supporting it here
+   although this is not generally supported in C code supporting it here
    has little cost and some practical benefit (sr 110532).  */
 #ifdef __cplusplus
 extern "C"
 #endif
-char opendir ();
+char opendir (void);
 int
 main (void)
 {
@@ -52689,6 +51829,9 @@ fi
 if test "$ac_use_included_regex" = no; then
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Included lib/regex.c not used" >&5
 printf "%s\n" "$as_me: WARNING: Included lib/regex.c not used" >&2;}
+
+printf "%s\n" "#define USE_INCLUDED_REGEX 1" >>confdefs.h
+
 fi
 
 
@@ -52711,6 +51854,8 @@ fi
 
   if test $test_pcre != no; then
 
+    if test -z "${PCRE_CFLAGS+set}" && test -z "${PCRE_LIBS+set}"; then
+
 pkg_failed=no
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PCRE" >&5
 printf %s "checking for PCRE... " >&6; }
@@ -52781,6 +51926,7 @@ else
 printf "%s\n" "yes" >&6; }
 
 fi
+    fi
 
     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pcre2_compile" >&5
 printf %s "checking for pcre2_compile... " >&6; }
@@ -53004,6 +52150,12 @@ if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
   as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+# Check whether --enable-year2038 was given.
+if test ${enable_year2038+y}
+then :
+  enableval=$enable_year2038;
+fi
+
 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
   as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -53471,8 +52623,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by GNU grep $as_me 3.8, which was
-generated by GNU Autoconf 2.72a.55-bc66c.  Invocation command line was
+This file was extended by GNU grep $as_me 3.11, which was
+generated by GNU Autoconf 2.72c.20-9c018.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -53545,11 +52697,11 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config='$ac_cs_config_escaped'
 ac_cs_version="\\
-GNU grep config.status 3.8
-configured by $0, generated by GNU Autoconf 2.72a.55-bc66c,
+GNU grep config.status 3.11
+configured by $0, generated by GNU Autoconf 2.72c.20-9c018,
   with options \\"\$ac_cs_config\\"
 
-Copyright (C) 2022 Free Software Foundation, Inc.
+Copyright (C) 2023 Free Software Foundation, Inc.
 This config.status script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it."
 
diff --git a/configure.ac b/configure.ac
index 5941b88a..13ec9056 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
 dnl
 dnl autoconf input file for GNU grep
 dnl
-dnl Copyright (C) 1997-2006, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 1997-2006, 2009-2023 Free Software Foundation, Inc.
 dnl
 dnl This file is part of GNU grep.
 dnl
@@ -138,6 +138,7 @@ if test $gl_gcc_warnings != no; then
   gl_WARN_ADD([-Wno-sign-compare])     # Too many warnings for now
   gl_WARN_ADD([-Wno-unused-parameter]) # Too many warnings for now
   gl_WARN_ADD([-Wno-cast-function-type]) # sig-handler.h's sa_handler_t cast
+  gl_WARN_ADD([-Wno-deprecated-declarations]) # clang complains about sprintf
 
   # In spite of excluding -Wlogical-op above, it is enabled, as of
   # gcc 4.5.0 20090517, and it provokes warnings in cat.c, dd.c, truncate.c
@@ -211,6 +212,7 @@ dnl then the installer should configure --with-included-regex.
 AM_CONDITIONAL([USE_INCLUDED_REGEX], [test "$ac_use_included_regex" = yes])
 if test "$ac_use_included_regex" = no; then
   AC_MSG_WARN([Included lib/regex.c not used])
+  AC_DEFINE([USE_INCLUDED_REGEX], 1, [building with included regex code])
 fi
 
 gl_FUNC_PCRE
diff --git a/debian/changelog b/debian/changelog
index 04fe40b1..01ffc25c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+grep (3.11-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+  * Drop patch upstream-0001-doc-improve-GREP_COLORS-doc-Bug-57696.patch,
+    present upstream.
+  * Drop patch 1029235-grep-bug-backref-in-last-of-multiple-patterns.patch,
+    present upstream.
+
+ -- Debian Janitor <janitor@jelmer.uk>  Wed, 31 May 2023 18:17:45 -0000
+
 grep (3.8-5) unstable; urgency=medium
 
   * Upload to unstable
diff --git a/debian/patches/01-disable-egrep-fgrep-warnings.patch b/debian/patches/01-disable-egrep-fgrep-warnings.patch
index 78a33147..7016a280 100644
--- a/debian/patches/01-disable-egrep-fgrep-warnings.patch
+++ b/debian/patches/01-disable-egrep-fgrep-warnings.patch
@@ -1,7 +1,7 @@
-Index: grep/src/egrep.sh
+Index: grep.git/src/egrep.sh
 ===================================================================
---- grep.orig/src/egrep.sh
-+++ grep/src/egrep.sh
+--- grep.git.orig/src/egrep.sh
++++ grep.git/src/egrep.sh
 @@ -1,4 +1,3 @@
  #!@SHELL@
  cmd=${0##*/}
diff --git a/debian/patches/02-man_egrep_fgrep_rgrep.patch b/debian/patches/02-man_egrep_fgrep_rgrep.patch
index 1b778e85..a073dffa 100644
--- a/debian/patches/02-man_egrep_fgrep_rgrep.patch
+++ b/debian/patches/02-man_egrep_fgrep_rgrep.patch
@@ -1,9 +1,9 @@
 Description: Include the Debian-specific egrep, fgrep, rgrep in the man page
 
-Index: grep/doc/grep.in.1
+Index: grep.git/doc/grep.in.1
 ===================================================================
---- grep.orig/doc/grep.in.1
-+++ grep/doc/grep.in.1
+--- grep.git.orig/doc/grep.in.1
++++ grep.git/doc/grep.in.1
 @@ -137,7 +137,7 @@
  .hy 0
  .
diff --git a/debian/patches/05-grep-wrapper-sh.patch b/debian/patches/05-grep-wrapper-sh.patch
index 0dd0794b..2cb845db 100644
--- a/debian/patches/05-grep-wrapper-sh.patch
+++ b/debian/patches/05-grep-wrapper-sh.patch
@@ -5,10 +5,10 @@ Removes needless call to bash.
 
 Closes: #762427, #762917
 
-Index: grep/src/Makefile.am
+Index: grep.git/src/Makefile.am
 ===================================================================
---- grep.orig/src/Makefile.am
-+++ grep/src/Makefile.am
+--- grep.git.orig/src/Makefile.am
++++ grep.git/src/Makefile.am
 @@ -15,6 +15,7 @@
  # along with this program.  If not, see <https://www.gnu.org/licenses/>.
  
diff --git a/debian/patches/1019724-handle-backslash-warning.patch b/debian/patches/1019724-handle-backslash-warning.patch
index 43c1054d..599edd17 100644
--- a/debian/patches/1019724-handle-backslash-warning.patch
+++ b/debian/patches/1019724-handle-backslash-warning.patch
@@ -8,11 +8,11 @@ Description: Temporarily disable the stray \ warnings. While the related
 Author: Santiago Ruano Rincón <santiago@debian.org>
 Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1019724
 
-Index: grep/lib/dfa.c
+Index: grep.git/lib/dfa.c
 ===================================================================
---- grep.orig/lib/dfa.c
-+++ grep/lib/dfa.c
-@@ -1547,7 +1547,10 @@ lex (struct dfa *dfa)
+--- grep.git.orig/lib/dfa.c
++++ grep.git/lib/dfa.c
+@@ -1560,7 +1560,10 @@ lex (struct dfa *dfa)
            if (!backslash)
              goto normal_char;
          stray_backslash:
diff --git a/debian/patches/1029235-grep-bug-backref-in-last-of-multiple-patterns.patch b/debian/patches/1029235-grep-bug-backref-in-last-of-multiple-patterns.patch
deleted file mode 100644
index 54043f66..00000000
--- a/debian/patches/1029235-grep-bug-backref-in-last-of-multiple-patterns.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From b061d24916fb9a14da37a3f2a05cb80dc65cfd38 Mon Sep 17 00:00:00 2001
-From: Paul Eggert <eggert@cs.ucla.edu>
-Date: Mon, 5 Dec 2022 14:16:45 -0800
-Subject: [PATCH] grep: bug: backref in last of multiple patterns
-Bug-Debian: https://bugs.debian.org/1029235
-
-* NEWS: Mention this.
-* src/dfasearch.c (GEAcompile): Trim trailing newline from
-the last pattern, even if it has back-references and follows
-a pattern that lacks back-references.
-* tests/backref: Add test for this bug.
----
- NEWS            |  6 ++++++
- src/dfasearch.c | 25 ++++++++++++-------------
- tests/backref   |  8 ++++++++
- 3 files changed, 26 insertions(+), 13 deletions(-)
-
-Index: grep/src/dfasearch.c
-===================================================================
---- grep.orig/src/dfasearch.c
-+++ grep/src/dfasearch.c
-@@ -281,20 +281,19 @@ GEAcompile (char *pattern, idx_t size, r
-   if (compilation_failed)
-     exit (EXIT_TROUBLE);
- 
--  if (prev <= patlim)
-+  if (patlim < prev)
-+    buflen--;
-+  else if (pattern < prev)
-     {
--      if (pattern < prev)
--        {
--          idx_t prevlen = patlim - prev;
--          buf = xirealloc (buf, buflen + prevlen);
--          memcpy (buf + buflen, prev, prevlen);
--          buflen += prevlen;
--        }
--      else
--        {
--          buf = pattern;
--          buflen = size;
--        }
-+      idx_t prevlen = patlim - prev;
-+      buf = xirealloc (buf, buflen + prevlen);
-+      memcpy (buf + buflen, prev, prevlen);
-+      buflen += prevlen;
-+    }
-+  else
-+    {
-+      buf = pattern;
-+      buflen = size;
-     }
- 
-   /* In the match_words and match_lines cases, we use a different pattern
-Index: grep/tests/backref
-===================================================================
---- grep.orig/tests/backref
-+++ grep/tests/backref
-@@ -43,4 +43,12 @@ if test $? -ne 2 ; then
-         failures=1
- fi
- 
-+# https://bugs.gnu.org/36148#13
-+echo 'Total failed: 2 (1 ignored)' |
-+    grep -e '^Total failed: 0$' -e '^Total failed: \([0-9]*\) (\1 ignored)$'
-+if test $? -ne 1 ; then
-+        echo "Backref: Multiple -e test, test #5 failed"
-+        failures=1
-+fi
-+
- Exit $failures
diff --git a/debian/patches/XFAIL-test-regex.patch b/debian/patches/XFAIL-test-regex.patch
index 3f009617..58b1e927 100644
--- a/debian/patches/XFAIL-test-regex.patch
+++ b/debian/patches/XFAIL-test-regex.patch
@@ -6,16 +6,16 @@ Forwarded: not-needed
 Author: Santiago Ruano Rincón <santiagorr@riseup.net>
 Last-Update: 2021-09-01
 
-Index: grep/gnulib-tests/gnulib.mk
+Index: grep.git/gnulib-tests/gnulib.mk
 ===================================================================
---- grep.orig/gnulib-tests/gnulib.mk
-+++ grep/gnulib-tests/gnulib.mk
-@@ -1440,7 +1440,7 @@ EXTRA_DIST += test-reallocarray.c signat
+--- grep.git.orig/gnulib-tests/gnulib.mk
++++ grep.git/gnulib-tests/gnulib.mk
+@@ -1511,7 +1511,7 @@ EXTRA_DIST += test-reallocarray.c signat
  
  ## begin gnulib module regex-tests
  
 -TESTS += test-regex
 +XFAIL_TESTS += test-regex
  check_PROGRAMS += test-regex
- test_regex_LDADD = $(LDADD) $(LIB_SETLOCALE) $(LIB_MBRTOWC) @LIBINTL@ $(LIBTHREAD)
+ test_regex_LDADD = $(LDADD) $(SETLOCALE_LIB) $(MBRTOWC_LIB) @LIBINTL@ $(LIBTHREAD)
  EXTRA_DIST += test-regex.c macros.h
diff --git a/debian/patches/series b/debian/patches/series
index ff85b808..f386d23f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,6 +2,4 @@ XFAIL-test-regex.patch
 01-disable-egrep-fgrep-warnings.patch
 02-man_egrep_fgrep_rgrep.patch
 05-grep-wrapper-sh.patch
-upstream-0001-doc-improve-GREP_COLORS-doc-Bug-57696.patch
 1019724-handle-backslash-warning.patch
-1029235-grep-bug-backref-in-last-of-multiple-patterns.patch
diff --git a/debian/patches/upstream-0001-doc-improve-GREP_COLORS-doc-Bug-57696.patch b/debian/patches/upstream-0001-doc-improve-GREP_COLORS-doc-Bug-57696.patch
deleted file mode 100644
index 86e9fff9..00000000
--- a/debian/patches/upstream-0001-doc-improve-GREP_COLORS-doc-Bug-57696.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From b3cd2ee4aeaf01930c88ac6320afa347e74e91aa Mon Sep 17 00:00:00 2001
-From: Paul Eggert <eggert@cs.ucla.edu>
-Date: Fri, 9 Sep 2022 13:12:24 -0500
-Subject: [PATCH] doc: improve GREP_COLORS doc (Bug#57696)
-Origin: https://git.savannah.gnu.org/cgit/grep.git/commit/?id=b3cd2ee4aeaf01930c88ac6320afa347e74e91aa
-Bug-Debian: http://bugs.debian.org/792385
-
----
- doc/grep.in.1 | 5 +++--
- doc/grep.texi | 3 +--
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/doc/grep.in.1 b/doc/grep.in.1
-index 0423866..5b3123d 100644
---- a/doc/grep.in.1
-+++ b/doc/grep.in.1
-@@ -1007,8 +1007,9 @@ The shell command
- lists locales that are currently available.
- .TP
- .B GREP_COLORS
--Specifies the colors and other attributes
--used to highlight various parts of the output.
-+Controls how the
-+.B \-\^\-color
-+option highlights output.
- Its value is a colon-separated list of capabilities
- that defaults to
- .B ms=01;31:mc=01;31:sl=:cx=:fn=35:ln=32:bn=32:se=36
-diff --git a/doc/grep.texi b/doc/grep.texi
-index c371172..a8089cc 100644
---- a/doc/grep.texi
-+++ b/doc/grep.texi
-@@ -864,8 +864,7 @@ overridden by @env{GREP_COLORS}.  Instead of
- @item GREP_COLORS
- @vindex GREP_COLORS @r{environment variable}
- @cindex highlight markers
--This variable specifies the colors and other attributes
--used to highlight various parts of the output.
-+This variable controls how the @option{--color} option highlights output.
- Its value is a colon-separated list of @code{terminfo} capabilities
- that defaults to @samp{ms=01;31:mc=01;31:sl=:cx=:fn=35:ln=32:bn=32:se=36}
- with the @samp{rv} and @samp{ne} boolean capabilities omitted (i.e., false).
--- 
-2.37.2
-
diff --git a/doc/Makefile.am b/doc/Makefile.am
index bd28da80..4237af6e 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,7 +1,7 @@
 # Process this file with automake to create Makefile.in
 # Makefile.am for grep/doc.
 #
-# Copyright 2008-2022 Free Software Foundation, Inc.
+# Copyright 2008-2023 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/doc/Makefile.in b/doc/Makefile.in
index 6a29eaa6..b0a960b3 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -1,7 +1,7 @@
 # Makefile.in generated by automake 1.16i from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2022 Free Software Foundation, Inc.
+# Copyright (C) 1994-2023 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -17,7 +17,7 @@
 # Process this file with automake to create Makefile.in
 # Makefile.am for grep/doc.
 #
-# Copyright 2008-2022 Free Software Foundation, Inc.
+# Copyright 2008-2023 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
@@ -89,9 +89,6 @@ am__make_dryrun = (target_option=n; $(am__make_running_with_option))
 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 am__rm_f = rm -f $(am__rm_f_notfound)
 am__rm_rf = rm -rf $(am__rm_f_notfound)
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
@@ -113,7 +110,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
 	$(top_srcdir)/m4/absolute-header.m4 $(top_srcdir)/m4/alloca.m4 \
 	$(top_srcdir)/m4/arpa_inet_h.m4 \
 	$(top_srcdir)/m4/asm-underscore.m4 $(top_srcdir)/m4/assert.m4 \
-	$(top_srcdir)/m4/btowc.m4 $(top_srcdir)/m4/builtin-expect.m4 \
+	$(top_srcdir)/m4/assert_h.m4 $(top_srcdir)/m4/btowc.m4 \
+	$(top_srcdir)/m4/build-to-host.m4 \
+	$(top_srcdir)/m4/builtin-expect.m4 $(top_srcdir)/m4/c-bool.m4 \
 	$(top_srcdir)/m4/c-stack.m4 $(top_srcdir)/m4/calloc.m4 \
 	$(top_srcdir)/m4/chdir-long.m4 $(top_srcdir)/m4/close.m4 \
 	$(top_srcdir)/m4/closedir.m4 $(top_srcdir)/m4/codeset.m4 \
@@ -124,12 +123,13 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
 	$(top_srcdir)/m4/double-slash-root.m4 $(top_srcdir)/m4/dup.m4 \
 	$(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \
 	$(top_srcdir)/m4/environ.m4 $(top_srcdir)/m4/errno_h.m4 \
-	$(top_srcdir)/m4/error.m4 $(top_srcdir)/m4/exponentd.m4 \
-	$(top_srcdir)/m4/extensions.m4 \
+	$(top_srcdir)/m4/error.m4 $(top_srcdir)/m4/error_h.m4 \
+	$(top_srcdir)/m4/exponentd.m4 $(top_srcdir)/m4/extensions.m4 \
 	$(top_srcdir)/m4/extern-inline.m4 $(top_srcdir)/m4/fchdir.m4 \
-	$(top_srcdir)/m4/fcntl-o.m4 $(top_srcdir)/m4/fcntl-safer.m4 \
-	$(top_srcdir)/m4/fcntl.m4 $(top_srcdir)/m4/fcntl_h.m4 \
-	$(top_srcdir)/m4/fdopen.m4 $(top_srcdir)/m4/fdopendir.m4 \
+	$(top_srcdir)/m4/fclose.m4 $(top_srcdir)/m4/fcntl-o.m4 \
+	$(top_srcdir)/m4/fcntl-safer.m4 $(top_srcdir)/m4/fcntl.m4 \
+	$(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fdopen.m4 \
+	$(top_srcdir)/m4/fdopendir.m4 $(top_srcdir)/m4/fflush.m4 \
 	$(top_srcdir)/m4/filenamecat.m4 $(top_srcdir)/m4/flexmember.m4 \
 	$(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fnmatch.m4 \
 	$(top_srcdir)/m4/fnmatch_h.m4 $(top_srcdir)/m4/fopen.m4 \
@@ -210,35 +210,34 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
 	$(top_srcdir)/m4/stack-direction.m4 \
 	$(top_srcdir)/m4/stat-time.m4 $(top_srcdir)/m4/stat.m4 \
 	$(top_srcdir)/m4/stdalign.m4 $(top_srcdir)/m4/stdarg.m4 \
-	$(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stddef_h.m4 \
-	$(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/stdint_h.m4 \
-	$(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \
-	$(top_srcdir)/m4/stpcpy.m4 $(top_srcdir)/m4/strdup.m4 \
-	$(top_srcdir)/m4/strerror.m4 $(top_srcdir)/m4/strerror_r.m4 \
-	$(top_srcdir)/m4/string_h.m4 $(top_srcdir)/m4/strnlen.m4 \
-	$(top_srcdir)/m4/strstr.m4 $(top_srcdir)/m4/strtoimax.m4 \
-	$(top_srcdir)/m4/strtoll.m4 $(top_srcdir)/m4/strtoull.m4 \
-	$(top_srcdir)/m4/strtoumax.m4 $(top_srcdir)/m4/symlink.m4 \
-	$(top_srcdir)/m4/sys_ioctl_h.m4 \
+	$(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \
+	$(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/stdio_h.m4 \
+	$(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/stpcpy.m4 \
+	$(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \
+	$(top_srcdir)/m4/strerror_r.m4 $(top_srcdir)/m4/string_h.m4 \
+	$(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/strstr.m4 \
+	$(top_srcdir)/m4/strtoimax.m4 $(top_srcdir)/m4/strtoll.m4 \
+	$(top_srcdir)/m4/strtoull.m4 $(top_srcdir)/m4/strtoumax.m4 \
+	$(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_ioctl_h.m4 \
 	$(top_srcdir)/m4/sys_select_h.m4 \
 	$(top_srcdir)/m4/sys_socket_h.m4 \
 	$(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_time_h.m4 \
 	$(top_srcdir)/m4/sys_types_h.m4 $(top_srcdir)/m4/sys_uio_h.m4 \
 	$(top_srcdir)/m4/thread.m4 $(top_srcdir)/m4/threadlib.m4 \
-	$(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/unistd-safer.m4 \
-	$(top_srcdir)/m4/unistd_h.m4 $(top_srcdir)/m4/unlocked-io.m4 \
-	$(top_srcdir)/m4/vasnprintf.m4 $(top_srcdir)/m4/version-etc.m4 \
-	$(top_srcdir)/m4/visibility.m4 $(top_srcdir)/m4/warn-on-use.m4 \
-	$(top_srcdir)/m4/warnings.m4 $(top_srcdir)/m4/wchar_h.m4 \
-	$(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wcrtomb.m4 \
-	$(top_srcdir)/m4/wctob.m4 $(top_srcdir)/m4/wctomb.m4 \
-	$(top_srcdir)/m4/wctype_h.m4 $(top_srcdir)/m4/wcwidth.m4 \
+	$(top_srcdir)/m4/time.m4 $(top_srcdir)/m4/time_h.m4 \
+	$(top_srcdir)/m4/unistd-safer.m4 $(top_srcdir)/m4/unistd_h.m4 \
+	$(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/vasnprintf.m4 \
+	$(top_srcdir)/m4/version-etc.m4 $(top_srcdir)/m4/visibility.m4 \
+	$(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/warnings.m4 \
+	$(top_srcdir)/m4/wchar_h.m4 $(top_srcdir)/m4/wchar_t.m4 \
+	$(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wctob.m4 \
+	$(top_srcdir)/m4/wctomb.m4 $(top_srcdir)/m4/wctype_h.m4 \
+	$(top_srcdir)/m4/wcwidth.m4 \
 	$(top_srcdir)/m4/windows-stat-inodes.m4 \
 	$(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/wmemchr.m4 \
 	$(top_srcdir)/m4/wmempcpy.m4 $(top_srcdir)/m4/xalloc.m4 \
 	$(top_srcdir)/m4/xsize.m4 $(top_srcdir)/m4/xstrtol.m4 \
-	$(top_srcdir)/m4/year2038.m4 $(top_srcdir)/m4/zzgnulib.m4 \
-	$(top_srcdir)/configure.ac
+	$(top_srcdir)/m4/zzgnulib.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/version.texi \
@@ -342,6 +341,9 @@ am__DIST_COMMON = $(grep_TEXINFOS) $(srcdir)/Makefile.in \
 	$(top_srcdir)/build-aux/mdate-sh \
 	$(top_srcdir)/build-aux/texinfo.tex
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+pkgdatadir = @pkgdatadir@
+pkgincludedir = @pkgincludedir@
+pkglibdir = @pkglibdir@
 pkglibexecdir = @pkglibexecdir@
 ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
@@ -351,6 +353,7 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
 AR = @AR@
 ARFLAGS = @ARFLAGS@
+ASSERT_H = @ASSERT_H@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -373,6 +376,7 @@ CTAGS = @CTAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DIR_HAS_FD_MEMBER = @DIR_HAS_FD_MEMBER@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
@@ -383,6 +387,7 @@ ENOLINK_VALUE = @ENOLINK_VALUE@
 EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
 EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
 ERRNO_H = @ERRNO_H@
+ERROR_H = @ERROR_H@
 ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FLOAT_H = @FLOAT_H@
@@ -483,6 +488,7 @@ GL_GNULIB_GETPAGESIZE = @GL_GNULIB_GETPAGESIZE@
 GL_GNULIB_GETPASS = @GL_GNULIB_GETPASS@
 GL_GNULIB_GETPASS_GNU = @GL_GNULIB_GETPASS_GNU@
 GL_GNULIB_GETPEERNAME = @GL_GNULIB_GETPEERNAME@
+GL_GNULIB_GETPROGNAME = @GL_GNULIB_GETPROGNAME@
 GL_GNULIB_GETSOCKNAME = @GL_GNULIB_GETSOCKNAME@
 GL_GNULIB_GETSOCKOPT = @GL_GNULIB_GETSOCKOPT@
 GL_GNULIB_GETSUBOPT = @GL_GNULIB_GETSUBOPT@
@@ -534,6 +540,7 @@ GL_GNULIB_MBSSEP = @GL_GNULIB_MBSSEP@
 GL_GNULIB_MBSSPN = @GL_GNULIB_MBSSPN@
 GL_GNULIB_MBSSTR = @GL_GNULIB_MBSSTR@
 GL_GNULIB_MBSTOK_R = @GL_GNULIB_MBSTOK_R@
+GL_GNULIB_MBSTOWCS = @GL_GNULIB_MBSTOWCS@
 GL_GNULIB_MBTOWC = @GL_GNULIB_MBTOWC@
 GL_GNULIB_MDA_ACCESS = @GL_GNULIB_MDA_ACCESS@
 GL_GNULIB_MDA_CHDIR = @GL_GNULIB_MDA_CHDIR@
@@ -580,6 +587,7 @@ GL_GNULIB_MEMCHR = @GL_GNULIB_MEMCHR@
 GL_GNULIB_MEMMEM = @GL_GNULIB_MEMMEM@
 GL_GNULIB_MEMPCPY = @GL_GNULIB_MEMPCPY@
 GL_GNULIB_MEMRCHR = @GL_GNULIB_MEMRCHR@
+GL_GNULIB_MEMSET_EXPLICIT = @GL_GNULIB_MEMSET_EXPLICIT@
 GL_GNULIB_MKDIR = @GL_GNULIB_MKDIR@
 GL_GNULIB_MKDIRAT = @GL_GNULIB_MKDIRAT@
 GL_GNULIB_MKDTEMP = @GL_GNULIB_MKDTEMP@
@@ -704,6 +712,7 @@ GL_GNULIB_STRVERSCMP = @GL_GNULIB_STRVERSCMP@
 GL_GNULIB_SYMLINK = @GL_GNULIB_SYMLINK@
 GL_GNULIB_SYMLINKAT = @GL_GNULIB_SYMLINKAT@
 GL_GNULIB_SYSTEM_POSIX = @GL_GNULIB_SYSTEM_POSIX@
+GL_GNULIB_TIME = @GL_GNULIB_TIME@
 GL_GNULIB_TIMEGM = @GL_GNULIB_TIMEGM@
 GL_GNULIB_TIMESPEC_GET = @GL_GNULIB_TIMESPEC_GET@
 GL_GNULIB_TIMESPEC_GETRES = @GL_GNULIB_TIMESPEC_GETRES@
@@ -780,6 +789,7 @@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
 GNULIB_TEST_WARN_CFLAGS = @GNULIB_TEST_WARN_CFLAGS@
 GNULIB_WARN_CFLAGS = @GNULIB_WARN_CFLAGS@
 GREP = @GREP@
+HARD_LOCALE_LIB = @HARD_LOCALE_LIB@
 HAVE_ACCEPT4 = @HAVE_ACCEPT4@
 HAVE_ALIGNED_ALLOC = @HAVE_ALIGNED_ALLOC@
 HAVE_ALLOCA_H = @HAVE_ALLOCA_H@
@@ -814,6 +824,7 @@ HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@
 HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
 HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
 HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
+HAVE_DECL_GETW = @HAVE_DECL_GETW@
 HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@
 HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@
 HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@
@@ -823,6 +834,8 @@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@
 HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
 HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
 HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@
+HAVE_DECL_PROGRAM_INVOCATION_NAME = @HAVE_DECL_PROGRAM_INVOCATION_NAME@
+HAVE_DECL_PUTW = @HAVE_DECL_PUTW@
 HAVE_DECL_SETENV = @HAVE_DECL_SETENV@
 HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@
 HAVE_DECL_SETSTATE = @HAVE_DECL_SETSTATE@
@@ -846,6 +859,9 @@ HAVE_DIRENT_H = @HAVE_DIRENT_H@
 HAVE_DPRINTF = @HAVE_DPRINTF@
 HAVE_DUP3 = @HAVE_DUP3@
 HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
+HAVE_ERROR = @HAVE_ERROR@
+HAVE_ERROR_AT_LINE = @HAVE_ERROR_AT_LINE@
+HAVE_ERROR_H = @HAVE_ERROR_H@
 HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
 HAVE_EXECVPE = @HAVE_EXECVPE@
 HAVE_EXPLICIT_BZERO = @HAVE_EXPLICIT_BZERO@
@@ -876,11 +892,14 @@ HAVE_GETLOGIN = @HAVE_GETLOGIN@
 HAVE_GETOPT_H = @HAVE_GETOPT_H@
 HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
 HAVE_GETPASS = @HAVE_GETPASS@
+HAVE_GETPROGNAME = @HAVE_GETPROGNAME@
 HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
 HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@
 HAVE_GETUMASK = @HAVE_GETUMASK@
 HAVE_GRANTPT = @HAVE_GRANTPT@
 HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
+HAVE_IMAXABS = @HAVE_IMAXABS@
+HAVE_IMAXDIV = @HAVE_IMAXDIV@
 HAVE_IMAXDIV_T = @HAVE_IMAXDIV_T@
 HAVE_INITSTATE = @HAVE_INITSTATE@
 HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
@@ -908,6 +927,7 @@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@
 HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@
 HAVE_MBTOWC = @HAVE_MBTOWC@
 HAVE_MEMPCPY = @HAVE_MEMPCPY@
+HAVE_MEMSET_EXPLICIT = @HAVE_MEMSET_EXPLICIT@
 HAVE_MKDIRAT = @HAVE_MKDIRAT@
 HAVE_MKDTEMP = @HAVE_MKDTEMP@
 HAVE_MKFIFO = @HAVE_MKFIFO@
@@ -1070,6 +1090,7 @@ HAVE_TIMESPEC_GETRES = @HAVE_TIMESPEC_GETRES@
 HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@
 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@
 HAVE_UNISTD_H = @HAVE_UNISTD_H@
+HAVE_UNISTRING_WOE32DLL_H = @HAVE_UNISTRING_WOE32DLL_H@
 HAVE_UNLINKAT = @HAVE_UNLINKAT@
 HAVE_UNLOCKPT = @HAVE_UNLOCKPT@
 HAVE_USLEEP = @HAVE_USLEEP@
@@ -1119,7 +1140,6 @@ HAVE_WMEMPCPY = @HAVE_WMEMPCPY@
 HAVE_WMEMSET = @HAVE_WMEMSET@
 HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@
 HAVE_XLOCALE_H = @HAVE_XLOCALE_H@
-HAVE__BOOL = @HAVE__BOOL@
 HAVE__EXIT = @HAVE__EXIT@
 HOST_CPU = @HOST_CPU@
 HOST_CPU_C_ABI = @HOST_CPU_C_ABI@
@@ -1183,16 +1203,21 @@ LTLIBOBJS = @LTLIBOBJS@
 LTLIBSIGSEGV = @LTLIBSIGSEGV@
 LTLIBTHREAD = @LTLIBTHREAD@
 MAKEINFO = @MAKEINFO@
+MBRTOWC_LIB = @MBRTOWC_LIB@
 MKDIR_P = @MKDIR_P@
 MSGFMT = @MSGFMT@
 MSGFMT_015 = @MSGFMT_015@
 MSGMERGE = @MSGMERGE@
+NANOSLEEP_LIB = @NANOSLEEP_LIB@
 NETINET_IN_H = @NETINET_IN_H@
 NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@
+NEXT_ASSERT_H = @NEXT_ASSERT_H@
 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@
+NEXT_AS_FIRST_DIRECTIVE_ASSERT_H = @NEXT_AS_FIRST_DIRECTIVE_ASSERT_H@
 NEXT_AS_FIRST_DIRECTIVE_CTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_CTYPE_H@
 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@
 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
+NEXT_AS_FIRST_DIRECTIVE_ERROR_H = @NEXT_AS_FIRST_DIRECTIVE_ERROR_H@
 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@
 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@
 NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H = @NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H@
@@ -1226,6 +1251,7 @@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@
 NEXT_CTYPE_H = @NEXT_CTYPE_H@
 NEXT_DIRENT_H = @NEXT_DIRENT_H@
 NEXT_ERRNO_H = @NEXT_ERRNO_H@
+NEXT_ERROR_H = @NEXT_ERROR_H@
 NEXT_FCNTL_H = @NEXT_FCNTL_H@
 NEXT_FLOAT_H = @NEXT_FLOAT_H@
 NEXT_FNMATCH_H = @NEXT_FNMATCH_H@
@@ -1276,6 +1302,7 @@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
 PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
 PRIPTR_PREFIX = @PRIPTR_PREFIX@
 PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
+PTHREAD_SIGMASK_LIB = @PTHREAD_SIGMASK_LIB@
 PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
 RANLIB = @RANLIB@
 REPLACE_ACCESS = @REPLACE_ACCESS@
@@ -1295,7 +1322,10 @@ REPLACE_DIRFD = @REPLACE_DIRFD@
 REPLACE_DPRINTF = @REPLACE_DPRINTF@
 REPLACE_DUP = @REPLACE_DUP@
 REPLACE_DUP2 = @REPLACE_DUP2@
+REPLACE_DUP3 = @REPLACE_DUP3@
 REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
+REPLACE_ERROR = @REPLACE_ERROR@
+REPLACE_ERROR_AT_LINE = @REPLACE_ERROR_AT_LINE@
 REPLACE_EXECL = @REPLACE_EXECL@
 REPLACE_EXECLE = @REPLACE_EXECLE@
 REPLACE_EXECLP = @REPLACE_EXECLP@
@@ -1308,6 +1338,7 @@ REPLACE_FCHMODAT = @REPLACE_FCHMODAT@
 REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
 REPLACE_FCLOSE = @REPLACE_FCLOSE@
 REPLACE_FCNTL = @REPLACE_FCNTL@
+REPLACE_FDATASYNC = @REPLACE_FDATASYNC@
 REPLACE_FDOPEN = @REPLACE_FDOPEN@
 REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@
 REPLACE_FFLUSH = @REPLACE_FFLUSH@
@@ -1332,17 +1363,23 @@ REPLACE_GETCWD = @REPLACE_GETCWD@
 REPLACE_GETDELIM = @REPLACE_GETDELIM@
 REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
 REPLACE_GETDTABLESIZE = @REPLACE_GETDTABLESIZE@
+REPLACE_GETENTROPY = @REPLACE_GETENTROPY@
 REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
 REPLACE_GETLINE = @REPLACE_GETLINE@
+REPLACE_GETLOADAVG = @REPLACE_GETLOADAVG@
 REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
 REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
 REPLACE_GETPASS = @REPLACE_GETPASS@
 REPLACE_GETPASS_FOR_GETPASS_GNU = @REPLACE_GETPASS_FOR_GETPASS_GNU@
+REPLACE_GETPROGNAME = @REPLACE_GETPROGNAME@
+REPLACE_GETSUBOPT = @REPLACE_GETSUBOPT@
 REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
 REPLACE_GMTIME = @REPLACE_GMTIME@
 REPLACE_ICONV = @REPLACE_ICONV@
 REPLACE_ICONV_OPEN = @REPLACE_ICONV_OPEN@
 REPLACE_ICONV_UTF = @REPLACE_ICONV_UTF@
+REPLACE_IMAXABS = @REPLACE_IMAXABS@
+REPLACE_IMAXDIV = @REPLACE_IMAXDIV@
 REPLACE_INET_NTOP = @REPLACE_INET_NTOP@
 REPLACE_INET_PTON = @REPLACE_INET_PTON@
 REPLACE_INITSTATE = @REPLACE_INITSTATE@
@@ -1369,14 +1406,19 @@ REPLACE_MBSINIT = @REPLACE_MBSINIT@
 REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
 REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
 REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
+REPLACE_MBSTOWCS = @REPLACE_MBSTOWCS@
 REPLACE_MBTOWC = @REPLACE_MBTOWC@
+REPLACE_MB_CUR_MAX = @REPLACE_MB_CUR_MAX@
 REPLACE_MEMCHR = @REPLACE_MEMCHR@
 REPLACE_MEMMEM = @REPLACE_MEMMEM@
+REPLACE_MEMPCPY = @REPLACE_MEMPCPY@
 REPLACE_MKDIR = @REPLACE_MKDIR@
 REPLACE_MKFIFO = @REPLACE_MKFIFO@
 REPLACE_MKFIFOAT = @REPLACE_MKFIFOAT@
 REPLACE_MKNOD = @REPLACE_MKNOD@
 REPLACE_MKNODAT = @REPLACE_MKNODAT@
+REPLACE_MKOSTEMP = @REPLACE_MKOSTEMP@
+REPLACE_MKOSTEMPS = @REPLACE_MKOSTEMPS@
 REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
 REPLACE_MKTIME = @REPLACE_MKTIME@
 REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
@@ -1388,8 +1430,10 @@ REPLACE_OPEN = @REPLACE_OPEN@
 REPLACE_OPENAT = @REPLACE_OPENAT@
 REPLACE_OPENDIR = @REPLACE_OPENDIR@
 REPLACE_PERROR = @REPLACE_PERROR@
+REPLACE_PIPE2 = @REPLACE_PIPE2@
 REPLACE_POPEN = @REPLACE_POPEN@
 REPLACE_POSIX_MEMALIGN = @REPLACE_POSIX_MEMALIGN@
+REPLACE_POSIX_OPENPT = @REPLACE_POSIX_OPENPT@
 REPLACE_PREAD = @REPLACE_PREAD@
 REPLACE_PRINTF = @REPLACE_PRINTF@
 REPLACE_PSELECT = @REPLACE_PSELECT@
@@ -1454,6 +1498,7 @@ REPLACE_RAISE = @REPLACE_RAISE@
 REPLACE_RANDOM = @REPLACE_RANDOM@
 REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
 REPLACE_READ = @REPLACE_READ@
+REPLACE_READDIR = @REPLACE_READDIR@
 REPLACE_READLINK = @REPLACE_READLINK@
 REPLACE_READLINKAT = @REPLACE_READLINKAT@
 REPLACE_REALLOCARRAY = @REPLACE_REALLOCARRAY@
@@ -1463,10 +1508,12 @@ REPLACE_REALPATH = @REPLACE_REALPATH@
 REPLACE_REMOVE = @REPLACE_REMOVE@
 REPLACE_RENAME = @REPLACE_RENAME@
 REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
+REPLACE_REWINDDIR = @REPLACE_REWINDDIR@
 REPLACE_RMDIR = @REPLACE_RMDIR@
 REPLACE_SCHED_YIELD = @REPLACE_SCHED_YIELD@
 REPLACE_SELECT = @REPLACE_SELECT@
 REPLACE_SETENV = @REPLACE_SETENV@
+REPLACE_SETHOSTNAME = @REPLACE_SETHOSTNAME@
 REPLACE_SETLOCALE = @REPLACE_SETLOCALE@
 REPLACE_SETSTATE = @REPLACE_SETSTATE@
 REPLACE_SLEEP = @REPLACE_SLEEP@
@@ -1475,6 +1522,7 @@ REPLACE_SPRINTF = @REPLACE_SPRINTF@
 REPLACE_STAT = @REPLACE_STAT@
 REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@
 REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
+REPLACE_STPCPY = @REPLACE_STPCPY@
 REPLACE_STPNCPY = @REPLACE_STPNCPY@
 REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
 REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@
@@ -1501,7 +1549,9 @@ REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@
 REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@
 REPLACE_SYMLINK = @REPLACE_SYMLINK@
 REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@
+REPLACE_TIME = @REPLACE_TIME@
 REPLACE_TIMEGM = @REPLACE_TIMEGM@
+REPLACE_TIMESPEC_GET = @REPLACE_TIMESPEC_GET@
 REPLACE_TMPFILE = @REPLACE_TMPFILE@
 REPLACE_TOWLOWER = @REPLACE_TOWLOWER@
 REPLACE_TRUNCATE = @REPLACE_TRUNCATE@
@@ -1519,24 +1569,33 @@ REPLACE_VPRINTF = @REPLACE_VPRINTF@
 REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
 REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
 REPLACE_WCRTOMB = @REPLACE_WCRTOMB@
+REPLACE_WCSCMP = @REPLACE_WCSCMP@
 REPLACE_WCSFTIME = @REPLACE_WCSFTIME@
+REPLACE_WCSNCMP = @REPLACE_WCSNCMP@
 REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@
 REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@
+REPLACE_WCSSTR = @REPLACE_WCSSTR@
 REPLACE_WCSTOK = @REPLACE_WCSTOK@
 REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@
 REPLACE_WCTOB = @REPLACE_WCTOB@
 REPLACE_WCTOMB = @REPLACE_WCTOMB@
 REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
+REPLACE_WMEMCMP = @REPLACE_WMEMCMP@
+REPLACE_WMEMPCPY = @REPLACE_WMEMPCPY@
 REPLACE_WRITE = @REPLACE_WRITE@
+REPLACE__EXIT = @REPLACE__EXIT@
+SCHED_YIELD_LIB = @SCHED_YIELD_LIB@
 SED = @SED@
+SELECT_LIB = @SELECT_LIB@
+SETLOCALE_LIB = @SETLOCALE_LIB@
+SETLOCALE_NULL_LIB = @SETLOCALE_NULL_LIB@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 SIGSEGV_H = @SIGSEGV_H@
 SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
 SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
-STDALIGN_H = @STDALIGN_H@
 STDARG_H = @STDARG_H@
-STDBOOL_H = @STDBOOL_H@
+STDCKDINT_H = @STDCKDINT_H@
 STDDEF_H = @STDDEF_H@
 STDINT_H = @STDINT_H@
 STRIP = @STRIP@
@@ -1579,6 +1638,8 @@ am__tar = @am__tar@
 am__untar = @am__untar@
 am__xargs_n = @am__xargs_n@
 bindir = @bindir@
+bindir_c = @bindir_c@
+bindir_c_make = @bindir_c_make@
 build = @build@
 build_alias = @build_alias@
 build_cpu = @build_cpu@
@@ -1586,10 +1647,20 @@ build_os = @build_os@
 build_vendor = @build_vendor@
 builddir = @builddir@
 datadir = @datadir@
+datadir_c = @datadir_c@
+datadir_c_make = @datadir_c_make@
 datarootdir = @datarootdir@
+datarootdir_c = @datarootdir_c@
+datarootdir_c_make = @datarootdir_c_make@
 docdir = @docdir@
+docdir_c = @docdir_c@
+docdir_c_make = @docdir_c_make@
 dvidir = @dvidir@
+dvidir_c = @dvidir_c@
+dvidir_c_make = @dvidir_c_make@
 exec_prefix = @exec_prefix@
+exec_prefix_c = @exec_prefix_c@
+exec_prefix_c_make = @exec_prefix_c_make@
 gl_LIBOBJDEPS = @gl_LIBOBJDEPS@
 gl_LIBOBJS = @gl_LIBOBJS@
 gl_LTLIBOBJS = @gl_LTLIBOBJS@
@@ -1603,26 +1674,68 @@ host_cpu = @host_cpu@
 host_os = @host_os@
 host_vendor = @host_vendor@
 htmldir = @htmldir@
+htmldir_c = @htmldir_c@
+htmldir_c_make = @htmldir_c_make@
 includedir = @includedir@
+includedir_c = @includedir_c@
+includedir_c_make = @includedir_c_make@
 infodir = @infodir@
+infodir_c = @infodir_c@
+infodir_c_make = @infodir_c_make@
 install_sh = @install_sh@
 libdir = @libdir@
+libdir_c = @libdir_c@
+libdir_c_make = @libdir_c_make@
 libexecdir = @libexecdir@
+libexecdir_c = @libexecdir_c@
+libexecdir_c_make = @libexecdir_c_make@
 lispdir = @lispdir@
+lispdir_c = @lispdir_c@
+lispdir_c_make = @lispdir_c_make@
 localedir = @localedir@
+localedir_c = @localedir_c@
+localedir_c_make = @localedir_c_make@
 localstatedir = @localstatedir@
+localstatedir_c = @localstatedir_c@
+localstatedir_c_make = @localstatedir_c_make@
 mandir = @mandir@
+mandir_c = @mandir_c@
+mandir_c_make = @mandir_c_make@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+oldincludedir_c = @oldincludedir_c@
+oldincludedir_c_make = @oldincludedir_c_make@
 pdfdir = @pdfdir@
+pdfdir_c = @pdfdir_c@
+pdfdir_c_make = @pdfdir_c_make@
+pkgdatadir_c = @pkgdatadir_c@
+pkgdatadir_c_make = @pkgdatadir_c_make@
+pkgincludedir_c = @pkgincludedir_c@
+pkgincludedir_c_make = @pkgincludedir_c_make@
+pkglibdir_c = @pkglibdir_c@
+pkglibdir_c_make = @pkglibdir_c_make@
+pkglibexecdir_c = @pkglibexecdir_c@
+pkglibexecdir_c_make = @pkglibexecdir_c_make@
 prefix = @prefix@
+prefix_c = @prefix_c@
+prefix_c_make = @prefix_c_make@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+psdir_c = @psdir_c@
+psdir_c_make = @psdir_c_make@
 runstatedir = @runstatedir@
+runstatedir_c = @runstatedir_c@
+runstatedir_c_make = @runstatedir_c_make@
 sbindir = @sbindir@
+sbindir_c = @sbindir_c@
+sbindir_c_make = @sbindir_c_make@
 sharedstatedir = @sharedstatedir@
+sharedstatedir_c = @sharedstatedir_c@
+sharedstatedir_c_make = @sharedstatedir_c_make@
 srcdir = @srcdir@
 sysconfdir = @sysconfdir@
+sysconfdir_c = @sysconfdir_c@
+sysconfdir_c_make = @sysconfdir_c_make@
 target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
@@ -1939,7 +2052,7 @@ install-strip:
 mostlyclean-generic:
 
 clean-generic:
-	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+	-$(am__rm_f) $(CLEANFILES)
 
 distclean-generic:
 	-$(am__rm_f) $(CONFIG_CLEAN_FILES)
diff --git a/doc/fdl.texi b/doc/fdl.texi
index eaf3da0e..84f45b0a 100644
--- a/doc/fdl.texi
+++ b/doc/fdl.texi
@@ -5,7 +5,8 @@
 @c hence no sectioning command or @node.
 
 @display
-Copyright @copyright{} 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
+Copyright @copyright{} 2000--2002, 2007--2008, 2023 Free Software Foundation,
+Inc.
 @uref{https://fsf.org/}
 
 Everyone is permitted to copy and distribute verbatim copies
diff --git a/doc/grep.in.1 b/doc/grep.in.1
index 0423866c..236791ee 100644
--- a/doc/grep.in.1
+++ b/doc/grep.in.1
@@ -244,6 +244,11 @@ If this option is used multiple times or is combined with the
 .RB ( \-\^\-regexp )
 option, search for all patterns given.
 The empty file contains zero patterns, and therefore matches nothing.
+If
+.IR FILE
+is
+.B \-
+, read patterns from standard input.
 .TP
 .BR \-i ", " \-\^\-ignore\-case
 Ignore case distinctions in patterns and input data,
@@ -715,12 +720,12 @@ This can cause a performance penalty.
 .BR \-U ", " \-\^\-binary
 Treat the file(s) as binary.
 By default, under MS-DOS and MS-Windows,
-.BR grep
+.B grep
 guesses whether a file is text or binary as described for the
 .B \-\^\-binary\-files
 option.
 If
-.BR grep
+.B grep
 decides the file is a text file, it strips the CR characters from the
 original file contents (to make regular expressions with
 .B ^
@@ -756,13 +761,14 @@ expressions, by using various operators to combine smaller expressions.
 understands three different versions of regular expression syntax:
 \*(lqbasic\*(rq (BRE), \*(lqextended\*(rq (ERE) and \*(lqperl\*(rq (PCRE).
 In GNU
-.B grep
-there is no difference in available functionality between basic and
-extended syntax.
-In other implementations, basic regular expressions are less powerful.
+.BR grep ,
+basic and extended regular expressions are merely different notations
+for the same pattern-matching functionality.
+In other implementations, basic regular expressions are ordinarily
+less powerful than extended, though occasionally it is the other way around.
 The following description applies to extended regular expressions;
 differences for basic regular expressions are summarized afterwards.
-Perl-compatible regular expressions give additional functionality, and are
+Perl-compatible regular expressions have different functionality, and are
 documented in
 .BR pcre2syntax (3)
 and
@@ -1007,8 +1013,9 @@ The shell command
 lists locales that are currently available.
 .TP
 .B GREP_COLORS
-Specifies the colors and other attributes
-used to highlight various parts of the output.
+Controls how the
+.B \-\^\-color
+option highlights output.
 Its value is a colon-separated list of capabilities
 that defaults to
 .B ms=01;31:mc=01;31:sl=:cx=:fn=35:ln=32:bn=32:se=36
@@ -1242,38 +1249,13 @@ front of the operand list and are treated as options.
 Also, POSIX requires that unrecognized options be diagnosed as
 \*(lqillegal\*(rq, but since they are not really against the law the default
 is to diagnose them as \*(lqinvalid\*(rq.
-.B POSIXLY_CORRECT
-also disables \fB_\fP\fIN\fP\fB_GNU_nonoption_argv_flags_\fP,
-described below.
-.TP
-\fB_\fP\fIN\fP\fB_GNU_nonoption_argv_flags_\fP
-(Here
-.I N
-is
-.BR grep 's
-numeric process ID.)  If the
-.IR i th
-character of this environment variable's value is
-.BR 1 ,
-do not consider the
-.IR i th
-operand of
-.B grep
-to be an option, even if it appears to be one.
-A shell can put this variable in the environment for each command it runs,
-specifying which operands are the results of file name wildcard
-expansion and therefore should not be treated as options.
-This behavior is available only with the GNU C library, and only
-when
-.B POSIXLY_CORRECT
-is not set.
 .
 .SH NOTES
 This man page is maintained only fitfully;
 the full documentation is often more up-to-date.
 .
 .SH COPYRIGHT
-Copyright 1998-2000, 2002, 2005-2022 Free Software Foundation, Inc.
+Copyright 1998-2000, 2002, 2005-2023 Free Software Foundation, Inc.
 .PP
 This is free software;
 see the source for copying conditions.
diff --git a/doc/grep.info b/doc/grep.info
index 001edb25..f38ac18f 100644
--- a/doc/grep.info
+++ b/doc/grep.info
@@ -1,15 +1,15 @@
-This is grep.info, produced by makeinfo version 6.8 from grep.texi.
+This is grep.info, produced by makeinfo version 7.0dev from grep.texi.
 
 This manual is for ‘grep’, a pattern matching engine.
 
-   Copyright © 1999–2002, 2005, 2008–2022 Free Software Foundation, Inc.
+   Copyright © 1999-2002, 2005, 2008-2023 Free Software Foundation, Inc.
 
      Permission is granted to copy, distribute and/or modify this
      document under the terms of the GNU Free Documentation License,
      Version 1.3 or any later version published by the Free Software
      Foundation; with no Invariant Sections, with no Front-Cover Texts,
-     and with no Back-Cover Texts. A copy of the license is included in
-     the section entitled “GNU Free Documentation License”.
+     and with no Back-Cover Texts.  A copy of the license is included in
+     the section entitled "GNU Free Documentation License".
 INFO-DIR-SECTION Text creation and manipulation
 START-INFO-DIR-ENTRY
 * grep: (grep).                 Print lines that match patterns.
@@ -23,18 +23,18 @@ grep
 
 ‘grep’ prints lines that contain a match for one or more patterns.
 
-   This manual is for version 3.8 of GNU Grep.
+   This manual is for version 3.11 of GNU Grep.
 
    This manual is for ‘grep’, a pattern matching engine.
 
-   Copyright © 1999–2002, 2005, 2008–2022 Free Software Foundation, Inc.
+   Copyright © 1999-2002, 2005, 2008-2023 Free Software Foundation, Inc.
 
      Permission is granted to copy, distribute and/or modify this
      document under the terms of the GNU Free Documentation License,
      Version 1.3 or any later version published by the Free Software
      Foundation; with no Invariant Sections, with no Front-Cover Texts,
      and with no Back-Cover Texts.  A copy of the license is included in
-     the section entitled “GNU Free Documentation License”.
+     the section entitled "GNU Free Documentation License".
 
 * Menu:
 
@@ -148,9 +148,9 @@ File: grep.info,  Node: Matching Control,  Next: General Output Control,  Prev:
 ‘--file=FILE’
      Obtain patterns from FILE, one per line.  If this option is used
      multiple times or is combined with the ‘-e’ (‘--regexp’) option,
-     search for all patterns given.  The empty file contains zero
-     patterns, and therefore matches nothing.  (‘-f’ is specified by
-     POSIX.)
+     search for all patterns given.  When FILE is ‘-’, read patterns
+     from standard input.  The empty file contains zero patterns, and
+     therefore matches nothing.  (‘-f’ is specified by POSIX.)
 
 ‘-i’
 ‘-y’
@@ -159,14 +159,14 @@ File: grep.info,  Node: Matching Control,  Next: General Output Control,  Prev:
      characters that differ only in case match each other.  Although
      this is straightforward when letters differ in case only via
      lowercase-uppercase pairs, the behavior is unspecified in other
-     situations.  For example, uppercase “S” has an unusual lowercase
-     counterpart “ſ” (Unicode character U+017F, LATIN SMALL LETTER LONG
+     situations.  For example, uppercase "S" has an unusual lowercase
+     counterpart "ſ" (Unicode character U+017F, LATIN SMALL LETTER LONG
      S) in many locales, and it is unspecified whether this unusual
-     character matches “S” or “s” even though uppercasing it yields “S”.
-     Another example: the lowercase German letter “ß” (U+00DF, LATIN
+     character matches "S" or "s" even though uppercasing it yields "S".
+     Another example: the lowercase German letter "ß" (U+00DF, LATIN
      SMALL LETTER SHARP S) is normally capitalized as the two-character
-     string “SS” but it does not match “SS”, and it might not match the
-     uppercase letter “ẞ” (U+1E9E, LATIN CAPITAL LETTER SHARP S) even
+     string "SS" but it does not match "SS", and it might not match the
+     uppercase letter "ẞ" (U+1E9E, LATIN CAPITAL LETTER SHARP S) even
      though lowercasing the latter yields the former.
 
      ‘-y’ is an obsolete synonym that is provided for compatibility.
@@ -233,7 +233,7 @@ File: grep.info,  Node: General Output Control,  Next: Output Line Prefix Contro
 
      WHEN is ‘always’ to use colors, ‘never’ to not use colors, or
      ‘auto’ to use colors if standard output is associated with a
-     terminal device and the ‘TERM’ environment variable’s value
+     terminal device and the ‘TERM’ environment variable's value
      suggests that the terminal supports colors.  Plain ‘--color’ is
      treated like ‘--color=auto’; if no ‘--color’ option is given, the
      default is ‘--color=never’.
@@ -335,7 +335,7 @@ these options were specified.
 ‘--label=LABEL’
      Display input actually coming from standard input as input coming
      from file LABEL.  This can be useful for commands that transform a
-     file’s contents before searching; e.g.:
+     file's contents before searching; e.g.:
 
           gzip -cd foo.gz | grep --label=foo -H 'some pattern'
 
@@ -432,7 +432,7 @@ File: grep.info,  Node: File and Directory Selection,  Next: Other Options,  Pre
      ‘--binary-files=text’ option.
 
 ‘--binary-files=TYPE’
-     If a file’s data or metadata indicate that the file contains binary
+     If a file's data or metadata indicate that the file contains binary
      data, assume that the file is of type TYPE.  Non-text bytes
      indicate binary data; these are either output bytes that are
      improperly encoded for the current locale (*note Environment
@@ -559,13 +559,13 @@ File: grep.info,  Node: Other Options,  Prev: File and Directory Selection,  Up:
 ‘-U’
 ‘--binary’
      On platforms that distinguish between text and binary I/O, use the
-     latter when reading and writing files other than the user’s
+     latter when reading and writing files other than the user's
      terminal, so that all input bytes are read and written as-is.  This
      overrides the default behavior where ‘grep’ follows the operating
-     system’s advice whether to use text or binary I/O.  On MS-Windows
-     when ‘grep’ uses text I/O it reads a carriage return–newline pair
+     system's advice whether to use text or binary I/O.  On MS-Windows
+     when ‘grep’ uses text I/O it reads a carriage return-newline pair
      as a newline and a Control-Z as end-of-file, and it writes a
-     newline as a carriage return–newline pair.
+     newline as a carriage return-newline pair.
 
      When using text I/O ‘--byte-offset’ (‘-b’) counts and
      ‘--binary-files’ heuristics apply to input data after text-I/O
@@ -617,14 +617,13 @@ available.
      ‘GREP_COLORS='mt=COLOR'’.
 
 ‘GREP_COLORS’
-     This variable specifies the colors and other attributes used to
-     highlight various parts of the output.  Its value is a
-     colon-separated list of ‘terminfo’ capabilities that defaults to
-     ‘ms=01;31:mc=01;31:sl=:cx=:fn=35:ln=32:bn=32:se=36’ with the ‘rv’
-     and ‘ne’ boolean capabilities omitted (i.e., false).  The
-     two-letter capability names refer to terminal “capabilities,” the
-     ability of a terminal to highlight text, or change its color, and
-     so on.  These capabilities are stored in an online database and
+     This variable controls how the ‘--color’ option highlights output.
+     Its value is a colon-separated list of ‘terminfo’ capabilities that
+     defaults to ‘ms=01;31:mc=01;31:sl=:cx=:fn=35:ln=32:bn=32:se=36’
+     with the ‘rv’ and ‘ne’ boolean capabilities omitted (i.e., false).
+     The two-letter capability names refer to terminal "capabilities,"
+     the ability of a terminal to highlight text, or change its color,
+     and so on.  These capabilities are stored in an online database and
      accessed by the ‘terminfo’ library.  Non-empty capability values
      control highlighting using Select Graphic Rendition (SGR) commands
      interpreted by the terminal or terminal emulator.  (See the section
@@ -650,7 +649,7 @@ available.
           lines when ‘-v’ is specified).  If however the boolean ‘rv’
           capability and the ‘-v’ command-line option are both
           specified, it applies to context matching lines instead.  The
-          default is empty (i.e., the terminal’s default color pair).
+          default is empty (i.e., the terminal's default color pair).
 
      ‘cx=’
           SGR substring for whole context lines (i.e., non-matching
@@ -658,7 +657,7 @@ available.
           matching lines when ‘-v’ is specified).  If however the
           boolean ‘rv’ capability and the ‘-v’ command-line option are
           both specified, it applies to selected non-matching lines
-          instead.  The default is empty (i.e., the terminal’s default
+          instead.  The default is empty (i.e., the terminal's default
           color pair).
 
      ‘rv’
@@ -693,17 +692,17 @@ available.
 
      ‘fn=35’
           SGR substring for file names prefixing any content line.  The
-          default is a magenta text foreground over the terminal’s
+          default is a magenta text foreground over the terminal's
           default background.
 
      ‘ln=32’
           SGR substring for line numbers prefixing any content line.
-          The default is a green text foreground over the terminal’s
+          The default is a green text foreground over the terminal's
           default background.
 
      ‘bn=32’
           SGR substring for byte offsets prefixing any content line.
-          The default is a green text foreground over the terminal’s
+          The default is a green text foreground over the terminal's
           default background.
 
      ‘se=36’
@@ -711,7 +710,7 @@ available.
           selected line fields (‘:’), between context line fields (‘-’),
           and between groups of adjacent lines when nonzero context is
           specified (‘--’).  The default is a cyan text foreground over
-          the terminal’s default background.
+          the terminal's default background.
 
      ‘ne’
           Boolean value that prevents clearing to the end of line using
@@ -760,16 +759,6 @@ available.
      This variable specifies the output terminal type, which can affect
      what the ‘--color’ option does.  *Note General Output Control::.
 
-‘_N_GNU_nonoption_argv_flags_’
-     (Here ‘N’ is ‘grep’’s numeric process ID.) If the Ith character of
-     this environment variable’s value is ‘1’, do not consider the Ith
-     operand of ‘grep’ to be an option, even if it appears to be one.  A
-     shell can put this variable in the environment for each command it
-     runs, specifying which operands are the results of file name
-     wildcard expansion and therefore should not be treated as options.
-     This behavior is available only with the GNU C library, and only
-     when ‘POSIXLY_CORRECT’ is not set.
-
    The ‘GREP_OPTIONS’ environment variable of ‘grep’ 2.20 and earlier is
 no longer supported, as it caused problems when writing portable
 scripts.  To make arbitrary changes to how ‘grep’ works, you can use an
@@ -829,6 +818,32 @@ are four major variants of ‘grep’, controlled by the following options.
      ‘grep -P’ may warn of unimplemented features.  *Note Other
      Options::.
 
+     For documentation, refer to <https://www.pcre.org/>, with these
+     caveats:
+        • ‘\d’ matches only the ten ASCII digits (and ‘\D’ matches the
+          complement), regardless of locale.  Use ‘\p{Nd}’ to also match
+          non-ASCII digits.  (The behavior of ‘\d’ and ‘\D’ is
+          unspecified after in-regexp directives like ‘(?aD)’.)
+
+        • Although PCRE tracks the syntax and semantics of Perl's
+          regular expressions, the match is not always exact.  For
+          example, Perl evolves and a Perl installation may predate or
+          postdate the PCRE2 installation on the same host, or their
+          Unicode versions may differ, or Perl and PCRE2 may disagree
+          about an obscure construct.
+
+        • By default, ‘grep’ applies each regexp to a line at a time, so
+          the ‘(?s)’ directive (making ‘.’ match line breaks) is
+          generally ineffective.  However, with ‘-z’ (‘--null-data’) it
+          can work:
+               $ printf 'a\nb\n' |grep -zP '(?s)a.b'
+               a
+               b
+          But beware: with the ‘-z’ (‘--null-data’) and a file
+          containing no NUL byte, grep must read the entire file into
+          memory before processing any of it.  Thus, it will exhaust
+          memory and fail for some large files.
+
 
 File: grep.info,  Node: Regular Expressions,  Next: Usage,  Prev: Invoking,  Up: Top
 
@@ -840,14 +855,15 @@ Regular expressions are constructed analogously to arithmetic
 expressions, by using various operators to combine smaller expressions.
 ‘grep’ understands three different versions of regular expression
 syntax: basic (BRE), extended (ERE), and Perl-compatible (PCRE). In GNU
-‘grep’, there is no difference in available functionality between basic
-and extended syntax.  In other implementations, basic regular
-expressions are less powerful.  The following description applies to
-extended regular expressions; differences for basic regular expressions
-are summarized afterwards.  Perl-compatible regular expressions give
-additional functionality, and are documented in the pcre2syntax(3) and
-pcre2pattern(3) manual pages, but work only if PCRE is available in the
-system.
+‘grep’, basic and extended regular expressions are merely different
+notations for the same pattern-matching functionality.  In other
+implementations, basic regular expressions are ordinarily less powerful
+than extended, though occasionally it is the other way around.  The
+following description applies to extended regular expressions;
+differences for basic regular expressions are summarized afterwards.
+Perl-compatible regular expressions have different functionality, and
+are documented in the pcre2syntax(3) and pcre2pattern(3) manual pages,
+but work only if PCRE is available in the system.
 
 * Menu:
 
@@ -1011,7 +1027,7 @@ expression ‘[:epru]’.
 expressions.
 
 ‘]’
-     ends the bracket expression if it’s not the first list item.  So,
+     ends the bracket expression if it's not the first list item.  So,
      if you want to make the ‘]’ character a list item, you must put it
      first.
 
@@ -1035,7 +1051,7 @@ expressions.
      represents the close character class symbol.
 
 ‘-’
-     represents the range if it’s not first or last in a list or the
+     represents the range if it's not first or last in a list or the
      ending point of a range.  To make the ‘-’ a list item, it is best
      to put it last.
 
@@ -1057,7 +1073,7 @@ followed by certain ordinary characters, takes a special meaning:
      Match the empty string at the edge of a word.
 
 ‘\B’
-     Match the empty string provided it’s not at the edge of a word.
+     Match the empty string provided it's not at the edge of a word.
 
 ‘\<’
      Match the empty string at the beginning of a word.
@@ -1100,7 +1116,7 @@ File: grep.info,  Node: Anchoring,  Next: Back-references and Subexpressions,  P
 
 The caret ‘^’ and the dollar sign ‘$’ are special characters that
 respectively match the empty string at the beginning and end of a line.
-They are termed “anchors”, since they force the match to be “anchored”
+They are termed “anchors”, since they force the match to be "anchored"
 to beginning or end of a line, respectively.
 
 
@@ -1134,7 +1150,7 @@ the following ways:
    • The characters ‘?’, ‘+’, ‘{’, ‘|’, ‘(’, and ‘)’ lose their special
      meaning; instead use the backslashed versions ‘\?’, ‘\+’, ‘\{’,
      ‘\|’, ‘\(’, and ‘\)’.  Also, a backslash is needed before an
-     interval expression’s closing ‘}’.
+     interval expression's closing ‘}’.
 
    • An unmatched ‘\)’ is invalid.
 
@@ -1312,7 +1328,7 @@ TAB), followed by ‘ω’ (U+03C9 GREEK SMALL LETTER OMEGA).
 or portable, but you also want to match specific non-ASCII or non-null
 non-printable characters.  If you are using the ‘-P’ (‘--perl-regexp’)
 option, PCREs give you several ways to do this.  Otherwise, if you are
-using Bash, the GNU project’s shell, you can represent these characters
+using Bash, the GNU project's shell, you can represent these characters
 via ANSI-C quoting.  For example, the Bash commands ‘grep $'Λ\tω'’ and
 ‘grep $'\u039B\t\u03C9'’ both search for the same three-character string
 ‘Λ ω’ mentioned earlier.  However, because Bash translates ANSI-C
@@ -1325,7 +1341,7 @@ containing the character ‘^’ (U+005E CIRCUMFLEX ACCENT).
 shell scripts written in ASCII should use other methods to match
 specific non-ASCII characters.  For example, in a UTF-8 locale the
 command ‘grep "$(printf '\316\233\t\317\211\n')"’ is a portable albeit
-hard-to-read alternative to Bash’s ‘grep $'Λ\tω'’.  However, none of
+hard-to-read alternative to Bash's ‘grep $'Λ\tω'’.  However, none of
 these techniques will let you put a null character directly into a
 command-line pattern; null characters can appear only in a pattern
 specified via the ‘-f’ (‘--file’) option.
@@ -1404,7 +1420,7 @@ the globbing syntax that the shell uses to match file names.
           grep -e "$pattern" ./*
 
      searches for all lines matching the pattern in all the working
-     directory’s files whose names do not begin with ‘.’.  Without the
+     directory's files whose names do not begin with ‘.’.  Without the
      ‘-e’, ‘grep’ might treat the pattern as an option if it begins with
      ‘-’.  Without the ‘./’, there might be similar problems with file
      names beginning with ‘-’.
@@ -1459,25 +1475,25 @@ the globbing syntax that the shell uses to match file names.
      ‘ps’ limits the output to the width of the screen; ‘grep’ does not
      have any limit on the length of a line except the available memory.
 
-  8. Why does ‘grep’ report “Binary file matches”?
+  8. Why does ‘grep’ report "Binary file matches"?
 
-     If ‘grep’ listed all matching “lines” from a binary file, it would
+     If ‘grep’ listed all matching "lines" from a binary file, it would
      probably generate output that is not useful, and it might even muck
      up your display.  So GNU ‘grep’ suppresses output from files that
      appear to be binary files.  To force GNU ‘grep’ to output lines
      even from files that appear to be binary, use the ‘-a’ or
-     ‘--binary-files=text’ option.  To eliminate the “Binary file
-     matches” messages, use the ‘-I’ or ‘--binary-files=without-match’
+     ‘--binary-files=text’ option.  To eliminate the "Binary file
+     matches" messages, use the ‘-I’ or ‘--binary-files=without-match’
      option.
 
-  9. Why doesn’t ‘grep -lv’ print non-matching file names?
+  9. Why doesn't ‘grep -lv’ print non-matching file names?
 
      ‘grep -lv’ lists the names of all files containing one or more
      lines that do not match.  To list the names of all files that
      contain no matching lines, use the ‘-L’ or ‘--files-without-match’
      option.
 
-  10. I can do “OR” with ‘|’, but what about “AND”?
+  10. I can do "OR" with ‘|’, but what about "AND"?
 
           grep 'paul' /etc/motd | grep 'franc,ois'
 
@@ -1504,7 +1520,7 @@ the globbing syntax that the shell uses to match file names.
 
           cat /etc/passwd | grep 'alain' - /etc/motd
 
-  13. Why can’t I combine the shell’s ‘set -e’ with ‘grep’?
+  13. Why can't I combine the shell's ‘set -e’ with ‘grep’?
 
      The ‘grep’ command follows the convention of programs like ‘cmp’
      and ‘diff’ where an exit status of 1 is not an error.  The shell
@@ -1513,10 +1529,10 @@ the globbing syntax that the shell uses to match file names.
      because ‘grep’ selected no lines, which is ordinarily not what you
      want.
 
-     There is a related problem with Bash’s ‘set -e -o pipefail’.  Since
+     There is a related problem with Bash's ‘set -e -o pipefail’.  Since
      ‘grep’ does not always read all its input, a command outputting to
      a pipe read by ‘grep’ can fail when ‘grep’ exits before reading all
-     its input, and the command’s failure can cause Bash to exit.
+     its input, and the command's failure can cause Bash to exit.
 
   14. Why is this back-reference failing?
 
@@ -1532,7 +1548,7 @@ the globbing syntax that the shell uses to match file names.
      match newlines in the way you might expect.
 
      With the GNU ‘grep’ option ‘-z’ (‘--null-data’), each input and
-     output “line” is null-terminated; *note Other Options::.  Thus, you
+     output "line" is null-terminated; *note Other Options::.  Thus, you
      can match newlines in the input, but typically if there is a match
      the entire input is output, so this usage is often combined with
      output-suppressing options like ‘-q’, e.g.:
@@ -1560,14 +1576,14 @@ the globbing syntax that the shell uses to match file names.
      7th Edition Unix had commands ‘egrep’ and ‘fgrep’ that were the
      counterparts of the modern ‘grep -E’ and ‘grep -F’.  Although
      breaking up ‘grep’ into three programs was perhaps useful on the
-     small computers of the 1970s, ‘egrep’ and ‘fgrep’ were not
-     standardized by POSIX and are no longer needed.  In the current GNU
-     implementation, ‘egrep’ and ‘fgrep’ issue a warning and then act
-     like their modern counterparts; eventually, they are planned to be
-     removed entirely.
+     small computers of the 1970s, ‘egrep’ and ‘fgrep’ were deemed
+     obsolescent by POSIX in 1992, removed from POSIX in 2001,
+     deprecated by GNU Grep 2.5.3 in 2007, and changed to issue
+     obsolescence warnings by GNU Grep 3.8 in 2022; eventually, they are
+     planned to be removed entirely.
 
-     If you prefer the old names, you can use use your own substitutes,
-     such as a shell script named ‘egrep’ with the following contents:
+     If you prefer the old names, you can use your own substitutes, such
+     as a shell script named ‘egrep’ with the following contents:
 
           #!/bin/sh
           exec grep -E "$@"
@@ -1588,8 +1604,8 @@ you improve its performance.
    The ‘grep’ command operates partly via a set of automata that are
 designed for efficiency, and partly via a slower matcher that takes over
 when the fast matchers run into unusual features like back-references.
-When feasible, the Boyer–Moore fast string searching algorithm is used
-to match a single fixed pattern, and the Aho–Corasick algorithm is used
+When feasible, the Boyer-Moore fast string searching algorithm is used
+to match a single fixed pattern, and the Aho-Corasick algorithm is used
 to match multiple fixed patterns.
 
    Generally speaking ‘grep’ operates more efficiently in single-byte
@@ -1623,12 +1639,13 @@ does not perform linear Diophantine analysis and instead backtracks
 through all possible matching strings, using an algorithm that is
 exponential in the worst case.
 
-   On some operating systems that support files with holes—large regions
-of zeros that are not physically present on secondary storage—‘grep’ can
-skip over the holes efficiently without needing to read the zeros.  This
-optimization is not available if the ‘-a’ (‘--binary-files=text’) option
-is used (*note File and Directory Selection::), unless the ‘-z’
-(‘--null-data’) option is also used (*note Other Options::).
+   On some operating systems that support files with holes--large
+regions of zeros that are not physically present on secondary
+storage--‘grep’ can skip over the holes efficiently without needing to
+read the zeros.  This optimization is not available if the ‘-a’
+(‘--binary-files=text’) option is used (*note File and Directory
+Selection::), unless the ‘-z’ (‘--null-data’) option is also used (*note
+Other Options::).
 
    For efficiency ‘grep’ does not always read all its input.  For
 example, the shell command ‘sed '/^...$/d' | grep -q X’ can cause ‘grep’
@@ -1642,17 +1659,17 @@ matching algorithms, see:
 
    • Aho AV. Algorithms for finding patterns in strings. In: van Leeuwen
      J. _Handbook of Theoretical Computer Science_, vol. A. New York:
-     Elsevier; 1990. p. 255–300. This surveys classic string matching
+     Elsevier; 1990. p. 255-300. This surveys classic string matching
      algorithms, some of which are used by ‘grep’.
 
    • Aho AV, Corasick MJ. Efficient string matching: an aid to
-     bibliographic search. _CACM_. 1975;18(6):333–40.
+     bibliographic search. _CACM_. 1975;18(6):333-40.
      <https://doi.org/10.1145/360825.360855>. This introduces the
-     Aho–Corasick algorithm.
+     Aho-Corasick algorithm.
 
    • Boyer RS, Moore JS. A fast string searching algorithm. _CACM_.
-     1977;20(10):762–72. <https://doi.org/10.1145/359842.359859>. This
-     introduces the Boyer–Moore algorithm.
+     1977;20(10):762-72. <https://doi.org/10.1145/359842.359859>. This
+     introduces the Boyer-Moore algorithm.
 
    • Faro S, Lecroq T. The exact online string matching problem: a
      review of the most recent results. _ACM Comput Surv_.
@@ -1662,13 +1679,13 @@ matching algorithms, see:
 
    • Hakak SI, Kamsin A, Shivakumara P, Gilkar GA, Khan WZ, Imran M.
      Exact string matching algorithms: survey issues, and future
-     research directions. _IEEE Access_. 2019;7:69614–37.
+     research directions. _IEEE Access_. 2019;7:69614-37.
      <https://doi.org/10.1109/ACCESS.2019.2914071>. This survey is more
      recent than Faro & Lecroq, and focuses on taxonomy instead of
      performance.
 
    • Hume A, Sunday D. Fast string search. _Software Pract Exper_.
-     1991;21(11):1221–48. <https://doi.org/10.1002/spe.4380211105>. This
+     1991;21(11):1221-48. <https://doi.org/10.1002/spe.4380211105>. This
      excellent albeit now-dated survey aided the initial development of
      ‘grep’.
 
@@ -1719,15 +1736,16 @@ File: grep.info,  Node: Copying,  Next: Index,  Prev: Reporting Bugs,  Up: Top
 GNU ‘grep’ is licensed under the GNU GPL, which makes it “free
 software”.
 
-   The “free” in “free software” refers to liberty, not price.  As some
-GNU project advocates like to point out, think of “free speech” rather
-than “free beer”.  In short, you have the right (freedom) to run and
-change ‘grep’ and distribute it to other people, and—if you want—charge
-money for doing either.  The important restriction is that you have to
-grant your recipients the same rights and impose the same restrictions.
+   The "free" in "free software" refers to liberty, not price.  As some
+GNU project advocates like to point out, think of "free speech" rather
+than "free beer".  In short, you have the right (freedom) to run and
+change ‘grep’ and distribute it to other people, and--if you
+want--charge money for doing either.  The important restriction is that
+you have to grant your recipients the same rights and impose the same
+restrictions.
 
    This general method of licensing software is sometimes called “open
-source”.  The GNU project prefers the term “free software” for reasons
+source”.  The GNU project prefers the term "free software" for reasons
 outlined at
 <https://www.gnu.org/philosophy/open-source-misses-the-point.html>.
 
@@ -1748,7 +1766,8 @@ File: grep.info,  Node: GNU Free Documentation License,  Up: Copying
 
                      Version 1.3, 3 November 2008
 
-     Copyright © 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
+     Copyright © 2000-2002, 2007-2008, 2023 Free Software Foundation,
+     Inc.
      <https://fsf.org/>
 
      Everyone is permitted to copy and distribute verbatim copies
@@ -1764,7 +1783,7 @@ File: grep.info,  Node: GNU Free Documentation License,  Up: Copying
      author and publisher a way to get credit for their work, while not
      being considered responsible for modifications made by others.
 
-     This License is a kind of “copyleft”, which means that derivative
+     This License is a kind of "copyleft", which means that derivative
      works of the document must themselves be free in the same sense.
      It complements the GNU General Public License, which is a copyleft
      license designed for free software.
@@ -1785,18 +1804,18 @@ File: grep.info,  Node: GNU Free Documentation License,  Up: Copying
      be distributed under the terms of this License.  Such a notice
      grants a world-wide, royalty-free license, unlimited in duration,
      to use that work under the conditions stated herein.  The
-     “Document”, below, refers to any such manual or work.  Any member
-     of the public is a licensee, and is addressed as “you”.  You accept
+     "Document", below, refers to any such manual or work.  Any member
+     of the public is a licensee, and is addressed as "you".  You accept
      the license if you copy, modify or distribute the work in a way
      requiring permission under copyright law.
 
-     A “Modified Version” of the Document means any work containing the
+     A "Modified Version" of the Document means any work containing the
      Document or a portion of it, either copied verbatim, or with
      modifications and/or translated into another language.
 
-     A “Secondary Section” is a named appendix or a front-matter section
+     A "Secondary Section" is a named appendix or a front-matter section
      of the Document that deals exclusively with the relationship of the
-     publishers or authors of the Document to the Document’s overall
+     publishers or authors of the Document to the Document's overall
      subject (or to related matters) and contains nothing that could
      fall directly within that overall subject.  (Thus, if the Document
      is in part a textbook of mathematics, a Secondary Section may not
@@ -1805,7 +1824,7 @@ File: grep.info,  Node: GNU Free Documentation License,  Up: Copying
      of legal, commercial, philosophical, ethical or political position
      regarding them.
 
-     The “Invariant Sections” are certain Secondary Sections whose
+     The "Invariant Sections" are certain Secondary Sections whose
      titles are designated, as being those of Invariant Sections, in the
      notice that says that the Document is released under this License.
      If a section does not fit the above definition of Secondary then it
@@ -1813,13 +1832,13 @@ File: grep.info,  Node: GNU Free Documentation License,  Up: Copying
      contain zero Invariant Sections.  If the Document does not identify
      any Invariant Sections then there are none.
 
-     The “Cover Texts” are certain short passages of text that are
+     The "Cover Texts" are certain short passages of text that are
      listed, as Front-Cover Texts or Back-Cover Texts, in the notice
      that says that the Document is released under this License.  A
      Front-Cover Text may be at most 5 words, and a Back-Cover Text may
      be at most 25 words.
 
-     A “Transparent” copy of the Document means a machine-readable copy,
+     A "Transparent" copy of the Document means a machine-readable copy,
      represented in a format whose specification is available to the
      general public, that is suitable for revising the document
      straightforwardly with generic text editors or (for images composed
@@ -1831,7 +1850,7 @@ File: grep.info,  Node: GNU Free Documentation License,  Up: Copying
      been arranged to thwart or discourage subsequent modification by
      readers is not Transparent.  An image format is not Transparent if
      used for any substantial amount of text.  A copy that is not
-     “Transparent” is called “Opaque”.
+     "Transparent" is called "Opaque".
 
      Examples of suitable formats for Transparent copies include plain
      ASCII without markup, Texinfo input format, LaTeX input format,
@@ -1844,23 +1863,23 @@ File: grep.info,  Node: GNU Free Documentation License,  Up: Copying
      the machine-generated HTML, PostScript or PDF produced by some word
      processors for output purposes only.
 
-     The “Title Page” means, for a printed book, the title page itself,
+     The "Title Page" means, for a printed book, the title page itself,
      plus such following pages as are needed to hold, legibly, the
      material this License requires to appear in the title page.  For
-     works in formats which do not have any title page as such, “Title
-     Page” means the text near the most prominent appearance of the
-     work’s title, preceding the beginning of the body of the text.
+     works in formats which do not have any title page as such, "Title
+     Page" means the text near the most prominent appearance of the
+     work's title, preceding the beginning of the body of the text.
 
-     The “publisher” means any person or entity that distributes copies
+     The "publisher" means any person or entity that distributes copies
      of the Document to the public.
 
-     A section “Entitled XYZ” means a named subunit of the Document
+     A section "Entitled XYZ" means a named subunit of the Document
      whose title either is precisely XYZ or contains XYZ in parentheses
      following text that translates XYZ in another language.  (Here XYZ
      stands for a specific section name mentioned below, such as
-     “Acknowledgements”, “Dedications”, “Endorsements”, or “History”.)
-     To “Preserve the Title” of such a section when you modify the
-     Document means that it remains a section “Entitled XYZ” according
+     "Acknowledgements", "Dedications", "Endorsements", or "History".)
+     To "Preserve the Title" of such a section when you modify the
+     Document means that it remains a section "Entitled XYZ" according
      to this definition.
 
      The Document may include Warranty Disclaimers next to the notice
@@ -1890,7 +1909,7 @@ File: grep.info,  Node: GNU Free Documentation License,  Up: Copying
 
      If you publish printed copies (or copies in media that commonly
      have printed covers) of the Document, numbering more than 100, and
-     the Document’s license notice requires Cover Texts, you must
+     the Document's license notice requires Cover Texts, you must
      enclose the copies in covers that carry, clearly and legibly, all
      these Cover Texts: Front-Cover Texts on the front cover, and
      Back-Cover Texts on the back cover.  Both covers must also clearly
@@ -1962,15 +1981,15 @@ File: grep.info,  Node: GNU Free Documentation License,  Up: Copying
           the Addendum below.
 
        G. Preserve in that license notice the full lists of Invariant
-          Sections and required Cover Texts given in the Document’s
+          Sections and required Cover Texts given in the Document's
           license notice.
 
        H. Include an unaltered copy of this License.
 
-       I. Preserve the section Entitled “History”, Preserve its Title,
+       I. Preserve the section Entitled "History", Preserve its Title,
           and add to it an item stating at least the title, year, new
           authors, and publisher of the Modified Version as given on the
-          Title Page.  If there is no section Entitled “History” in the
+          Title Page.  If there is no section Entitled "History" in the
           Document, create one stating the title, year, authors, and
           publisher of the Document as given on its Title Page, then add
           an item describing the Modified Version as stated in the
@@ -1980,12 +1999,12 @@ File: grep.info,  Node: GNU Free Documentation License,  Up: Copying
           for public access to a Transparent copy of the Document, and
           likewise the network locations given in the Document for
           previous versions it was based on.  These may be placed in the
-          “History” section.  You may omit a network location for a work
+          "History" section.  You may omit a network location for a work
           that was published at least four years before the Document
           itself, or if the original publisher of the version it refers
           to gives permission.
 
-       K. For any section Entitled “Acknowledgements” or “Dedications”,
+       K. For any section Entitled "Acknowledgements" or "Dedications",
           Preserve the Title of the section, and preserve in the section
           all the substance and tone of each of the contributor
           acknowledgements and/or dedications given therein.
@@ -1994,11 +2013,11 @@ File: grep.info,  Node: GNU Free Documentation License,  Up: Copying
           in their text and in their titles.  Section numbers or the
           equivalent are not considered part of the section titles.
 
-       M. Delete any section Entitled “Endorsements”.  Such a section
+       M. Delete any section Entitled "Endorsements".  Such a section
           may not be included in the Modified Version.
 
        N. Do not retitle any existing section to be Entitled
-          “Endorsements” or to conflict in title with any Invariant
+          "Endorsements" or to conflict in title with any Invariant
           Section.
 
        O. Preserve any Warranty Disclaimers.
@@ -2007,15 +2026,15 @@ File: grep.info,  Node: GNU Free Documentation License,  Up: Copying
      appendices that qualify as Secondary Sections and contain no
      material copied from the Document, you may at your option designate
      some or all of these sections as invariant.  To do this, add their
-     titles to the list of Invariant Sections in the Modified Version’s
+     titles to the list of Invariant Sections in the Modified Version's
      license notice.  These titles must be distinct from any other
      section titles.
 
-     You may add a section Entitled “Endorsements”, provided it contains
+     You may add a section Entitled "Endorsements", provided it contains
      nothing but endorsements of your Modified Version by various
-     parties—for example, statements of peer review or that the text has
-     been approved by an organization as the authoritative definition of
-     a standard.
+     parties--for example, statements of peer review or that the text
+     has been approved by an organization as the authoritative
+     definition of a standard.
 
      You may add a passage of up to five words as a Front-Cover Text,
      and a passage of up to 25 words as a Back-Cover Text, to the end of
@@ -2053,10 +2072,10 @@ File: grep.info,  Node: GNU Free Documentation License,  Up: Copying
      combined work.
 
      In the combination, you must combine any sections Entitled
-     “History” in the various original documents, forming one section
-     Entitled “History”; likewise combine any sections Entitled
-     “Acknowledgements”, and any sections Entitled “Dedications”.  You
-     must delete all sections Entitled “Endorsements.”
+     "History" in the various original documents, forming one section
+     Entitled "History"; likewise combine any sections Entitled
+     "Acknowledgements", and any sections Entitled "Dedications".  You
+     must delete all sections Entitled "Endorsements."
 
   6. COLLECTIONS OF DOCUMENTS
 
@@ -2077,16 +2096,16 @@ File: grep.info,  Node: GNU Free Documentation License,  Up: Copying
 
      A compilation of the Document or its derivatives with other
      separate and independent documents or works, in or on a volume of a
-     storage or distribution medium, is called an “aggregate” if the
+     storage or distribution medium, is called an "aggregate" if the
      copyright resulting from the compilation is not used to limit the
-     legal rights of the compilation’s users beyond what the individual
+     legal rights of the compilation's users beyond what the individual
      works permit.  When the Document is included in an aggregate, this
      License does not apply to the other works in the aggregate which
      are not themselves derivative works of the Document.
 
      If the Cover Text requirement of section 3 is applicable to these
      copies of the Document, then if the Document is less than one half
-     of the entire aggregate, the Document’s Cover Texts may be placed
+     of the entire aggregate, the Document's Cover Texts may be placed
      on covers that bracket the Document within the aggregate, or the
      electronic equivalent of covers if the Document is in electronic
      form.  Otherwise they must appear on printed covers that bracket
@@ -2108,8 +2127,8 @@ File: grep.info,  Node: GNU Free Documentation License,  Up: Copying
      this License or a notice or disclaimer, the original version will
      prevail.
 
-     If a section in the Document is Entitled “Acknowledgements”,
-     “Dedications”, or “History”, the requirement (section 4) to
+     If a section in the Document is Entitled "Acknowledgements",
+     "Dedications", or "History", the requirement (section 4) to
      Preserve its Title (section 1) will typically require changing the
      actual title.
 
@@ -2150,7 +2169,7 @@ File: grep.info,  Node: GNU Free Documentation License,  Up: Copying
 
      Each version of the License is given a distinguishing version
      number.  If the Document specifies that a particular numbered
-     version of this License “or any later version” applies to it, you
+     version of this License "or any later version" applies to it, you
      have the option of following the terms and conditions either of
      that specified version or of any later version that has been
      published (not as a draft) by the Free Software Foundation.  If the
@@ -2158,29 +2177,29 @@ File: grep.info,  Node: GNU Free Documentation License,  Up: Copying
      choose any version ever published (not as a draft) by the Free
      Software Foundation.  If the Document specifies that a proxy can
      decide which future versions of this License can be used, that
-     proxy’s public statement of acceptance of a version permanently
+     proxy's public statement of acceptance of a version permanently
      authorizes you to choose that version for the Document.
 
   11. RELICENSING
 
-     “Massive Multiauthor Collaboration Site” (or “MMC Site”) means any
+     "Massive Multiauthor Collaboration Site" (or "MMC Site") means any
      World Wide Web server that publishes copyrightable works and also
      provides prominent facilities for anybody to edit those works.  A
      public wiki that anybody can edit is an example of such a server.
-     A “Massive Multiauthor Collaboration” (or “MMC”) contained in the
+     A "Massive Multiauthor Collaboration" (or "MMC") contained in the
      site means any set of copyrightable works thus published on the MMC
      site.
 
-     “CC-BY-SA” means the Creative Commons Attribution-Share Alike 3.0
+     "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0
      license published by Creative Commons Corporation, a not-for-profit
      corporation with a principal place of business in San Francisco,
      California, as well as future copyleft versions of that license
      published by that same organization.
 
-     “Incorporate” means to publish or republish a Document, in whole or
+     "Incorporate" means to publish or republish a Document, in whole or
      in part, as part of another Document.
 
-     An MMC is “eligible for relicensing” if it is licensed under this
+     An MMC is "eligible for relicensing" if it is licensed under this
      License, and if all works that were first published under this
      License somewhere other than this MMC, and subsequently
      incorporated in whole or in part into the MMC, (1) had no cover
@@ -2207,7 +2226,7 @@ notices just after the title page:
        Free Documentation License''.
 
    If you have Invariant Sections, Front-Cover Texts and Back-Cover
-Texts, replace the “with...Texts.” line with this:
+Texts, replace the "with...Texts." line with this:
 
          with the Invariant Sections being LIST THEIR TITLES, with
          the Front-Cover Texts being LIST, and with the Back-Cover Texts
@@ -2231,10 +2250,6 @@ Index
 [index]
 * Menu:
 
-* *:                                     Fundamental Structure.
-                                                              (line  22)
-* +:                                     Fundamental Structure.
-                                                              (line  25)
 * --:                                    Other Options.       (line   7)
 * --after-context:                       Context Line Control.
                                                               (line  15)
@@ -2377,20 +2392,22 @@ Index
 * -Z:                                    Output Line Prefix Control.
                                                               (line  50)
 * -z:                                    Other Options.       (line  43)
-* .:                                     Fundamental Structure.
-                                                              (line  11)
 * ?:                                     Fundamental Structure.
                                                               (line  19)
-* _N_GNU_nonoption_argv_flags_ environment variable: Environment Variables.
-                                                              (line 177)
+* .:                                     Fundamental Structure.
+                                                              (line  11)
 * {,M}:                                  Fundamental Structure.
                                                               (line  34)
-* {N,M}:                                 Fundamental Structure.
-                                                              (line  38)
 * {N,}:                                  Fundamental Structure.
                                                               (line  31)
+* {N,M}:                                 Fundamental Structure.
+                                                              (line  38)
 * {N}:                                   Fundamental Structure.
                                                               (line  28)
+* *:                                     Fundamental Structure.
+                                                              (line  22)
+* +:                                     Fundamental Structure.
+                                                              (line  25)
 * after context:                         Context Line Control.
                                                               (line  15)
 * alnum character class:                 Character Classes and Bracket Expressions.
@@ -2424,7 +2441,7 @@ Index
 * blank characters:                      Character Classes and Bracket Expressions.
                                                               (line  42)
 * bn GREP_COLORS capability:             Environment Variables.
-                                                              (line 118)
+                                                              (line 117)
 * braces, first argument omitted:        Fundamental Structure.
                                                               (line  34)
 * braces, one argument:                  Fundamental Structure.
@@ -2449,7 +2466,7 @@ Index
                                                               (line  31)
 * character encoding:                    Character Encoding.  (line   6)
 * character type:                        Environment Variables.
-                                                              (line 145)
+                                                              (line 144)
 * classes of characters:                 Character Classes and Bracket Expressions.
                                                               (line  31)
 * cntrl character class:                 Character Classes and Bracket Expressions.
@@ -2470,7 +2487,7 @@ Index
 * counting lines:                        General Output Control.
                                                               (line   8)
 * cx GREP_COLORS capability:             Environment Variables.
-                                                              (line  69)
+                                                              (line  68)
 * device search:                         File and Directory Selection.
                                                               (line  51)
 * digit character class:                 Character Classes and Bracket Expressions.
@@ -2482,7 +2499,7 @@ Index
 * dot:                                   Fundamental Structure.
                                                               (line  11)
 * encoding error:                        Environment Variables.
-                                                              (line 152)
+                                                              (line 151)
 * environment variables:                 Environment Variables.
                                                               (line  24)
 * exclude directories:                   File and Directory Selection.
@@ -2493,12 +2510,12 @@ Index
                                                               (line  83)
 * exit status:                           Exit Status.         (line   6)
 * FAQ about grep usage:                  Usage.               (line  32)
-* files which don’t match:               General Output Control.
+* files which don't match:               General Output Control.
                                                               (line  33)
 * fn GREP_COLORS capability:             Environment Variables.
-                                                              (line 108)
+                                                              (line 107)
 * fn GREP_COLORS capability <1>:         Environment Variables.
-                                                              (line 123)
+                                                              (line 122)
 * graph character class:                 Character Classes and Bracket Expressions.
                                                               (line  53)
 * graphic characters:                    Character Classes and Bracket Expressions.
@@ -2532,38 +2549,38 @@ Index
 * LANG environment variable:             Environment Variables.
                                                               (line  10)
 * LANG environment variable <1>:         Environment Variables.
-                                                              (line 145)
+                                                              (line 144)
 * LANG environment variable <2>:         Environment Variables.
-                                                              (line 152)
+                                                              (line 151)
 * LANG environment variable <3>:         Environment Variables.
-                                                              (line 161)
+                                                              (line 160)
 * LANGUAGE environment variable:         Environment Variables.
                                                               (line  10)
 * LANGUAGE environment variable <1>:     Environment Variables.
-                                                              (line 161)
+                                                              (line 160)
 * language of messages:                  Environment Variables.
-                                                              (line 161)
+                                                              (line 160)
 * LC_ALL environment variable:           Environment Variables.
                                                               (line  10)
 * LC_ALL environment variable <1>:       Environment Variables.
-                                                              (line 145)
+                                                              (line 144)
 * LC_ALL environment variable <2>:       Environment Variables.
-                                                              (line 152)
+                                                              (line 151)
 * LC_ALL environment variable <3>:       Environment Variables.
-                                                              (line 161)
+                                                              (line 160)
 * LC_COLLATE environment variable:       Environment Variables.
-                                                              (line 145)
+                                                              (line 144)
 * LC_CTYPE environment variable:         Environment Variables.
-                                                              (line 152)
+                                                              (line 151)
 * LC_MESSAGES environment variable:      Environment Variables.
                                                               (line  10)
 * LC_MESSAGES environment variable <1>:  Environment Variables.
-                                                              (line 161)
+                                                              (line 160)
 * line buffering:                        Other Options.       (line  13)
 * line numbering:                        Output Line Prefix Control.
                                                               (line  36)
 * ln GREP_COLORS capability:             Environment Variables.
-                                                              (line 113)
+                                                              (line 112)
 * locales:                               Performance.         (line  20)
 * lower character class:                 Character Classes and Bracket Expressions.
                                                               (line  56)
@@ -2593,30 +2610,30 @@ Index
 * max-count:                             General Output Control.
                                                               (line  44)
 * mc GREP_COLORS capability:             Environment Variables.
-                                                              (line 100)
+                                                              (line  99)
 * message language:                      Environment Variables.
-                                                              (line 161)
+                                                              (line 160)
 * ms GREP_COLORS capability:             Environment Variables.
-                                                              (line  92)
+                                                              (line  91)
 * MS-Windows binary I/O:                 Other Options.       (line  22)
 * mt GREP_COLORS capability:             Environment Variables.
-                                                              (line  84)
+                                                              (line  83)
 * names of matching files:               General Output Control.
                                                               (line  38)
 * national language support:             Environment Variables.
-                                                              (line 145)
+                                                              (line 144)
 * national language support <1>:         Environment Variables.
-                                                              (line 161)
+                                                              (line 160)
 * ne GREP_COLORS capability:             Environment Variables.
-                                                              (line 130)
+                                                              (line 129)
 * NLS:                                   Environment Variables.
-                                                              (line 145)
+                                                              (line 144)
 * no filename prefix:                    Output Line Prefix Control.
                                                               (line  23)
 * non-ASCII matching:                    Matching Non-ASCII.  (line   6)
 * non-printable matching:                Matching Non-ASCII.  (line   6)
 * null character:                        Environment Variables.
-                                                              (line 152)
+                                                              (line 151)
 * numeric characters:                    Character Classes and Bracket Expressions.
                                                               (line  50)
 * only matching:                         General Output Control.
@@ -2629,11 +2646,11 @@ Index
 * performance:                           Performance.         (line   6)
 * period:                                Fundamental Structure.
                                                               (line  11)
-* pipelines and reading:                 Performance.         (line  58)
+* pipelines and reading:                 Performance.         (line  59)
 * plus sign:                             Fundamental Structure.
                                                               (line  25)
 * POSIXLY_CORRECT environment variable:  Environment Variables.
-                                                              (line 166)
+                                                              (line 165)
 * print character class:                 Character Classes and Bracket Expressions.
                                                               (line  60)
 * print non-matching lines:              Matching Control.    (line  51)
@@ -2656,7 +2673,7 @@ Index
 * regular expressions:                   Regular Expressions. (line   6)
 * return status:                         Exit Status.         (line   6)
 * rv GREP_COLORS capability:             Environment Variables.
-                                                              (line  78)
+                                                              (line  77)
 * searching directory trees:             File and Directory Selection.
                                                               (line  73)
 * searching directory trees <1>:         File and Directory Selection.
@@ -2669,7 +2686,7 @@ Index
                                                               (line 113)
 * searching for patterns:                Introduction.        (line   6)
 * sl GREP_COLORS capability:             Environment Variables.
-                                                              (line  61)
+                                                              (line  60)
 * space character class:                 Character Classes and Bracket Expressions.
                                                               (line  68)
 * space characters:                      Character Classes and Bracket Expressions.
@@ -2691,9 +2708,9 @@ Index
 * tab-aligned content lines:             Output Line Prefix Control.
                                                               (line  41)
 * TERM environment variable:             Environment Variables.
-                                                              (line 173)
+                                                              (line 172)
 * translation of message language:       Environment Variables.
-                                                              (line 161)
+                                                              (line 160)
 * unspecified behavior in regular expressions: Problematic Expressions.
                                                               (line   6)
 * upper character class:                 Character Classes and Bracket Expressions.
@@ -2722,37 +2739,37 @@ Index
 
 
 Tag Table:
-Node: Top773
-Node: Introduction1965
-Node: Invoking2708
-Node: Command-line Options3551
-Node: Generic Program Information4434
-Node: Matching Control4908
-Node: General Output Control8519
-Node: Output Line Prefix Control12629
-Node: Context Line Control14985
-Node: File and Directory Selection17048
-Node: Other Options22849
-Node: Environment Variables25062
-Node: Exit Status34915
-Node: grep Programs35393
-Node: Regular Expressions36702
-Node: Fundamental Structure37949
-Node: Character Classes and Bracket Expressions39969
-Node: Special Backslash Expressions44800
-Node: Anchoring46347
-Node: Back-references and Subexpressions46791
-Node: Basic vs Extended47795
-Node: Problematic Expressions49002
-Node: Character Encoding54445
-Node: Matching Non-ASCII55917
-Node: Usage58044
-Node: Performance67914
-Node: Reporting Bugs73141
-Node: Known Bugs73518
-Node: Copying74589
-Node: GNU Free Documentation License75717
-Node: Index101022
+Node: Top769
+Node: Introduction1954
+Node: Invoking2697
+Node: Command-line Options3540
+Node: Generic Program Information4423
+Node: Matching Control4897
+Node: General Output Control8530
+Node: Output Line Prefix Control12638
+Node: Context Line Control14992
+Node: File and Directory Selection17055
+Node: Other Options22854
+Node: Environment Variables25059
+Node: Exit Status34261
+Node: grep Programs34739
+Node: Regular Expressions37411
+Node: Fundamental Structure38759
+Node: Character Classes and Bracket Expressions40779
+Node: Special Backslash Expressions45606
+Node: Anchoring47151
+Node: Back-references and Subexpressions47591
+Node: Basic vs Extended48595
+Node: Problematic Expressions49800
+Node: Character Encoding55243
+Node: Matching Non-ASCII56715
+Node: Usage58838
+Node: Performance68662
+Node: Reporting Bugs73869
+Node: Known Bugs74246
+Node: Copying75317
+Node: GNU Free Documentation License76423
+Node: Index101530
 
 End Tag Table
 
diff --git a/doc/grep.texi b/doc/grep.texi
index 9f2f225a..594ac1f8 100644
--- a/doc/grep.texi
+++ b/doc/grep.texi
@@ -30,7 +30,7 @@
 @copying
 This manual is for @command{grep}, a pattern matching engine.
 
-Copyright @copyright{} 1999--2002, 2005, 2008--2022 Free Software Foundation,
+Copyright @copyright{} 1999--2002, 2005, 2008--2023 Free Software Foundation,
 Inc.
 
 @quotation
@@ -202,6 +202,7 @@ in a shell command.
 Obtain patterns from @var{file}, one per line.
 If this option is used multiple times or is combined with the
 @option{-e} (@option{--regexp}) option, search for all patterns given.
+When @var{file} is @samp{-}, read patterns from standard input.
 The empty file contains zero patterns, and therefore matches nothing.
 (@option{-f} is specified by POSIX.)
 
@@ -223,7 +224,13 @@ this unusual character matches ``S'' or ``s'' even though uppercasing
 it yields ``S''.  Another example: the lowercase German letter ``ß''
 (U+00DF, LATIN SMALL LETTER SHARP S) is normally capitalized as the
 two-character string ``SS'' but it does not match ``SS'', and it might
-not match the uppercase letter ``ẞ'' (U+1E9E, LATIN CAPITAL LETTER
+not match the uppercase letter
+@c texinfo version 2023-03-04.12 complains about the following, saying
+@c "Character missing, sorry: LONG S."  For now, omit it if tex.
+@ifnottex
+``ẞ''
+@end ifnottex
+(U+1E9E, LATIN CAPITAL LETTER
 SHARP S) even though lowercasing the latter yields the former.
 
 @option{-y} is an obsolete synonym that is provided for compatibility.
@@ -864,8 +871,7 @@ overridden by @env{GREP_COLORS}.  Instead of
 @item GREP_COLORS
 @vindex GREP_COLORS @r{environment variable}
 @cindex highlight markers
-This variable specifies the colors and other attributes
-used to highlight various parts of the output.
+This variable controls how the @option{--color} option highlights output.
 Its value is a colon-separated list of @code{terminfo} capabilities
 that defaults to @samp{ms=01;31:mc=01;31:sl=:cx=:fn=35:ln=32:bn=32:se=36}
 with the @samp{rv} and @samp{ne} boolean capabilities omitted (i.e., false).
@@ -1061,18 +1067,6 @@ and are treated as options.
 This variable specifies the output terminal type, which can affect
 what the @option{--color} option does.  @xref{General Output Control}.
 
-@item _@var{N}_GNU_nonoption_argv_flags_
-@vindex _@var{N}_GNU_nonoption_argv_flags_ @r{environment variable}
-(Here @code{@var{N}} is @command{grep}'s numeric process ID.)
-If the @var{i}th character of this environment variable's value is @samp{1},
-do not consider the @var{i}th operand of @command{grep} to be an option,
-even if it appears to be one.
-A shell can put this variable in the environment for each command it runs,
-specifying which operands are the results of file name wildcard expansion
-and therefore should not be treated as options.
-This behavior is available only with the GNU C library,
-and only when @env{POSIXLY_CORRECT} is not set.
-
 @end table
 
 The @env{GREP_OPTIONS} environment variable of @command{grep} 2.20 and
@@ -1154,6 +1148,38 @@ combined with the @option{-z} (@option{--null-data}) option, and note that
 @samp{grep@ -P} may warn of unimplemented features.
 @xref{Other Options}.
 
+For documentation, refer to @url{https://www.pcre.org/}, with these caveats:
+@itemize
+@item
+@samp{\d} matches only the ten ASCII digits
+(and @samp{\D} matches the complement), regardless of locale.
+Use @samp{\p@{Nd@}} to also match non-ASCII digits.
+(The behavior of @samp{\d} and @samp{\D} is unspecified after
+in-regexp directives like @samp{(?aD)}.)
+
+@item
+Although PCRE tracks the syntax and semantics of Perl's regular
+expressions, the match is not always exact.  For example, Perl
+evolves and a Perl installation may predate or postdate the PCRE2
+installation on the same host, or their Unicode versions may differ,
+or Perl and PCRE2 may disagree about an obscure construct.
+
+@item
+By default, @command{grep} applies each regexp to a line at a time,
+so the @samp{(?s)} directive (making @samp{.} match line breaks)
+is generally ineffective.
+However, with @option{-z} (@option{--null-data}) it can work:
+@example
+$ printf 'a\nb\n' |grep -zP '(?s)a.b'
+a
+b
+@end example
+But beware: with the @option{-z} (@option{--null-data}) and a file
+containing no NUL byte, grep must read the entire file into memory
+before processing any of it.
+Thus, it will exhaust memory and fail for some large files.
+@end itemize
+
 @end table
 
 
@@ -1168,12 +1194,13 @@ by using various operators to combine smaller expressions.
 three different versions of regular expression syntax:
 basic (BRE), extended (ERE), and Perl-compatible (PCRE).
 In GNU @command{grep},
-there is no difference in available functionality between basic and
-extended syntax.
-In other implementations, basic regular expressions are less powerful.
+basic and extended regular expressions are merely different notations
+for the same pattern-matching functionality.
+In other implementations, basic regular expressions are ordinarily
+less powerful than extended, though occasionally it is the other way around.
 The following description applies to extended regular expressions;
 differences for basic regular expressions are summarized afterwards.
-Perl-compatible regular expressions give additional functionality, and
+Perl-compatible regular expressions have different functionality, and
 are documented in the @i{pcre2syntax}(3) and @i{pcre2pattern}(3) manual
 pages, but work only if PCRE is available in the system.
 
@@ -2105,12 +2132,12 @@ What happened to @command{egrep} and @command{fgrep}?
 that were the counterparts of the modern @samp{grep -E} and @samp{grep -F}.
 Although breaking up @command{grep} into three programs was perhaps
 useful on the small computers of the 1970s, @command{egrep} and
-@command{fgrep} were not standardized by POSIX and are no longer needed.
-In the current GNU implementation, @command{egrep} and @command{fgrep}
-issue a warning and then act like their modern counterparts;
+@command{fgrep} were deemed obsolescent by POSIX in 1992,
+removed from POSIX in 2001, deprecated by GNU Grep 2.5.3 in 2007,
+and changed to issue obsolescence warnings by GNU Grep 3.8 in 2022;
 eventually, they are planned to be removed entirely.
 
-If you prefer the old names, you can use use your own substitutes,
+If you prefer the old names, you can use your own substitutes,
 such as a shell script named @command{egrep} with the following
 contents:
 
diff --git a/doc/stamp-vti b/doc/stamp-vti
index 89cc9793..83a2f7e0 100644
--- a/doc/stamp-vti
+++ b/doc/stamp-vti
@@ -1,4 +1,4 @@
-@set UPDATED 6 June 2022
-@set UPDATED-MONTH June 2022
-@set EDITION 3.8
-@set VERSION 3.8
+@set UPDATED 10 May 2023
+@set UPDATED-MONTH May 2023
+@set EDITION 3.11
+@set VERSION 3.11
diff --git a/doc/version.texi b/doc/version.texi
index 89cc9793..83a2f7e0 100644
--- a/doc/version.texi
+++ b/doc/version.texi
@@ -1,4 +1,4 @@
-@set UPDATED 6 June 2022
-@set UPDATED-MONTH June 2022
-@set EDITION 3.8
-@set VERSION 3.8
+@set UPDATED 10 May 2023
+@set UPDATED-MONTH May 2023
+@set EDITION 3.11
+@set VERSION 3.11
diff --git a/gnulib-tests/Makefile.in b/gnulib-tests/Makefile.in
index 8ceae27f..3d0ba78d 100644
--- a/gnulib-tests/Makefile.in
+++ b/gnulib-tests/Makefile.in
@@ -1,7 +1,7 @@
 # Makefile.in generated by automake 1.16i from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2022 Free Software Foundation, Inc.
+# Copyright (C) 1994-2023 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,7 +14,7 @@
 
 @SET_MAKE@
 
-# Copyright (C) 2002-2022 Free Software Foundation, Inc.
+# Copyright (C) 2002-2023 Free Software Foundation, Inc.
 #
 # This file is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -96,9 +96,6 @@ am__make_dryrun = (target_option=n; $(am__make_running_with_option))
 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 am__rm_f = rm -f $(am__rm_f_notfound)
 am__rm_rf = rm -rf $(am__rm_f_notfound)
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
@@ -113,21 +110,23 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-TESTS = test-accept$(EXEEXT) test-alignof$(EXEEXT) \
-	test-alloca-opt$(EXEEXT) test-argmatch$(EXEEXT) \
-	test-arpa_inet$(EXEEXT) test-binary-io.sh test-bind$(EXEEXT) \
+TESTS = test-accept$(EXEEXT) test-alignasof$(EXEEXT) \
+	test-alignof$(EXEEXT) test-alloca-opt$(EXEEXT) \
+	test-argmatch$(EXEEXT) test-arpa_inet$(EXEEXT) \
+	test-assert$(EXEEXT) test-binary-io.sh test-bind$(EXEEXT) \
 	test-bitrotate$(EXEEXT) test-btowc1.sh test-btowc2.sh \
-	test-c-ctype$(EXEEXT) test-c-stack.sh test-c-stack2.sh \
-	test-c-strcase.sh test-calloc-gnu$(EXEEXT) test-chdir$(EXEEXT) \
+	test-btowc3.sh test-c-ctype$(EXEEXT) test-c-stack.sh \
+	test-c-stack2.sh test-c-strcase.sh test-c-strcasestr$(EXEEXT) \
+	test-calloc-gnu$(EXEEXT) test-chdir$(EXEEXT) \
 	test-cloexec$(EXEEXT) test-close$(EXEEXT) \
 	test-connect$(EXEEXT) test-ctype$(EXEEXT) \
 	test-dfa-invalid-char-class.sh test-dfa-invalid-merge.sh \
 	test-dfa-match.sh test-dirent$(EXEEXT) test-dup$(EXEEXT) \
-	test-dup2$(EXEEXT) test-dynarray$(EXEEXT) \
-	test-environ$(EXEEXT) test-errno$(EXEEXT) test-exclude1.sh \
-	test-exclude2.sh test-exclude3.sh test-exclude4.sh \
-	test-exclude5.sh test-exclude6.sh test-exclude7.sh \
-	test-exclude8.sh test-fchdir$(EXEEXT) test-fcntl-h$(EXEEXT) \
+	test-dup2$(EXEEXT) test-environ$(EXEEXT) test-errno$(EXEEXT) \
+	test-error.sh test-exclude1.sh test-exclude2.sh \
+	test-exclude3.sh test-exclude4.sh test-exclude5.sh \
+	test-exclude6.sh test-exclude7.sh test-exclude8.sh \
+	test-fchdir$(EXEEXT) test-fcntl-h$(EXEEXT) \
 	test-fcntl-safer$(EXEEXT) test-fcntl$(EXEEXT) \
 	test-fdopen$(EXEEXT) test-fdopendir$(EXEEXT) \
 	test-fgetc$(EXEEXT) test-float$(EXEEXT) \
@@ -138,30 +137,37 @@ TESTS = test-accept$(EXEEXT) test-alignof$(EXEEXT) \
 	test-fwrite$(EXEEXT) test-getcwd-lgpl$(EXEEXT) \
 	test-getdtablesize$(EXEEXT) test-getopt-gnu$(EXEEXT) \
 	test-getopt-posix$(EXEEXT) test-getprogname$(EXEEXT) \
-	test-gettimeofday$(EXEEXT) test-hard-locale$(EXEEXT) \
-	test-hash$(EXEEXT) test-i-ring$(EXEEXT) test-iconv-h$(EXEEXT) \
-	test-iconv$(EXEEXT) test-ignore-value$(EXEEXT) \
-	test-inet_pton$(EXEEXT) test-intprops$(EXEEXT) \
-	test-inttostr$(EXEEXT) test-inttypes$(EXEEXT) \
-	test-ioctl$(EXEEXT) test-isatty$(EXEEXT) test-isblank$(EXEEXT) \
+	test-gettimeofday$(EXEEXT) test-dynarray$(EXEEXT) \
+	test-hard-locale$(EXEEXT) test-hash$(EXEEXT) \
+	test-i-ring$(EXEEXT) test-iconv-h$(EXEEXT) test-iconv$(EXEEXT) \
+	test-ignore-value$(EXEEXT) test-inet_pton$(EXEEXT) \
+	test-intprops$(EXEEXT) test-inttostr$(EXEEXT) \
+	test-inttypes$(EXEEXT) test-ioctl$(EXEEXT) \
+	test-isatty$(EXEEXT) test-isblank$(EXEEXT) \
 	test-iswblank$(EXEEXT) test-iswdigit.sh test-iswxdigit.sh \
-	test-langinfo$(EXEEXT) test-limits-h$(EXEEXT) \
-	test-listen$(EXEEXT) test-locale$(EXEEXT) \
-	test-localeconv$(EXEEXT) test-localename$(EXEEXT) \
-	test-lseek.sh test-lstat$(EXEEXT) test-malloc-gnu$(EXEEXT) \
-	test-malloca$(EXEEXT) test-mbscasecmp.sh test-mbsinit.sh \
-	test-mbsrtowcs1.sh test-mbsrtowcs2.sh test-mbsrtowcs3.sh \
-	test-mbsrtowcs4.sh test-mbsstr1$(EXEEXT) test-mbsstr2.sh \
-	test-mbsstr3.sh test-memchr$(EXEEXT) test-memchr2$(EXEEXT) \
+	test-langinfo$(EXEEXT) test-largefile$(EXEEXT) \
+	test-limits-h$(EXEEXT) test-listen$(EXEEXT) \
+	test-locale$(EXEEXT) test-localeconv$(EXEEXT) \
+	test-localename$(EXEEXT) test-lseek.sh test-lstat$(EXEEXT) \
+	test-malloc-gnu$(EXEEXT) test-malloca$(EXEEXT) test-mbrlen1.sh \
+	test-mbrlen2.sh test-mbrlen3.sh test-mbrlen4.sh \
+	test-mbrlen5.sh test-mbrlen-w32-1.sh test-mbrlen-w32-2.sh \
+	test-mbrlen-w32-3.sh test-mbrlen-w32-4.sh test-mbrlen-w32-5.sh \
+	test-mbrlen-w32-6.sh test-mbrlen-w32-7.sh test-mbscasecmp.sh \
+	test-mbsinit.sh test-mbsrtowcs1.sh test-mbsrtowcs2.sh \
+	test-mbsrtowcs3.sh test-mbsrtowcs4.sh test-mbsrtowcs5.sh \
+	test-mbsstr1$(EXEEXT) test-mbsstr2.sh test-mbsstr3.sh \
+	test-memchr$(EXEEXT) test-memchr2$(EXEEXT) \
 	test-memrchr$(EXEEXT) test-nanosleep$(EXEEXT) \
-	test-netinet_in$(EXEEXT) test-nl_langinfo.sh \
-	test-nl_langinfo-mt$(EXEEXT) test-open$(EXEEXT) \
-	test-openat-safer$(EXEEXT) test-openat$(EXEEXT) \
-	test-pathmax$(EXEEXT) test-perror.sh test-perror2$(EXEEXT) \
-	test-pipe$(EXEEXT) test-pselect$(EXEEXT) test-pthread$(EXEEXT) \
-	test-pthread-thread$(EXEEXT) test-pthread_sigmask1$(EXEEXT) \
-	test-pthread_sigmask2$(EXEEXT) test-quotearg-simple$(EXEEXT) \
-	test-raise$(EXEEXT) test-rawmemchr$(EXEEXT) test-read$(EXEEXT) \
+	test-netinet_in$(EXEEXT) test-nl_langinfo1.sh \
+	test-nl_langinfo2.sh test-nl_langinfo-mt$(EXEEXT) \
+	test-open$(EXEEXT) test-openat-safer$(EXEEXT) \
+	test-openat$(EXEEXT) test-pathmax$(EXEEXT) test-perror.sh \
+	test-perror2$(EXEEXT) test-pipe$(EXEEXT) test-pselect$(EXEEXT) \
+	test-pthread$(EXEEXT) test-pthread-thread$(EXEEXT) \
+	test-pthread_sigmask1$(EXEEXT) test-pthread_sigmask2$(EXEEXT) \
+	test-quotearg-simple$(EXEEXT) test-raise$(EXEEXT) \
+	test-rawmemchr$(EXEEXT) test-read$(EXEEXT) \
 	test-realloc-gnu$(EXEEXT) test-reallocarray$(EXEEXT) \
 	test-regex$(EXEEXT) test-sched$(EXEEXT) test-select$(EXEEXT) \
 	test-select-in.sh test-select-out.sh test-setenv$(EXEEXT) \
@@ -176,7 +182,7 @@ TESTS = test-accept$(EXEEXT) test-alignof$(EXEEXT) \
 	test-sigsegv-catch-stackoverflow2$(EXEEXT) test-sleep$(EXEEXT) \
 	test-snprintf$(EXEEXT) test-sockets$(EXEEXT) \
 	test-stat$(EXEEXT) test-stat-time$(EXEEXT) \
-	test-stdalign$(EXEEXT) test-stdbool$(EXEEXT) \
+	test-stdbool$(EXEEXT) test-stdckdint$(EXEEXT) \
 	test-stddef$(EXEEXT) test-stdint$(EXEEXT) test-stdio$(EXEEXT) \
 	test-stdlib$(EXEEXT) test-strerror$(EXEEXT) \
 	test-strerror_r$(EXEEXT) test-striconv$(EXEEXT) \
@@ -188,7 +194,8 @@ TESTS = test-accept$(EXEEXT) test-alignof$(EXEEXT) \
 	test-sys_socket$(EXEEXT) test-sys_stat$(EXEEXT) \
 	test-sys_time$(EXEEXT) test-sys_types$(EXEEXT) \
 	test-sys_uio$(EXEEXT) test-init.sh test-thread_self$(EXEEXT) \
-	test-thread_create$(EXEEXT) test-time$(EXEEXT) \
+	test-thread_create$(EXEEXT) test-time-h$(EXEEXT) \
+	test-time$(EXEEXT) test-trim1.sh test-trim2.sh test-trim3.sh \
 	test-dup-safer$(EXEEXT) test-unistd$(EXEEXT) \
 	test-u8-mbtoucr$(EXEEXT) test-u8-uctomb$(EXEEXT) \
 	test-uc_width$(EXEEXT) uniwidth/test-uc_width2.sh \
@@ -200,34 +207,36 @@ TESTS = test-accept$(EXEEXT) test-alignof$(EXEEXT) \
 	test-wcrtomb-w32-4.sh test-wcrtomb-w32-5.sh \
 	test-wcrtomb-w32-6.sh test-wcrtomb-w32-7.sh \
 	test-wctype-h$(EXEEXT) test-wcwidth$(EXEEXT) \
-	test-xalloc-die.sh test-xstrtoimax.sh test-xstrtol.sh
+	test-xalloc-die.sh test-xstrtoimax.sh test-xstrtol.sh \
+	test-year2038$(EXEEXT)
 XFAIL_TESTS =
 noinst_PROGRAMS = current-locale$(EXEEXT) test-localcharset$(EXEEXT)
-check_PROGRAMS = test-accept$(EXEEXT) test-alignof$(EXEEXT) \
-	test-alloca-opt$(EXEEXT) test-argmatch$(EXEEXT) \
-	test-arpa_inet$(EXEEXT) test-binary-io$(EXEEXT) \
+check_PROGRAMS = test-accept$(EXEEXT) test-alignasof$(EXEEXT) \
+	test-alignof$(EXEEXT) test-alloca-opt$(EXEEXT) \
+	test-argmatch$(EXEEXT) test-arpa_inet$(EXEEXT) \
+	test-assert$(EXEEXT) test-binary-io$(EXEEXT) \
 	test-bind$(EXEEXT) test-bitrotate$(EXEEXT) test-btowc$(EXEEXT) \
 	test-c-ctype$(EXEEXT) test-c-stack$(EXEEXT) \
 	test-c-strcasecmp$(EXEEXT) test-c-strncasecmp$(EXEEXT) \
-	test-calloc-gnu$(EXEEXT) test-chdir$(EXEEXT) \
-	test-cloexec$(EXEEXT) test-close$(EXEEXT) \
+	test-c-strcasestr$(EXEEXT) test-calloc-gnu$(EXEEXT) \
+	test-chdir$(EXEEXT) test-cloexec$(EXEEXT) test-close$(EXEEXT) \
 	test-connect$(EXEEXT) test-ctype$(EXEEXT) \
 	test-dfa-match-aux$(EXEEXT) test-dirent$(EXEEXT) \
-	test-dup$(EXEEXT) test-dup2$(EXEEXT) test-dynarray$(EXEEXT) \
-	test-environ$(EXEEXT) test-errno$(EXEEXT) \
-	test-exclude$(EXEEXT) test-fchdir$(EXEEXT) \
-	test-fcntl-h$(EXEEXT) test-fcntl-safer$(EXEEXT) \
-	test-fcntl$(EXEEXT) test-fdopen$(EXEEXT) \
-	test-fdopendir$(EXEEXT) test-fgetc$(EXEEXT) \
-	test-float$(EXEEXT) test-fnmatch-h$(EXEEXT) \
-	test-fnmatch$(EXEEXT) test-fopen-gnu$(EXEEXT) \
-	test-fopen$(EXEEXT) test-fpending$(EXEEXT) test-fputc$(EXEEXT) \
-	test-fread$(EXEEXT) test-free$(EXEEXT) test-fstat$(EXEEXT) \
-	test-fstatat$(EXEEXT) test-ftruncate$(EXEEXT) \
-	test-fwrite$(EXEEXT) test-getcwd-lgpl$(EXEEXT) \
-	test-getdtablesize$(EXEEXT) test-getopt-gnu$(EXEEXT) \
-	test-getopt-posix$(EXEEXT) test-getprogname$(EXEEXT) \
-	test-gettimeofday$(EXEEXT) test-hard-locale$(EXEEXT) \
+	test-dup$(EXEEXT) test-dup2$(EXEEXT) test-environ$(EXEEXT) \
+	test-errno$(EXEEXT) test-error$(EXEEXT) test-exclude$(EXEEXT) \
+	test-fchdir$(EXEEXT) test-fcntl-h$(EXEEXT) \
+	test-fcntl-safer$(EXEEXT) test-fcntl$(EXEEXT) \
+	test-fdopen$(EXEEXT) test-fdopendir$(EXEEXT) \
+	test-fgetc$(EXEEXT) test-float$(EXEEXT) \
+	test-fnmatch-h$(EXEEXT) test-fnmatch$(EXEEXT) \
+	test-fopen-gnu$(EXEEXT) test-fopen$(EXEEXT) \
+	test-fpending$(EXEEXT) test-fputc$(EXEEXT) test-fread$(EXEEXT) \
+	test-free$(EXEEXT) test-fstat$(EXEEXT) test-fstatat$(EXEEXT) \
+	test-ftruncate$(EXEEXT) test-fwrite$(EXEEXT) \
+	test-getcwd-lgpl$(EXEEXT) test-getdtablesize$(EXEEXT) \
+	test-getopt-gnu$(EXEEXT) test-getopt-posix$(EXEEXT) \
+	test-getprogname$(EXEEXT) test-gettimeofday$(EXEEXT) \
+	test-dynarray$(EXEEXT) test-hard-locale$(EXEEXT) \
 	test-hash$(EXEEXT) test-i-ring$(EXEEXT) test-iconv-h$(EXEEXT) \
 	test-iconv$(EXEEXT) test-ignore-value$(EXEEXT) \
 	test-inet_pton$(EXEEXT) test-intprops$(EXEEXT) \
@@ -235,17 +244,19 @@ check_PROGRAMS = test-accept$(EXEEXT) test-alignof$(EXEEXT) \
 	test-ioctl$(EXEEXT) test-isatty$(EXEEXT) test-isblank$(EXEEXT) \
 	test-iswblank$(EXEEXT) test-iswdigit$(EXEEXT) \
 	test-iswxdigit$(EXEEXT) test-langinfo$(EXEEXT) \
-	test-limits-h$(EXEEXT) test-listen$(EXEEXT) \
-	test-locale$(EXEEXT) test-localeconv$(EXEEXT) \
-	test-localename$(EXEEXT) test-lseek$(EXEEXT) \
-	test-lstat$(EXEEXT) test-malloc-gnu$(EXEEXT) \
-	test-malloca$(EXEEXT) test-mbscasecmp$(EXEEXT) \
-	test-mbsinit$(EXEEXT) test-mbsrtowcs$(EXEEXT) \
-	test-mbsstr1$(EXEEXT) test-mbsstr2$(EXEEXT) \
-	test-mbsstr3$(EXEEXT) test-memchr$(EXEEXT) \
-	test-memchr2$(EXEEXT) test-memrchr$(EXEEXT) \
-	test-nanosleep$(EXEEXT) test-netinet_in$(EXEEXT) \
-	test-nl_langinfo$(EXEEXT) test-nl_langinfo-mt$(EXEEXT) \
+	test-largefile$(EXEEXT) test-limits-h$(EXEEXT) \
+	test-listen$(EXEEXT) test-locale$(EXEEXT) \
+	test-localeconv$(EXEEXT) test-localename$(EXEEXT) \
+	test-lseek$(EXEEXT) test-lstat$(EXEEXT) \
+	test-malloc-gnu$(EXEEXT) test-malloca$(EXEEXT) \
+	test-mbrlen$(EXEEXT) test-mbrlen-w32$(EXEEXT) \
+	test-mbscasecmp$(EXEEXT) test-mbsinit$(EXEEXT) \
+	test-mbsrtowcs$(EXEEXT) test-mbsstr1$(EXEEXT) \
+	test-mbsstr2$(EXEEXT) test-mbsstr3$(EXEEXT) \
+	test-memchr$(EXEEXT) test-memchr2$(EXEEXT) \
+	test-memrchr$(EXEEXT) test-nanosleep$(EXEEXT) \
+	test-netinet_in$(EXEEXT) test-nl_langinfo1$(EXEEXT) \
+	test-nl_langinfo2$(EXEEXT) test-nl_langinfo-mt$(EXEEXT) \
 	test-open$(EXEEXT) test-openat-safer$(EXEEXT) \
 	test-openat$(EXEEXT) test-pathmax$(EXEEXT) \
 	test-perror$(EXEEXT) test-perror2$(EXEEXT) test-pipe$(EXEEXT) \
@@ -267,7 +278,7 @@ check_PROGRAMS = test-accept$(EXEEXT) test-alignof$(EXEEXT) \
 	test-sigsegv-catch-stackoverflow2$(EXEEXT) test-sleep$(EXEEXT) \
 	test-snprintf$(EXEEXT) test-sockets$(EXEEXT) \
 	test-stat$(EXEEXT) test-stat-time$(EXEEXT) \
-	test-stdalign$(EXEEXT) test-stdbool$(EXEEXT) \
+	test-stdbool$(EXEEXT) test-stdckdint$(EXEEXT) \
 	test-stddef$(EXEEXT) test-stdint$(EXEEXT) test-stdio$(EXEEXT) \
 	test-stdlib$(EXEEXT) test-strerror$(EXEEXT) \
 	test-strerror_r$(EXEEXT) test-striconv$(EXEEXT) \
@@ -279,17 +290,18 @@ check_PROGRAMS = test-accept$(EXEEXT) test-alignof$(EXEEXT) \
 	test-sys_socket$(EXEEXT) test-sys_stat$(EXEEXT) \
 	test-sys_time$(EXEEXT) test-sys_types$(EXEEXT) \
 	test-sys_uio$(EXEEXT) test-thread_self$(EXEEXT) \
-	test-thread_create$(EXEEXT) test-time$(EXEEXT) \
-	test-dup-safer$(EXEEXT) test-unistd$(EXEEXT) \
-	test-u8-mbtoucr$(EXEEXT) test-u8-uctomb$(EXEEXT) \
-	test-uc_width$(EXEEXT) test-uc_width2$(EXEEXT) \
-	test-unsetenv$(EXEEXT) test-vasnprintf$(EXEEXT) \
-	test-verify$(EXEEXT) test-version-etc$(EXEEXT) \
-	test-wchar$(EXEEXT) test-wcrtomb$(EXEEXT) \
-	test-wcrtomb-w32$(EXEEXT) test-wctype-h$(EXEEXT) \
-	test-wcwidth$(EXEEXT) test-xalloc-die$(EXEEXT) \
-	test-xstrtoimax$(EXEEXT) test-xstrtol$(EXEEXT) \
-	test-xstrtoul$(EXEEXT)
+	test-thread_create$(EXEEXT) test-time-h$(EXEEXT) \
+	test-time$(EXEEXT) test-trim$(EXEEXT) test-dup-safer$(EXEEXT) \
+	test-unistd$(EXEEXT) test-u8-mbtoucr$(EXEEXT) \
+	test-u8-uctomb$(EXEEXT) test-uc_width$(EXEEXT) \
+	test-uc_width2$(EXEEXT) test-unsetenv$(EXEEXT) \
+	test-vasnprintf$(EXEEXT) test-verify$(EXEEXT) \
+	test-version-etc$(EXEEXT) test-wchar$(EXEEXT) \
+	test-wcrtomb$(EXEEXT) test-wcrtomb-w32$(EXEEXT) \
+	test-wctype-h$(EXEEXT) test-wcwidth$(EXEEXT) \
+	test-xalloc-die$(EXEEXT) test-xstrtoimax$(EXEEXT) \
+	test-xstrtol$(EXEEXT) test-xstrtoul$(EXEEXT) \
+	test-year2038$(EXEEXT)
 EXTRA_PROGRAMS = test-verify-try$(EXEEXT)
 @GL_COND_OBJ_ACCEPT_TRUE@am__append_1 = accept.c
 @GL_COND_OBJ_BIND_TRUE@am__append_2 = bind.c
@@ -316,9 +328,10 @@ EXTRA_PROGRAMS = test-verify-try$(EXEEXT)
 @GL_COND_OBJ_SLEEP_TRUE@am__append_23 = sleep.c
 @GL_COND_OBJ_SOCKET_TRUE@am__append_24 = socket.c
 @GL_COND_OBJ_SYMLINK_TRUE@am__append_25 = symlink.c
-@GL_COND_OBJ_UNSETENV_TRUE@am__append_26 = unsetenv.c
-@GL_COND_OBJ_WINDOWS_THREAD_TRUE@am__append_27 = windows-thread.c
-@GL_COND_OBJ_WINDOWS_TLS_TRUE@am__append_28 = windows-tls.c
+@GL_COND_OBJ_TIME_TRUE@am__append_26 = time.c
+@GL_COND_OBJ_UNSETENV_TRUE@am__append_27 = unsetenv.c
+@GL_COND_OBJ_WINDOWS_THREAD_TRUE@am__append_28 = windows-thread.c
+@GL_COND_OBJ_WINDOWS_TLS_TRUE@am__append_29 = windows-tls.c
 subdir = gnulib-tests
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
@@ -326,7 +339,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
 	$(top_srcdir)/m4/absolute-header.m4 $(top_srcdir)/m4/alloca.m4 \
 	$(top_srcdir)/m4/arpa_inet_h.m4 \
 	$(top_srcdir)/m4/asm-underscore.m4 $(top_srcdir)/m4/assert.m4 \
-	$(top_srcdir)/m4/btowc.m4 $(top_srcdir)/m4/builtin-expect.m4 \
+	$(top_srcdir)/m4/assert_h.m4 $(top_srcdir)/m4/btowc.m4 \
+	$(top_srcdir)/m4/build-to-host.m4 \
+	$(top_srcdir)/m4/builtin-expect.m4 $(top_srcdir)/m4/c-bool.m4 \
 	$(top_srcdir)/m4/c-stack.m4 $(top_srcdir)/m4/calloc.m4 \
 	$(top_srcdir)/m4/chdir-long.m4 $(top_srcdir)/m4/close.m4 \
 	$(top_srcdir)/m4/closedir.m4 $(top_srcdir)/m4/codeset.m4 \
@@ -337,12 +352,13 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
 	$(top_srcdir)/m4/double-slash-root.m4 $(top_srcdir)/m4/dup.m4 \
 	$(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \
 	$(top_srcdir)/m4/environ.m4 $(top_srcdir)/m4/errno_h.m4 \
-	$(top_srcdir)/m4/error.m4 $(top_srcdir)/m4/exponentd.m4 \
-	$(top_srcdir)/m4/extensions.m4 \
+	$(top_srcdir)/m4/error.m4 $(top_srcdir)/m4/error_h.m4 \
+	$(top_srcdir)/m4/exponentd.m4 $(top_srcdir)/m4/extensions.m4 \
 	$(top_srcdir)/m4/extern-inline.m4 $(top_srcdir)/m4/fchdir.m4 \
-	$(top_srcdir)/m4/fcntl-o.m4 $(top_srcdir)/m4/fcntl-safer.m4 \
-	$(top_srcdir)/m4/fcntl.m4 $(top_srcdir)/m4/fcntl_h.m4 \
-	$(top_srcdir)/m4/fdopen.m4 $(top_srcdir)/m4/fdopendir.m4 \
+	$(top_srcdir)/m4/fclose.m4 $(top_srcdir)/m4/fcntl-o.m4 \
+	$(top_srcdir)/m4/fcntl-safer.m4 $(top_srcdir)/m4/fcntl.m4 \
+	$(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fdopen.m4 \
+	$(top_srcdir)/m4/fdopendir.m4 $(top_srcdir)/m4/fflush.m4 \
 	$(top_srcdir)/m4/filenamecat.m4 $(top_srcdir)/m4/flexmember.m4 \
 	$(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fnmatch.m4 \
 	$(top_srcdir)/m4/fnmatch_h.m4 $(top_srcdir)/m4/fopen.m4 \
@@ -423,35 +439,34 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
 	$(top_srcdir)/m4/stack-direction.m4 \
 	$(top_srcdir)/m4/stat-time.m4 $(top_srcdir)/m4/stat.m4 \
 	$(top_srcdir)/m4/stdalign.m4 $(top_srcdir)/m4/stdarg.m4 \
-	$(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stddef_h.m4 \
-	$(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/stdint_h.m4 \
-	$(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \
-	$(top_srcdir)/m4/stpcpy.m4 $(top_srcdir)/m4/strdup.m4 \
-	$(top_srcdir)/m4/strerror.m4 $(top_srcdir)/m4/strerror_r.m4 \
-	$(top_srcdir)/m4/string_h.m4 $(top_srcdir)/m4/strnlen.m4 \
-	$(top_srcdir)/m4/strstr.m4 $(top_srcdir)/m4/strtoimax.m4 \
-	$(top_srcdir)/m4/strtoll.m4 $(top_srcdir)/m4/strtoull.m4 \
-	$(top_srcdir)/m4/strtoumax.m4 $(top_srcdir)/m4/symlink.m4 \
-	$(top_srcdir)/m4/sys_ioctl_h.m4 \
+	$(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \
+	$(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/stdio_h.m4 \
+	$(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/stpcpy.m4 \
+	$(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \
+	$(top_srcdir)/m4/strerror_r.m4 $(top_srcdir)/m4/string_h.m4 \
+	$(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/strstr.m4 \
+	$(top_srcdir)/m4/strtoimax.m4 $(top_srcdir)/m4/strtoll.m4 \
+	$(top_srcdir)/m4/strtoull.m4 $(top_srcdir)/m4/strtoumax.m4 \
+	$(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_ioctl_h.m4 \
 	$(top_srcdir)/m4/sys_select_h.m4 \
 	$(top_srcdir)/m4/sys_socket_h.m4 \
 	$(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_time_h.m4 \
 	$(top_srcdir)/m4/sys_types_h.m4 $(top_srcdir)/m4/sys_uio_h.m4 \
 	$(top_srcdir)/m4/thread.m4 $(top_srcdir)/m4/threadlib.m4 \
-	$(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/unistd-safer.m4 \
-	$(top_srcdir)/m4/unistd_h.m4 $(top_srcdir)/m4/unlocked-io.m4 \
-	$(top_srcdir)/m4/vasnprintf.m4 $(top_srcdir)/m4/version-etc.m4 \
-	$(top_srcdir)/m4/visibility.m4 $(top_srcdir)/m4/warn-on-use.m4 \
-	$(top_srcdir)/m4/warnings.m4 $(top_srcdir)/m4/wchar_h.m4 \
-	$(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wcrtomb.m4 \
-	$(top_srcdir)/m4/wctob.m4 $(top_srcdir)/m4/wctomb.m4 \
-	$(top_srcdir)/m4/wctype_h.m4 $(top_srcdir)/m4/wcwidth.m4 \
+	$(top_srcdir)/m4/time.m4 $(top_srcdir)/m4/time_h.m4 \
+	$(top_srcdir)/m4/unistd-safer.m4 $(top_srcdir)/m4/unistd_h.m4 \
+	$(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/vasnprintf.m4 \
+	$(top_srcdir)/m4/version-etc.m4 $(top_srcdir)/m4/visibility.m4 \
+	$(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/warnings.m4 \
+	$(top_srcdir)/m4/wchar_h.m4 $(top_srcdir)/m4/wchar_t.m4 \
+	$(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wctob.m4 \
+	$(top_srcdir)/m4/wctomb.m4 $(top_srcdir)/m4/wctype_h.m4 \
+	$(top_srcdir)/m4/wcwidth.m4 \
 	$(top_srcdir)/m4/windows-stat-inodes.m4 \
 	$(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/wmemchr.m4 \
 	$(top_srcdir)/m4/wmempcpy.m4 $(top_srcdir)/m4/xalloc.m4 \
 	$(top_srcdir)/m4/xsize.m4 $(top_srcdir)/m4/xstrtol.m4 \
-	$(top_srcdir)/m4/year2038.m4 $(top_srcdir)/m4/zzgnulib.m4 \
-	$(top_srcdir)/configure.ac
+	$(top_srcdir)/m4/zzgnulib.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
@@ -469,15 +484,15 @@ am__v_AR_1 =
 libtests_a_AR = $(AR) $(ARFLAGS)
 libtests_a_RANLIB = $(RANLIB)
 am__DEPENDENCIES_1 =
-am__libtests_a_SOURCES_DIST = accept.c bind.c connect.c fdopen.c \
-	float.c itold.c ftruncate.c gettimeofday.c hash-pjw.h \
-	hash-pjw.c inet_pton.c imaxtostr.c inttostr.c offtostr.c \
-	uinttostr.c umaxtostr.c ioctl.c listen.c localename.c \
-	localename-table.c nanosleep.c perror.c pselect.c \
+am__libtests_a_SOURCES_DIST = accept.c bind.c c-strcasestr.h \
+	c-strcasestr.c connect.c fdopen.c float.c itold.c ftruncate.c \
+	gettimeofday.c hash-pjw.h hash-pjw.c inet_pton.c imaxtostr.c \
+	inttostr.c offtostr.c uinttostr.c umaxtostr.c ioctl.c listen.c \
+	localename.c localename-table.c nanosleep.c perror.c pselect.c \
 	pthread-thread.c pthread_sigmask.c putenv.c select.c setenv.c \
 	setlocale.c setsockopt.c sigprocmask.c size_max.h sleep.c \
 	socket.c sockets.h sockets.c symlink.c sys_socket.c \
-	glthread/thread.h glthread/thread.c unsetenv.c \
+	glthread/thread.h glthread/thread.c time.c unsetenv.c \
 	windows-thread.c windows-tls.c xsize.h xsize.c xstrtol-error.c
 @GL_COND_OBJ_ACCEPT_TRUE@am__objects_1 = accept.$(OBJEXT)
 @GL_COND_OBJ_BIND_TRUE@am__objects_2 = bind.$(OBJEXT)
@@ -507,25 +522,27 @@ am__libtests_a_SOURCES_DIST = accept.c bind.c connect.c fdopen.c \
 @GL_COND_OBJ_SOCKET_TRUE@am__objects_24 = socket.$(OBJEXT)
 @GL_COND_OBJ_SYMLINK_TRUE@am__objects_25 = symlink.$(OBJEXT)
 am__dirstamp = $(am__leading_dot)dirstamp
-@GL_COND_OBJ_UNSETENV_TRUE@am__objects_26 = unsetenv.$(OBJEXT)
-@GL_COND_OBJ_WINDOWS_THREAD_TRUE@am__objects_27 =  \
+@GL_COND_OBJ_TIME_TRUE@am__objects_26 = time.$(OBJEXT)
+@GL_COND_OBJ_UNSETENV_TRUE@am__objects_27 = unsetenv.$(OBJEXT)
+@GL_COND_OBJ_WINDOWS_THREAD_TRUE@am__objects_28 =  \
 @GL_COND_OBJ_WINDOWS_THREAD_TRUE@	windows-thread.$(OBJEXT)
-@GL_COND_OBJ_WINDOWS_TLS_TRUE@am__objects_28 = windows-tls.$(OBJEXT)
+@GL_COND_OBJ_WINDOWS_TLS_TRUE@am__objects_29 = windows-tls.$(OBJEXT)
 am_libtests_a_OBJECTS = $(am__objects_1) $(am__objects_2) \
-	$(am__objects_3) $(am__objects_4) $(am__objects_5) \
-	$(am__objects_6) $(am__objects_7) $(am__objects_8) \
-	hash-pjw.$(OBJEXT) $(am__objects_9) imaxtostr.$(OBJEXT) \
-	inttostr.$(OBJEXT) offtostr.$(OBJEXT) uinttostr.$(OBJEXT) \
-	umaxtostr.$(OBJEXT) $(am__objects_10) $(am__objects_11) \
-	localename.$(OBJEXT) localename-table.$(OBJEXT) \
-	$(am__objects_12) $(am__objects_13) $(am__objects_14) \
-	$(am__objects_15) $(am__objects_16) $(am__objects_17) \
-	$(am__objects_18) $(am__objects_19) $(am__objects_20) \
-	$(am__objects_21) $(am__objects_22) $(am__objects_23) \
-	$(am__objects_24) sockets.$(OBJEXT) $(am__objects_25) \
-	sys_socket.$(OBJEXT) glthread/thread.$(OBJEXT) \
-	$(am__objects_26) $(am__objects_27) $(am__objects_28) \
-	xsize.$(OBJEXT) xstrtol-error.$(OBJEXT)
+	c-strcasestr.$(OBJEXT) $(am__objects_3) $(am__objects_4) \
+	$(am__objects_5) $(am__objects_6) $(am__objects_7) \
+	$(am__objects_8) hash-pjw.$(OBJEXT) $(am__objects_9) \
+	imaxtostr.$(OBJEXT) inttostr.$(OBJEXT) offtostr.$(OBJEXT) \
+	uinttostr.$(OBJEXT) umaxtostr.$(OBJEXT) $(am__objects_10) \
+	$(am__objects_11) localename.$(OBJEXT) \
+	localename-table.$(OBJEXT) $(am__objects_12) $(am__objects_13) \
+	$(am__objects_14) $(am__objects_15) $(am__objects_16) \
+	$(am__objects_17) $(am__objects_18) $(am__objects_19) \
+	$(am__objects_20) $(am__objects_21) $(am__objects_22) \
+	$(am__objects_23) $(am__objects_24) sockets.$(OBJEXT) \
+	$(am__objects_25) sys_socket.$(OBJEXT) \
+	glthread/thread.$(OBJEXT) $(am__objects_26) $(am__objects_27) \
+	$(am__objects_28) $(am__objects_29) xsize.$(OBJEXT) \
+	xstrtol-error.$(OBJEXT)
 libtests_a_OBJECTS = $(am_libtests_a_OBJECTS)
 am_current_locale_OBJECTS = locale.$(OBJEXT)
 current_locale_OBJECTS = $(am_current_locale_OBJECTS)
@@ -538,6 +555,12 @@ test_accept_OBJECTS = test-accept.$(OBJEXT)
 am__DEPENDENCIES_2 = libtests.a ../lib/libgreputils.a libtests.a \
 	../lib/libgreputils.a libtests.a $(am__DEPENDENCIES_1)
 test_accept_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_alignasof_SOURCES = test-alignasof.c
+test_alignasof_OBJECTS = test-alignasof.$(OBJEXT)
+test_alignasof_LDADD = $(LDADD)
+test_alignasof_DEPENDENCIES = libtests.a ../lib/libgreputils.a \
+	libtests.a ../lib/libgreputils.a libtests.a \
+	$(am__DEPENDENCIES_1)
 test_alignof_SOURCES = test-alignof.c
 test_alignof_OBJECTS = test-alignof.$(OBJEXT)
 test_alignof_LDADD = $(LDADD)
@@ -560,6 +583,11 @@ test_arpa_inet_LDADD = $(LDADD)
 test_arpa_inet_DEPENDENCIES = libtests.a ../lib/libgreputils.a \
 	libtests.a ../lib/libgreputils.a libtests.a \
 	$(am__DEPENDENCIES_1)
+test_assert_SOURCES = test-assert.c
+test_assert_OBJECTS = test-assert.$(OBJEXT)
+test_assert_LDADD = $(LDADD)
+test_assert_DEPENDENCIES = libtests.a ../lib/libgreputils.a libtests.a \
+	../lib/libgreputils.a libtests.a $(am__DEPENDENCIES_1)
 test_binary_io_SOURCES = test-binary-io.c
 test_binary_io_OBJECTS = test-binary-io.$(OBJEXT)
 test_binary_io_LDADD = $(LDADD)
@@ -590,6 +618,12 @@ test_c_strcasecmp_SOURCES = test-c-strcasecmp.c
 test_c_strcasecmp_OBJECTS = test-c-strcasecmp.$(OBJEXT)
 test_c_strcasecmp_DEPENDENCIES = $(am__DEPENDENCIES_2) \
 	$(am__DEPENDENCIES_1)
+test_c_strcasestr_SOURCES = test-c-strcasestr.c
+test_c_strcasestr_OBJECTS = test-c-strcasestr.$(OBJEXT)
+test_c_strcasestr_LDADD = $(LDADD)
+test_c_strcasestr_DEPENDENCIES = libtests.a ../lib/libgreputils.a \
+	libtests.a ../lib/libgreputils.a libtests.a \
+	$(am__DEPENDENCIES_1)
 test_c_strncasecmp_SOURCES = test-c-strncasecmp.c
 test_c_strncasecmp_OBJECTS = test-c-strncasecmp.$(OBJEXT)
 test_c_strncasecmp_DEPENDENCIES = $(am__DEPENDENCIES_2) \
@@ -667,6 +701,9 @@ test_errno_OBJECTS = test-errno.$(OBJEXT)
 test_errno_LDADD = $(LDADD)
 test_errno_DEPENDENCIES = libtests.a ../lib/libgreputils.a libtests.a \
 	../lib/libgreputils.a libtests.a $(am__DEPENDENCIES_1)
+test_error_SOURCES = test-error.c
+test_error_OBJECTS = test-error.$(OBJEXT)
+test_error_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
 test_exclude_SOURCES = test-exclude.c
 test_exclude_OBJECTS = test-exclude.$(OBJEXT)
 test_exclude_DEPENDENCIES = $(am__DEPENDENCIES_2) \
@@ -883,6 +920,12 @@ test_langinfo_LDADD = $(LDADD)
 test_langinfo_DEPENDENCIES = libtests.a ../lib/libgreputils.a \
 	libtests.a ../lib/libgreputils.a libtests.a \
 	$(am__DEPENDENCIES_1)
+test_largefile_SOURCES = test-largefile.c
+test_largefile_OBJECTS = test-largefile.$(OBJEXT)
+test_largefile_LDADD = $(LDADD)
+test_largefile_DEPENDENCIES = libtests.a ../lib/libgreputils.a \
+	libtests.a ../lib/libgreputils.a libtests.a \
+	$(am__DEPENDENCIES_1)
 test_limits_h_SOURCES = test-limits-h.c
 test_limits_h_OBJECTS = test-limits-h.$(OBJEXT)
 test_limits_h_LDADD = $(LDADD)
@@ -933,6 +976,16 @@ test_malloca_LDADD = $(LDADD)
 test_malloca_DEPENDENCIES = libtests.a ../lib/libgreputils.a \
 	libtests.a ../lib/libgreputils.a libtests.a \
 	$(am__DEPENDENCIES_1)
+test_mbrlen_SOURCES = test-mbrlen.c
+test_mbrlen_OBJECTS = test-mbrlen.$(OBJEXT)
+test_mbrlen_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1)
+test_mbrlen_w32_SOURCES = test-mbrlen-w32.c
+test_mbrlen_w32_OBJECTS = test-mbrlen-w32.$(OBJEXT)
+test_mbrlen_w32_LDADD = $(LDADD)
+test_mbrlen_w32_DEPENDENCIES = libtests.a ../lib/libgreputils.a \
+	libtests.a ../lib/libgreputils.a libtests.a \
+	$(am__DEPENDENCIES_1)
 test_mbscasecmp_SOURCES = test-mbscasecmp.c
 test_mbscasecmp_OBJECTS = test-mbscasecmp.$(OBJEXT)
 test_mbscasecmp_DEPENDENCIES = $(am__DEPENDENCIES_2) \
@@ -984,15 +1037,19 @@ test_netinet_in_LDADD = $(LDADD)
 test_netinet_in_DEPENDENCIES = libtests.a ../lib/libgreputils.a \
 	libtests.a ../lib/libgreputils.a libtests.a \
 	$(am__DEPENDENCIES_1)
-test_nl_langinfo_SOURCES = test-nl_langinfo.c
-test_nl_langinfo_OBJECTS = test-nl_langinfo.$(OBJEXT)
-test_nl_langinfo_DEPENDENCIES = $(am__DEPENDENCIES_2) \
-	$(am__DEPENDENCIES_1)
 test_nl_langinfo_mt_SOURCES = test-nl_langinfo-mt.c
 test_nl_langinfo_mt_OBJECTS = test-nl_langinfo-mt.$(OBJEXT)
 test_nl_langinfo_mt_DEPENDENCIES = $(am__DEPENDENCIES_2) \
 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
 	$(am__DEPENDENCIES_1)
+test_nl_langinfo1_SOURCES = test-nl_langinfo1.c
+test_nl_langinfo1_OBJECTS = test-nl_langinfo1.$(OBJEXT)
+test_nl_langinfo1_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+	$(am__DEPENDENCIES_1)
+test_nl_langinfo2_SOURCES = test-nl_langinfo2.c
+test_nl_langinfo2_OBJECTS = test-nl_langinfo2.$(OBJEXT)
+test_nl_langinfo2_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+	$(am__DEPENDENCIES_1)
 test_open_SOURCES = test-open.c
 test_open_OBJECTS = test-open.$(OBJEXT)
 test_open_LDADD = $(LDADD)
@@ -1175,18 +1232,18 @@ test_stat_time_SOURCES = test-stat-time.c
 test_stat_time_OBJECTS = test-stat-time.$(OBJEXT)
 test_stat_time_DEPENDENCIES = $(am__DEPENDENCIES_2) \
 	$(am__DEPENDENCIES_1)
-test_stdalign_SOURCES = test-stdalign.c
-test_stdalign_OBJECTS = test-stdalign.$(OBJEXT)
-test_stdalign_LDADD = $(LDADD)
-test_stdalign_DEPENDENCIES = libtests.a ../lib/libgreputils.a \
-	libtests.a ../lib/libgreputils.a libtests.a \
-	$(am__DEPENDENCIES_1)
 test_stdbool_SOURCES = test-stdbool.c
 test_stdbool_OBJECTS = test-stdbool.$(OBJEXT)
 test_stdbool_LDADD = $(LDADD)
 test_stdbool_DEPENDENCIES = libtests.a ../lib/libgreputils.a \
 	libtests.a ../lib/libgreputils.a libtests.a \
 	$(am__DEPENDENCIES_1)
+test_stdckdint_SOURCES = test-stdckdint.c
+test_stdckdint_OBJECTS = test-stdckdint.$(OBJEXT)
+test_stdckdint_LDADD = $(LDADD)
+test_stdckdint_DEPENDENCIES = libtests.a ../lib/libgreputils.a \
+	libtests.a ../lib/libgreputils.a libtests.a \
+	$(am__DEPENDENCIES_1)
 test_stddef_SOURCES = test-stddef.c
 test_stddef_OBJECTS = test-stddef.$(OBJEXT)
 test_stddef_LDADD = $(LDADD)
@@ -1321,6 +1378,14 @@ test_time_OBJECTS = test-time.$(OBJEXT)
 test_time_LDADD = $(LDADD)
 test_time_DEPENDENCIES = libtests.a ../lib/libgreputils.a libtests.a \
 	../lib/libgreputils.a libtests.a $(am__DEPENDENCIES_1)
+test_time_h_SOURCES = test-time-h.c
+test_time_h_OBJECTS = test-time-h.$(OBJEXT)
+test_time_h_LDADD = $(LDADD)
+test_time_h_DEPENDENCIES = libtests.a ../lib/libgreputils.a libtests.a \
+	../lib/libgreputils.a libtests.a $(am__DEPENDENCIES_1)
+test_trim_SOURCES = test-trim.c
+test_trim_OBJECTS = test-trim.$(OBJEXT)
+test_trim_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
 am_test_u8_mbtoucr_OBJECTS = unistr/test-u8-mbtoucr.$(OBJEXT)
 test_u8_mbtoucr_OBJECTS = $(am_test_u8_mbtoucr_OBJECTS)
 test_u8_mbtoucr_DEPENDENCIES = $(am__DEPENDENCIES_2)
@@ -1401,6 +1466,12 @@ test_xstrtol_DEPENDENCIES = $(am__DEPENDENCIES_2)
 test_xstrtoul_SOURCES = test-xstrtoul.c
 test_xstrtoul_OBJECTS = test-xstrtoul.$(OBJEXT)
 test_xstrtoul_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_year2038_SOURCES = test-year2038.c
+test_year2038_OBJECTS = test-year2038.$(OBJEXT)
+test_year2038_LDADD = $(LDADD)
+test_year2038_DEPENDENCIES = libtests.a ../lib/libgreputils.a \
+	libtests.a ../lib/libgreputils.a libtests.a \
+	$(am__DEPENDENCIES_1)
 AM_V_P = $(am__v_P_@AM_V@)
 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
 am__v_P_0 = false
@@ -1418,31 +1489,33 @@ depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
 am__maybe_remake_depfiles = depfiles
 am__depfiles_remade = ./$(DEPDIR)/accept.Po ./$(DEPDIR)/alloca.Po \
 	./$(DEPDIR)/anytostr.Po ./$(DEPDIR)/asnprintf.Po \
-	./$(DEPDIR)/bind.Po ./$(DEPDIR)/connect.Po \
-	./$(DEPDIR)/fdopen.Po ./$(DEPDIR)/float.Po \
-	./$(DEPDIR)/ftruncate.Po ./$(DEPDIR)/gettimeofday.Po \
-	./$(DEPDIR)/hash-pjw.Po ./$(DEPDIR)/imaxtostr.Po \
-	./$(DEPDIR)/inet_pton.Po ./$(DEPDIR)/inttostr.Po \
-	./$(DEPDIR)/ioctl.Po ./$(DEPDIR)/itold.Po \
-	./$(DEPDIR)/listen.Po ./$(DEPDIR)/locale.Po \
-	./$(DEPDIR)/localename-table.Po ./$(DEPDIR)/localename.Po \
-	./$(DEPDIR)/nanosleep.Po ./$(DEPDIR)/offtostr.Po \
-	./$(DEPDIR)/perror.Po ./$(DEPDIR)/printf-args.Po \
-	./$(DEPDIR)/printf-parse.Po ./$(DEPDIR)/pselect.Po \
-	./$(DEPDIR)/pthread-thread.Po ./$(DEPDIR)/pthread_sigmask.Po \
-	./$(DEPDIR)/putenv.Po ./$(DEPDIR)/select.Po \
-	./$(DEPDIR)/setenv.Po ./$(DEPDIR)/setlocale.Po \
-	./$(DEPDIR)/setsockopt.Po ./$(DEPDIR)/sigprocmask.Po \
-	./$(DEPDIR)/sleep.Po ./$(DEPDIR)/snprintf.Po \
-	./$(DEPDIR)/socket.Po ./$(DEPDIR)/sockets.Po \
-	./$(DEPDIR)/strerror_r.Po ./$(DEPDIR)/symlink.Po \
-	./$(DEPDIR)/sys_socket.Po ./$(DEPDIR)/test-accept.Po \
+	./$(DEPDIR)/bind.Po ./$(DEPDIR)/c-strcasestr.Po \
+	./$(DEPDIR)/connect.Po ./$(DEPDIR)/fdopen.Po \
+	./$(DEPDIR)/float.Po ./$(DEPDIR)/ftruncate.Po \
+	./$(DEPDIR)/gettimeofday.Po ./$(DEPDIR)/hash-pjw.Po \
+	./$(DEPDIR)/imaxtostr.Po ./$(DEPDIR)/inet_pton.Po \
+	./$(DEPDIR)/inttostr.Po ./$(DEPDIR)/ioctl.Po \
+	./$(DEPDIR)/itold.Po ./$(DEPDIR)/listen.Po \
+	./$(DEPDIR)/locale.Po ./$(DEPDIR)/localename-table.Po \
+	./$(DEPDIR)/localename.Po ./$(DEPDIR)/nanosleep.Po \
+	./$(DEPDIR)/offtostr.Po ./$(DEPDIR)/perror.Po \
+	./$(DEPDIR)/printf-args.Po ./$(DEPDIR)/printf-parse.Po \
+	./$(DEPDIR)/pselect.Po ./$(DEPDIR)/pthread-thread.Po \
+	./$(DEPDIR)/pthread_sigmask.Po ./$(DEPDIR)/putenv.Po \
+	./$(DEPDIR)/select.Po ./$(DEPDIR)/setenv.Po \
+	./$(DEPDIR)/setlocale.Po ./$(DEPDIR)/setsockopt.Po \
+	./$(DEPDIR)/sigprocmask.Po ./$(DEPDIR)/sleep.Po \
+	./$(DEPDIR)/snprintf.Po ./$(DEPDIR)/socket.Po \
+	./$(DEPDIR)/sockets.Po ./$(DEPDIR)/strerror_r.Po \
+	./$(DEPDIR)/symlink.Po ./$(DEPDIR)/sys_socket.Po \
+	./$(DEPDIR)/test-accept.Po ./$(DEPDIR)/test-alignasof.Po \
 	./$(DEPDIR)/test-alignof.Po ./$(DEPDIR)/test-alloca-opt.Po \
 	./$(DEPDIR)/test-argmatch.Po ./$(DEPDIR)/test-arpa_inet.Po \
-	./$(DEPDIR)/test-binary-io.Po ./$(DEPDIR)/test-bind.Po \
-	./$(DEPDIR)/test-bitrotate.Po ./$(DEPDIR)/test-btowc.Po \
-	./$(DEPDIR)/test-c-ctype.Po ./$(DEPDIR)/test-c-stack.Po \
-	./$(DEPDIR)/test-c-strcasecmp.Po \
+	./$(DEPDIR)/test-assert.Po ./$(DEPDIR)/test-binary-io.Po \
+	./$(DEPDIR)/test-bind.Po ./$(DEPDIR)/test-bitrotate.Po \
+	./$(DEPDIR)/test-btowc.Po ./$(DEPDIR)/test-c-ctype.Po \
+	./$(DEPDIR)/test-c-stack.Po ./$(DEPDIR)/test-c-strcasecmp.Po \
+	./$(DEPDIR)/test-c-strcasestr.Po \
 	./$(DEPDIR)/test-c-strncasecmp.Po \
 	./$(DEPDIR)/test-calloc-gnu.Po ./$(DEPDIR)/test-chdir.Po \
 	./$(DEPDIR)/test-cloexec.Po ./$(DEPDIR)/test-close.Po \
@@ -1451,17 +1524,18 @@ am__depfiles_remade = ./$(DEPDIR)/accept.Po ./$(DEPDIR)/alloca.Po \
 	./$(DEPDIR)/test-dup-safer.Po ./$(DEPDIR)/test-dup.Po \
 	./$(DEPDIR)/test-dup2.Po ./$(DEPDIR)/test-dynarray.Po \
 	./$(DEPDIR)/test-environ.Po ./$(DEPDIR)/test-errno.Po \
-	./$(DEPDIR)/test-exclude.Po ./$(DEPDIR)/test-fchdir.Po \
-	./$(DEPDIR)/test-fcntl-h.Po ./$(DEPDIR)/test-fcntl-safer.Po \
-	./$(DEPDIR)/test-fcntl.Po ./$(DEPDIR)/test-fdopen.Po \
-	./$(DEPDIR)/test-fdopendir.Po ./$(DEPDIR)/test-fgetc.Po \
-	./$(DEPDIR)/test-float.Po ./$(DEPDIR)/test-fnmatch-h.Po \
-	./$(DEPDIR)/test-fnmatch.Po ./$(DEPDIR)/test-fopen-gnu.Po \
-	./$(DEPDIR)/test-fopen.Po ./$(DEPDIR)/test-fpending.Po \
-	./$(DEPDIR)/test-fputc.Po ./$(DEPDIR)/test-fread.Po \
-	./$(DEPDIR)/test-free.Po ./$(DEPDIR)/test-fstat.Po \
-	./$(DEPDIR)/test-fstatat.Po ./$(DEPDIR)/test-ftruncate.Po \
-	./$(DEPDIR)/test-fwrite.Po ./$(DEPDIR)/test-getcwd-lgpl.Po \
+	./$(DEPDIR)/test-error.Po ./$(DEPDIR)/test-exclude.Po \
+	./$(DEPDIR)/test-fchdir.Po ./$(DEPDIR)/test-fcntl-h.Po \
+	./$(DEPDIR)/test-fcntl-safer.Po ./$(DEPDIR)/test-fcntl.Po \
+	./$(DEPDIR)/test-fdopen.Po ./$(DEPDIR)/test-fdopendir.Po \
+	./$(DEPDIR)/test-fgetc.Po ./$(DEPDIR)/test-float.Po \
+	./$(DEPDIR)/test-fnmatch-h.Po ./$(DEPDIR)/test-fnmatch.Po \
+	./$(DEPDIR)/test-fopen-gnu.Po ./$(DEPDIR)/test-fopen.Po \
+	./$(DEPDIR)/test-fpending.Po ./$(DEPDIR)/test-fputc.Po \
+	./$(DEPDIR)/test-fread.Po ./$(DEPDIR)/test-free.Po \
+	./$(DEPDIR)/test-fstat.Po ./$(DEPDIR)/test-fstatat.Po \
+	./$(DEPDIR)/test-ftruncate.Po ./$(DEPDIR)/test-fwrite.Po \
+	./$(DEPDIR)/test-getcwd-lgpl.Po \
 	./$(DEPDIR)/test-getdtablesize.Po \
 	./$(DEPDIR)/test-getopt-gnu.Po \
 	./$(DEPDIR)/test-getopt-posix.Po \
@@ -1475,19 +1549,22 @@ am__depfiles_remade = ./$(DEPDIR)/accept.Po ./$(DEPDIR)/alloca.Po \
 	./$(DEPDIR)/test-ioctl.Po ./$(DEPDIR)/test-isatty.Po \
 	./$(DEPDIR)/test-isblank.Po ./$(DEPDIR)/test-iswblank.Po \
 	./$(DEPDIR)/test-iswdigit.Po ./$(DEPDIR)/test-iswxdigit.Po \
-	./$(DEPDIR)/test-langinfo.Po ./$(DEPDIR)/test-limits-h.Po \
-	./$(DEPDIR)/test-listen.Po ./$(DEPDIR)/test-localcharset.Po \
-	./$(DEPDIR)/test-locale.Po ./$(DEPDIR)/test-localeconv.Po \
-	./$(DEPDIR)/test-localename.Po ./$(DEPDIR)/test-lseek.Po \
-	./$(DEPDIR)/test-lstat.Po ./$(DEPDIR)/test-malloc-gnu.Po \
-	./$(DEPDIR)/test-malloca.Po ./$(DEPDIR)/test-mbscasecmp.Po \
-	./$(DEPDIR)/test-mbsinit.Po ./$(DEPDIR)/test-mbsrtowcs.Po \
-	./$(DEPDIR)/test-mbsstr1.Po ./$(DEPDIR)/test-mbsstr2.Po \
-	./$(DEPDIR)/test-mbsstr3.Po ./$(DEPDIR)/test-memchr.Po \
-	./$(DEPDIR)/test-memchr2.Po ./$(DEPDIR)/test-memrchr.Po \
-	./$(DEPDIR)/test-nanosleep.Po ./$(DEPDIR)/test-netinet_in.Po \
+	./$(DEPDIR)/test-langinfo.Po ./$(DEPDIR)/test-largefile.Po \
+	./$(DEPDIR)/test-limits-h.Po ./$(DEPDIR)/test-listen.Po \
+	./$(DEPDIR)/test-localcharset.Po ./$(DEPDIR)/test-locale.Po \
+	./$(DEPDIR)/test-localeconv.Po ./$(DEPDIR)/test-localename.Po \
+	./$(DEPDIR)/test-lseek.Po ./$(DEPDIR)/test-lstat.Po \
+	./$(DEPDIR)/test-malloc-gnu.Po ./$(DEPDIR)/test-malloca.Po \
+	./$(DEPDIR)/test-mbrlen-w32.Po ./$(DEPDIR)/test-mbrlen.Po \
+	./$(DEPDIR)/test-mbscasecmp.Po ./$(DEPDIR)/test-mbsinit.Po \
+	./$(DEPDIR)/test-mbsrtowcs.Po ./$(DEPDIR)/test-mbsstr1.Po \
+	./$(DEPDIR)/test-mbsstr2.Po ./$(DEPDIR)/test-mbsstr3.Po \
+	./$(DEPDIR)/test-memchr.Po ./$(DEPDIR)/test-memchr2.Po \
+	./$(DEPDIR)/test-memrchr.Po ./$(DEPDIR)/test-nanosleep.Po \
+	./$(DEPDIR)/test-netinet_in.Po \
 	./$(DEPDIR)/test-nl_langinfo-mt.Po \
-	./$(DEPDIR)/test-nl_langinfo.Po ./$(DEPDIR)/test-open.Po \
+	./$(DEPDIR)/test-nl_langinfo1.Po \
+	./$(DEPDIR)/test-nl_langinfo2.Po ./$(DEPDIR)/test-open.Po \
 	./$(DEPDIR)/test-openat-safer.Po ./$(DEPDIR)/test-openat.Po \
 	./$(DEPDIR)/test-pathmax.Po ./$(DEPDIR)/test-perror.Po \
 	./$(DEPDIR)/test-perror2.Po ./$(DEPDIR)/test-pipe.Po \
@@ -1514,8 +1591,8 @@ am__depfiles_remade = ./$(DEPDIR)/accept.Po ./$(DEPDIR)/alloca.Po \
 	./$(DEPDIR)/test-sigsegv-catch-stackoverflow2.Po \
 	./$(DEPDIR)/test-sleep.Po ./$(DEPDIR)/test-snprintf.Po \
 	./$(DEPDIR)/test-sockets.Po ./$(DEPDIR)/test-stat-time.Po \
-	./$(DEPDIR)/test-stat.Po ./$(DEPDIR)/test-stdalign.Po \
-	./$(DEPDIR)/test-stdbool.Po ./$(DEPDIR)/test-stddef.Po \
+	./$(DEPDIR)/test-stat.Po ./$(DEPDIR)/test-stdbool.Po \
+	./$(DEPDIR)/test-stdckdint.Po ./$(DEPDIR)/test-stddef.Po \
 	./$(DEPDIR)/test-stdint.Po ./$(DEPDIR)/test-stdio.Po \
 	./$(DEPDIR)/test-stdlib.Po ./$(DEPDIR)/test-strerror.Po \
 	./$(DEPDIR)/test-strerror_r.Po ./$(DEPDIR)/test-striconv.Po \
@@ -1527,7 +1604,8 @@ am__depfiles_remade = ./$(DEPDIR)/accept.Po ./$(DEPDIR)/alloca.Po \
 	./$(DEPDIR)/test-sys_socket.Po ./$(DEPDIR)/test-sys_stat.Po \
 	./$(DEPDIR)/test-sys_time.Po ./$(DEPDIR)/test-sys_types.Po \
 	./$(DEPDIR)/test-sys_uio.Po ./$(DEPDIR)/test-thread_create.Po \
-	./$(DEPDIR)/test-thread_self.Po ./$(DEPDIR)/test-time.Po \
+	./$(DEPDIR)/test-thread_self.Po ./$(DEPDIR)/test-time-h.Po \
+	./$(DEPDIR)/test-time.Po ./$(DEPDIR)/test-trim.Po \
 	./$(DEPDIR)/test-unistd.Po ./$(DEPDIR)/test-unsetenv.Po \
 	./$(DEPDIR)/test-vasnprintf.Po ./$(DEPDIR)/test-verify-try.Po \
 	./$(DEPDIR)/test-verify.Po ./$(DEPDIR)/test-version-etc.Po \
@@ -1535,7 +1613,8 @@ am__depfiles_remade = ./$(DEPDIR)/accept.Po ./$(DEPDIR)/alloca.Po \
 	./$(DEPDIR)/test-wcrtomb.Po ./$(DEPDIR)/test-wctype-h.Po \
 	./$(DEPDIR)/test-wcwidth.Po ./$(DEPDIR)/test-xalloc-die.Po \
 	./$(DEPDIR)/test-xstrtoimax.Po ./$(DEPDIR)/test-xstrtol.Po \
-	./$(DEPDIR)/test-xstrtoul.Po ./$(DEPDIR)/uinttostr.Po \
+	./$(DEPDIR)/test-xstrtoul.Po ./$(DEPDIR)/test-year2038.Po \
+	./$(DEPDIR)/time.Po ./$(DEPDIR)/uinttostr.Po \
 	./$(DEPDIR)/umaxtostr.Po ./$(DEPDIR)/unsetenv.Po \
 	./$(DEPDIR)/vasnprintf.Po ./$(DEPDIR)/windows-thread.Po \
 	./$(DEPDIR)/windows-tls.Po ./$(DEPDIR)/xsize.Po \
@@ -1558,36 +1637,38 @@ am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
 am__v_CCLD_0 = @echo "  CCLD    " $@;
 am__v_CCLD_1 = 
 SOURCES = $(libtests_a_SOURCES) $(EXTRA_libtests_a_SOURCES) \
-	$(current_locale_SOURCES) test-accept.c test-alignof.c \
-	test-alloca-opt.c test-argmatch.c test-arpa_inet.c \
-	test-binary-io.c test-bind.c test-bitrotate.c test-btowc.c \
-	test-c-ctype.c test-c-stack.c test-c-strcasecmp.c \
-	test-c-strncasecmp.c test-calloc-gnu.c test-chdir.c \
-	test-cloexec.c test-close.c test-connect.c test-ctype.c \
-	test-dfa-match-aux.c test-dirent.c test-dup.c test-dup-safer.c \
-	test-dup2.c test-dynarray.c test-environ.c test-errno.c \
-	test-exclude.c test-fchdir.c test-fcntl.c test-fcntl-h.c \
-	test-fcntl-safer.c test-fdopen.c test-fdopendir.c test-fgetc.c \
-	test-float.c test-fnmatch.c test-fnmatch-h.c test-fopen.c \
-	test-fopen-gnu.c test-fpending.c test-fputc.c test-fread.c \
-	test-free.c test-fstat.c test-fstatat.c test-ftruncate.c \
-	test-fwrite.c test-getcwd-lgpl.c test-getdtablesize.c \
-	test-getopt-gnu.c test-getopt-posix.c test-getprogname.c \
-	test-gettimeofday.c test-hard-locale.c test-hash.c \
-	test-i-ring.c test-iconv.c test-iconv-h.c test-ignore-value.c \
-	test-inet_pton.c test-intprops.c test-inttostr.c \
-	test-inttypes.c test-ioctl.c test-isatty.c test-isblank.c \
-	test-iswblank.c test-iswdigit.c test-iswxdigit.c \
-	test-langinfo.c test-limits-h.c test-listen.c \
-	test-localcharset.c test-locale.c test-localeconv.c \
-	test-localename.c test-lseek.c test-lstat.c test-malloc-gnu.c \
-	test-malloca.c test-mbscasecmp.c test-mbsinit.c \
+	$(current_locale_SOURCES) test-accept.c test-alignasof.c \
+	test-alignof.c test-alloca-opt.c test-argmatch.c \
+	test-arpa_inet.c test-assert.c test-binary-io.c test-bind.c \
+	test-bitrotate.c test-btowc.c test-c-ctype.c test-c-stack.c \
+	test-c-strcasecmp.c test-c-strcasestr.c test-c-strncasecmp.c \
+	test-calloc-gnu.c test-chdir.c test-cloexec.c test-close.c \
+	test-connect.c test-ctype.c test-dfa-match-aux.c test-dirent.c \
+	test-dup.c test-dup-safer.c test-dup2.c test-dynarray.c \
+	test-environ.c test-errno.c test-error.c test-exclude.c \
+	test-fchdir.c test-fcntl.c test-fcntl-h.c test-fcntl-safer.c \
+	test-fdopen.c test-fdopendir.c test-fgetc.c test-float.c \
+	test-fnmatch.c test-fnmatch-h.c test-fopen.c test-fopen-gnu.c \
+	test-fpending.c test-fputc.c test-fread.c test-free.c \
+	test-fstat.c test-fstatat.c test-ftruncate.c test-fwrite.c \
+	test-getcwd-lgpl.c test-getdtablesize.c test-getopt-gnu.c \
+	test-getopt-posix.c test-getprogname.c test-gettimeofday.c \
+	test-hard-locale.c test-hash.c test-i-ring.c test-iconv.c \
+	test-iconv-h.c test-ignore-value.c test-inet_pton.c \
+	test-intprops.c test-inttostr.c test-inttypes.c test-ioctl.c \
+	test-isatty.c test-isblank.c test-iswblank.c test-iswdigit.c \
+	test-iswxdigit.c test-langinfo.c test-largefile.c \
+	test-limits-h.c test-listen.c test-localcharset.c \
+	test-locale.c test-localeconv.c test-localename.c test-lseek.c \
+	test-lstat.c test-malloc-gnu.c test-malloca.c test-mbrlen.c \
+	test-mbrlen-w32.c test-mbscasecmp.c test-mbsinit.c \
 	test-mbsrtowcs.c test-mbsstr1.c test-mbsstr2.c test-mbsstr3.c \
 	test-memchr.c test-memchr2.c test-memrchr.c test-nanosleep.c \
-	test-netinet_in.c test-nl_langinfo.c test-nl_langinfo-mt.c \
-	test-open.c test-openat.c test-openat-safer.c test-pathmax.c \
-	test-perror.c test-perror2.c test-pipe.c test-pselect.c \
-	test-pthread.c test-pthread-thread.c test-pthread_sigmask1.c \
+	test-netinet_in.c test-nl_langinfo-mt.c test-nl_langinfo1.c \
+	test-nl_langinfo2.c test-open.c test-openat.c \
+	test-openat-safer.c test-pathmax.c test-perror.c \
+	test-perror2.c test-pipe.c test-pselect.c test-pthread.c \
+	test-pthread-thread.c test-pthread_sigmask1.c \
 	test-pthread_sigmask2.c test-quotearg-simple.c test-raise.c \
 	test-rawmemchr.c test-read.c test-realloc-gnu.c \
 	test-reallocarray.c test-regex.c test-sched.c test-select.c \
@@ -1599,7 +1680,7 @@ SOURCES = $(libtests_a_SOURCES) $(EXTRA_libtests_a_SOURCES) \
 	test-sigsegv-catch-stackoverflow1.c \
 	test-sigsegv-catch-stackoverflow2.c test-sleep.c \
 	test-snprintf.c test-sockets.c test-stat.c test-stat-time.c \
-	test-stdalign.c test-stdbool.c test-stddef.c test-stdint.c \
+	test-stdbool.c test-stdckdint.c test-stddef.c test-stdint.c \
 	test-stdio.c test-stdlib.c test-strerror.c test-strerror_r.c \
 	test-striconv.c test-string.c test-strnlen.c test-strstr.c \
 	test-strtoimax.c test-strtoll.c test-strtoull.c \
@@ -1607,44 +1688,48 @@ SOURCES = $(libtests_a_SOURCES) $(EXTRA_libtests_a_SOURCES) \
 	test-sys_select.c test-sys_socket.c test-sys_stat.c \
 	test-sys_time.c test-sys_types.c test-sys_uio.c \
 	test-thread_create.c test-thread_self.c test-time.c \
-	$(test_u8_mbtoucr_SOURCES) $(test_u8_uctomb_SOURCES) \
-	$(test_uc_width_SOURCES) $(test_uc_width2_SOURCES) \
-	test-unistd.c test-unsetenv.c test-vasnprintf.c test-verify.c \
-	test-verify-try.c test-version-etc.c test-wchar.c \
-	test-wcrtomb.c test-wcrtomb-w32.c test-wctype-h.c \
-	test-wcwidth.c test-xalloc-die.c test-xstrtoimax.c \
-	test-xstrtol.c test-xstrtoul.c
+	test-time-h.c test-trim.c $(test_u8_mbtoucr_SOURCES) \
+	$(test_u8_uctomb_SOURCES) $(test_uc_width_SOURCES) \
+	$(test_uc_width2_SOURCES) test-unistd.c test-unsetenv.c \
+	test-vasnprintf.c test-verify.c test-verify-try.c \
+	test-version-etc.c test-wchar.c test-wcrtomb.c \
+	test-wcrtomb-w32.c test-wctype-h.c test-wcwidth.c \
+	test-xalloc-die.c test-xstrtoimax.c test-xstrtol.c \
+	test-xstrtoul.c test-year2038.c
 DIST_SOURCES = $(am__libtests_a_SOURCES_DIST) \
 	$(EXTRA_libtests_a_SOURCES) $(current_locale_SOURCES) \
-	test-accept.c test-alignof.c test-alloca-opt.c test-argmatch.c \
-	test-arpa_inet.c test-binary-io.c test-bind.c test-bitrotate.c \
+	test-accept.c test-alignasof.c test-alignof.c \
+	test-alloca-opt.c test-argmatch.c test-arpa_inet.c \
+	test-assert.c test-binary-io.c test-bind.c test-bitrotate.c \
 	test-btowc.c test-c-ctype.c test-c-stack.c test-c-strcasecmp.c \
-	test-c-strncasecmp.c test-calloc-gnu.c test-chdir.c \
-	test-cloexec.c test-close.c test-connect.c test-ctype.c \
-	test-dfa-match-aux.c test-dirent.c test-dup.c test-dup-safer.c \
-	test-dup2.c test-dynarray.c test-environ.c test-errno.c \
-	test-exclude.c test-fchdir.c test-fcntl.c test-fcntl-h.c \
-	test-fcntl-safer.c test-fdopen.c test-fdopendir.c test-fgetc.c \
-	test-float.c test-fnmatch.c test-fnmatch-h.c test-fopen.c \
-	test-fopen-gnu.c test-fpending.c test-fputc.c test-fread.c \
-	test-free.c test-fstat.c test-fstatat.c test-ftruncate.c \
-	test-fwrite.c test-getcwd-lgpl.c test-getdtablesize.c \
-	test-getopt-gnu.c test-getopt-posix.c test-getprogname.c \
-	test-gettimeofday.c test-hard-locale.c test-hash.c \
-	test-i-ring.c test-iconv.c test-iconv-h.c test-ignore-value.c \
-	test-inet_pton.c test-intprops.c test-inttostr.c \
-	test-inttypes.c test-ioctl.c test-isatty.c test-isblank.c \
-	test-iswblank.c test-iswdigit.c test-iswxdigit.c \
-	test-langinfo.c test-limits-h.c test-listen.c \
-	test-localcharset.c test-locale.c test-localeconv.c \
-	test-localename.c test-lseek.c test-lstat.c test-malloc-gnu.c \
-	test-malloca.c test-mbscasecmp.c test-mbsinit.c \
+	test-c-strcasestr.c test-c-strncasecmp.c test-calloc-gnu.c \
+	test-chdir.c test-cloexec.c test-close.c test-connect.c \
+	test-ctype.c test-dfa-match-aux.c test-dirent.c test-dup.c \
+	test-dup-safer.c test-dup2.c test-dynarray.c test-environ.c \
+	test-errno.c test-error.c test-exclude.c test-fchdir.c \
+	test-fcntl.c test-fcntl-h.c test-fcntl-safer.c test-fdopen.c \
+	test-fdopendir.c test-fgetc.c test-float.c test-fnmatch.c \
+	test-fnmatch-h.c test-fopen.c test-fopen-gnu.c test-fpending.c \
+	test-fputc.c test-fread.c test-free.c test-fstat.c \
+	test-fstatat.c test-ftruncate.c test-fwrite.c \
+	test-getcwd-lgpl.c test-getdtablesize.c test-getopt-gnu.c \
+	test-getopt-posix.c test-getprogname.c test-gettimeofday.c \
+	test-hard-locale.c test-hash.c test-i-ring.c test-iconv.c \
+	test-iconv-h.c test-ignore-value.c test-inet_pton.c \
+	test-intprops.c test-inttostr.c test-inttypes.c test-ioctl.c \
+	test-isatty.c test-isblank.c test-iswblank.c test-iswdigit.c \
+	test-iswxdigit.c test-langinfo.c test-largefile.c \
+	test-limits-h.c test-listen.c test-localcharset.c \
+	test-locale.c test-localeconv.c test-localename.c test-lseek.c \
+	test-lstat.c test-malloc-gnu.c test-malloca.c test-mbrlen.c \
+	test-mbrlen-w32.c test-mbscasecmp.c test-mbsinit.c \
 	test-mbsrtowcs.c test-mbsstr1.c test-mbsstr2.c test-mbsstr3.c \
 	test-memchr.c test-memchr2.c test-memrchr.c test-nanosleep.c \
-	test-netinet_in.c test-nl_langinfo.c test-nl_langinfo-mt.c \
-	test-open.c test-openat.c test-openat-safer.c test-pathmax.c \
-	test-perror.c test-perror2.c test-pipe.c test-pselect.c \
-	test-pthread.c test-pthread-thread.c test-pthread_sigmask1.c \
+	test-netinet_in.c test-nl_langinfo-mt.c test-nl_langinfo1.c \
+	test-nl_langinfo2.c test-open.c test-openat.c \
+	test-openat-safer.c test-pathmax.c test-perror.c \
+	test-perror2.c test-pipe.c test-pselect.c test-pthread.c \
+	test-pthread-thread.c test-pthread_sigmask1.c \
 	test-pthread_sigmask2.c test-quotearg-simple.c test-raise.c \
 	test-rawmemchr.c test-read.c test-realloc-gnu.c \
 	test-reallocarray.c test-regex.c test-sched.c test-select.c \
@@ -1656,7 +1741,7 @@ DIST_SOURCES = $(am__libtests_a_SOURCES_DIST) \
 	test-sigsegv-catch-stackoverflow1.c \
 	test-sigsegv-catch-stackoverflow2.c test-sleep.c \
 	test-snprintf.c test-sockets.c test-stat.c test-stat-time.c \
-	test-stdalign.c test-stdbool.c test-stddef.c test-stdint.c \
+	test-stdbool.c test-stdckdint.c test-stddef.c test-stdint.c \
 	test-stdio.c test-stdlib.c test-strerror.c test-strerror_r.c \
 	test-striconv.c test-string.c test-strnlen.c test-strstr.c \
 	test-strtoimax.c test-strtoll.c test-strtoull.c \
@@ -1664,13 +1749,14 @@ DIST_SOURCES = $(am__libtests_a_SOURCES_DIST) \
 	test-sys_select.c test-sys_socket.c test-sys_stat.c \
 	test-sys_time.c test-sys_types.c test-sys_uio.c \
 	test-thread_create.c test-thread_self.c test-time.c \
-	$(test_u8_mbtoucr_SOURCES) $(test_u8_uctomb_SOURCES) \
-	$(test_uc_width_SOURCES) $(test_uc_width2_SOURCES) \
-	test-unistd.c test-unsetenv.c test-vasnprintf.c test-verify.c \
-	test-verify-try.c test-version-etc.c test-wchar.c \
-	test-wcrtomb.c test-wcrtomb-w32.c test-wctype-h.c \
-	test-wcwidth.c test-xalloc-die.c test-xstrtoimax.c \
-	test-xstrtol.c test-xstrtoul.c
+	test-time-h.c test-trim.c $(test_u8_mbtoucr_SOURCES) \
+	$(test_u8_uctomb_SOURCES) $(test_uc_width_SOURCES) \
+	$(test_uc_width2_SOURCES) test-unistd.c test-unsetenv.c \
+	test-vasnprintf.c test-verify.c test-verify-try.c \
+	test-version-etc.c test-wchar.c test-wcrtomb.c \
+	test-wcrtomb-w32.c test-wctype-h.c test-wcwidth.c \
+	test-xalloc-die.c test-xstrtoimax.c test-xstrtol.c \
+	test-xstrtoul.c test-year2038.c
 RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
 	ctags-recursive dvi-recursive html-recursive info-recursive \
 	install-data-recursive install-dvi-recursive \
@@ -1943,6 +2029,9 @@ am__relativize = \
     dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
   done; \
   reldir="$$dir2"
+pkgdatadir = @pkgdatadir@
+pkgincludedir = @pkgincludedir@
+pkglibdir = @pkglibdir@
 pkglibexecdir = @pkglibexecdir@
 ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
@@ -1952,6 +2041,7 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
 AR = @AR@
 ARFLAGS = @ARFLAGS@
+ASSERT_H = @ASSERT_H@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -1974,6 +2064,7 @@ CTAGS = @CTAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@ -DEXEEXT=\"@EXEEXT@\"
 DEPDIR = @DEPDIR@
+DIR_HAS_FD_MEMBER = @DIR_HAS_FD_MEMBER@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
@@ -1984,6 +2075,7 @@ ENOLINK_VALUE = @ENOLINK_VALUE@
 EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
 EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
 ERRNO_H = @ERRNO_H@
+ERROR_H = @ERROR_H@
 ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FLOAT_H = @FLOAT_H@
@@ -2084,6 +2176,7 @@ GL_GNULIB_GETPAGESIZE = @GL_GNULIB_GETPAGESIZE@
 GL_GNULIB_GETPASS = @GL_GNULIB_GETPASS@
 GL_GNULIB_GETPASS_GNU = @GL_GNULIB_GETPASS_GNU@
 GL_GNULIB_GETPEERNAME = @GL_GNULIB_GETPEERNAME@
+GL_GNULIB_GETPROGNAME = @GL_GNULIB_GETPROGNAME@
 GL_GNULIB_GETSOCKNAME = @GL_GNULIB_GETSOCKNAME@
 GL_GNULIB_GETSOCKOPT = @GL_GNULIB_GETSOCKOPT@
 GL_GNULIB_GETSUBOPT = @GL_GNULIB_GETSUBOPT@
@@ -2135,6 +2228,7 @@ GL_GNULIB_MBSSEP = @GL_GNULIB_MBSSEP@
 GL_GNULIB_MBSSPN = @GL_GNULIB_MBSSPN@
 GL_GNULIB_MBSSTR = @GL_GNULIB_MBSSTR@
 GL_GNULIB_MBSTOK_R = @GL_GNULIB_MBSTOK_R@
+GL_GNULIB_MBSTOWCS = @GL_GNULIB_MBSTOWCS@
 GL_GNULIB_MBTOWC = @GL_GNULIB_MBTOWC@
 GL_GNULIB_MDA_ACCESS = @GL_GNULIB_MDA_ACCESS@
 GL_GNULIB_MDA_CHDIR = @GL_GNULIB_MDA_CHDIR@
@@ -2181,6 +2275,7 @@ GL_GNULIB_MEMCHR = @GL_GNULIB_MEMCHR@
 GL_GNULIB_MEMMEM = @GL_GNULIB_MEMMEM@
 GL_GNULIB_MEMPCPY = @GL_GNULIB_MEMPCPY@
 GL_GNULIB_MEMRCHR = @GL_GNULIB_MEMRCHR@
+GL_GNULIB_MEMSET_EXPLICIT = @GL_GNULIB_MEMSET_EXPLICIT@
 GL_GNULIB_MKDIR = @GL_GNULIB_MKDIR@
 GL_GNULIB_MKDIRAT = @GL_GNULIB_MKDIRAT@
 GL_GNULIB_MKDTEMP = @GL_GNULIB_MKDTEMP@
@@ -2305,6 +2400,7 @@ GL_GNULIB_STRVERSCMP = @GL_GNULIB_STRVERSCMP@
 GL_GNULIB_SYMLINK = @GL_GNULIB_SYMLINK@
 GL_GNULIB_SYMLINKAT = @GL_GNULIB_SYMLINKAT@
 GL_GNULIB_SYSTEM_POSIX = @GL_GNULIB_SYSTEM_POSIX@
+GL_GNULIB_TIME = @GL_GNULIB_TIME@
 GL_GNULIB_TIMEGM = @GL_GNULIB_TIMEGM@
 GL_GNULIB_TIMESPEC_GET = @GL_GNULIB_TIMESPEC_GET@
 GL_GNULIB_TIMESPEC_GETRES = @GL_GNULIB_TIMESPEC_GETRES@
@@ -2381,6 +2477,7 @@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
 GNULIB_TEST_WARN_CFLAGS = @GNULIB_TEST_WARN_CFLAGS@
 GNULIB_WARN_CFLAGS = @GNULIB_WARN_CFLAGS@
 GREP = @GREP@
+HARD_LOCALE_LIB = @HARD_LOCALE_LIB@
 HAVE_ACCEPT4 = @HAVE_ACCEPT4@
 HAVE_ALIGNED_ALLOC = @HAVE_ALIGNED_ALLOC@
 HAVE_ALLOCA_H = @HAVE_ALLOCA_H@
@@ -2415,6 +2512,7 @@ HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@
 HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
 HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
 HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
+HAVE_DECL_GETW = @HAVE_DECL_GETW@
 HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@
 HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@
 HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@
@@ -2424,6 +2522,8 @@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@
 HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
 HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
 HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@
+HAVE_DECL_PROGRAM_INVOCATION_NAME = @HAVE_DECL_PROGRAM_INVOCATION_NAME@
+HAVE_DECL_PUTW = @HAVE_DECL_PUTW@
 HAVE_DECL_SETENV = @HAVE_DECL_SETENV@
 HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@
 HAVE_DECL_SETSTATE = @HAVE_DECL_SETSTATE@
@@ -2447,6 +2547,9 @@ HAVE_DIRENT_H = @HAVE_DIRENT_H@
 HAVE_DPRINTF = @HAVE_DPRINTF@
 HAVE_DUP3 = @HAVE_DUP3@
 HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
+HAVE_ERROR = @HAVE_ERROR@
+HAVE_ERROR_AT_LINE = @HAVE_ERROR_AT_LINE@
+HAVE_ERROR_H = @HAVE_ERROR_H@
 HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
 HAVE_EXECVPE = @HAVE_EXECVPE@
 HAVE_EXPLICIT_BZERO = @HAVE_EXPLICIT_BZERO@
@@ -2477,11 +2580,14 @@ HAVE_GETLOGIN = @HAVE_GETLOGIN@
 HAVE_GETOPT_H = @HAVE_GETOPT_H@
 HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
 HAVE_GETPASS = @HAVE_GETPASS@
+HAVE_GETPROGNAME = @HAVE_GETPROGNAME@
 HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
 HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@
 HAVE_GETUMASK = @HAVE_GETUMASK@
 HAVE_GRANTPT = @HAVE_GRANTPT@
 HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
+HAVE_IMAXABS = @HAVE_IMAXABS@
+HAVE_IMAXDIV = @HAVE_IMAXDIV@
 HAVE_IMAXDIV_T = @HAVE_IMAXDIV_T@
 HAVE_INITSTATE = @HAVE_INITSTATE@
 HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
@@ -2509,6 +2615,7 @@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@
 HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@
 HAVE_MBTOWC = @HAVE_MBTOWC@
 HAVE_MEMPCPY = @HAVE_MEMPCPY@
+HAVE_MEMSET_EXPLICIT = @HAVE_MEMSET_EXPLICIT@
 HAVE_MKDIRAT = @HAVE_MKDIRAT@
 HAVE_MKDTEMP = @HAVE_MKDTEMP@
 HAVE_MKFIFO = @HAVE_MKFIFO@
@@ -2671,6 +2778,7 @@ HAVE_TIMESPEC_GETRES = @HAVE_TIMESPEC_GETRES@
 HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@
 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@
 HAVE_UNISTD_H = @HAVE_UNISTD_H@
+HAVE_UNISTRING_WOE32DLL_H = @HAVE_UNISTRING_WOE32DLL_H@
 HAVE_UNLINKAT = @HAVE_UNLINKAT@
 HAVE_UNLOCKPT = @HAVE_UNLOCKPT@
 HAVE_USLEEP = @HAVE_USLEEP@
@@ -2720,7 +2828,6 @@ HAVE_WMEMPCPY = @HAVE_WMEMPCPY@
 HAVE_WMEMSET = @HAVE_WMEMSET@
 HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@
 HAVE_XLOCALE_H = @HAVE_XLOCALE_H@
-HAVE__BOOL = @HAVE__BOOL@
 HAVE__EXIT = @HAVE__EXIT@
 HOST_CPU = @HOST_CPU@
 HOST_CPU_C_ABI = @HOST_CPU_C_ABI@
@@ -2784,16 +2891,21 @@ LTLIBOBJS = @LTLIBOBJS@
 LTLIBSIGSEGV = @LTLIBSIGSEGV@
 LTLIBTHREAD = @LTLIBTHREAD@
 MAKEINFO = @MAKEINFO@
+MBRTOWC_LIB = @MBRTOWC_LIB@
 MKDIR_P = @MKDIR_P@
 MSGFMT = @MSGFMT@
 MSGFMT_015 = @MSGFMT_015@
 MSGMERGE = @MSGMERGE@
+NANOSLEEP_LIB = @NANOSLEEP_LIB@
 NETINET_IN_H = @NETINET_IN_H@
 NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@
+NEXT_ASSERT_H = @NEXT_ASSERT_H@
 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@
+NEXT_AS_FIRST_DIRECTIVE_ASSERT_H = @NEXT_AS_FIRST_DIRECTIVE_ASSERT_H@
 NEXT_AS_FIRST_DIRECTIVE_CTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_CTYPE_H@
 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@
 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
+NEXT_AS_FIRST_DIRECTIVE_ERROR_H = @NEXT_AS_FIRST_DIRECTIVE_ERROR_H@
 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@
 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@
 NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H = @NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H@
@@ -2827,6 +2939,7 @@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@
 NEXT_CTYPE_H = @NEXT_CTYPE_H@
 NEXT_DIRENT_H = @NEXT_DIRENT_H@
 NEXT_ERRNO_H = @NEXT_ERRNO_H@
+NEXT_ERROR_H = @NEXT_ERROR_H@
 NEXT_FCNTL_H = @NEXT_FCNTL_H@
 NEXT_FLOAT_H = @NEXT_FLOAT_H@
 NEXT_FNMATCH_H = @NEXT_FNMATCH_H@
@@ -2877,6 +2990,7 @@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
 PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
 PRIPTR_PREFIX = @PRIPTR_PREFIX@
 PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
+PTHREAD_SIGMASK_LIB = @PTHREAD_SIGMASK_LIB@
 PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
 RANLIB = @RANLIB@
 REPLACE_ACCESS = @REPLACE_ACCESS@
@@ -2896,7 +3010,10 @@ REPLACE_DIRFD = @REPLACE_DIRFD@
 REPLACE_DPRINTF = @REPLACE_DPRINTF@
 REPLACE_DUP = @REPLACE_DUP@
 REPLACE_DUP2 = @REPLACE_DUP2@
+REPLACE_DUP3 = @REPLACE_DUP3@
 REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
+REPLACE_ERROR = @REPLACE_ERROR@
+REPLACE_ERROR_AT_LINE = @REPLACE_ERROR_AT_LINE@
 REPLACE_EXECL = @REPLACE_EXECL@
 REPLACE_EXECLE = @REPLACE_EXECLE@
 REPLACE_EXECLP = @REPLACE_EXECLP@
@@ -2909,6 +3026,7 @@ REPLACE_FCHMODAT = @REPLACE_FCHMODAT@
 REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
 REPLACE_FCLOSE = @REPLACE_FCLOSE@
 REPLACE_FCNTL = @REPLACE_FCNTL@
+REPLACE_FDATASYNC = @REPLACE_FDATASYNC@
 REPLACE_FDOPEN = @REPLACE_FDOPEN@
 REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@
 REPLACE_FFLUSH = @REPLACE_FFLUSH@
@@ -2933,17 +3051,23 @@ REPLACE_GETCWD = @REPLACE_GETCWD@
 REPLACE_GETDELIM = @REPLACE_GETDELIM@
 REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
 REPLACE_GETDTABLESIZE = @REPLACE_GETDTABLESIZE@
+REPLACE_GETENTROPY = @REPLACE_GETENTROPY@
 REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
 REPLACE_GETLINE = @REPLACE_GETLINE@
+REPLACE_GETLOADAVG = @REPLACE_GETLOADAVG@
 REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
 REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
 REPLACE_GETPASS = @REPLACE_GETPASS@
 REPLACE_GETPASS_FOR_GETPASS_GNU = @REPLACE_GETPASS_FOR_GETPASS_GNU@
+REPLACE_GETPROGNAME = @REPLACE_GETPROGNAME@
+REPLACE_GETSUBOPT = @REPLACE_GETSUBOPT@
 REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
 REPLACE_GMTIME = @REPLACE_GMTIME@
 REPLACE_ICONV = @REPLACE_ICONV@
 REPLACE_ICONV_OPEN = @REPLACE_ICONV_OPEN@
 REPLACE_ICONV_UTF = @REPLACE_ICONV_UTF@
+REPLACE_IMAXABS = @REPLACE_IMAXABS@
+REPLACE_IMAXDIV = @REPLACE_IMAXDIV@
 REPLACE_INET_NTOP = @REPLACE_INET_NTOP@
 REPLACE_INET_PTON = @REPLACE_INET_PTON@
 REPLACE_INITSTATE = @REPLACE_INITSTATE@
@@ -2970,14 +3094,19 @@ REPLACE_MBSINIT = @REPLACE_MBSINIT@
 REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
 REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
 REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
+REPLACE_MBSTOWCS = @REPLACE_MBSTOWCS@
 REPLACE_MBTOWC = @REPLACE_MBTOWC@
+REPLACE_MB_CUR_MAX = @REPLACE_MB_CUR_MAX@
 REPLACE_MEMCHR = @REPLACE_MEMCHR@
 REPLACE_MEMMEM = @REPLACE_MEMMEM@
+REPLACE_MEMPCPY = @REPLACE_MEMPCPY@
 REPLACE_MKDIR = @REPLACE_MKDIR@
 REPLACE_MKFIFO = @REPLACE_MKFIFO@
 REPLACE_MKFIFOAT = @REPLACE_MKFIFOAT@
 REPLACE_MKNOD = @REPLACE_MKNOD@
 REPLACE_MKNODAT = @REPLACE_MKNODAT@
+REPLACE_MKOSTEMP = @REPLACE_MKOSTEMP@
+REPLACE_MKOSTEMPS = @REPLACE_MKOSTEMPS@
 REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
 REPLACE_MKTIME = @REPLACE_MKTIME@
 REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
@@ -2989,8 +3118,10 @@ REPLACE_OPEN = @REPLACE_OPEN@
 REPLACE_OPENAT = @REPLACE_OPENAT@
 REPLACE_OPENDIR = @REPLACE_OPENDIR@
 REPLACE_PERROR = @REPLACE_PERROR@
+REPLACE_PIPE2 = @REPLACE_PIPE2@
 REPLACE_POPEN = @REPLACE_POPEN@
 REPLACE_POSIX_MEMALIGN = @REPLACE_POSIX_MEMALIGN@
+REPLACE_POSIX_OPENPT = @REPLACE_POSIX_OPENPT@
 REPLACE_PREAD = @REPLACE_PREAD@
 REPLACE_PRINTF = @REPLACE_PRINTF@
 REPLACE_PSELECT = @REPLACE_PSELECT@
@@ -3055,6 +3186,7 @@ REPLACE_RAISE = @REPLACE_RAISE@
 REPLACE_RANDOM = @REPLACE_RANDOM@
 REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
 REPLACE_READ = @REPLACE_READ@
+REPLACE_READDIR = @REPLACE_READDIR@
 REPLACE_READLINK = @REPLACE_READLINK@
 REPLACE_READLINKAT = @REPLACE_READLINKAT@
 REPLACE_REALLOCARRAY = @REPLACE_REALLOCARRAY@
@@ -3064,10 +3196,12 @@ REPLACE_REALPATH = @REPLACE_REALPATH@
 REPLACE_REMOVE = @REPLACE_REMOVE@
 REPLACE_RENAME = @REPLACE_RENAME@
 REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
+REPLACE_REWINDDIR = @REPLACE_REWINDDIR@
 REPLACE_RMDIR = @REPLACE_RMDIR@
 REPLACE_SCHED_YIELD = @REPLACE_SCHED_YIELD@
 REPLACE_SELECT = @REPLACE_SELECT@
 REPLACE_SETENV = @REPLACE_SETENV@
+REPLACE_SETHOSTNAME = @REPLACE_SETHOSTNAME@
 REPLACE_SETLOCALE = @REPLACE_SETLOCALE@
 REPLACE_SETSTATE = @REPLACE_SETSTATE@
 REPLACE_SLEEP = @REPLACE_SLEEP@
@@ -3076,6 +3210,7 @@ REPLACE_SPRINTF = @REPLACE_SPRINTF@
 REPLACE_STAT = @REPLACE_STAT@
 REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@
 REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
+REPLACE_STPCPY = @REPLACE_STPCPY@
 REPLACE_STPNCPY = @REPLACE_STPNCPY@
 REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
 REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@
@@ -3102,7 +3237,9 @@ REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@
 REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@
 REPLACE_SYMLINK = @REPLACE_SYMLINK@
 REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@
+REPLACE_TIME = @REPLACE_TIME@
 REPLACE_TIMEGM = @REPLACE_TIMEGM@
+REPLACE_TIMESPEC_GET = @REPLACE_TIMESPEC_GET@
 REPLACE_TMPFILE = @REPLACE_TMPFILE@
 REPLACE_TOWLOWER = @REPLACE_TOWLOWER@
 REPLACE_TRUNCATE = @REPLACE_TRUNCATE@
@@ -3120,24 +3257,33 @@ REPLACE_VPRINTF = @REPLACE_VPRINTF@
 REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
 REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
 REPLACE_WCRTOMB = @REPLACE_WCRTOMB@
+REPLACE_WCSCMP = @REPLACE_WCSCMP@
 REPLACE_WCSFTIME = @REPLACE_WCSFTIME@
+REPLACE_WCSNCMP = @REPLACE_WCSNCMP@
 REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@
 REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@
+REPLACE_WCSSTR = @REPLACE_WCSSTR@
 REPLACE_WCSTOK = @REPLACE_WCSTOK@
 REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@
 REPLACE_WCTOB = @REPLACE_WCTOB@
 REPLACE_WCTOMB = @REPLACE_WCTOMB@
 REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
+REPLACE_WMEMCMP = @REPLACE_WMEMCMP@
+REPLACE_WMEMPCPY = @REPLACE_WMEMPCPY@
 REPLACE_WRITE = @REPLACE_WRITE@
+REPLACE__EXIT = @REPLACE__EXIT@
+SCHED_YIELD_LIB = @SCHED_YIELD_LIB@
 SED = @SED@
+SELECT_LIB = @SELECT_LIB@
+SETLOCALE_LIB = @SETLOCALE_LIB@
+SETLOCALE_NULL_LIB = @SETLOCALE_NULL_LIB@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 SIGSEGV_H = @SIGSEGV_H@
 SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
 SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
-STDALIGN_H = @STDALIGN_H@
 STDARG_H = @STDARG_H@
-STDBOOL_H = @STDBOOL_H@
+STDCKDINT_H = @STDCKDINT_H@
 STDDEF_H = @STDDEF_H@
 STDINT_H = @STDINT_H@
 STRIP = @STRIP@
@@ -3180,6 +3326,8 @@ am__tar = @am__tar@
 am__untar = @am__untar@
 am__xargs_n = @am__xargs_n@
 bindir = @bindir@
+bindir_c = @bindir_c@
+bindir_c_make = @bindir_c_make@
 build = @build@
 build_alias = @build_alias@
 build_cpu = @build_cpu@
@@ -3187,10 +3335,20 @@ build_os = @build_os@
 build_vendor = @build_vendor@
 builddir = @builddir@
 datadir = @datadir@
+datadir_c = @datadir_c@
+datadir_c_make = @datadir_c_make@
 datarootdir = @datarootdir@
+datarootdir_c = @datarootdir_c@
+datarootdir_c_make = @datarootdir_c_make@
 docdir = @docdir@
+docdir_c = @docdir_c@
+docdir_c_make = @docdir_c_make@
 dvidir = @dvidir@
+dvidir_c = @dvidir_c@
+dvidir_c_make = @dvidir_c_make@
 exec_prefix = @exec_prefix@
+exec_prefix_c = @exec_prefix_c@
+exec_prefix_c_make = @exec_prefix_c_make@
 gl_LIBOBJDEPS = @gl_LIBOBJDEPS@
 gl_LIBOBJS = @gl_LIBOBJS@
 gl_LTLIBOBJS = @gl_LTLIBOBJS@
@@ -3204,26 +3362,68 @@ host_cpu = @host_cpu@
 host_os = @host_os@
 host_vendor = @host_vendor@
 htmldir = @htmldir@
+htmldir_c = @htmldir_c@
+htmldir_c_make = @htmldir_c_make@
 includedir = @includedir@
+includedir_c = @includedir_c@
+includedir_c_make = @includedir_c_make@
 infodir = @infodir@
+infodir_c = @infodir_c@
+infodir_c_make = @infodir_c_make@
 install_sh = @install_sh@
 libdir = @libdir@
+libdir_c = @libdir_c@
+libdir_c_make = @libdir_c_make@
 libexecdir = @libexecdir@
+libexecdir_c = @libexecdir_c@
+libexecdir_c_make = @libexecdir_c_make@
 lispdir = @lispdir@
+lispdir_c = @lispdir_c@
+lispdir_c_make = @lispdir_c_make@
 localedir = @localedir@
+localedir_c = @localedir_c@
+localedir_c_make = @localedir_c_make@
 localstatedir = @localstatedir@
+localstatedir_c = @localstatedir_c@
+localstatedir_c_make = @localstatedir_c_make@
 mandir = @mandir@
+mandir_c = @mandir_c@
+mandir_c_make = @mandir_c_make@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+oldincludedir_c = @oldincludedir_c@
+oldincludedir_c_make = @oldincludedir_c_make@
 pdfdir = @pdfdir@
+pdfdir_c = @pdfdir_c@
+pdfdir_c_make = @pdfdir_c_make@
+pkgdatadir_c = @pkgdatadir_c@
+pkgdatadir_c_make = @pkgdatadir_c_make@
+pkgincludedir_c = @pkgincludedir_c@
+pkgincludedir_c_make = @pkgincludedir_c_make@
+pkglibdir_c = @pkglibdir_c@
+pkglibdir_c_make = @pkglibdir_c_make@
+pkglibexecdir_c = @pkglibexecdir_c@
+pkglibexecdir_c_make = @pkglibexecdir_c_make@
 prefix = @prefix@
+prefix_c = @prefix_c@
+prefix_c_make = @prefix_c_make@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+psdir_c = @psdir_c@
+psdir_c_make = @psdir_c_make@
 runstatedir = @runstatedir@
+runstatedir_c = @runstatedir_c@
+runstatedir_c_make = @runstatedir_c_make@
 sbindir = @sbindir@
+sbindir_c = @sbindir_c@
+sbindir_c_make = @sbindir_c_make@
 sharedstatedir = @sharedstatedir@
+sharedstatedir_c = @sharedstatedir_c@
+sharedstatedir_c_make = @sharedstatedir_c_make@
 srcdir = @srcdir@
 sysconfdir = @sysconfdir@
+sysconfdir_c = @sysconfdir_c@
+sysconfdir_c_make = @sysconfdir_c_make@
 target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
@@ -3238,6 +3438,8 @@ TESTS_ENVIRONMENT = EXEEXT='@EXEEXT@' srcdir='$(srcdir)' \
 	LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' LOCALE_JA='@LOCALE_JA@' \
 	LOCALE_ZH_CN='@LOCALE_ZH_CN@' LOCALE_FR='@LOCALE_FR@' \
 	LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' LOCALE_JA='@LOCALE_JA@' \
+	LOCALE_ZH_CN='@LOCALE_ZH_CN@' LOCALE_FR='@LOCALE_FR@' \
+	LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' LOCALE_JA='@LOCALE_JA@' \
 	LOCALE_ZH_CN='@LOCALE_ZH_CN@' \
 	LOCALE_TR_UTF8='@LOCALE_TR_UTF8@' \
 	LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' LOCALE_FR='@LOCALE_FR@' \
@@ -3247,6 +3449,8 @@ TESTS_ENVIRONMENT = EXEEXT='@EXEEXT@' srcdir='$(srcdir)' \
 	LOCALE_ZH_CN='@LOCALE_ZH_CN@' LOCALE_FR='@LOCALE_FR@' \
 	LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' LOCALE_FR='@LOCALE_FR@' \
 	LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' LOCALE_JA='@LOCALE_JA@' \
+	LOCALE_ZH_CN='@LOCALE_ZH_CN@' \
+	LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \
 	LOCALE_ZH_CN='@LOCALE_ZH_CN@' abs_aux_dir='$(abs_aux_dir)' \
 	MAKE='$(MAKE)' LOCALE_FR='@LOCALE_FR@' \
 	LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' LOCALE_JA='@LOCALE_JA@' \
@@ -3255,72 +3459,82 @@ noinst_HEADERS =
 noinst_LIBRARIES = 
 check_LIBRARIES = libtests.a
 EXTRA_DIST = w32sock.h test-accept.c signature.h macros.h \
-	test-alignof.c alloca.c test-alloca-opt.c test-argmatch.c \
-	macros.h arpa_inet.in.h test-arpa_inet.c test-binary-io.sh \
+	test-alignasof.c macros.h test-alignof.c alloca.c \
+	test-alloca-opt.c test-argmatch.c macros.h arpa_inet.in.h \
+	test-arpa_inet.c test-assert.c test-binary-io.sh \
 	test-binary-io.c macros.h w32sock.h test-bind.c signature.h \
 	macros.h test-bitrotate.c macros.h test-btowc1.sh \
-	test-btowc2.sh test-btowc.c signature.h macros.h \
-	test-c-ctype.c macros.h test-c-stack.c test-c-stack.sh \
-	test-c-stack2.sh macros.h test-c-strcase.sh \
+	test-btowc2.sh test-btowc3.sh test-btowc.c signature.h \
+	macros.h test-c-ctype.c macros.h test-c-stack.c \
+	test-c-stack.sh test-c-stack2.sh macros.h test-c-strcase.sh \
 	test-c-strcasecmp.c test-c-strncasecmp.c macros.h \
-	test-calloc-gnu.c macros.h test-chdir.c signature.h macros.h \
-	test-cloexec.c macros.h test-close.c signature.h macros.h \
-	w32sock.h test-connect.c signature.h macros.h test-ctype.c \
+	str-two-way.h test-c-strcasestr.c macros.h test-calloc-gnu.c \
+	macros.h test-chdir.c signature.h macros.h test-cloexec.c \
+	macros.h test-close.c signature.h macros.h w32sock.h \
+	test-connect.c signature.h macros.h test-ctype.c \
 	test-dfa-match.sh test-dfa-match-aux.c \
 	test-dfa-invalid-char-class.sh test-dfa-invalid-merge.sh \
 	test-dirent.c test-dup.c signature.h macros.h test-dup2.c \
-	signature.h macros.h test-dynarray.c macros.h test-environ.c \
-	test-errno.c test-exclude.c test-exclude1.sh test-exclude2.sh \
-	test-exclude3.sh test-exclude4.sh test-exclude5.sh \
-	test-exclude6.sh test-exclude7.sh test-exclude8.sh \
-	test-fchdir.c signature.h macros.h test-fcntl-h.c test-open.h \
-	test-fcntl-safer.c macros.h test-fcntl.c signature.h macros.h \
-	test-fdopen.c signature.h macros.h test-fdopendir.c \
-	signature.h macros.h test-fgetc.c signature.h macros.h \
-	float.in.h test-float.c macros.h test-fnmatch-h.c \
-	test-fnmatch.c signature.h macros.h test-fopen-gnu.c macros.h \
-	test-fopen.h test-fopen.c signature.h macros.h test-fpending.c \
-	test-fpending.sh macros.h fpucw.h test-fputc.c signature.h \
-	macros.h test-fread.c signature.h macros.h test-free.c \
-	macros.h test-fstat.c signature.h macros.h test-fstatat.c \
-	test-lstat.h test-stat.h signature.h macros.h test-ftruncate.c \
-	test-ftruncate.sh signature.h macros.h test-fwrite.c \
-	signature.h macros.h test-getcwd-lgpl.c signature.h macros.h \
-	test-getdtablesize.c signature.h macros.h macros.h signature.h \
-	test-getopt-gnu.c test-getopt-main.h test-getopt.h \
-	test-getopt_long.h macros.h signature.h test-getopt-posix.c \
-	test-getopt-main.h test-getopt.h test-getprogname.c \
-	signature.h test-gettimeofday.c test-hard-locale.c locale.c \
-	test-hash.c macros.h test-i-ring.c macros.h test-iconv-h.c \
-	test-iconv.c signature.h macros.h test-ignore-value.c \
-	test-inet_pton.c signature.h macros.h test-intprops.c macros.h \
-	anytostr.c inttostr.h macros.h test-inttostr.c test-inttypes.c \
-	w32sock.h test-ioctl.c signature.h macros.h test-isatty.c \
-	signature.h macros.h test-isblank.c signature.h macros.h \
-	test-iswblank.c macros.h test-iswdigit.sh test-iswdigit.c \
-	signature.h macros.h test-iswxdigit.sh test-iswxdigit.c \
-	signature.h macros.h test-langinfo.c test-limits-h.c w32sock.h \
+	signature.h macros.h test-environ.c test-errno.c test-error.sh \
+	test-error.c macros.h test-exclude.c test-exclude1.sh \
+	test-exclude2.sh test-exclude3.sh test-exclude4.sh \
+	test-exclude5.sh test-exclude6.sh test-exclude7.sh \
+	test-exclude8.sh test-fchdir.c signature.h macros.h \
+	test-fcntl-h.c test-open.h test-fcntl-safer.c macros.h \
+	test-fcntl.c signature.h macros.h test-fdopen.c signature.h \
+	macros.h test-fdopendir.c signature.h macros.h test-fgetc.c \
+	signature.h macros.h float.in.h test-float.c macros.h \
+	test-fnmatch-h.c test-fnmatch.c signature.h macros.h \
+	test-fopen-gnu.c macros.h test-fopen.h test-fopen.c \
+	signature.h macros.h test-fpending.c test-fpending.sh macros.h \
+	fpucw.h test-fputc.c signature.h macros.h test-fread.c \
+	signature.h macros.h test-free.c macros.h test-fstat.c \
+	signature.h macros.h test-fstatat.c test-lstat.h test-stat.h \
+	signature.h macros.h test-ftruncate.c test-ftruncate.sh \
+	signature.h macros.h test-fwrite.c signature.h macros.h \
+	test-getcwd-lgpl.c signature.h macros.h test-getdtablesize.c \
+	signature.h macros.h macros.h signature.h test-getopt-gnu.c \
+	test-getopt-main.h test-getopt.h test-getopt_long.h macros.h \
+	signature.h test-getopt-posix.c test-getopt-main.h \
+	test-getopt.h test-getprogname.c test-gettimeofday.c \
+	signature.h macros.h test-dynarray.c macros.h \
+	test-hard-locale.c locale.c test-hash.c macros.h test-i-ring.c \
+	macros.h test-iconv-h.c test-iconv.c signature.h macros.h \
+	test-ignore-value.c test-inet_pton.c signature.h macros.h \
+	test-intprops.c macros.h anytostr.c inttostr.h macros.h \
+	test-inttostr.c test-inttypes.c w32sock.h test-ioctl.c \
+	signature.h macros.h test-isatty.c signature.h macros.h \
+	test-isblank.c signature.h macros.h test-iswblank.c macros.h \
+	test-iswdigit.sh test-iswdigit.c signature.h macros.h \
+	test-iswxdigit.sh test-iswxdigit.c signature.h macros.h \
+	test-langinfo.c test-largefile.c test-limits-h.c w32sock.h \
 	test-listen.c signature.h macros.h test-localcharset.c \
 	test-locale.c test-localeconv.c signature.h macros.h \
 	localename-table.h localename.h test-localename.c macros.h \
 	test-lseek.c test-lseek.sh signature.h macros.h test-lstat.h \
 	test-lstat.c signature.h macros.h test-malloc-gnu.c macros.h \
-	test-malloca.c test-mbscasecmp.sh test-mbscasecmp.c macros.h \
-	test-mbsinit.sh test-mbsinit.c signature.h macros.h \
-	test-mbsrtowcs1.sh test-mbsrtowcs2.sh test-mbsrtowcs3.sh \
-	test-mbsrtowcs4.sh test-mbsrtowcs.c signature.h macros.h \
+	test-malloca.c test-mbrlen1.sh test-mbrlen2.sh test-mbrlen3.sh \
+	test-mbrlen4.sh test-mbrlen5.sh test-mbrlen.c \
+	test-mbrlen-w32-1.sh test-mbrlen-w32-2.sh test-mbrlen-w32-3.sh \
+	test-mbrlen-w32-4.sh test-mbrlen-w32-5.sh test-mbrlen-w32-6.sh \
+	test-mbrlen-w32-7.sh test-mbrlen-w32.c signature.h macros.h \
+	test-mbscasecmp.sh test-mbscasecmp.c macros.h test-mbsinit.sh \
+	test-mbsinit.c signature.h macros.h test-mbsrtowcs1.sh \
+	test-mbsrtowcs2.sh test-mbsrtowcs3.sh test-mbsrtowcs4.sh \
+	test-mbsrtowcs5.sh test-mbsrtowcs.c signature.h macros.h \
 	test-mbsstr1.c test-mbsstr2.sh test-mbsstr2.c test-mbsstr3.sh \
 	test-mbsstr3.c macros.h test-memchr.c zerosize-ptr.h \
 	signature.h macros.h test-memchr2.c zerosize-ptr.h macros.h \
 	test-memrchr.c zerosize-ptr.h signature.h macros.h \
 	test-nanosleep.c signature.h macros.h netinet_in.in.h \
-	test-netinet_in.c test-nl_langinfo.sh test-nl_langinfo.c \
-	test-nl_langinfo-mt.c signature.h macros.h test-open.h \
-	test-open.c signature.h macros.h test-openat-safer.c macros.h \
-	test-openat.c test-open.h signature.h macros.h test-pathmax.c \
-	macros.h signature.h test-perror.c test-perror2.c \
-	test-perror.sh test-pipe.c signature.h macros.h test-pselect.c \
-	test-select.h macros.h signature.h pthread.in.h test-pthread.c \
+	test-netinet_in.c test-nl_langinfo1.sh test-nl_langinfo2.sh \
+	test-nl_langinfo1.c test-nl_langinfo2.c test-nl_langinfo-mt.c \
+	signature.h macros.h test-open.h test-open.c signature.h \
+	macros.h test-openat-safer.c macros.h test-openat.c \
+	test-open.h signature.h macros.h test-pathmax.c macros.h \
+	signature.h test-perror.c test-perror2.c test-perror.sh \
+	test-pipe.c signature.h macros.h test-pselect.c test-select.h \
+	macros.h signature.h pthread.in.h test-pthread.c \
 	test-pthread-thread.c macros.h test-pthread_sigmask1.c \
 	test-pthread_sigmask2.c signature.h macros.h \
 	test-quotearg-simple.c test-quotearg.h macros.h zerosize-ptr.h \
@@ -3343,23 +3557,25 @@ EXTRA_DIST = w32sock.h test-accept.c signature.h macros.h \
 	arg-nonnull.h c++defs.h warn-on-use.h snprintf.c \
 	test-snprintf.c signature.h macros.h w32sock.h w32sock.h \
 	test-sockets.c test-stat.h test-stat.c signature.h macros.h \
-	test-stat-time.c macros.h nap.h test-stdalign.c macros.h \
-	test-stdbool.c test-stddef.c test-stdint.c test-stdio.c \
-	test-stdlib.c test-sys_wait.h test-strerror.c signature.h \
-	macros.h strerror_r.c test-strerror_r.c signature.h macros.h \
-	test-striconv.c macros.h test-string.c test-strnlen.c \
-	zerosize-ptr.h signature.h macros.h test-strstr.c \
-	zerosize-ptr.h signature.h macros.h test-strtoimax.c \
-	signature.h macros.h test-strtoll.c signature.h macros.h \
-	test-strtoull.c signature.h macros.h test-strtoumax.c \
-	signature.h macros.h test-symlink.h test-symlink.c signature.h \
-	macros.h sys_ioctl.in.h test-sys_ioctl.c sys_select.in.h \
-	test-sys_select.c signature.h sys_socket.in.h \
-	test-sys_socket.c test-sys_stat.c sys_time.in.h \
-	test-sys_time.c test-sys_types.c sys_uio.in.h test-sys_uio.c \
-	init.sh test-init.sh thread-optim.h test-thread_self.c \
-	test-thread_create.c macros.h test-time.c test-dup-safer.c \
-	macros.h test-unistd.c unistr/test-u8-mbtoucr.c macros.h \
+	test-stat-time.c macros.h nap.h test-stdbool.c macros.h \
+	test-intprops.c test-stdckdint.c test-stddef.c test-stdint.c \
+	test-stdio.c nan.h macros.h test-stdlib.c test-sys_wait.h \
+	test-strerror.c signature.h macros.h strerror_r.c \
+	test-strerror_r.c signature.h macros.h test-striconv.c \
+	macros.h test-string.c test-strnlen.c zerosize-ptr.h \
+	signature.h macros.h test-strstr.c zerosize-ptr.h signature.h \
+	macros.h test-strtoimax.c signature.h macros.h test-strtoll.c \
+	signature.h macros.h test-strtoull.c signature.h macros.h \
+	test-strtoumax.c signature.h macros.h test-symlink.h \
+	test-symlink.c signature.h macros.h sys_ioctl.in.h \
+	test-sys_ioctl.c sys_select.in.h test-sys_select.c signature.h \
+	sys_socket.in.h test-sys_socket.c test-sys_stat.c \
+	sys_time.in.h test-sys_time.c test-sys_types.c sys_uio.in.h \
+	test-sys_uio.c init.sh test-init.sh thread-optim.h \
+	test-thread_self.c test-thread_create.c macros.h test-time-h.c \
+	test-time.c signature.h macros.h test-trim1.sh test-trim2.sh \
+	test-trim3.sh test-trim.c macros.h test-dup-safer.c macros.h \
+	test-unistd.c unistr/test-u8-mbtoucr.c macros.h \
 	unistr/test-u8-uctomb.c macros.h uniwidth/test-uc_width.c \
 	uniwidth/test-uc_width2.c uniwidth/test-uc_width2.sh macros.h \
 	test-unsetenv.c signature.h macros.h asnprintf.c float+.h \
@@ -3376,7 +3592,7 @@ EXTRA_DIST = w32sock.h test-accept.c signature.h macros.h \
 	signature.h macros.h windows-thread.h windows-tls.h \
 	test-xalloc-die.c test-xalloc-die.sh test-xstrtoimax.c \
 	test-xstrtoimax.sh xstrtol-error.h test-xstrtol.c \
-	test-xstrtoul.c test-xstrtol.sh
+	test-xstrtoul.c test-xstrtol.sh test-year2038.c
 BUILT_SOURCES = arpa/inet.h $(FLOAT_H) $(NETINET_IN_H) pthread.h \
 	sched.h sys/ioctl.h sys/select.h sys/socket.h sys/time.h \
 	sys/uio.h
@@ -3403,38 +3619,40 @@ AM_CPPFLAGS = \
   -I../lib -I$(srcdir)/../lib
 
 LDADD = libtests.a ../lib/libgreputils.a libtests.a ../lib/libgreputils.a libtests.a $(LIBTESTS_LIBDEPS)
-libtests_a_SOURCES = $(am__append_1) $(am__append_2) $(am__append_3) \
-	$(am__append_4) $(am__append_5) $(am__append_6) \
-	$(am__append_7) $(am__append_8) hash-pjw.h hash-pjw.c \
-	$(am__append_9) imaxtostr.c inttostr.c offtostr.c uinttostr.c \
-	umaxtostr.c $(am__append_10) $(am__append_11) localename.c \
-	localename-table.c $(am__append_12) $(am__append_13) \
-	$(am__append_14) $(am__append_15) $(am__append_16) \
-	$(am__append_17) $(am__append_18) $(am__append_19) \
-	$(am__append_20) $(am__append_21) $(am__append_22) size_max.h \
-	$(am__append_23) $(am__append_24) sockets.h sockets.c \
-	$(am__append_25) sys_socket.c glthread/thread.h \
-	glthread/thread.c $(am__append_26) $(am__append_27) \
-	$(am__append_28) xsize.h xsize.c xstrtol-error.c
+libtests_a_SOURCES = $(am__append_1) $(am__append_2) c-strcasestr.h \
+	c-strcasestr.c $(am__append_3) $(am__append_4) $(am__append_5) \
+	$(am__append_6) $(am__append_7) $(am__append_8) hash-pjw.h \
+	hash-pjw.c $(am__append_9) imaxtostr.c inttostr.c offtostr.c \
+	uinttostr.c umaxtostr.c $(am__append_10) $(am__append_11) \
+	localename.c localename-table.c $(am__append_12) \
+	$(am__append_13) $(am__append_14) $(am__append_15) \
+	$(am__append_16) $(am__append_17) $(am__append_18) \
+	$(am__append_19) $(am__append_20) $(am__append_21) \
+	$(am__append_22) size_max.h $(am__append_23) $(am__append_24) \
+	sockets.h sockets.c $(am__append_25) sys_socket.c \
+	glthread/thread.h glthread/thread.c $(am__append_26) \
+	$(am__append_27) $(am__append_28) $(am__append_29) xsize.h \
+	xsize.c xstrtol-error.c
 libtests_a_LIBADD = $(gltests_LIBOBJS) @ALLOCA@
 libtests_a_DEPENDENCIES = $(gltests_LIBOBJS) @ALLOCA@
 EXTRA_libtests_a_SOURCES = alloca.c anytostr.c snprintf.c strerror_r.c \
 	asnprintf.c printf-args.c printf-parse.c vasnprintf.c
 AM_LIBTOOLFLAGS = --preserve-dup-deps
 test_accept_LDADD = $(LDADD) @LIBSOCKET@
-test_argmatch_LDADD = $(LDADD) @LIBINTL@ $(LIB_MBRTOWC)
+test_argmatch_LDADD = $(LDADD) @LIBINTL@ $(MBRTOWC_LIB)
 test_bind_LDADD = $(LDADD) @LIBSOCKET@ $(INET_PTON_LIB)
-test_btowc_LDADD = $(LDADD) $(LIB_SETLOCALE)
-test_c_ctype_LDADD = $(LDADD) $(LIB_SETLOCALE)
+test_btowc_LDADD = $(LDADD) $(SETLOCALE_LIB)
+test_c_ctype_LDADD = $(LDADD) $(SETLOCALE_LIB)
 test_c_stack_LDADD = $(LDADD) $(LIBCSTACK) @LIBINTL@
-test_c_strcasecmp_LDADD = $(LDADD) $(LIB_SETLOCALE)
-test_c_strncasecmp_LDADD = $(LDADD) $(LIB_SETLOCALE)
+test_c_strcasecmp_LDADD = $(LDADD) $(SETLOCALE_LIB)
+test_c_strncasecmp_LDADD = $(LDADD) $(SETLOCALE_LIB)
 test_connect_LDADD = $(LDADD) @LIBSOCKET@ $(INET_PTON_LIB)
-test_dfa_match_aux_LDADD = $(LDADD) $(LIB_SETLOCALE) @LIBINTL@ $(LIB_MBRTOWC)
-test_exclude_LDADD = $(LDADD) $(LIBUNISTRING) @LIBINTL@ $(LIB_MBRTOWC) $(LIBTHREAD)
+test_dfa_match_aux_LDADD = $(LDADD) $(SETLOCALE_LIB) @LIBINTL@ $(MBRTOWC_LIB)
+test_error_LDADD = $(LDADD) $(LIBINTL)
+test_exclude_LDADD = $(LDADD) $(LIBUNISTRING) @LIBINTL@ $(MBRTOWC_LIB) $(LIBTHREAD)
 test_fchdir_LDADD = $(LDADD) $(LIBINTL)
 test_fdopendir_LDADD = $(LDADD) @LIBINTL@
-test_fnmatch_LDADD = $(LDADD) $(LIB_MBRTOWC)
+test_fnmatch_LDADD = $(LDADD) $(MBRTOWC_LIB)
 test_fstatat_LDADD = $(LDADD) @LIBINTL@
 
 # In 'sed', replace the pattern space with a "DO NOT EDIT" comment.
@@ -3459,40 +3677,42 @@ GPERF = gperf
 V_GPERF = $(V_GPERF_@AM_V@)
 V_GPERF_ = $(V_GPERF_@AM_DEFAULT_V@)
 V_GPERF_0 = @echo "  GPERF   " $@;
-test_hard_locale_LDADD = $(LDADD) $(LIB_SETLOCALE) @LIB_HARD_LOCALE@
+test_hard_locale_LDADD = $(LDADD) $(SETLOCALE_LIB) @HARD_LOCALE_LIB@
 current_locale_SOURCES = locale.c
 test_iconv_LDADD = $(LDADD) @LIBICONV@
 test_inet_pton_LDADD = $(LDADD) @INET_PTON_LIB@
-test_iswdigit_LDADD = $(LDADD) $(LIB_SETLOCALE) $(LIB_MBRTOWC)
-test_iswxdigit_LDADD = $(LDADD) $(LIB_SETLOCALE) $(LIB_MBRTOWC)
+test_iswdigit_LDADD = $(LDADD) $(SETLOCALE_LIB) $(MBRTOWC_LIB)
+test_iswxdigit_LDADD = $(LDADD) $(SETLOCALE_LIB) $(MBRTOWC_LIB)
 test_listen_LDADD = $(LDADD) @LIBSOCKET@
-test_localcharset_LDADD = $(LDADD) $(LIB_SETLOCALE)
-test_localename_LDADD = $(LDADD) $(LIB_SETLOCALE) @INTL_MACOSX_LIBS@ $(LIBTHREAD)
-test_mbscasecmp_LDADD = $(LDADD) $(LIBUNISTRING) $(LIB_SETLOCALE) $(LIB_MBRTOWC)
-test_mbsinit_LDADD = $(LDADD) $(LIB_SETLOCALE) $(LIB_MBRTOWC)
-test_mbsrtowcs_LDADD = $(LDADD) $(LIB_SETLOCALE) $(LIB_MBRTOWC)
-test_mbsstr1_LDADD = $(LDADD) $(LIBUNISTRING) $(LIB_MBRTOWC)
-test_mbsstr2_LDADD = $(LDADD) $(LIBUNISTRING) $(LIB_SETLOCALE) $(LIB_MBRTOWC)
-test_mbsstr3_LDADD = $(LDADD) $(LIBUNISTRING) $(LIB_SETLOCALE) $(LIB_MBRTOWC)
-test_nanosleep_LDADD = $(LDADD) $(LIB_NANOSLEEP)
-test_nl_langinfo_LDADD = $(LDADD) $(LIB_SETLOCALE)
-test_nl_langinfo_mt_LDADD = $(LDADD) $(LIB_SETLOCALE) $(LIBMULTITHREAD) $(LIB_NANOSLEEP)
+test_localcharset_LDADD = $(LDADD) $(SETLOCALE_LIB)
+test_localename_LDADD = $(LDADD) $(SETLOCALE_LIB) @INTL_MACOSX_LIBS@ $(LIBTHREAD)
+test_mbrlen_LDADD = $(LDADD) $(SETLOCALE_LIB) $(MBRTOWC_LIB)
+test_mbscasecmp_LDADD = $(LDADD) $(LIBUNISTRING) $(SETLOCALE_LIB) $(MBRTOWC_LIB)
+test_mbsinit_LDADD = $(LDADD) $(SETLOCALE_LIB) $(MBRTOWC_LIB)
+test_mbsrtowcs_LDADD = $(LDADD) $(SETLOCALE_LIB) $(MBRTOWC_LIB)
+test_mbsstr1_LDADD = $(LDADD) $(LIBUNISTRING) $(MBRTOWC_LIB)
+test_mbsstr2_LDADD = $(LDADD) $(LIBUNISTRING) $(SETLOCALE_LIB) $(MBRTOWC_LIB)
+test_mbsstr3_LDADD = $(LDADD) $(LIBUNISTRING) $(SETLOCALE_LIB) $(MBRTOWC_LIB)
+test_nanosleep_LDADD = $(LDADD) $(NANOSLEEP_LIB)
+test_nl_langinfo1_LDADD = $(LDADD) $(SETLOCALE_LIB)
+test_nl_langinfo2_LDADD = $(LDADD) $(SETLOCALE_LIB)
+test_nl_langinfo_mt_LDADD = $(LDADD) $(SETLOCALE_LIB) $(LIBMULTITHREAD) $(NANOSLEEP_LIB)
 test_openat_safer_LDADD = $(LDADD) @LIBINTL@
 test_openat_LDADD = $(LDADD) @LIBINTL@
-test_pselect_LDADD = $(LDADD) @LIB_SELECT@ @LIBSOCKET@ @LIB_PTHREAD_SIGMASK@ $(INET_PTON_LIB)
+test_pselect_LDADD = $(LDADD) @SELECT_LIB@ @LIBSOCKET@ @PTHREAD_SIGMASK_LIB@ $(INET_PTON_LIB)
 test_pthread_thread_LDADD = $(LDADD) @LIBPMULTITHREAD@
-test_pthread_sigmask1_LDADD = $(LDADD) @LIB_PTHREAD_SIGMASK@
-test_pthread_sigmask2_LDADD = $(LDADD) @LIB_PTHREAD_SIGMASK@ @LIBMULTITHREAD@
-test_quotearg_simple_LDADD = $(LDADD) @LIBINTL@ $(LIB_MBRTOWC)
-test_regex_LDADD = $(LDADD) $(LIB_SETLOCALE) $(LIB_MBRTOWC) @LIBINTL@ $(LIBTHREAD)
-test_select_LDADD = $(LDADD) @LIB_SELECT@ @LIBSOCKET@ $(INET_PTON_LIB)
-test_select_fd_LDADD = $(LDADD) @LIB_SELECT@
-test_select_stdin_LDADD = $(LDADD) @LIB_SELECT@
-test_setlocale_null_LDADD = $(LDADD) @LIB_SETLOCALE_NULL@
-test_setlocale_null_mt_one_LDADD = $(LDADD) @LIB_SETLOCALE_NULL@ $(LIBMULTITHREAD) $(LIB_NANOSLEEP)
-test_setlocale_null_mt_all_LDADD = $(LDADD) @LIB_SETLOCALE_NULL@ $(LIBMULTITHREAD) $(LIB_NANOSLEEP)
-test_setlocale1_LDADD = $(LDADD) @LIB_SETLOCALE@
-test_setlocale2_LDADD = $(LDADD) @LIB_SETLOCALE@
+test_pthread_sigmask1_LDADD = $(LDADD) @PTHREAD_SIGMASK_LIB@
+test_pthread_sigmask2_LDADD = $(LDADD) @PTHREAD_SIGMASK_LIB@ @LIBMULTITHREAD@
+test_quotearg_simple_LDADD = $(LDADD) @LIBINTL@ $(MBRTOWC_LIB)
+test_regex_LDADD = $(LDADD) $(SETLOCALE_LIB) $(MBRTOWC_LIB) @LIBINTL@ $(LIBTHREAD)
+test_select_LDADD = $(LDADD) @SELECT_LIB@ @LIBSOCKET@ $(INET_PTON_LIB)
+test_select_fd_LDADD = $(LDADD) @SELECT_LIB@
+test_select_stdin_LDADD = $(LDADD) @SELECT_LIB@
+test_setlocale_null_LDADD = $(LDADD) @SETLOCALE_NULL_LIB@
+test_setlocale_null_mt_one_LDADD = $(LDADD) @SETLOCALE_NULL_LIB@ $(LIBMULTITHREAD) $(NANOSLEEP_LIB)
+test_setlocale_null_mt_all_LDADD = $(LDADD) @SETLOCALE_NULL_LIB@ $(LIBMULTITHREAD) $(NANOSLEEP_LIB)
+test_setlocale1_LDADD = $(LDADD) @SETLOCALE_LIB@
+test_setlocale2_LDADD = $(LDADD) @SETLOCALE_LIB@
 test_setsockopt_LDADD = $(LDADD) @LIBSOCKET@
 test_sigsegv_catch_segv1_LDADD = $(LDADD) $(LIBSIGSEGV)
 test_sigsegv_catch_segv2_LDADD = $(LDADD) $(LIBSIGSEGV)
@@ -3520,10 +3740,11 @@ CXXDEFS_H = $(srcdir)/c++defs.h
 WARN_ON_USE_H = $(srcdir)/warn-on-use.h
 test_sockets_LDADD = $(LDADD) @LIBSOCKET@
 test_stat_LDADD = $(LDADD) $(LIBINTL)
-test_stat_time_LDADD = $(LDADD) $(LIB_NANOSLEEP)
+test_stat_time_LDADD = $(LDADD) $(NANOSLEEP_LIB)
 test_striconv_LDADD = $(LDADD) @LIBICONV@
 test_thread_self_LDADD = $(LDADD) @LIBTHREAD@
 test_thread_create_LDADD = $(LDADD) @LIBMULTITHREAD@
+test_trim_LDADD = $(LDADD) $(LIBUNISTRING) @LIBINTL@ $(MBRTOWC_LIB)
 test_u8_mbtoucr_SOURCES = unistr/test-u8-mbtoucr.c
 test_u8_mbtoucr_LDADD = $(LDADD) $(LIBUNISTRING)
 test_u8_uctomb_SOURCES = unistr/test-u8-uctomb.c
@@ -3533,8 +3754,8 @@ test_uc_width_LDADD = $(LDADD) $(LIBUNISTRING)
 test_uc_width2_SOURCES = uniwidth/test-uc_width2.c
 test_uc_width2_LDADD = $(LDADD) $(LIBUNISTRING)
 test_version_etc_LDADD = $(LDADD) @LIBINTL@
-test_wcrtomb_LDADD = $(LDADD) $(LIB_SETLOCALE)
-test_wcwidth_LDADD = $(LDADD) $(LIB_SETLOCALE) $(LIBUNISTRING)
+test_wcrtomb_LDADD = $(LDADD) $(SETLOCALE_LIB)
+test_wcwidth_LDADD = $(LDADD) $(SETLOCALE_LIB) $(LIBUNISTRING)
 test_xalloc_die_LDADD = $(LDADD) @LIBINTL@
 test_xstrtoimax_LDADD = $(LDADD) @LIBINTL@
 test_xstrtol_LDADD = $(LDADD) @LIBINTL@
@@ -3588,10 +3809,10 @@ clean-noinstLIBRARIES:
 	-$(am__rm_f) $(noinst_LIBRARIES)
 glthread/$(am__dirstamp):
 	@$(MKDIR_P) glthread
-	@: > glthread/$(am__dirstamp)
+	@: >>glthread/$(am__dirstamp)
 glthread/$(DEPDIR)/$(am__dirstamp):
 	@$(MKDIR_P) glthread/$(DEPDIR)
-	@: > glthread/$(DEPDIR)/$(am__dirstamp)
+	@: >>glthread/$(DEPDIR)/$(am__dirstamp)
 glthread/thread.$(OBJEXT): glthread/$(am__dirstamp) \
 	glthread/$(DEPDIR)/$(am__dirstamp)
 
@@ -3608,6 +3829,10 @@ test-accept$(EXEEXT): $(test_accept_OBJECTS) $(test_accept_DEPENDENCIES) $(EXTRA
 	@rm -f test-accept$(EXEEXT)
 	$(AM_V_CCLD)$(LINK) $(test_accept_OBJECTS) $(test_accept_LDADD) $(LIBS)
 
+test-alignasof$(EXEEXT): $(test_alignasof_OBJECTS) $(test_alignasof_DEPENDENCIES) $(EXTRA_test_alignasof_DEPENDENCIES) 
+	@rm -f test-alignasof$(EXEEXT)
+	$(AM_V_CCLD)$(LINK) $(test_alignasof_OBJECTS) $(test_alignasof_LDADD) $(LIBS)
+
 test-alignof$(EXEEXT): $(test_alignof_OBJECTS) $(test_alignof_DEPENDENCIES) $(EXTRA_test_alignof_DEPENDENCIES) 
 	@rm -f test-alignof$(EXEEXT)
 	$(AM_V_CCLD)$(LINK) $(test_alignof_OBJECTS) $(test_alignof_LDADD) $(LIBS)
@@ -3624,6 +3849,10 @@ test-arpa_inet$(EXEEXT): $(test_arpa_inet_OBJECTS) $(test_arpa_inet_DEPENDENCIES
 	@rm -f test-arpa_inet$(EXEEXT)
 	$(AM_V_CCLD)$(LINK) $(test_arpa_inet_OBJECTS) $(test_arpa_inet_LDADD) $(LIBS)
 
+test-assert$(EXEEXT): $(test_assert_OBJECTS) $(test_assert_DEPENDENCIES) $(EXTRA_test_assert_DEPENDENCIES) 
+	@rm -f test-assert$(EXEEXT)
+	$(AM_V_CCLD)$(LINK) $(test_assert_OBJECTS) $(test_assert_LDADD) $(LIBS)
+
 test-binary-io$(EXEEXT): $(test_binary_io_OBJECTS) $(test_binary_io_DEPENDENCIES) $(EXTRA_test_binary_io_DEPENDENCIES) 
 	@rm -f test-binary-io$(EXEEXT)
 	$(AM_V_CCLD)$(LINK) $(test_binary_io_OBJECTS) $(test_binary_io_LDADD) $(LIBS)
@@ -3652,6 +3881,10 @@ test-c-strcasecmp$(EXEEXT): $(test_c_strcasecmp_OBJECTS) $(test_c_strcasecmp_DEP
 	@rm -f test-c-strcasecmp$(EXEEXT)
 	$(AM_V_CCLD)$(LINK) $(test_c_strcasecmp_OBJECTS) $(test_c_strcasecmp_LDADD) $(LIBS)
 
+test-c-strcasestr$(EXEEXT): $(test_c_strcasestr_OBJECTS) $(test_c_strcasestr_DEPENDENCIES) $(EXTRA_test_c_strcasestr_DEPENDENCIES) 
+	@rm -f test-c-strcasestr$(EXEEXT)
+	$(AM_V_CCLD)$(LINK) $(test_c_strcasestr_OBJECTS) $(test_c_strcasestr_LDADD) $(LIBS)
+
 test-c-strncasecmp$(EXEEXT): $(test_c_strncasecmp_OBJECTS) $(test_c_strncasecmp_DEPENDENCIES) $(EXTRA_test_c_strncasecmp_DEPENDENCIES) 
 	@rm -f test-c-strncasecmp$(EXEEXT)
 	$(AM_V_CCLD)$(LINK) $(test_c_strncasecmp_OBJECTS) $(test_c_strncasecmp_LDADD) $(LIBS)
@@ -3712,6 +3945,10 @@ test-errno$(EXEEXT): $(test_errno_OBJECTS) $(test_errno_DEPENDENCIES) $(EXTRA_te
 	@rm -f test-errno$(EXEEXT)
 	$(AM_V_CCLD)$(LINK) $(test_errno_OBJECTS) $(test_errno_LDADD) $(LIBS)
 
+test-error$(EXEEXT): $(test_error_OBJECTS) $(test_error_DEPENDENCIES) $(EXTRA_test_error_DEPENDENCIES) 
+	@rm -f test-error$(EXEEXT)
+	$(AM_V_CCLD)$(LINK) $(test_error_OBJECTS) $(test_error_LDADD) $(LIBS)
+
 test-exclude$(EXEEXT): $(test_exclude_OBJECTS) $(test_exclude_DEPENDENCIES) $(EXTRA_test_exclude_DEPENDENCIES) 
 	@rm -f test-exclude$(EXEEXT)
 	$(AM_V_CCLD)$(LINK) $(test_exclude_OBJECTS) $(test_exclude_LDADD) $(LIBS)
@@ -3888,6 +4125,10 @@ test-langinfo$(EXEEXT): $(test_langinfo_OBJECTS) $(test_langinfo_DEPENDENCIES) $
 	@rm -f test-langinfo$(EXEEXT)
 	$(AM_V_CCLD)$(LINK) $(test_langinfo_OBJECTS) $(test_langinfo_LDADD) $(LIBS)
 
+test-largefile$(EXEEXT): $(test_largefile_OBJECTS) $(test_largefile_DEPENDENCIES) $(EXTRA_test_largefile_DEPENDENCIES) 
+	@rm -f test-largefile$(EXEEXT)
+	$(AM_V_CCLD)$(LINK) $(test_largefile_OBJECTS) $(test_largefile_LDADD) $(LIBS)
+
 test-limits-h$(EXEEXT): $(test_limits_h_OBJECTS) $(test_limits_h_DEPENDENCIES) $(EXTRA_test_limits_h_DEPENDENCIES) 
 	@rm -f test-limits-h$(EXEEXT)
 	$(AM_V_CCLD)$(LINK) $(test_limits_h_OBJECTS) $(test_limits_h_LDADD) $(LIBS)
@@ -3928,6 +4169,14 @@ test-malloca$(EXEEXT): $(test_malloca_OBJECTS) $(test_malloca_DEPENDENCIES) $(EX
 	@rm -f test-malloca$(EXEEXT)
 	$(AM_V_CCLD)$(LINK) $(test_malloca_OBJECTS) $(test_malloca_LDADD) $(LIBS)
 
+test-mbrlen$(EXEEXT): $(test_mbrlen_OBJECTS) $(test_mbrlen_DEPENDENCIES) $(EXTRA_test_mbrlen_DEPENDENCIES) 
+	@rm -f test-mbrlen$(EXEEXT)
+	$(AM_V_CCLD)$(LINK) $(test_mbrlen_OBJECTS) $(test_mbrlen_LDADD) $(LIBS)
+
+test-mbrlen-w32$(EXEEXT): $(test_mbrlen_w32_OBJECTS) $(test_mbrlen_w32_DEPENDENCIES) $(EXTRA_test_mbrlen_w32_DEPENDENCIES) 
+	@rm -f test-mbrlen-w32$(EXEEXT)
+	$(AM_V_CCLD)$(LINK) $(test_mbrlen_w32_OBJECTS) $(test_mbrlen_w32_LDADD) $(LIBS)
+
 test-mbscasecmp$(EXEEXT): $(test_mbscasecmp_OBJECTS) $(test_mbscasecmp_DEPENDENCIES) $(EXTRA_test_mbscasecmp_DEPENDENCIES) 
 	@rm -f test-mbscasecmp$(EXEEXT)
 	$(AM_V_CCLD)$(LINK) $(test_mbscasecmp_OBJECTS) $(test_mbscasecmp_LDADD) $(LIBS)
@@ -3972,14 +4221,18 @@ test-netinet_in$(EXEEXT): $(test_netinet_in_OBJECTS) $(test_netinet_in_DEPENDENC
 	@rm -f test-netinet_in$(EXEEXT)
 	$(AM_V_CCLD)$(LINK) $(test_netinet_in_OBJECTS) $(test_netinet_in_LDADD) $(LIBS)
 
-test-nl_langinfo$(EXEEXT): $(test_nl_langinfo_OBJECTS) $(test_nl_langinfo_DEPENDENCIES) $(EXTRA_test_nl_langinfo_DEPENDENCIES) 
-	@rm -f test-nl_langinfo$(EXEEXT)
-	$(AM_V_CCLD)$(LINK) $(test_nl_langinfo_OBJECTS) $(test_nl_langinfo_LDADD) $(LIBS)
-
 test-nl_langinfo-mt$(EXEEXT): $(test_nl_langinfo_mt_OBJECTS) $(test_nl_langinfo_mt_DEPENDENCIES) $(EXTRA_test_nl_langinfo_mt_DEPENDENCIES) 
 	@rm -f test-nl_langinfo-mt$(EXEEXT)
 	$(AM_V_CCLD)$(LINK) $(test_nl_langinfo_mt_OBJECTS) $(test_nl_langinfo_mt_LDADD) $(LIBS)
 
+test-nl_langinfo1$(EXEEXT): $(test_nl_langinfo1_OBJECTS) $(test_nl_langinfo1_DEPENDENCIES) $(EXTRA_test_nl_langinfo1_DEPENDENCIES) 
+	@rm -f test-nl_langinfo1$(EXEEXT)
+	$(AM_V_CCLD)$(LINK) $(test_nl_langinfo1_OBJECTS) $(test_nl_langinfo1_LDADD) $(LIBS)
+
+test-nl_langinfo2$(EXEEXT): $(test_nl_langinfo2_OBJECTS) $(test_nl_langinfo2_DEPENDENCIES) $(EXTRA_test_nl_langinfo2_DEPENDENCIES) 
+	@rm -f test-nl_langinfo2$(EXEEXT)
+	$(AM_V_CCLD)$(LINK) $(test_nl_langinfo2_OBJECTS) $(test_nl_langinfo2_LDADD) $(LIBS)
+
 test-open$(EXEEXT): $(test_open_OBJECTS) $(test_open_DEPENDENCIES) $(EXTRA_test_open_DEPENDENCIES) 
 	@rm -f test-open$(EXEEXT)
 	$(AM_V_CCLD)$(LINK) $(test_open_OBJECTS) $(test_open_LDADD) $(LIBS)
@@ -4144,14 +4397,14 @@ test-stat-time$(EXEEXT): $(test_stat_time_OBJECTS) $(test_stat_time_DEPENDENCIES
 	@rm -f test-stat-time$(EXEEXT)
 	$(AM_V_CCLD)$(LINK) $(test_stat_time_OBJECTS) $(test_stat_time_LDADD) $(LIBS)
 
-test-stdalign$(EXEEXT): $(test_stdalign_OBJECTS) $(test_stdalign_DEPENDENCIES) $(EXTRA_test_stdalign_DEPENDENCIES) 
-	@rm -f test-stdalign$(EXEEXT)
-	$(AM_V_CCLD)$(LINK) $(test_stdalign_OBJECTS) $(test_stdalign_LDADD) $(LIBS)
-
 test-stdbool$(EXEEXT): $(test_stdbool_OBJECTS) $(test_stdbool_DEPENDENCIES) $(EXTRA_test_stdbool_DEPENDENCIES) 
 	@rm -f test-stdbool$(EXEEXT)
 	$(AM_V_CCLD)$(LINK) $(test_stdbool_OBJECTS) $(test_stdbool_LDADD) $(LIBS)
 
+test-stdckdint$(EXEEXT): $(test_stdckdint_OBJECTS) $(test_stdckdint_DEPENDENCIES) $(EXTRA_test_stdckdint_DEPENDENCIES) 
+	@rm -f test-stdckdint$(EXEEXT)
+	$(AM_V_CCLD)$(LINK) $(test_stdckdint_OBJECTS) $(test_stdckdint_LDADD) $(LIBS)
+
 test-stddef$(EXEEXT): $(test_stddef_OBJECTS) $(test_stddef_DEPENDENCIES) $(EXTRA_test_stddef_DEPENDENCIES) 
 	@rm -f test-stddef$(EXEEXT)
 	$(AM_V_CCLD)$(LINK) $(test_stddef_OBJECTS) $(test_stddef_LDADD) $(LIBS)
@@ -4251,12 +4504,20 @@ test-thread_self$(EXEEXT): $(test_thread_self_OBJECTS) $(test_thread_self_DEPEND
 test-time$(EXEEXT): $(test_time_OBJECTS) $(test_time_DEPENDENCIES) $(EXTRA_test_time_DEPENDENCIES) 
 	@rm -f test-time$(EXEEXT)
 	$(AM_V_CCLD)$(LINK) $(test_time_OBJECTS) $(test_time_LDADD) $(LIBS)
+
+test-time-h$(EXEEXT): $(test_time_h_OBJECTS) $(test_time_h_DEPENDENCIES) $(EXTRA_test_time_h_DEPENDENCIES) 
+	@rm -f test-time-h$(EXEEXT)
+	$(AM_V_CCLD)$(LINK) $(test_time_h_OBJECTS) $(test_time_h_LDADD) $(LIBS)
+
+test-trim$(EXEEXT): $(test_trim_OBJECTS) $(test_trim_DEPENDENCIES) $(EXTRA_test_trim_DEPENDENCIES) 
+	@rm -f test-trim$(EXEEXT)
+	$(AM_V_CCLD)$(LINK) $(test_trim_OBJECTS) $(test_trim_LDADD) $(LIBS)
 unistr/$(am__dirstamp):
 	@$(MKDIR_P) unistr
-	@: > unistr/$(am__dirstamp)
+	@: >>unistr/$(am__dirstamp)
 unistr/$(DEPDIR)/$(am__dirstamp):
 	@$(MKDIR_P) unistr/$(DEPDIR)
-	@: > unistr/$(DEPDIR)/$(am__dirstamp)
+	@: >>unistr/$(DEPDIR)/$(am__dirstamp)
 unistr/test-u8-mbtoucr.$(OBJEXT): unistr/$(am__dirstamp) \
 	unistr/$(DEPDIR)/$(am__dirstamp)
 
@@ -4271,10 +4532,10 @@ test-u8-uctomb$(EXEEXT): $(test_u8_uctomb_OBJECTS) $(test_u8_uctomb_DEPENDENCIES
 	$(AM_V_CCLD)$(LINK) $(test_u8_uctomb_OBJECTS) $(test_u8_uctomb_LDADD) $(LIBS)
 uniwidth/$(am__dirstamp):
 	@$(MKDIR_P) uniwidth
-	@: > uniwidth/$(am__dirstamp)
+	@: >>uniwidth/$(am__dirstamp)
 uniwidth/$(DEPDIR)/$(am__dirstamp):
 	@$(MKDIR_P) uniwidth/$(DEPDIR)
-	@: > uniwidth/$(DEPDIR)/$(am__dirstamp)
+	@: >>uniwidth/$(DEPDIR)/$(am__dirstamp)
 uniwidth/test-uc_width.$(OBJEXT): uniwidth/$(am__dirstamp) \
 	uniwidth/$(DEPDIR)/$(am__dirstamp)
 
@@ -4348,6 +4609,10 @@ test-xstrtoul$(EXEEXT): $(test_xstrtoul_OBJECTS) $(test_xstrtoul_DEPENDENCIES) $
 	@rm -f test-xstrtoul$(EXEEXT)
 	$(AM_V_CCLD)$(LINK) $(test_xstrtoul_OBJECTS) $(test_xstrtoul_LDADD) $(LIBS)
 
+test-year2038$(EXEEXT): $(test_year2038_OBJECTS) $(test_year2038_DEPENDENCIES) $(EXTRA_test_year2038_DEPENDENCIES) 
+	@rm -f test-year2038$(EXEEXT)
+	$(AM_V_CCLD)$(LINK) $(test_year2038_OBJECTS) $(test_year2038_LDADD) $(LIBS)
+
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
 	-rm -f glthread/*.$(OBJEXT)
@@ -4362,6 +4627,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/anytostr.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asnprintf.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bind.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-strcasestr.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/connect.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdopen.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/float.Po@am__quote@ # am--include-marker
@@ -4399,10 +4665,12 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symlink.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sys_socket.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-accept.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-alignasof.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-alignof.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-alloca-opt.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-argmatch.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-arpa_inet.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-assert.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-binary-io.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-bind.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-bitrotate.Po@am__quote@ # am--include-marker
@@ -4410,6 +4678,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-c-ctype.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-c-stack.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-c-strcasecmp.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-c-strcasestr.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-c-strncasecmp.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-calloc-gnu.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-chdir.Po@am__quote@ # am--include-marker
@@ -4425,6 +4694,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-dynarray.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-environ.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-errno.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-error.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-exclude.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fchdir.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fcntl-h.Po@am__quote@ # am--include-marker
@@ -4469,6 +4739,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-iswdigit.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-iswxdigit.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-langinfo.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-largefile.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-limits-h.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-listen.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-localcharset.Po@am__quote@ # am--include-marker
@@ -4479,6 +4750,8 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-lstat.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-malloc-gnu.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-malloca.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mbrlen-w32.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mbrlen.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mbscasecmp.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mbsinit.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mbsrtowcs.Po@am__quote@ # am--include-marker
@@ -4491,7 +4764,8 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-nanosleep.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-netinet_in.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-nl_langinfo-mt.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-nl_langinfo.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-nl_langinfo1.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-nl_langinfo2.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-open.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-openat-safer.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-openat.Po@am__quote@ # am--include-marker
@@ -4533,8 +4807,8 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sockets.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stat-time.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stat.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stdalign.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stdbool.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stdckdint.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stddef.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stdint.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stdio.Po@am__quote@ # am--include-marker
@@ -4559,7 +4833,9 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_uio.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-thread_create.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-thread_self.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-time-h.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-time.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-trim.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-unistd.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-unsetenv.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-vasnprintf.Po@am__quote@ # am--include-marker
@@ -4575,6 +4851,8 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-xstrtoimax.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-xstrtol.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-xstrtoul.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-year2038.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/time.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uinttostr.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umaxtostr.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unsetenv.Po@am__quote@ # am--include-marker
@@ -4831,13 +5109,12 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
 	$$success || exit 1
 
 check-TESTS: $(check_PROGRAMS) $(check_LIBRARIES)
-	@list='$(RECHECK_LOGS)';           $(am__rm_f) $$list
-	@list='$(RECHECK_LOGS:.log=.trs)'; $(am__rm_f) $$list
+	@$(am__rm_f) $(RECHECK_LOGS)
+	@$(am__rm_f) $(RECHECK_LOGS:.log=.trs)
 	@$(am__rm_f) $(TEST_SUITE_LOG)
 	@set +e; $(am__set_TESTS_bases); \
 	log_list=`for i in $$bases; do echo $$i.log; done`; \
-	trs_list=`for i in $$bases; do echo $$i.trs; done`; \
-	log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
+	log_list=`echo $$log_list`; \
 	$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
 	exit $$?;
 recheck: all $(check_PROGRAMS) $(check_LIBRARIES)
@@ -4858,6 +5135,13 @@ test-accept.log: test-accept$(EXEEXT)
 	--log-file $$b.log --trs-file $$b.trs \
 	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
 	"$$tst" $(AM_TESTS_FD_REDIRECT)
+test-alignasof.log: test-alignasof$(EXEEXT)
+	@p='test-alignasof$(EXEEXT)'; \
+	b='test-alignasof'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
 test-alignof.log: test-alignof$(EXEEXT)
 	@p='test-alignof$(EXEEXT)'; \
 	b='test-alignof'; \
@@ -4886,6 +5170,13 @@ test-arpa_inet.log: test-arpa_inet$(EXEEXT)
 	--log-file $$b.log --trs-file $$b.trs \
 	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
 	"$$tst" $(AM_TESTS_FD_REDIRECT)
+test-assert.log: test-assert$(EXEEXT)
+	@p='test-assert$(EXEEXT)'; \
+	b='test-assert'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
 test-binary-io.sh.log: test-binary-io.sh
 	@p='test-binary-io.sh'; \
 	b='test-binary-io.sh'; \
@@ -4921,6 +5212,13 @@ test-btowc2.sh.log: test-btowc2.sh
 	--log-file $$b.log --trs-file $$b.trs \
 	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
 	"$$tst" $(AM_TESTS_FD_REDIRECT)
+test-btowc3.sh.log: test-btowc3.sh
+	@p='test-btowc3.sh'; \
+	b='test-btowc3.sh'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
 test-c-ctype.log: test-c-ctype$(EXEEXT)
 	@p='test-c-ctype$(EXEEXT)'; \
 	b='test-c-ctype'; \
@@ -4949,6 +5247,13 @@ test-c-strcase.sh.log: test-c-strcase.sh
 	--log-file $$b.log --trs-file $$b.trs \
 	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
 	"$$tst" $(AM_TESTS_FD_REDIRECT)
+test-c-strcasestr.log: test-c-strcasestr$(EXEEXT)
+	@p='test-c-strcasestr$(EXEEXT)'; \
+	b='test-c-strcasestr'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
 test-calloc-gnu.log: test-calloc-gnu$(EXEEXT)
 	@p='test-calloc-gnu$(EXEEXT)'; \
 	b='test-calloc-gnu'; \
@@ -5033,13 +5338,6 @@ test-dup2.log: test-dup2$(EXEEXT)
 	--log-file $$b.log --trs-file $$b.trs \
 	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
 	"$$tst" $(AM_TESTS_FD_REDIRECT)
-test-dynarray.log: test-dynarray$(EXEEXT)
-	@p='test-dynarray$(EXEEXT)'; \
-	b='test-dynarray'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
 test-environ.log: test-environ$(EXEEXT)
 	@p='test-environ$(EXEEXT)'; \
 	b='test-environ'; \
@@ -5054,6 +5352,13 @@ test-errno.log: test-errno$(EXEEXT)
 	--log-file $$b.log --trs-file $$b.trs \
 	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
 	"$$tst" $(AM_TESTS_FD_REDIRECT)
+test-error.sh.log: test-error.sh
+	@p='test-error.sh'; \
+	b='test-error.sh'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
 test-exclude1.sh.log: test-exclude1.sh
 	@p='test-exclude1.sh'; \
 	b='test-exclude1.sh'; \
@@ -5292,6 +5597,13 @@ test-gettimeofday.log: test-gettimeofday$(EXEEXT)
 	--log-file $$b.log --trs-file $$b.trs \
 	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
 	"$$tst" $(AM_TESTS_FD_REDIRECT)
+test-dynarray.log: test-dynarray$(EXEEXT)
+	@p='test-dynarray$(EXEEXT)'; \
+	b='test-dynarray'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
 test-hard-locale.log: test-hard-locale$(EXEEXT)
 	@p='test-hard-locale$(EXEEXT)'; \
 	b='test-hard-locale'; \
@@ -5411,6 +5723,13 @@ test-langinfo.log: test-langinfo$(EXEEXT)
 	--log-file $$b.log --trs-file $$b.trs \
 	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
 	"$$tst" $(AM_TESTS_FD_REDIRECT)
+test-largefile.log: test-largefile$(EXEEXT)
+	@p='test-largefile$(EXEEXT)'; \
+	b='test-largefile'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
 test-limits-h.log: test-limits-h$(EXEEXT)
 	@p='test-limits-h$(EXEEXT)'; \
 	b='test-limits-h'; \
@@ -5474,6 +5793,90 @@ test-malloca.log: test-malloca$(EXEEXT)
 	--log-file $$b.log --trs-file $$b.trs \
 	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
 	"$$tst" $(AM_TESTS_FD_REDIRECT)
+test-mbrlen1.sh.log: test-mbrlen1.sh
+	@p='test-mbrlen1.sh'; \
+	b='test-mbrlen1.sh'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
+test-mbrlen2.sh.log: test-mbrlen2.sh
+	@p='test-mbrlen2.sh'; \
+	b='test-mbrlen2.sh'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
+test-mbrlen3.sh.log: test-mbrlen3.sh
+	@p='test-mbrlen3.sh'; \
+	b='test-mbrlen3.sh'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
+test-mbrlen4.sh.log: test-mbrlen4.sh
+	@p='test-mbrlen4.sh'; \
+	b='test-mbrlen4.sh'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
+test-mbrlen5.sh.log: test-mbrlen5.sh
+	@p='test-mbrlen5.sh'; \
+	b='test-mbrlen5.sh'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
+test-mbrlen-w32-1.sh.log: test-mbrlen-w32-1.sh
+	@p='test-mbrlen-w32-1.sh'; \
+	b='test-mbrlen-w32-1.sh'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
+test-mbrlen-w32-2.sh.log: test-mbrlen-w32-2.sh
+	@p='test-mbrlen-w32-2.sh'; \
+	b='test-mbrlen-w32-2.sh'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
+test-mbrlen-w32-3.sh.log: test-mbrlen-w32-3.sh
+	@p='test-mbrlen-w32-3.sh'; \
+	b='test-mbrlen-w32-3.sh'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
+test-mbrlen-w32-4.sh.log: test-mbrlen-w32-4.sh
+	@p='test-mbrlen-w32-4.sh'; \
+	b='test-mbrlen-w32-4.sh'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
+test-mbrlen-w32-5.sh.log: test-mbrlen-w32-5.sh
+	@p='test-mbrlen-w32-5.sh'; \
+	b='test-mbrlen-w32-5.sh'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
+test-mbrlen-w32-6.sh.log: test-mbrlen-w32-6.sh
+	@p='test-mbrlen-w32-6.sh'; \
+	b='test-mbrlen-w32-6.sh'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
+test-mbrlen-w32-7.sh.log: test-mbrlen-w32-7.sh
+	@p='test-mbrlen-w32-7.sh'; \
+	b='test-mbrlen-w32-7.sh'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
 test-mbscasecmp.sh.log: test-mbscasecmp.sh
 	@p='test-mbscasecmp.sh'; \
 	b='test-mbscasecmp.sh'; \
@@ -5516,6 +5919,13 @@ test-mbsrtowcs4.sh.log: test-mbsrtowcs4.sh
 	--log-file $$b.log --trs-file $$b.trs \
 	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
 	"$$tst" $(AM_TESTS_FD_REDIRECT)
+test-mbsrtowcs5.sh.log: test-mbsrtowcs5.sh
+	@p='test-mbsrtowcs5.sh'; \
+	b='test-mbsrtowcs5.sh'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
 test-mbsstr1.log: test-mbsstr1$(EXEEXT)
 	@p='test-mbsstr1$(EXEEXT)'; \
 	b='test-mbsstr1'; \
@@ -5572,9 +5982,16 @@ test-netinet_in.log: test-netinet_in$(EXEEXT)
 	--log-file $$b.log --trs-file $$b.trs \
 	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
 	"$$tst" $(AM_TESTS_FD_REDIRECT)
-test-nl_langinfo.sh.log: test-nl_langinfo.sh
-	@p='test-nl_langinfo.sh'; \
-	b='test-nl_langinfo.sh'; \
+test-nl_langinfo1.sh.log: test-nl_langinfo1.sh
+	@p='test-nl_langinfo1.sh'; \
+	b='test-nl_langinfo1.sh'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
+test-nl_langinfo2.sh.log: test-nl_langinfo2.sh
+	@p='test-nl_langinfo2.sh'; \
+	b='test-nl_langinfo2.sh'; \
 	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
 	--log-file $$b.log --trs-file $$b.trs \
 	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
@@ -5873,16 +6290,16 @@ test-stat-time.log: test-stat-time$(EXEEXT)
 	--log-file $$b.log --trs-file $$b.trs \
 	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
 	"$$tst" $(AM_TESTS_FD_REDIRECT)
-test-stdalign.log: test-stdalign$(EXEEXT)
-	@p='test-stdalign$(EXEEXT)'; \
-	b='test-stdalign'; \
+test-stdbool.log: test-stdbool$(EXEEXT)
+	@p='test-stdbool$(EXEEXT)'; \
+	b='test-stdbool'; \
 	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
 	--log-file $$b.log --trs-file $$b.trs \
 	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
 	"$$tst" $(AM_TESTS_FD_REDIRECT)
-test-stdbool.log: test-stdbool$(EXEEXT)
-	@p='test-stdbool$(EXEEXT)'; \
-	b='test-stdbool'; \
+test-stdckdint.log: test-stdckdint$(EXEEXT)
+	@p='test-stdckdint$(EXEEXT)'; \
+	b='test-stdckdint'; \
 	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
 	--log-file $$b.log --trs-file $$b.trs \
 	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
@@ -6062,6 +6479,13 @@ test-thread_create.log: test-thread_create$(EXEEXT)
 	--log-file $$b.log --trs-file $$b.trs \
 	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
 	"$$tst" $(AM_TESTS_FD_REDIRECT)
+test-time-h.log: test-time-h$(EXEEXT)
+	@p='test-time-h$(EXEEXT)'; \
+	b='test-time-h'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
 test-time.log: test-time$(EXEEXT)
 	@p='test-time$(EXEEXT)'; \
 	b='test-time'; \
@@ -6069,6 +6493,27 @@ test-time.log: test-time$(EXEEXT)
 	--log-file $$b.log --trs-file $$b.trs \
 	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
 	"$$tst" $(AM_TESTS_FD_REDIRECT)
+test-trim1.sh.log: test-trim1.sh
+	@p='test-trim1.sh'; \
+	b='test-trim1.sh'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
+test-trim2.sh.log: test-trim2.sh
+	@p='test-trim2.sh'; \
+	b='test-trim2.sh'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
+test-trim3.sh.log: test-trim3.sh
+	@p='test-trim3.sh'; \
+	b='test-trim3.sh'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
 test-dup-safer.log: test-dup-safer$(EXEEXT)
 	@p='test-dup-safer$(EXEEXT)'; \
 	b='test-dup-safer'; \
@@ -6258,6 +6703,13 @@ test-xstrtol.sh.log: test-xstrtol.sh
 	--log-file $$b.log --trs-file $$b.trs \
 	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
 	"$$tst" $(AM_TESTS_FD_REDIRECT)
+test-year2038.log: test-year2038$(EXEEXT)
+	@p='test-year2038$(EXEEXT)'; \
+	b='test-year2038'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
 .test.log:
 	@p='$<'; \
 	$(am__set_b); \
@@ -6360,30 +6812,30 @@ install-strip:
 	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
 	fi
 mostlyclean-generic:
-	-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
-	-test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
-	-test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
-	-test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+	-$(am__rm_f) $(MOSTLYCLEANFILES)
+	-$(am__rm_f) $(TEST_LOGS)
+	-$(am__rm_f) $(TEST_LOGS:.log=.trs)
+	-$(am__rm_f) $(TEST_SUITE_LOG)
 
 clean-generic:
-	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+	-$(am__rm_f) $(CLEANFILES)
 
 distclean-generic:
 	-$(am__rm_f) $(CONFIG_CLEAN_FILES)
 	-test . = "$(srcdir)" || $(am__rm_f) $(CONFIG_CLEAN_VPATH_FILES)
-	-rm -f glthread/$(DEPDIR)/$(am__dirstamp)
-	-rm -f glthread/$(am__dirstamp)
-	-rm -f unistr/$(DEPDIR)/$(am__dirstamp)
-	-rm -f unistr/$(am__dirstamp)
-	-rm -f uniwidth/$(DEPDIR)/$(am__dirstamp)
-	-rm -f uniwidth/$(am__dirstamp)
-	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+	-$(am__rm_f) $(DISTCLEANFILES)
+	-$(am__rm_f) glthread/$(DEPDIR)/$(am__dirstamp)
+	-$(am__rm_f) glthread/$(am__dirstamp)
+	-$(am__rm_f) unistr/$(DEPDIR)/$(am__dirstamp)
+	-$(am__rm_f) unistr/$(am__dirstamp)
+	-$(am__rm_f) uniwidth/$(DEPDIR)/$(am__dirstamp)
+	-$(am__rm_f) uniwidth/$(am__dirstamp)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
 	@echo "it deletes files that may require special tools to rebuild."
-	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
-	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+	-$(am__rm_f) $(BUILT_SOURCES)
+	-$(am__rm_f) $(MAINTAINERCLEANFILES)
 clean: clean-recursive
 
 clean-am: clean-checkLIBRARIES clean-checkPROGRAMS clean-generic \
@@ -6391,11 +6843,12 @@ clean-am: clean-checkLIBRARIES clean-checkPROGRAMS clean-generic \
 	mostlyclean-am
 
 distclean: distclean-recursive
-		-rm -f ./$(DEPDIR)/accept.Po
+	-rm -f ./$(DEPDIR)/accept.Po
 	-rm -f ./$(DEPDIR)/alloca.Po
 	-rm -f ./$(DEPDIR)/anytostr.Po
 	-rm -f ./$(DEPDIR)/asnprintf.Po
 	-rm -f ./$(DEPDIR)/bind.Po
+	-rm -f ./$(DEPDIR)/c-strcasestr.Po
 	-rm -f ./$(DEPDIR)/connect.Po
 	-rm -f ./$(DEPDIR)/fdopen.Po
 	-rm -f ./$(DEPDIR)/float.Po
@@ -6433,10 +6886,12 @@ distclean: distclean-recursive
 	-rm -f ./$(DEPDIR)/symlink.Po
 	-rm -f ./$(DEPDIR)/sys_socket.Po
 	-rm -f ./$(DEPDIR)/test-accept.Po
+	-rm -f ./$(DEPDIR)/test-alignasof.Po
 	-rm -f ./$(DEPDIR)/test-alignof.Po
 	-rm -f ./$(DEPDIR)/test-alloca-opt.Po
 	-rm -f ./$(DEPDIR)/test-argmatch.Po
 	-rm -f ./$(DEPDIR)/test-arpa_inet.Po
+	-rm -f ./$(DEPDIR)/test-assert.Po
 	-rm -f ./$(DEPDIR)/test-binary-io.Po
 	-rm -f ./$(DEPDIR)/test-bind.Po
 	-rm -f ./$(DEPDIR)/test-bitrotate.Po
@@ -6444,6 +6899,7 @@ distclean: distclean-recursive
 	-rm -f ./$(DEPDIR)/test-c-ctype.Po
 	-rm -f ./$(DEPDIR)/test-c-stack.Po
 	-rm -f ./$(DEPDIR)/test-c-strcasecmp.Po
+	-rm -f ./$(DEPDIR)/test-c-strcasestr.Po
 	-rm -f ./$(DEPDIR)/test-c-strncasecmp.Po
 	-rm -f ./$(DEPDIR)/test-calloc-gnu.Po
 	-rm -f ./$(DEPDIR)/test-chdir.Po
@@ -6459,6 +6915,7 @@ distclean: distclean-recursive
 	-rm -f ./$(DEPDIR)/test-dynarray.Po
 	-rm -f ./$(DEPDIR)/test-environ.Po
 	-rm -f ./$(DEPDIR)/test-errno.Po
+	-rm -f ./$(DEPDIR)/test-error.Po
 	-rm -f ./$(DEPDIR)/test-exclude.Po
 	-rm -f ./$(DEPDIR)/test-fchdir.Po
 	-rm -f ./$(DEPDIR)/test-fcntl-h.Po
@@ -6503,6 +6960,7 @@ distclean: distclean-recursive
 	-rm -f ./$(DEPDIR)/test-iswdigit.Po
 	-rm -f ./$(DEPDIR)/test-iswxdigit.Po
 	-rm -f ./$(DEPDIR)/test-langinfo.Po
+	-rm -f ./$(DEPDIR)/test-largefile.Po
 	-rm -f ./$(DEPDIR)/test-limits-h.Po
 	-rm -f ./$(DEPDIR)/test-listen.Po
 	-rm -f ./$(DEPDIR)/test-localcharset.Po
@@ -6513,6 +6971,8 @@ distclean: distclean-recursive
 	-rm -f ./$(DEPDIR)/test-lstat.Po
 	-rm -f ./$(DEPDIR)/test-malloc-gnu.Po
 	-rm -f ./$(DEPDIR)/test-malloca.Po
+	-rm -f ./$(DEPDIR)/test-mbrlen-w32.Po
+	-rm -f ./$(DEPDIR)/test-mbrlen.Po
 	-rm -f ./$(DEPDIR)/test-mbscasecmp.Po
 	-rm -f ./$(DEPDIR)/test-mbsinit.Po
 	-rm -f ./$(DEPDIR)/test-mbsrtowcs.Po
@@ -6525,7 +6985,8 @@ distclean: distclean-recursive
 	-rm -f ./$(DEPDIR)/test-nanosleep.Po
 	-rm -f ./$(DEPDIR)/test-netinet_in.Po
 	-rm -f ./$(DEPDIR)/test-nl_langinfo-mt.Po
-	-rm -f ./$(DEPDIR)/test-nl_langinfo.Po
+	-rm -f ./$(DEPDIR)/test-nl_langinfo1.Po
+	-rm -f ./$(DEPDIR)/test-nl_langinfo2.Po
 	-rm -f ./$(DEPDIR)/test-open.Po
 	-rm -f ./$(DEPDIR)/test-openat-safer.Po
 	-rm -f ./$(DEPDIR)/test-openat.Po
@@ -6567,8 +7028,8 @@ distclean: distclean-recursive
 	-rm -f ./$(DEPDIR)/test-sockets.Po
 	-rm -f ./$(DEPDIR)/test-stat-time.Po
 	-rm -f ./$(DEPDIR)/test-stat.Po
-	-rm -f ./$(DEPDIR)/test-stdalign.Po
 	-rm -f ./$(DEPDIR)/test-stdbool.Po
+	-rm -f ./$(DEPDIR)/test-stdckdint.Po
 	-rm -f ./$(DEPDIR)/test-stddef.Po
 	-rm -f ./$(DEPDIR)/test-stdint.Po
 	-rm -f ./$(DEPDIR)/test-stdio.Po
@@ -6593,7 +7054,9 @@ distclean: distclean-recursive
 	-rm -f ./$(DEPDIR)/test-sys_uio.Po
 	-rm -f ./$(DEPDIR)/test-thread_create.Po
 	-rm -f ./$(DEPDIR)/test-thread_self.Po
+	-rm -f ./$(DEPDIR)/test-time-h.Po
 	-rm -f ./$(DEPDIR)/test-time.Po
+	-rm -f ./$(DEPDIR)/test-trim.Po
 	-rm -f ./$(DEPDIR)/test-unistd.Po
 	-rm -f ./$(DEPDIR)/test-unsetenv.Po
 	-rm -f ./$(DEPDIR)/test-vasnprintf.Po
@@ -6609,6 +7072,8 @@ distclean: distclean-recursive
 	-rm -f ./$(DEPDIR)/test-xstrtoimax.Po
 	-rm -f ./$(DEPDIR)/test-xstrtol.Po
 	-rm -f ./$(DEPDIR)/test-xstrtoul.Po
+	-rm -f ./$(DEPDIR)/test-year2038.Po
+	-rm -f ./$(DEPDIR)/time.Po
 	-rm -f ./$(DEPDIR)/uinttostr.Po
 	-rm -f ./$(DEPDIR)/umaxtostr.Po
 	-rm -f ./$(DEPDIR)/unsetenv.Po
@@ -6667,11 +7132,12 @@ install-ps-am:
 installcheck-am:
 
 maintainer-clean: maintainer-clean-recursive
-		-rm -f ./$(DEPDIR)/accept.Po
+	-rm -f ./$(DEPDIR)/accept.Po
 	-rm -f ./$(DEPDIR)/alloca.Po
 	-rm -f ./$(DEPDIR)/anytostr.Po
 	-rm -f ./$(DEPDIR)/asnprintf.Po
 	-rm -f ./$(DEPDIR)/bind.Po
+	-rm -f ./$(DEPDIR)/c-strcasestr.Po
 	-rm -f ./$(DEPDIR)/connect.Po
 	-rm -f ./$(DEPDIR)/fdopen.Po
 	-rm -f ./$(DEPDIR)/float.Po
@@ -6709,10 +7175,12 @@ maintainer-clean: maintainer-clean-recursive
 	-rm -f ./$(DEPDIR)/symlink.Po
 	-rm -f ./$(DEPDIR)/sys_socket.Po
 	-rm -f ./$(DEPDIR)/test-accept.Po
+	-rm -f ./$(DEPDIR)/test-alignasof.Po
 	-rm -f ./$(DEPDIR)/test-alignof.Po
 	-rm -f ./$(DEPDIR)/test-alloca-opt.Po
 	-rm -f ./$(DEPDIR)/test-argmatch.Po
 	-rm -f ./$(DEPDIR)/test-arpa_inet.Po
+	-rm -f ./$(DEPDIR)/test-assert.Po
 	-rm -f ./$(DEPDIR)/test-binary-io.Po
 	-rm -f ./$(DEPDIR)/test-bind.Po
 	-rm -f ./$(DEPDIR)/test-bitrotate.Po
@@ -6720,6 +7188,7 @@ maintainer-clean: maintainer-clean-recursive
 	-rm -f ./$(DEPDIR)/test-c-ctype.Po
 	-rm -f ./$(DEPDIR)/test-c-stack.Po
 	-rm -f ./$(DEPDIR)/test-c-strcasecmp.Po
+	-rm -f ./$(DEPDIR)/test-c-strcasestr.Po
 	-rm -f ./$(DEPDIR)/test-c-strncasecmp.Po
 	-rm -f ./$(DEPDIR)/test-calloc-gnu.Po
 	-rm -f ./$(DEPDIR)/test-chdir.Po
@@ -6735,6 +7204,7 @@ maintainer-clean: maintainer-clean-recursive
 	-rm -f ./$(DEPDIR)/test-dynarray.Po
 	-rm -f ./$(DEPDIR)/test-environ.Po
 	-rm -f ./$(DEPDIR)/test-errno.Po
+	-rm -f ./$(DEPDIR)/test-error.Po
 	-rm -f ./$(DEPDIR)/test-exclude.Po
 	-rm -f ./$(DEPDIR)/test-fchdir.Po
 	-rm -f ./$(DEPDIR)/test-fcntl-h.Po
@@ -6779,6 +7249,7 @@ maintainer-clean: maintainer-clean-recursive
 	-rm -f ./$(DEPDIR)/test-iswdigit.Po
 	-rm -f ./$(DEPDIR)/test-iswxdigit.Po
 	-rm -f ./$(DEPDIR)/test-langinfo.Po
+	-rm -f ./$(DEPDIR)/test-largefile.Po
 	-rm -f ./$(DEPDIR)/test-limits-h.Po
 	-rm -f ./$(DEPDIR)/test-listen.Po
 	-rm -f ./$(DEPDIR)/test-localcharset.Po
@@ -6789,6 +7260,8 @@ maintainer-clean: maintainer-clean-recursive
 	-rm -f ./$(DEPDIR)/test-lstat.Po
 	-rm -f ./$(DEPDIR)/test-malloc-gnu.Po
 	-rm -f ./$(DEPDIR)/test-malloca.Po
+	-rm -f ./$(DEPDIR)/test-mbrlen-w32.Po
+	-rm -f ./$(DEPDIR)/test-mbrlen.Po
 	-rm -f ./$(DEPDIR)/test-mbscasecmp.Po
 	-rm -f ./$(DEPDIR)/test-mbsinit.Po
 	-rm -f ./$(DEPDIR)/test-mbsrtowcs.Po
@@ -6801,7 +7274,8 @@ maintainer-clean: maintainer-clean-recursive
 	-rm -f ./$(DEPDIR)/test-nanosleep.Po
 	-rm -f ./$(DEPDIR)/test-netinet_in.Po
 	-rm -f ./$(DEPDIR)/test-nl_langinfo-mt.Po
-	-rm -f ./$(DEPDIR)/test-nl_langinfo.Po
+	-rm -f ./$(DEPDIR)/test-nl_langinfo1.Po
+	-rm -f ./$(DEPDIR)/test-nl_langinfo2.Po
 	-rm -f ./$(DEPDIR)/test-open.Po
 	-rm -f ./$(DEPDIR)/test-openat-safer.Po
 	-rm -f ./$(DEPDIR)/test-openat.Po
@@ -6843,8 +7317,8 @@ maintainer-clean: maintainer-clean-recursive
 	-rm -f ./$(DEPDIR)/test-sockets.Po
 	-rm -f ./$(DEPDIR)/test-stat-time.Po
 	-rm -f ./$(DEPDIR)/test-stat.Po
-	-rm -f ./$(DEPDIR)/test-stdalign.Po
 	-rm -f ./$(DEPDIR)/test-stdbool.Po
+	-rm -f ./$(DEPDIR)/test-stdckdint.Po
 	-rm -f ./$(DEPDIR)/test-stddef.Po
 	-rm -f ./$(DEPDIR)/test-stdint.Po
 	-rm -f ./$(DEPDIR)/test-stdio.Po
@@ -6869,7 +7343,9 @@ maintainer-clean: maintainer-clean-recursive
 	-rm -f ./$(DEPDIR)/test-sys_uio.Po
 	-rm -f ./$(DEPDIR)/test-thread_create.Po
 	-rm -f ./$(DEPDIR)/test-thread_self.Po
+	-rm -f ./$(DEPDIR)/test-time-h.Po
 	-rm -f ./$(DEPDIR)/test-time.Po
+	-rm -f ./$(DEPDIR)/test-trim.Po
 	-rm -f ./$(DEPDIR)/test-unistd.Po
 	-rm -f ./$(DEPDIR)/test-unsetenv.Po
 	-rm -f ./$(DEPDIR)/test-vasnprintf.Po
@@ -6885,6 +7361,8 @@ maintainer-clean: maintainer-clean-recursive
 	-rm -f ./$(DEPDIR)/test-xstrtoimax.Po
 	-rm -f ./$(DEPDIR)/test-xstrtol.Po
 	-rm -f ./$(DEPDIR)/test-xstrtoul.Po
+	-rm -f ./$(DEPDIR)/test-year2038.Po
+	-rm -f ./$(DEPDIR)/time.Po
 	-rm -f ./$(DEPDIR)/uinttostr.Po
 	-rm -f ./$(DEPDIR)/umaxtostr.Po
 	-rm -f ./$(DEPDIR)/unsetenv.Po
diff --git a/gnulib-tests/_Noreturn.h b/gnulib-tests/_Noreturn.h
index e914627a..6ecea98b 100644
--- a/gnulib-tests/_Noreturn.h
+++ b/gnulib-tests/_Noreturn.h
@@ -1,5 +1,5 @@
 /* A C macro for declaring that a function does not return.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 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
@@ -26,6 +26,11 @@
        AIX system header files and several gnulib header files use precisely
        this syntax with 'extern'.  */
 #  define _Noreturn [[noreturn]]
+# elif (defined __clang__ && __clang_major__ < 16 \
+        && defined _GL_WORK_AROUND_LLVM_BUG_59792)
+   /* Compile with -D_GL_WORK_AROUND_LLVM_BUG_59792 to work around
+      that rare LLVM bug, though you may get many false-alarm warnings.  */
+#  define _Noreturn
 # elif ((!defined __cplusplus || defined __clang__) \
         && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \
             || (!defined __STRICT_ANSI__ \
diff --git a/gnulib-tests/accept.c b/gnulib-tests/accept.c
index 5c4d1f35..2641cedb 100644
--- a/gnulib-tests/accept.c
+++ b/gnulib-tests/accept.c
@@ -1,6 +1,6 @@
 /* accept.c --- wrappers for Windows accept function
 
-   Copyright (C) 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 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
diff --git a/gnulib-tests/altstack-util.h b/gnulib-tests/altstack-util.h
index 8d0ee7e1..80e4d4ec 100644
--- a/gnulib-tests/altstack-util.h
+++ b/gnulib-tests/altstack-util.h
@@ -1,5 +1,5 @@
 /* Some auxiliary stuff for defining an alternate stack.
-   Copyright (C) 2010-2022 Free Software Foundation, Inc.
+   Copyright (C) 2010-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/anytostr.c b/gnulib-tests/anytostr.c
index 13827007..3b747896 100644
--- a/gnulib-tests/anytostr.c
+++ b/gnulib-tests/anytostr.c
@@ -1,6 +1,6 @@
 /* anytostr.c -- convert integers to printable strings
 
-   Copyright (C) 2001, 2006, 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2006, 2008-2023 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
diff --git a/gnulib-tests/arg-nonnull.h b/gnulib-tests/arg-nonnull.h
index e4513efe..9498ae1f 100644
--- a/gnulib-tests/arg-nonnull.h
+++ b/gnulib-tests/arg-nonnull.h
@@ -1,5 +1,5 @@
 /* A C macro for declaring that specific arguments must not be NULL.
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 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
diff --git a/gnulib-tests/arpa_inet.in.h b/gnulib-tests/arpa_inet.in.h
index f5d7db2d..12876b52 100644
--- a/gnulib-tests/arpa_inet.in.h
+++ b/gnulib-tests/arpa_inet.in.h
@@ -1,6 +1,6 @@
 /* A GNU-like <arpa/inet.h>.
 
-   Copyright (C) 2005-2006, 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2005-2006, 2008-2023 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
@@ -49,6 +49,11 @@
 #ifndef _@GUARD_PREFIX@_ARPA_INET_H
 #define _@GUARD_PREFIX@_ARPA_INET_H
 
+/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 /* Get all possible declarations of inet_ntop() and inet_pton().  */
 #if (@GNULIB_INET_NTOP@ || @GNULIB_INET_PTON@ || defined GNULIB_POSIXCHECK) \
     && @HAVE_WS2TCPIP_H@
diff --git a/gnulib-tests/asnprintf.c b/gnulib-tests/asnprintf.c
index 0c5c76ea..f4861bf8 100644
--- a/gnulib-tests/asnprintf.c
+++ b/gnulib-tests/asnprintf.c
@@ -1,5 +1,5 @@
 /* Formatted output to strings.
-   Copyright (C) 1999, 2002, 2006, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2002, 2006, 2009-2023 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
diff --git a/gnulib-tests/bind.c b/gnulib-tests/bind.c
index 199e0ba9..c67badec 100644
--- a/gnulib-tests/bind.c
+++ b/gnulib-tests/bind.c
@@ -1,6 +1,6 @@
 /* bind.c --- wrappers for Windows bind function
 
-   Copyright (C) 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 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
diff --git a/gnulib-tests/c++defs.h b/gnulib-tests/c++defs.h
index ad181558..458c014d 100644
--- a/gnulib-tests/c++defs.h
+++ b/gnulib-tests/c++defs.h
@@ -1,5 +1,5 @@
 /* C++ compatible function declaration macros.
-   Copyright (C) 2010-2022 Free Software Foundation, Inc.
+   Copyright (C) 2010-2023 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
@@ -99,6 +99,12 @@
    Example:
      _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...)
                                   _GL_ARG_NONNULL ((1)));
+
+   Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front
+   of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode.  (That's
+   because
+     [[...]] extern "C" <declaration>;
+   is invalid syntax in C++.)
  */
 #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \
   _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes)
diff --git a/gnulib-tests/c-strcasestr.c b/gnulib-tests/c-strcasestr.c
new file mode 100644
index 00000000..46fd4cdf
--- /dev/null
+++ b/gnulib-tests/c-strcasestr.c
@@ -0,0 +1,76 @@
+/* c-strcasestr.c -- case insensitive substring search in C locale
+   Copyright (C) 2005-2023 Free Software Foundation, Inc.
+   Written by Bruno Haible <bruno@clisp.org>, 2005.
+
+   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 <https://www.gnu.org/licenses/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include "c-strcasestr.h"
+
+#include <string.h>
+
+#include "c-ctype.h"
+#include "c-strcase.h"
+
+/* Two-Way algorithm.  */
+#define RETURN_TYPE char *
+#define AVAILABLE(h, h_l, j, n_l)                       \
+  (!memchr ((h) + (h_l), '\0', (j) + (n_l) - (h_l))     \
+   && ((h_l) = (j) + (n_l)))
+#define CANON_ELEMENT c_tolower
+#define CMP_FUNC(p1, p2, l)                             \
+  c_strncasecmp ((const char *) (p1), (const char *) (p2), l)
+#include "str-two-way.h"
+
+/* Find the first occurrence of NEEDLE in HAYSTACK, using case-insensitive
+   comparison from the C locale, regardless of the current locale.  */
+char *
+c_strcasestr (const char *haystack_start, const char *needle_start)
+{
+  const char *haystack = haystack_start;
+  const char *needle = needle_start;
+  size_t needle_len; /* Length of NEEDLE.  */
+  size_t haystack_len; /* Known minimum length of HAYSTACK.  */
+  bool ok = true; /* True if NEEDLE is prefix of HAYSTACK.  */
+
+  /* Determine length of NEEDLE, and in the process, make sure
+     HAYSTACK is at least as long (no point processing all of a long
+     NEEDLE if HAYSTACK is too short).  */
+  while (*haystack && *needle)
+    ok &= (c_tolower ((unsigned char) *haystack++)
+           == c_tolower ((unsigned char) *needle++));
+  if (*needle)
+    return NULL;
+  if (ok)
+    return (char *) haystack_start;
+  needle_len = needle - needle_start;
+  haystack = haystack_start + 1;
+  haystack_len = needle_len - 1;
+
+  /* Perform the search.  Abstract memory is considered to be an array
+     of 'unsigned char' values, not an array of 'char' values.  See
+     ISO C 99 section 6.2.6.1.  */
+  if (needle_len < LONG_NEEDLE_THRESHOLD)
+    return two_way_short_needle ((const unsigned char *) haystack,
+                                 haystack_len,
+                                 (const unsigned char *) needle_start,
+                                 needle_len);
+  return two_way_long_needle ((const unsigned char *) haystack, haystack_len,
+                              (const unsigned char *) needle_start,
+                              needle_len);
+}
+
+#undef LONG_NEEDLE_THRESHOLD
diff --git a/gnulib-tests/c-strcasestr.h b/gnulib-tests/c-strcasestr.h
new file mode 100644
index 00000000..f62ab1fc
--- /dev/null
+++ b/gnulib-tests/c-strcasestr.h
@@ -0,0 +1,36 @@
+/* Case-insensitive searching in a string in C locale.
+   Copyright (C) 2005, 2009-2023 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 <https://www.gnu.org/licenses/>.  */
+
+#ifndef C_STRCASESTR_H
+#define C_STRCASESTR_H
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Find the first occurrence of NEEDLE in HAYSTACK, using case-insensitive
+   comparison.  */
+extern char *c_strcasestr (const char *haystack, const char *needle);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* C_STRCASESTR_H */
diff --git a/gnulib-tests/connect.c b/gnulib-tests/connect.c
index d1600634..1ac4a74b 100644
--- a/gnulib-tests/connect.c
+++ b/gnulib-tests/connect.c
@@ -1,6 +1,6 @@
 /* connect.c --- wrappers for Windows connect function
 
-   Copyright (C) 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 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
diff --git a/gnulib-tests/fdopen.c b/gnulib-tests/fdopen.c
index f1c5dff1..6cd64707 100644
--- a/gnulib-tests/fdopen.c
+++ b/gnulib-tests/fdopen.c
@@ -1,5 +1,5 @@
 /* Open a stream with a given file descriptor.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 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
diff --git a/gnulib-tests/float+.h b/gnulib-tests/float+.h
index 9ab45208..e7531e46 100644
--- a/gnulib-tests/float+.h
+++ b/gnulib-tests/float+.h
@@ -1,5 +1,5 @@
 /* Supplemental information about the floating-point formats.
-   Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009-2023 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2007.
 
    This file is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/float.c b/gnulib-tests/float.c
index de850645..f81ff33d 100644
--- a/gnulib-tests/float.c
+++ b/gnulib-tests/float.c
@@ -1,5 +1,5 @@
 /* Auxiliary definitions for <float.h>.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2011.
 
    This file is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/float.in.h b/gnulib-tests/float.in.h
index a4183765..bf2c502c 100644
--- a/gnulib-tests/float.in.h
+++ b/gnulib-tests/float.in.h
@@ -1,6 +1,6 @@
 /* A correct <float.h>.
 
-   Copyright (C) 2007-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007-2023 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
diff --git a/gnulib-tests/fpucw.h b/gnulib-tests/fpucw.h
index 19218366..7dcb310e 100644
--- a/gnulib-tests/fpucw.h
+++ b/gnulib-tests/fpucw.h
@@ -1,5 +1,5 @@
 /* Manipulating the FPU control word.  -*- coding: utf-8 -*-
-   Copyright (C) 2007-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007-2023 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2007.
 
    This file is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/ftruncate.c b/gnulib-tests/ftruncate.c
index 4a9279b7..b662523e 100644
--- a/gnulib-tests/ftruncate.c
+++ b/gnulib-tests/ftruncate.c
@@ -1,5 +1,5 @@
 /* ftruncate emulations for native Windows.
-   Copyright (C) 1992-2022 Free Software Foundation, Inc.
+   Copyright (C) 1992-2023 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/gettimeofday.c b/gnulib-tests/gettimeofday.c
index 36c7920a..d896ec13 100644
--- a/gnulib-tests/gettimeofday.c
+++ b/gnulib-tests/gettimeofday.c
@@ -1,6 +1,6 @@
 /* Provide gettimeofday for systems that don't have it or for which it's broken.
 
-   Copyright (C) 2001-2003, 2005-2007, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2001-2003, 2005-2007, 2009-2023 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
diff --git a/gnulib-tests/glthread/thread.c b/gnulib-tests/glthread/thread.c
index 0b923c04..1f28be59 100644
--- a/gnulib-tests/glthread/thread.c
+++ b/gnulib-tests/glthread/thread.c
@@ -1,5 +1,5 @@
 /* Creating and controlling threads.
-   Copyright (C) 2005-2022 Free Software Foundation, Inc.
+   Copyright (C) 2005-2023 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
diff --git a/gnulib-tests/glthread/thread.h b/gnulib-tests/glthread/thread.h
index 6d98f2d6..88bc53ee 100644
--- a/gnulib-tests/glthread/thread.h
+++ b/gnulib-tests/glthread/thread.h
@@ -1,5 +1,5 @@
 /* Creating and controlling threads.
-   Copyright (C) 2005-2022 Free Software Foundation, Inc.
+   Copyright (C) 2005-2023 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
@@ -70,6 +70,11 @@
 #ifndef _GLTHREAD_THREAD_H
 #define _GLTHREAD_THREAD_H
 
+/* This file uses _Noreturn, HAVE_THREADS_H, HAVE_PTHREAD_ATFORK.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #include <errno.h>
 #include <stdlib.h>
 
@@ -228,7 +233,7 @@ extern const gl_thread_t gl_null_thread;
 #  define gl_thread_self() \
      (pthread_in_use () ? pthread_self () : (pthread_t) 0)
 #  define gl_thread_self_pointer() \
-     (pthread_in_use () ? (void *) pthread_self () : NULL)
+     (pthread_in_use () ? (void *) (pthread_t) pthread_self () : NULL)
 # endif
 # define gl_thread_exit(RETVAL) \
     (void) (pthread_in_use () ? (pthread_exit (RETVAL), 0) : 0)
diff --git a/gnulib-tests/gnulib.mk b/gnulib-tests/gnulib.mk
index e148867b..3556ae53 100644
--- a/gnulib-tests/gnulib.mk
+++ b/gnulib-tests/gnulib.mk
@@ -1,6 +1,6 @@
 ## DO NOT EDIT! GENERATED AUTOMATICALLY!
 ## Process this file with automake to produce Makefile.in.
-# Copyright (C) 2002-2022 Free Software Foundation, Inc.
+# Copyright (C) 2002-2023 Free Software Foundation, Inc.
 #
 # This file is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -81,11 +81,18 @@ EXTRA_DIST += test-accept.c signature.h macros.h
 
 ## end   gnulib module accept-tests
 
+## begin gnulib module alignasof-tests
+
+TESTS += test-alignasof
+check_PROGRAMS += test-alignasof
+EXTRA_DIST += test-alignasof.c macros.h
+
+## end   gnulib module alignasof-tests
+
 ## begin gnulib module alignof-tests
 
 TESTS += test-alignof
 check_PROGRAMS += test-alignof
-
 EXTRA_DIST += test-alignof.c
 
 ## end   gnulib module alignof-tests
@@ -114,7 +121,7 @@ EXTRA_DIST += test-alloca-opt.c
 
 TESTS += test-argmatch
 check_PROGRAMS += test-argmatch
-test_argmatch_LDADD = $(LDADD) @LIBINTL@ $(LIB_MBRTOWC)
+test_argmatch_LDADD = $(LDADD) @LIBINTL@ $(MBRTOWC_LIB)
 
 EXTRA_DIST += test-argmatch.c macros.h
 
@@ -163,6 +170,14 @@ EXTRA_DIST += test-arpa_inet.c
 
 ## end   gnulib module arpa_inet-tests
 
+## begin gnulib module assert-h-tests
+
+TESTS += test-assert
+check_PROGRAMS += test-assert
+EXTRA_DIST += test-assert.c
+
+## end   gnulib module assert-h-tests
+
 ## begin gnulib module binary-io-tests
 
 TESTS += test-binary-io.sh
@@ -201,11 +216,11 @@ EXTRA_DIST += test-bitrotate.c macros.h
 
 ## begin gnulib module btowc-tests
 
-TESTS += test-btowc1.sh test-btowc2.sh
+TESTS += test-btowc1.sh test-btowc2.sh test-btowc3.sh
 TESTS_ENVIRONMENT += LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@'
 check_PROGRAMS += test-btowc
-test_btowc_LDADD = $(LDADD) $(LIB_SETLOCALE)
-EXTRA_DIST += test-btowc1.sh test-btowc2.sh test-btowc.c signature.h macros.h
+test_btowc_LDADD = $(LDADD) $(SETLOCALE_LIB)
+EXTRA_DIST += test-btowc1.sh test-btowc2.sh test-btowc3.sh test-btowc.c signature.h macros.h
 
 ## end   gnulib module btowc-tests
 
@@ -213,7 +228,7 @@ EXTRA_DIST += test-btowc1.sh test-btowc2.sh test-btowc.c signature.h macros.h
 
 TESTS += test-c-ctype
 check_PROGRAMS += test-c-ctype
-test_c_ctype_LDADD = $(LDADD) $(LIB_SETLOCALE)
+test_c_ctype_LDADD = $(LDADD) $(SETLOCALE_LIB)
 EXTRA_DIST += test-c-ctype.c macros.h
 
 ## end   gnulib module c-ctype-tests
@@ -234,12 +249,29 @@ EXTRA_DIST += test-c-stack.c test-c-stack.sh test-c-stack2.sh macros.h
 TESTS += test-c-strcase.sh
 TESTS_ENVIRONMENT += LOCALE_FR='@LOCALE_FR@' LOCALE_TR_UTF8='@LOCALE_TR_UTF8@'
 check_PROGRAMS += test-c-strcasecmp test-c-strncasecmp
-test_c_strcasecmp_LDADD = $(LDADD) $(LIB_SETLOCALE)
-test_c_strncasecmp_LDADD = $(LDADD) $(LIB_SETLOCALE)
+test_c_strcasecmp_LDADD = $(LDADD) $(SETLOCALE_LIB)
+test_c_strncasecmp_LDADD = $(LDADD) $(SETLOCALE_LIB)
 EXTRA_DIST += test-c-strcase.sh test-c-strcasecmp.c test-c-strncasecmp.c macros.h
 
 ## end   gnulib module c-strcase-tests
 
+## begin gnulib module c-strcasestr
+
+libtests_a_SOURCES += c-strcasestr.h c-strcasestr.c
+
+EXTRA_DIST += str-two-way.h
+
+## end   gnulib module c-strcasestr
+
+## begin gnulib module c-strcasestr-tests
+
+TESTS += test-c-strcasestr
+check_PROGRAMS += test-c-strcasestr
+
+EXTRA_DIST += test-c-strcasestr.c macros.h
+
+## end   gnulib module c-strcasestr-tests
+
 ## begin gnulib module calloc-gnu-tests
 
 TESTS += test-calloc-gnu
@@ -307,7 +339,7 @@ TESTS += \
   test-dfa-match.sh
 
 check_PROGRAMS += test-dfa-match-aux
-test_dfa_match_aux_LDADD = $(LDADD) $(LIB_SETLOCALE) @LIBINTL@ $(LIB_MBRTOWC)
+test_dfa_match_aux_LDADD = $(LDADD) $(SETLOCALE_LIB) @LIBINTL@ $(MBRTOWC_LIB)
 EXTRA_DIST += test-dfa-match.sh test-dfa-match-aux.c test-dfa-invalid-char-class.sh test-dfa-invalid-merge.sh
 
 ## end   gnulib module dfa-tests
@@ -336,14 +368,6 @@ EXTRA_DIST += test-dup2.c signature.h macros.h
 
 ## end   gnulib module dup2-tests
 
-## begin gnulib module dynarray-tests
-
-TESTS += test-dynarray
-check_PROGRAMS += test-dynarray
-EXTRA_DIST += test-dynarray.c macros.h
-
-## end   gnulib module dynarray-tests
-
 ## begin gnulib module environ-tests
 
 TESTS += test-environ
@@ -362,6 +386,15 @@ EXTRA_DIST += test-errno.c
 
 ## end   gnulib module errno-tests
 
+## begin gnulib module error-tests
+
+TESTS += test-error.sh
+check_PROGRAMS += test-error
+test_error_LDADD = $(LDADD) $(LIBINTL)
+EXTRA_DIST += test-error.sh test-error.c macros.h
+
+## end   gnulib module error-tests
+
 ## begin gnulib module exclude-tests
 
 TESTS += \
@@ -375,7 +408,7 @@ TESTS += \
  test-exclude8.sh
 
 check_PROGRAMS += test-exclude
-test_exclude_LDADD = $(LDADD) $(LIBUNISTRING) @LIBINTL@ $(LIB_MBRTOWC) $(LIBTHREAD)
+test_exclude_LDADD = $(LDADD) $(LIBUNISTRING) @LIBINTL@ $(MBRTOWC_LIB) $(LIBTHREAD)
 EXTRA_DIST += test-exclude.c test-exclude1.sh test-exclude2.sh test-exclude3.sh test-exclude4.sh test-exclude5.sh test-exclude6.sh test-exclude7.sh test-exclude8.sh
 
 ## end   gnulib module exclude-tests
@@ -500,7 +533,7 @@ EXTRA_DIST += test-fnmatch-h.c
 
 TESTS += test-fnmatch
 check_PROGRAMS += test-fnmatch
-test_fnmatch_LDADD = $(LDADD) $(LIB_MBRTOWC)
+test_fnmatch_LDADD = $(LDADD) $(MBRTOWC_LIB)
 EXTRA_DIST += test-fnmatch.c signature.h macros.h
 
 ## end   gnulib module fnmatch-tests
@@ -680,10 +713,18 @@ endif
 TESTS += test-gettimeofday
 check_PROGRAMS += test-gettimeofday
 
-EXTRA_DIST += signature.h test-gettimeofday.c
+EXTRA_DIST += test-gettimeofday.c signature.h macros.h
 
 ## end   gnulib module gettimeofday-tests
 
+## begin gnulib module glibc-internal/dynarray-tests
+
+TESTS += test-dynarray
+check_PROGRAMS += test-dynarray
+EXTRA_DIST += test-dynarray.c macros.h
+
+## end   gnulib module glibc-internal/dynarray-tests
+
 ## begin gnulib module gperf
 
 GPERF = gperf
@@ -697,7 +738,7 @@ V_GPERF_0 = @echo "  GPERF   " $@;
 
 TESTS += test-hard-locale
 check_PROGRAMS += test-hard-locale
-test_hard_locale_LDADD = $(LDADD) $(LIB_SETLOCALE) @LIB_HARD_LOCALE@
+test_hard_locale_LDADD = $(LDADD) $(SETLOCALE_LIB) @HARD_LOCALE_LIB@
 # We cannot call this program 'locale', because the C++ compiler on Mac OS X
 # would then barf upon '#include <locale>'. So, call it 'current-locale'.
 noinst_PROGRAMS += current-locale
@@ -856,7 +897,7 @@ TESTS_ENVIRONMENT += \
   LOCALE_JA='@LOCALE_JA@' \
   LOCALE_ZH_CN='@LOCALE_ZH_CN@'
 check_PROGRAMS += test-iswdigit
-test_iswdigit_LDADD = $(LDADD) $(LIB_SETLOCALE) $(LIB_MBRTOWC)
+test_iswdigit_LDADD = $(LDADD) $(SETLOCALE_LIB) $(MBRTOWC_LIB)
 EXTRA_DIST += test-iswdigit.sh test-iswdigit.c signature.h macros.h
 
 ## end   gnulib module iswdigit-tests
@@ -870,7 +911,7 @@ TESTS_ENVIRONMENT += \
   LOCALE_JA='@LOCALE_JA@' \
   LOCALE_ZH_CN='@LOCALE_ZH_CN@'
 check_PROGRAMS += test-iswxdigit
-test_iswxdigit_LDADD = $(LDADD) $(LIB_SETLOCALE) $(LIB_MBRTOWC)
+test_iswxdigit_LDADD = $(LDADD) $(SETLOCALE_LIB) $(MBRTOWC_LIB)
 EXTRA_DIST += test-iswxdigit.sh test-iswxdigit.c signature.h macros.h
 
 ## end   gnulib module iswxdigit-tests
@@ -883,6 +924,14 @@ EXTRA_DIST += test-langinfo.c
 
 ## end   gnulib module langinfo-tests
 
+## begin gnulib module largefile-tests
+
+TESTS += test-largefile
+check_PROGRAMS += test-largefile
+EXTRA_DIST += test-largefile.c
+
+## end   gnulib module largefile-tests
+
 ## begin gnulib module limits-h-tests
 
 TESTS += test-limits-h
@@ -913,7 +962,7 @@ EXTRA_DIST += test-listen.c signature.h macros.h
 ## begin gnulib module localcharset-tests
 
 noinst_PROGRAMS += test-localcharset
-test_localcharset_LDADD = $(LDADD) $(LIB_SETLOCALE)
+test_localcharset_LDADD = $(LDADD) $(SETLOCALE_LIB)
 EXTRA_DIST += test-localcharset.c
 
 ## end   gnulib module localcharset-tests
@@ -946,7 +995,7 @@ EXTRA_DIST += localename-table.h localename.h
 
 TESTS += test-localename
 check_PROGRAMS += test-localename
-test_localename_LDADD = $(LDADD) $(LIB_SETLOCALE) @INTL_MACOSX_LIBS@ $(LIBTHREAD)
+test_localename_LDADD = $(LDADD) $(SETLOCALE_LIB) @INTL_MACOSX_LIBS@ $(LIBTHREAD)
 
 EXTRA_DIST += test-localename.c macros.h
 
@@ -985,12 +1034,31 @@ EXTRA_DIST += test-malloca.c
 
 ## end   gnulib module malloca-tests
 
+## begin gnulib module mbrlen-tests
+
+TESTS += \
+  test-mbrlen1.sh test-mbrlen2.sh test-mbrlen3.sh test-mbrlen4.sh \
+  test-mbrlen5.sh \
+  test-mbrlen-w32-1.sh test-mbrlen-w32-2.sh test-mbrlen-w32-3.sh \
+  test-mbrlen-w32-4.sh test-mbrlen-w32-5.sh test-mbrlen-w32-6.sh \
+  test-mbrlen-w32-7.sh
+TESTS_ENVIRONMENT += \
+  LOCALE_FR='@LOCALE_FR@' \
+  LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \
+  LOCALE_JA='@LOCALE_JA@' \
+  LOCALE_ZH_CN='@LOCALE_ZH_CN@'
+check_PROGRAMS += test-mbrlen test-mbrlen-w32
+test_mbrlen_LDADD = $(LDADD) $(SETLOCALE_LIB) $(MBRTOWC_LIB)
+EXTRA_DIST += test-mbrlen1.sh test-mbrlen2.sh test-mbrlen3.sh test-mbrlen4.sh test-mbrlen5.sh test-mbrlen.c test-mbrlen-w32-1.sh test-mbrlen-w32-2.sh test-mbrlen-w32-3.sh test-mbrlen-w32-4.sh test-mbrlen-w32-5.sh test-mbrlen-w32-6.sh test-mbrlen-w32-7.sh test-mbrlen-w32.c signature.h macros.h
+
+## end   gnulib module mbrlen-tests
+
 ## begin gnulib module mbscasecmp-tests
 
 TESTS += test-mbscasecmp.sh
 TESTS_ENVIRONMENT += LOCALE_TR_UTF8='@LOCALE_TR_UTF8@'
 check_PROGRAMS += test-mbscasecmp
-test_mbscasecmp_LDADD = $(LDADD) $(LIBUNISTRING) $(LIB_SETLOCALE) $(LIB_MBRTOWC)
+test_mbscasecmp_LDADD = $(LDADD) $(LIBUNISTRING) $(SETLOCALE_LIB) $(MBRTOWC_LIB)
 EXTRA_DIST += test-mbscasecmp.sh test-mbscasecmp.c macros.h
 
 ## end   gnulib module mbscasecmp-tests
@@ -1000,22 +1068,24 @@ EXTRA_DIST += test-mbscasecmp.sh test-mbscasecmp.c macros.h
 TESTS += test-mbsinit.sh
 TESTS_ENVIRONMENT += LOCALE_FR_UTF8='@LOCALE_FR_UTF8@'
 check_PROGRAMS += test-mbsinit
-test_mbsinit_LDADD = $(LDADD) $(LIB_SETLOCALE) $(LIB_MBRTOWC)
+test_mbsinit_LDADD = $(LDADD) $(SETLOCALE_LIB) $(MBRTOWC_LIB)
 EXTRA_DIST += test-mbsinit.sh test-mbsinit.c signature.h macros.h
 
 ## end   gnulib module mbsinit-tests
 
 ## begin gnulib module mbsrtowcs-tests
 
-TESTS += test-mbsrtowcs1.sh test-mbsrtowcs2.sh test-mbsrtowcs3.sh test-mbsrtowcs4.sh
+TESTS += \
+  test-mbsrtowcs1.sh test-mbsrtowcs2.sh test-mbsrtowcs3.sh test-mbsrtowcs4.sh \
+  test-mbsrtowcs5.sh
 TESTS_ENVIRONMENT += \
   LOCALE_FR='@LOCALE_FR@' \
   LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \
   LOCALE_JA='@LOCALE_JA@' \
   LOCALE_ZH_CN='@LOCALE_ZH_CN@'
 check_PROGRAMS += test-mbsrtowcs
-test_mbsrtowcs_LDADD = $(LDADD) $(LIB_SETLOCALE) $(LIB_MBRTOWC)
-EXTRA_DIST += test-mbsrtowcs1.sh test-mbsrtowcs2.sh test-mbsrtowcs3.sh test-mbsrtowcs4.sh test-mbsrtowcs.c signature.h macros.h
+test_mbsrtowcs_LDADD = $(LDADD) $(SETLOCALE_LIB) $(MBRTOWC_LIB)
+EXTRA_DIST += test-mbsrtowcs1.sh test-mbsrtowcs2.sh test-mbsrtowcs3.sh test-mbsrtowcs4.sh test-mbsrtowcs5.sh test-mbsrtowcs.c signature.h macros.h
 
 ## end   gnulib module mbsrtowcs-tests
 
@@ -1024,9 +1094,9 @@ EXTRA_DIST += test-mbsrtowcs1.sh test-mbsrtowcs2.sh test-mbsrtowcs3.sh test-mbsr
 TESTS += test-mbsstr1 test-mbsstr2.sh test-mbsstr3.sh
 TESTS_ENVIRONMENT += LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' LOCALE_ZH_CN='@LOCALE_ZH_CN@'
 check_PROGRAMS += test-mbsstr1 test-mbsstr2 test-mbsstr3
-test_mbsstr1_LDADD = $(LDADD) $(LIBUNISTRING) $(LIB_MBRTOWC)
-test_mbsstr2_LDADD = $(LDADD) $(LIBUNISTRING) $(LIB_SETLOCALE) $(LIB_MBRTOWC)
-test_mbsstr3_LDADD = $(LDADD) $(LIBUNISTRING) $(LIB_SETLOCALE) $(LIB_MBRTOWC)
+test_mbsstr1_LDADD = $(LDADD) $(LIBUNISTRING) $(MBRTOWC_LIB)
+test_mbsstr2_LDADD = $(LDADD) $(LIBUNISTRING) $(SETLOCALE_LIB) $(MBRTOWC_LIB)
+test_mbsstr3_LDADD = $(LDADD) $(LIBUNISTRING) $(SETLOCALE_LIB) $(MBRTOWC_LIB)
 EXTRA_DIST += test-mbsstr1.c test-mbsstr2.sh test-mbsstr2.c test-mbsstr3.sh test-mbsstr3.c macros.h
 
 ## end   gnulib module mbsstr-tests
@@ -1067,7 +1137,7 @@ endif
 
 TESTS += test-nanosleep
 check_PROGRAMS += test-nanosleep
-test_nanosleep_LDADD = $(LDADD) $(LIB_NANOSLEEP)
+test_nanosleep_LDADD = $(LDADD) $(NANOSLEEP_LIB)
 EXTRA_DIST += test-nanosleep.c signature.h macros.h
 
 ## end   gnulib module nanosleep-tests
@@ -1111,12 +1181,13 @@ EXTRA_DIST += test-netinet_in.c
 
 ## begin gnulib module nl_langinfo-tests
 
-TESTS += test-nl_langinfo.sh test-nl_langinfo-mt
+TESTS += test-nl_langinfo1.sh test-nl_langinfo2.sh test-nl_langinfo-mt
 TESTS_ENVIRONMENT += LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@'
-check_PROGRAMS += test-nl_langinfo test-nl_langinfo-mt
-test_nl_langinfo_LDADD = $(LDADD) $(LIB_SETLOCALE)
-test_nl_langinfo_mt_LDADD = $(LDADD) $(LIB_SETLOCALE) $(LIBMULTITHREAD) $(LIB_NANOSLEEP)
-EXTRA_DIST += test-nl_langinfo.sh test-nl_langinfo.c test-nl_langinfo-mt.c signature.h macros.h
+check_PROGRAMS += test-nl_langinfo1 test-nl_langinfo2 test-nl_langinfo-mt
+test_nl_langinfo1_LDADD = $(LDADD) $(SETLOCALE_LIB)
+test_nl_langinfo2_LDADD = $(LDADD) $(SETLOCALE_LIB)
+test_nl_langinfo_mt_LDADD = $(LDADD) $(SETLOCALE_LIB) $(LIBMULTITHREAD) $(NANOSLEEP_LIB)
+EXTRA_DIST += test-nl_langinfo1.sh test-nl_langinfo2.sh test-nl_langinfo1.c test-nl_langinfo2.c test-nl_langinfo-mt.c signature.h macros.h
 
 ## end   gnulib module nl_langinfo-tests
 
@@ -1190,7 +1261,7 @@ endif
 
 TESTS += test-pselect
 check_PROGRAMS += test-pselect
-test_pselect_LDADD = $(LDADD) @LIB_SELECT@ @LIBSOCKET@ @LIB_PTHREAD_SIGMASK@ $(INET_PTON_LIB)
+test_pselect_LDADD = $(LDADD) @SELECT_LIB@ @LIBSOCKET@ @PTHREAD_SIGMASK_LIB@ $(INET_PTON_LIB)
 EXTRA_DIST += test-pselect.c test-select.h macros.h signature.h
 
 ## end   gnulib module pselect-tests
@@ -1375,8 +1446,8 @@ endif
 
 TESTS += test-pthread_sigmask1 test-pthread_sigmask2
 check_PROGRAMS += test-pthread_sigmask1 test-pthread_sigmask2
-test_pthread_sigmask1_LDADD = $(LDADD) @LIB_PTHREAD_SIGMASK@
-test_pthread_sigmask2_LDADD = $(LDADD) @LIB_PTHREAD_SIGMASK@ @LIBMULTITHREAD@
+test_pthread_sigmask1_LDADD = $(LDADD) @PTHREAD_SIGMASK_LIB@
+test_pthread_sigmask2_LDADD = $(LDADD) @PTHREAD_SIGMASK_LIB@ @LIBMULTITHREAD@
 EXTRA_DIST += test-pthread_sigmask1.c test-pthread_sigmask2.c signature.h macros.h
 
 ## end   gnulib module pthread_sigmask-tests
@@ -1393,7 +1464,7 @@ endif
 
 TESTS += test-quotearg-simple
 check_PROGRAMS += test-quotearg-simple
-test_quotearg_simple_LDADD = $(LDADD) @LIBINTL@ $(LIB_MBRTOWC)
+test_quotearg_simple_LDADD = $(LDADD) @LIBINTL@ $(MBRTOWC_LIB)
 EXTRA_DIST += test-quotearg-simple.c test-quotearg.h macros.h zerosize-ptr.h
 
 ## end   gnulib module quotearg-simple-tests
@@ -1442,7 +1513,7 @@ EXTRA_DIST += test-reallocarray.c signature.h macros.h
 
 TESTS += test-regex
 check_PROGRAMS += test-regex
-test_regex_LDADD = $(LDADD) $(LIB_SETLOCALE) $(LIB_MBRTOWC) @LIBINTL@ $(LIBTHREAD)
+test_regex_LDADD = $(LDADD) $(SETLOCALE_LIB) $(MBRTOWC_LIB) @LIBINTL@ $(LIBTHREAD)
 EXTRA_DIST += test-regex.c macros.h
 
 ## end   gnulib module regex-tests
@@ -1497,9 +1568,9 @@ endif
 TESTS += test-select test-select-in.sh test-select-out.sh
 # test-select-stdin has to be run by hand.
 check_PROGRAMS += test-select test-select-fd test-select-stdin
-test_select_LDADD = $(LDADD) @LIB_SELECT@ @LIBSOCKET@ $(INET_PTON_LIB)
-test_select_fd_LDADD = $(LDADD) @LIB_SELECT@
-test_select_stdin_LDADD = $(LDADD) @LIB_SELECT@
+test_select_LDADD = $(LDADD) @SELECT_LIB@ @LIBSOCKET@ $(INET_PTON_LIB)
+test_select_fd_LDADD = $(LDADD) @SELECT_LIB@
+test_select_stdin_LDADD = $(LDADD) @SELECT_LIB@
 EXTRA_DIST += macros.h signature.h test-select.c test-select.h test-select-fd.c test-select-in.sh test-select-out.sh test-select-stdin.c
 
 ## end   gnulib module select-tests
@@ -1538,9 +1609,9 @@ check_PROGRAMS += \
   test-setlocale_null \
   test-setlocale_null-mt-one \
   test-setlocale_null-mt-all
-test_setlocale_null_LDADD = $(LDADD) @LIB_SETLOCALE_NULL@
-test_setlocale_null_mt_one_LDADD = $(LDADD) @LIB_SETLOCALE_NULL@ $(LIBMULTITHREAD) $(LIB_NANOSLEEP)
-test_setlocale_null_mt_all_LDADD = $(LDADD) @LIB_SETLOCALE_NULL@ $(LIBMULTITHREAD) $(LIB_NANOSLEEP)
+test_setlocale_null_LDADD = $(LDADD) @SETLOCALE_NULL_LIB@
+test_setlocale_null_mt_one_LDADD = $(LDADD) @SETLOCALE_NULL_LIB@ $(LIBMULTITHREAD) $(NANOSLEEP_LIB)
+test_setlocale_null_mt_all_LDADD = $(LDADD) @SETLOCALE_NULL_LIB@ $(LIBMULTITHREAD) $(NANOSLEEP_LIB)
 EXTRA_DIST += test-setlocale_null.c test-setlocale_null-mt-one.c test-setlocale_null-mt-all.c
 
 ## end   gnulib module setlocale-null-tests
@@ -1554,8 +1625,8 @@ TESTS_ENVIRONMENT += \
   LOCALE_JA='@LOCALE_JA@' \
   LOCALE_ZH_CN='@LOCALE_ZH_CN@'
 check_PROGRAMS += test-setlocale1 test-setlocale2
-test_setlocale1_LDADD = $(LDADD) @LIB_SETLOCALE@
-test_setlocale2_LDADD = $(LDADD) @LIB_SETLOCALE@
+test_setlocale1_LDADD = $(LDADD) @SETLOCALE_LIB@
+test_setlocale2_LDADD = $(LDADD) @SETLOCALE_LIB@
 EXTRA_DIST += test-setlocale1.sh test-setlocale1.c test-setlocale2.sh test-setlocale2.c signature.h macros.h
 
 ## end   gnulib module setlocale-tests
@@ -1751,19 +1822,11 @@ EXTRA_DIST += test-stat.h test-stat.c signature.h macros.h
 
 TESTS += test-stat-time
 check_PROGRAMS += test-stat-time
-test_stat_time_LDADD = $(LDADD) $(LIB_NANOSLEEP)
+test_stat_time_LDADD = $(LDADD) $(NANOSLEEP_LIB)
 EXTRA_DIST += test-stat-time.c macros.h nap.h
 
 ## end   gnulib module stat-time-tests
 
-## begin gnulib module stdalign-tests
-
-TESTS += test-stdalign
-check_PROGRAMS += test-stdalign
-EXTRA_DIST += test-stdalign.c macros.h
-
-## end   gnulib module stdalign-tests
-
 ## begin gnulib module stdbool-tests
 
 TESTS += test-stdbool
@@ -1772,6 +1835,14 @@ EXTRA_DIST += test-stdbool.c
 
 ## end   gnulib module stdbool-tests
 
+## begin gnulib module stdckdint-tests
+
+TESTS += test-stdckdint
+check_PROGRAMS += test-stdckdint
+EXTRA_DIST += macros.h test-intprops.c test-stdckdint.c
+
+## end   gnulib module stdckdint-tests
+
 ## begin gnulib module stddef-tests
 
 TESTS += test-stddef
@@ -1792,7 +1863,7 @@ EXTRA_DIST += test-stdint.c
 
 TESTS += test-stdio
 check_PROGRAMS += test-stdio
-EXTRA_DIST += test-stdio.c
+EXTRA_DIST += test-stdio.c nan.h macros.h
 
 ## end   gnulib module stdio-tests
 
@@ -2166,14 +2237,42 @@ EXTRA_DIST += test-thread_self.c test-thread_create.c macros.h
 
 ## end   gnulib module thread-tests
 
+## begin gnulib module time
+
+if GL_COND_OBJ_TIME
+libtests_a_SOURCES += time.c
+endif
+
+## end   gnulib module time
+
+## begin gnulib module time-h-tests
+
+TESTS += test-time-h
+check_PROGRAMS += test-time-h
+EXTRA_DIST += test-time-h.c
+
+## end   gnulib module time-h-tests
+
 ## begin gnulib module time-tests
 
 TESTS += test-time
 check_PROGRAMS += test-time
-EXTRA_DIST += test-time.c
+EXTRA_DIST += test-time.c signature.h macros.h
 
 ## end   gnulib module time-tests
 
+## begin gnulib module trim-tests
+
+TESTS += test-trim1.sh test-trim2.sh test-trim3.sh
+TESTS_ENVIRONMENT += \
+  LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \
+  LOCALE_ZH_CN='@LOCALE_ZH_CN@'
+check_PROGRAMS += test-trim
+test_trim_LDADD = $(LDADD) $(LIBUNISTRING) @LIBINTL@ $(MBRTOWC_LIB)
+EXTRA_DIST += test-trim1.sh test-trim2.sh test-trim3.sh test-trim.c macros.h
+
+## end   gnulib module trim-tests
+
 ## begin gnulib module unistd-safer-tests
 
 TESTS += test-dup-safer
@@ -2312,7 +2411,7 @@ TESTS_ENVIRONMENT += \
   LOCALE_JA='@LOCALE_JA@' \
   LOCALE_ZH_CN='@LOCALE_ZH_CN@'
 check_PROGRAMS += test-wcrtomb test-wcrtomb-w32
-test_wcrtomb_LDADD = $(LDADD) $(LIB_SETLOCALE)
+test_wcrtomb_LDADD = $(LDADD) $(SETLOCALE_LIB)
 EXTRA_DIST += test-wcrtomb.sh test-wcrtomb.c test-wcrtomb-w32-1.sh test-wcrtomb-w32-2.sh test-wcrtomb-w32-3.sh test-wcrtomb-w32-4.sh test-wcrtomb-w32-5.sh test-wcrtomb-w32-6.sh test-wcrtomb-w32-7.sh test-wcrtomb-w32.c signature.h macros.h
 
 ## end   gnulib module wcrtomb-tests
@@ -2329,7 +2428,7 @@ EXTRA_DIST += test-wctype-h.c macros.h
 
 TESTS += test-wcwidth
 check_PROGRAMS += test-wcwidth
-test_wcwidth_LDADD = $(LDADD) $(LIB_SETLOCALE) $(LIBUNISTRING)
+test_wcwidth_LDADD = $(LDADD) $(SETLOCALE_LIB) $(LIBUNISTRING)
 EXTRA_DIST += test-wcwidth.c signature.h macros.h
 
 ## end   gnulib module wcwidth-tests
@@ -2396,6 +2495,14 @@ EXTRA_DIST += test-xstrtol.c test-xstrtoul.c test-xstrtol.sh
 
 ## end   gnulib module xstrtol-tests
 
+## begin gnulib module year2038-tests
+
+TESTS += test-year2038
+check_PROGRAMS += test-year2038
+EXTRA_DIST += test-year2038.c
+
+## end   gnulib module year2038-tests
+
 all: all-notice
 all-notice:
 	@echo '## ---------------------------------------------------- ##'
diff --git a/gnulib-tests/hash-pjw.c b/gnulib-tests/hash-pjw.c
index 8ba139d5..74afac76 100644
--- a/gnulib-tests/hash-pjw.c
+++ b/gnulib-tests/hash-pjw.c
@@ -1,6 +1,6 @@
 /* hash-pjw.c -- compute a hash value from a NUL-terminated string.
 
-   Copyright (C) 2001, 2003, 2006, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2003, 2006, 2009-2023 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
diff --git a/gnulib-tests/hash-pjw.h b/gnulib-tests/hash-pjw.h
index cdf4da27..69af02f2 100644
--- a/gnulib-tests/hash-pjw.h
+++ b/gnulib-tests/hash-pjw.h
@@ -1,5 +1,5 @@
 /* hash-pjw.h -- declaration for a simple hash function
-   Copyright (C) 2001, 2003, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2003, 2009-2023 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
@@ -14,6 +14,11 @@
    You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
+/* This file uses _GL_ATTRIBUTE_PURE.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #include <stddef.h>
 
 /* Compute a hash code for a NUL-terminated string starting at X,
diff --git a/gnulib-tests/imaxtostr.c b/gnulib-tests/imaxtostr.c
index e84d8ff4..1ba2fb7a 100644
--- a/gnulib-tests/imaxtostr.c
+++ b/gnulib-tests/imaxtostr.c
@@ -1,6 +1,6 @@
 /* Convert 'intmax_t' integer to printable string.
 
-   Copyright (C) 2004-2022 Free Software Foundation, Inc.
+   Copyright (C) 2004-2023 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
diff --git a/gnulib-tests/inet_pton.c b/gnulib-tests/inet_pton.c
index a239b7d1..49a27bb5 100644
--- a/gnulib-tests/inet_pton.c
+++ b/gnulib-tests/inet_pton.c
@@ -1,6 +1,6 @@
 /* inet_pton.c -- convert IPv4 and IPv6 addresses from text to binary form
 
-   Copyright (C) 2006, 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2008-2023 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
diff --git a/gnulib-tests/init.sh b/gnulib-tests/init.sh
index d5d37c98..0494097e 100644
--- a/gnulib-tests/init.sh
+++ b/gnulib-tests/init.sh
@@ -1,6 +1,6 @@
 # source this file; set up for tests
 
-# Copyright (C) 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2009-2023 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
@@ -646,18 +646,19 @@ compare_dev_null_ ()
 
 for diff_opt_ in -u -U3 -c '' no; do
   test "$diff_opt_" != no &&
-    diff_out_=`exec 2>/dev/null; diff $diff_opt_ "$0" "$0" < /dev/null` &&
+    diff_out_=`exec 2>/dev/null
+      LC_ALL=C diff $diff_opt_ "$0" "$0" < /dev/null` &&
     break
 done
 if test "$diff_opt_" != no; then
   if test -z "$diff_out_"; then
-    compare_ () { diff $diff_opt_ "$@"; }
+    compare_ () { LC_ALL=C diff $diff_opt_ "$@"; }
   else
     compare_ ()
     {
       # If no differences were found, AIX and HP-UX 'diff' produce output
       # like "No differences encountered".  Hide this output.
-      diff $diff_opt_ "$@" > diff.out
+      LC_ALL=C diff $diff_opt_ "$@" > diff.out
       diff_status_=$?
       test $diff_status_ -eq 0 || cat diff.out || diff_status_=2
       rm -f diff.out || diff_status_=2
@@ -702,4 +703,4 @@ test -f "$srcdir/init.cfg" \
 setup_ "$@"
 # This trap is here, rather than in the setup_ function, because some
 # shells run the exit trap at shell function exit, rather than script exit.
-trap remove_tmp_ 0
+trap remove_tmp_ EXIT
diff --git a/gnulib-tests/inttostr.c b/gnulib-tests/inttostr.c
index 6d933cfb..29991535 100644
--- a/gnulib-tests/inttostr.c
+++ b/gnulib-tests/inttostr.c
@@ -1,6 +1,6 @@
 /* Convert 'int' integer to printable string.
 
-   Copyright (C) 2004-2022 Free Software Foundation, Inc.
+   Copyright (C) 2004-2023 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
diff --git a/gnulib-tests/inttostr.h b/gnulib-tests/inttostr.h
index 8a47e858..7e653f2d 100644
--- a/gnulib-tests/inttostr.h
+++ b/gnulib-tests/inttostr.h
@@ -1,6 +1,6 @@
 /* inttostr.h -- convert integers to printable strings
 
-   Copyright (C) 2001-2006, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2001-2006, 2009-2023 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
@@ -17,6 +17,11 @@
 
 /* Written by Paul Eggert */
 
+/* This file uses _GL_ATTRIBUTE_NODISCARD.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #include <stdint.h>
 #include <sys/types.h>
 
diff --git a/gnulib-tests/ioctl.c b/gnulib-tests/ioctl.c
index b1c7b2ee..65cce137 100644
--- a/gnulib-tests/ioctl.c
+++ b/gnulib-tests/ioctl.c
@@ -1,6 +1,6 @@
 /* ioctl.c --- wrappers for Windows ioctl function
 
-   Copyright (C) 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 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
diff --git a/gnulib-tests/itold.c b/gnulib-tests/itold.c
index fe4a3842..0ef4464e 100644
--- a/gnulib-tests/itold.c
+++ b/gnulib-tests/itold.c
@@ -1,5 +1,5 @@
 /* Replacement for 'int' to 'long double' conversion routine.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2011.
 
    This file is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/listen.c b/gnulib-tests/listen.c
index e67bdc9e..85600fa8 100644
--- a/gnulib-tests/listen.c
+++ b/gnulib-tests/listen.c
@@ -1,6 +1,6 @@
 /* listen.c --- wrappers for Windows listen function
 
-   Copyright (C) 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 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
diff --git a/gnulib-tests/locale.c b/gnulib-tests/locale.c
index d7ae6103..a71d885e 100644
--- a/gnulib-tests/locale.c
+++ b/gnulib-tests/locale.c
@@ -1,5 +1,5 @@
 /* Program that prints the names of the categories of the current locale.
-   Copyright (C) 2019-2022 Free Software Foundation, Inc.
+   Copyright (C) 2019-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/localename-table.c b/gnulib-tests/localename-table.c
index cb3a0907..c5c9266a 100644
--- a/gnulib-tests/localename-table.c
+++ b/gnulib-tests/localename-table.c
@@ -1,5 +1,5 @@
 /* Table that maps a locale object to the names of the locale categories.
-   Copyright (C) 2018-2022 Free Software Foundation, Inc.
+   Copyright (C) 2018-2023 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
diff --git a/gnulib-tests/localename-table.h b/gnulib-tests/localename-table.h
index cfc297c1..532c3c97 100644
--- a/gnulib-tests/localename-table.h
+++ b/gnulib-tests/localename-table.h
@@ -1,5 +1,5 @@
 /* Table that maps a locale object to the names of the locale categories.
-   Copyright (C) 2018-2022 Free Software Foundation, Inc.
+   Copyright (C) 2018-2023 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
diff --git a/gnulib-tests/localename.c b/gnulib-tests/localename.c
index 446fc033..3c1dc67c 100644
--- a/gnulib-tests/localename.c
+++ b/gnulib-tests/localename.c
@@ -1,5 +1,5 @@
 /* Determine name of the currently selected locale.
-   Copyright (C) 1995-2022 Free Software Foundation, Inc.
+   Copyright (C) 1995-2023 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
@@ -18,13 +18,18 @@
 /* Native Windows code written by Tor Lillqvist <tml@iki.fi>.  */
 /* Mac OS X code written by Bruno Haible <bruno@clisp.org>.  */
 
+/* Don't use __attribute__ __nonnull__ in this compilation unit.  Otherwise gcc
+   optimizes away the locale == NULL tests below in duplocale() and freelocale(),
+   or xlclang reports -Wtautological-pointer-compare warnings for these tests.
+ */
+#define _GL_ARG_NONNULL(params)
+
 #include <config.h>
 
 /* Specification.  */
 #include "localename.h"
 
 #include <limits.h>
-#include <stdbool.h>
 #include <stddef.h>
 #include <stdlib.h>
 #include <locale.h>
@@ -54,6 +59,9 @@ extern char * getlocalename_l(int, locale_t);
 # if HAVE_NAMELESS_LOCALES
 #  include "localename-table.h"
 # endif
+# if defined __HAIKU__
+#  include <dlfcn.h>
+# endif
 #endif
 
 #if HAVE_CFPREFERENCESCOPYAPPVALUE
@@ -3198,6 +3206,68 @@ gl_locale_name_thread_unsafe (int category, _GL_UNUSED const char *categoryname)
         };
         return ((struct __locale_t *) thread_locale)->categories[category];
 #   endif
+#  elif defined __HAIKU__
+        /* Since 2022, Haiku has per-thread locales.  locale_t is 'void *',
+           but in fact a 'LocaleBackendData *'.  */
+        struct LocaleBackendData {
+          int magic;
+          void /*BPrivate::Libroot::LocaleBackend*/ *backend;
+          void /*BPrivate::Libroot::LocaleDataBridge*/ *databridge;
+        };
+        void *thread_locale_backend =
+          ((struct LocaleBackendData *) thread_locale)->backend;
+        if (thread_locale_backend != NULL)
+          {
+            /* The only existing concrete subclass of
+               BPrivate::Libroot::LocaleBackend is
+               BPrivate::Libroot::ICULocaleBackend.
+               Invoke the (non-virtual) method
+               BPrivate::Libroot::ICULocaleBackend::_QueryLocale on it.
+               This method is located in a separate shared library,
+               libroot-addon-icu.so.  */
+            static void * volatile querylocale_method /* = NULL */;
+            static int volatile querylocale_found /* = 0 */;
+            /* Attempt to open this shared library, the first time we get
+               here.  */
+            if (querylocale_found == 0)
+              {
+                void *handle =
+                  dlopen ("/boot/system/lib/libroot-addon-icu.so", 0);
+                if (handle != NULL)
+                  {
+                    void *sym =
+                      dlsym (handle, "_ZN8BPrivate7Libroot16ICULocaleBackend12_QueryLocaleEi");
+                    if (sym != NULL)
+                      {
+                        querylocale_method = sym;
+                        querylocale_found = 1;
+                      }
+                    else
+                      /* Could not find the symbol.  */
+                      querylocale_found = -1;
+                  }
+                else
+                  /* Could not open the separate shared library.  */
+                  querylocale_found = -1;
+              }
+            if (querylocale_found > 0)
+              {
+                /* The _QueryLocale method is a non-static C++ method with
+                   parameters (int category) and return type 'const char *'.
+                   See
+                     haiku/headers/private/libroot/locale/ICULocaleBackend.h
+                     haiku/src/system/libroot/add-ons/icu/ICULocaleBackend.cpp
+                   This is the same as a C function with parameters
+                     (BPrivate::Libroot::LocaleBackend* this, int category)
+                   and return type 'const char *'.  Invoke it.  */
+                const char * (*querylocale_func) (void *, int) =
+                  (const char * (*) (void *, int)) querylocale_method;
+                return querylocale_func (thread_locale_backend, category);
+              }
+          }
+        else
+          /* It's the "C" or "POSIX" locale.  */
+          return "C";
 #  elif defined __ANDROID__
         return MB_CUR_MAX == 4 ? "C.UTF-8" : "C";
 #  endif
diff --git a/gnulib-tests/localename.h b/gnulib-tests/localename.h
index fd110818..c804e2d8 100644
--- a/gnulib-tests/localename.h
+++ b/gnulib-tests/localename.h
@@ -1,5 +1,5 @@
 /* Determine name of the currently selected locale.
-   Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009-2023 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
@@ -17,6 +17,11 @@
 #ifndef _GL_LOCALENAME_H
 #define _GL_LOCALENAME_H
 
+/* This file uses _GL_ATTRIBUTE_CONST, HAVE_CFPREFERENCESCOPYAPPVALUE.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #ifdef __cplusplus
 extern "C" {
 #endif
diff --git a/gnulib-tests/macros.h b/gnulib-tests/macros.h
index 7f5eb2de..eea90567 100644
--- a/gnulib-tests/macros.h
+++ b/gnulib-tests/macros.h
@@ -1,5 +1,5 @@
 /* Common macros used by gnulib tests.
-   Copyright (C) 2006-2022 Free Software Foundation, Inc.
+   Copyright (C) 2006-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/mmap-anon-util.h b/gnulib-tests/mmap-anon-util.h
index b03a2b80..08541221 100644
--- a/gnulib-tests/mmap-anon-util.h
+++ b/gnulib-tests/mmap-anon-util.h
@@ -1,5 +1,5 @@
 /* Some auxiliary stuff for using mmap & friends.
-   Copyright (C) 2002-2022 Free Software Foundation, Inc.
+   Copyright (C) 2002-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/nan.h b/gnulib-tests/nan.h
new file mode 100644
index 00000000..05f141d2
--- /dev/null
+++ b/gnulib-tests/nan.h
@@ -0,0 +1,85 @@
+/* Macros for not-a-number.
+   Copyright (C) 2007-2023 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+
+/* IBM z/OS supports both hexadecimal and IEEE floating-point formats. The
+   former does not support NaN and its isnan() implementation returns zero
+   for all values.  */
+#if defined __MVS__ && defined __IBMC__ && !defined __BFP__
+# error "NaN is not supported with IBM's hexadecimal floating-point format; please re-compile with -qfloat=ieee"
+#endif
+
+/* NaNf () returns a 'float' not-a-number.  */
+
+/* The Compaq (ex-DEC) C 6.4 compiler and the Microsoft MSVC 9 compiler choke
+   on the expression 0.0 / 0.0.  The IBM XL C compiler on z/OS complains.
+   PGI 16.10 complains.  */
+#if (defined __DECC || defined _MSC_VER \
+     || (defined __MVS__ && defined __IBMC__)   \
+     || defined __PGI)
+static float
+NaNf ()
+{
+  static float zero = 0.0f;
+  return zero / zero;
+}
+#else
+# define NaNf() (0.0f / 0.0f)
+#endif
+
+
+/* NaNd () returns a 'double' not-a-number.  */
+
+/* The Compaq (ex-DEC) C 6.4 compiler and the Microsoft MSVC 9 compiler choke
+   on the expression 0.0 / 0.0.  The IBM XL C compiler on z/OS complains.
+   PGI 16.10 complains.  */
+#if (defined __DECC || defined _MSC_VER \
+     || (defined __MVS__ && defined __IBMC__)   \
+     || defined __PGI)
+static double
+NaNd ()
+{
+  static double zero = 0.0;
+  return zero / zero;
+}
+#else
+# define NaNd() (0.0 / 0.0)
+#endif
+
+
+/* NaNl () returns a 'long double' not-a-number.  */
+
+/* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
+   runtime type conversion.
+   The Microsoft MSVC 9 compiler chokes on the expression 0.0L / 0.0L.
+   The IBM XL C compiler on z/OS complains.
+   PGI 16.10 complains.  */
+#ifdef __sgi
+static long double NaNl ()
+{
+  double zero = 0.0;
+  return zero / zero;
+}
+#elif defined _MSC_VER || (defined __MVS__ && defined __IBMC__) || defined __PGI
+static long double
+NaNl ()
+{
+  static long double zero = 0.0L;
+  return zero / zero;
+}
+#else
+# define NaNl() (0.0L / 0.0L)
+#endif
diff --git a/gnulib-tests/nanosleep.c b/gnulib-tests/nanosleep.c
index 446794ed..3f295f49 100644
--- a/gnulib-tests/nanosleep.c
+++ b/gnulib-tests/nanosleep.c
@@ -1,6 +1,6 @@
 /* Provide a replacement for the POSIX nanosleep function.
 
-   Copyright (C) 1999-2000, 2002, 2004-2022 Free Software Foundation, Inc.
+   Copyright (C) 1999-2000, 2002, 2004-2023 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
@@ -23,9 +23,7 @@
 #include <time.h>
 
 #include "intprops.h"
-#include "verify.h"
 
-#include <stdbool.h>
 #include <stdio.h>
 #include <sys/types.h>
 #include <sys/select.h>
@@ -59,7 +57,7 @@ nanosleep (const struct timespec *requested_delay,
 
   {
     /* Verify that time_t is large enough.  */
-    verify (TYPE_MAXIMUM (time_t) / 24 / 24 / 60 / 60);
+    static_assert (TYPE_MAXIMUM (time_t) / 24 / 24 / 60 / 60);
     const time_t limit = 24 * 24 * 60 * 60;
     time_t seconds = requested_delay->tv_sec;
     struct timespec intermediate;
diff --git a/gnulib-tests/nap.h b/gnulib-tests/nap.h
index 22c5933f..5dea86d4 100644
--- a/gnulib-tests/nap.h
+++ b/gnulib-tests/nap.h
@@ -1,5 +1,5 @@
 /* Assist in file system timestamp tests.
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 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
@@ -20,9 +20,8 @@
 # define GLTEST_NAP_H
 
 # include <limits.h>
-# include <stdbool.h>
 
-# include <intprops.h>
+# include <stdckdint.h>
 
 /* Avoid a conflict with a function called nap() on UnixWare.  */
 # if defined _SCO_DS || (defined __SCO_VERSION__ || defined __sysv5__)  /* OpenServer, UnixWare */
@@ -55,9 +54,9 @@ diff_timespec (struct timespec a, struct timespec b)
   if (! (bs < as || (bs == as && bns < ans)))
     return 0;
 
-  if (INT_SUBTRACT_WRAPV (as, bs, &sdiff)
-      || INT_MULTIPLY_WRAPV (sdiff, 1000000000, &sdiff)
-      || INT_ADD_WRAPV (sdiff, ans - bns, &sdiff))
+  if (ckd_sub (&sdiff, as, bs)
+      || ckd_mul (&sdiff, sdiff, 1000000000)
+      || ckd_add (&sdiff, sdiff, ans - bns))
     return INT_MAX;
 
   return sdiff;
diff --git a/gnulib-tests/netinet_in.in.h b/gnulib-tests/netinet_in.in.h
index e23807ca..f88923a3 100644
--- a/gnulib-tests/netinet_in.in.h
+++ b/gnulib-tests/netinet_in.in.h
@@ -1,5 +1,5 @@
 /* Substitute for <netinet/in.h>.
-   Copyright (C) 2007-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007-2023 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
diff --git a/gnulib-tests/offtostr.c b/gnulib-tests/offtostr.c
index df11155f..b02890f7 100644
--- a/gnulib-tests/offtostr.c
+++ b/gnulib-tests/offtostr.c
@@ -1,6 +1,6 @@
 /* Convert 'off_t' integer to printable string.
 
-   Copyright (C) 2004-2022 Free Software Foundation, Inc.
+   Copyright (C) 2004-2023 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
diff --git a/gnulib-tests/perror.c b/gnulib-tests/perror.c
index 977a9a55..a10cf71e 100644
--- a/gnulib-tests/perror.c
+++ b/gnulib-tests/perror.c
@@ -1,5 +1,5 @@
 /* Print a message describing error code.
-   Copyright (C) 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 Free Software Foundation, Inc.
    Written by Bruno Haible and Simon Josefsson.
 
    This file is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/printf-args.c b/gnulib-tests/printf-args.c
index 669c24a4..b2b21aee 100644
--- a/gnulib-tests/printf-args.c
+++ b/gnulib-tests/printf-args.c
@@ -1,5 +1,5 @@
 /* Decomposed printf argument list.
-   Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2022 Free Software
+   Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2023 Free Software
    Foundation, Inc.
 
    This file is free software: you can redistribute it and/or modify
@@ -29,6 +29,9 @@
 # include "printf-args.h"
 #endif
 
+/* Get INT_WIDTH.  */
+#include <limits.h>
+
 #ifdef STATIC
 STATIC
 #endif
@@ -71,6 +74,102 @@ PRINTF_FETCHARGS (va_list args, arguments *a)
       case TYPE_ULONGLONGINT:
         ap->a.a_ulonglongint = va_arg (args, unsigned long long int);
         break;
+      case TYPE_INT8_T:
+        #if INT8_WIDTH < INT_WIDTH
+        ap->a.a_int8_t = va_arg (args, /* int8_t */ int);
+        #else
+        ap->a.a_int8_t = va_arg (args, int8_t);
+        #endif
+        break;
+      case TYPE_UINT8_T:
+        #if UINT8_WIDTH < INT_WIDTH
+        ap->a.a_uint8_t = va_arg (args, /* uint8_t */ int);
+        #else
+        ap->a.a_uint8_t = va_arg (args, uint8_t);
+        #endif
+        break;
+      case TYPE_INT16_T:
+        #if INT16_WIDTH < INT_WIDTH
+        ap->a.a_int16_t = va_arg (args, /* int16_t */ int);
+        #else
+        ap->a.a_int16_t = va_arg (args, int16_t);
+        #endif
+        break;
+      case TYPE_UINT16_T:
+        #if UINT16_WIDTH < INT_WIDTH
+        ap->a.a_uint16_t = va_arg (args, /* uint16_t */ int);
+        #else
+        ap->a.a_uint16_t = va_arg (args, uint16_t);
+        #endif
+        break;
+      case TYPE_INT32_T:
+        #if INT32_WIDTH < INT_WIDTH
+        ap->a.a_int32_t = va_arg (args, /* int32_t */ int);
+        #else
+        ap->a.a_int32_t = va_arg (args, int32_t);
+        #endif
+        break;
+      case TYPE_UINT32_T:
+        #if UINT32_WIDTH < INT_WIDTH
+        ap->a.a_uint32_t = va_arg (args, /* uint32_t */ int);
+        #else
+        ap->a.a_uint32_t = va_arg (args, uint32_t);
+        #endif
+        break;
+      case TYPE_INT64_T:
+        ap->a.a_int64_t = va_arg (args, int64_t);
+        break;
+      case TYPE_UINT64_T:
+        ap->a.a_uint64_t = va_arg (args, uint64_t);
+        break;
+      case TYPE_INT_FAST8_T:
+        #if INT_FAST8_WIDTH < INT_WIDTH
+        ap->a.a_int_fast8_t = va_arg (args, /* int_fast8_t */ int);
+        #else
+        ap->a.a_int_fast8_t = va_arg (args, int_fast8_t);
+        #endif
+        break;
+      case TYPE_UINT_FAST8_T:
+        #if UINT_FAST8_WIDTH < INT_WIDTH
+        ap->a.a_uint_fast8_t = va_arg (args, /* uint_fast8_t */ int);
+        #else
+        ap->a.a_uint_fast8_t = va_arg (args, uint_fast8_t);
+        #endif
+        break;
+      case TYPE_INT_FAST16_T:
+        #if INT_FAST16_WIDTH < INT_WIDTH
+        ap->a.a_int_fast16_t = va_arg (args, /* int_fast16_t */ int);
+        #else
+        ap->a.a_int_fast16_t = va_arg (args, int_fast16_t);
+        #endif
+        break;
+      case TYPE_UINT_FAST16_T:
+        #if UINT_FAST16_WIDTH < INT_WIDTH
+        ap->a.a_uint_fast16_t = va_arg (args, /* uint_fast16_t */ int);
+        #else
+        ap->a.a_uint_fast16_t = va_arg (args, uint_fast16_t);
+        #endif
+        break;
+      case TYPE_INT_FAST32_T:
+        #if INT_FAST32_WIDTH < INT_WIDTH
+        ap->a.a_int_fast32_t = va_arg (args, /* int_fast32_t */ int);
+        #else
+        ap->a.a_int_fast32_t = va_arg (args, int_fast32_t);
+        #endif
+        break;
+      case TYPE_UINT_FAST32_T:
+        #if UINT_FAST32_WIDTH < INT_WIDTH
+        ap->a.a_uint_fast32_t = va_arg (args, /* uint_fast32_t */ int);
+        #else
+        ap->a.a_uint_fast32_t = va_arg (args, uint_fast32_t);
+        #endif
+        break;
+      case TYPE_INT_FAST64_T:
+        ap->a.a_int_fast64_t = va_arg (args, int_fast64_t);
+        break;
+      case TYPE_UINT_FAST64_T:
+        ap->a.a_uint_fast64_t = va_arg (args, uint_fast64_t);
+        break;
       case TYPE_DOUBLE:
         ap->a.a_double = va_arg (args, double);
         break;
@@ -136,6 +235,30 @@ PRINTF_FETCHARGS (va_list args, arguments *a)
       case TYPE_COUNT_LONGLONGINT_POINTER:
         ap->a.a_count_longlongint_pointer = va_arg (args, long long int *);
         break;
+      case TYPE_COUNT_INT8_T_POINTER:
+        ap->a.a_count_int8_t_pointer = va_arg (args, int8_t *);
+        break;
+      case TYPE_COUNT_INT16_T_POINTER:
+        ap->a.a_count_int16_t_pointer = va_arg (args, int16_t *);
+        break;
+      case TYPE_COUNT_INT32_T_POINTER:
+        ap->a.a_count_int32_t_pointer = va_arg (args, int32_t *);
+        break;
+      case TYPE_COUNT_INT64_T_POINTER:
+        ap->a.a_count_int64_t_pointer = va_arg (args, int64_t *);
+        break;
+      case TYPE_COUNT_INT_FAST8_T_POINTER:
+        ap->a.a_count_int_fast8_t_pointer = va_arg (args, int_fast8_t *);
+        break;
+      case TYPE_COUNT_INT_FAST16_T_POINTER:
+        ap->a.a_count_int_fast16_t_pointer = va_arg (args, int_fast16_t *);
+        break;
+      case TYPE_COUNT_INT_FAST32_T_POINTER:
+        ap->a.a_count_int_fast32_t_pointer = va_arg (args, int_fast32_t *);
+        break;
+      case TYPE_COUNT_INT_FAST64_T_POINTER:
+        ap->a.a_count_int_fast64_t_pointer = va_arg (args, int_fast64_t *);
+        break;
 #if ENABLE_UNISTDIO
       /* The unistdio extensions.  */
       case TYPE_U8_STRING:
diff --git a/gnulib-tests/printf-args.h b/gnulib-tests/printf-args.h
index 553fe961..11016102 100644
--- a/gnulib-tests/printf-args.h
+++ b/gnulib-tests/printf-args.h
@@ -1,5 +1,5 @@
 /* Decomposed printf argument list.
-   Copyright (C) 1999, 2002-2003, 2006-2007, 2011-2022 Free Software
+   Copyright (C) 1999, 2002-2003, 2006-2007, 2011-2023 Free Software
    Foundation, Inc.
 
    This file is free software: you can redistribute it and/or modify
@@ -41,6 +41,9 @@
 # include <wchar.h>
 #endif
 
+/* Get intN_t, uintN_t, intN_fast_t, uintN_fast_t.  */
+#include <stdint.h>
+
 /* Get va_list.  */
 #include <stdarg.h>
 
@@ -59,6 +62,26 @@ typedef enum
   TYPE_ULONGINT,
   TYPE_LONGLONGINT,
   TYPE_ULONGLONGINT,
+  /* According to ISO C 23 § 7.23.6.1, "all exact-width integer types",
+     "all minimum-width integer types", and "all fastest minimum-width integer
+     types" defined in <stdint.h> should be supported.  But for portability
+     between platforms, we support only those with N = 8, 16, 32, 64.  */
+  TYPE_INT8_T,
+  TYPE_UINT8_T,
+  TYPE_INT16_T,
+  TYPE_UINT16_T,
+  TYPE_INT32_T,
+  TYPE_UINT32_T,
+  TYPE_INT64_T,
+  TYPE_UINT64_T,
+  TYPE_INT_FAST8_T,
+  TYPE_UINT_FAST8_T,
+  TYPE_INT_FAST16_T,
+  TYPE_UINT_FAST16_T,
+  TYPE_INT_FAST32_T,
+  TYPE_UINT_FAST32_T,
+  TYPE_INT_FAST64_T,
+  TYPE_UINT_FAST64_T,
   TYPE_DOUBLE,
   TYPE_LONGDOUBLE,
   TYPE_CHAR,
@@ -74,7 +97,15 @@ typedef enum
   TYPE_COUNT_SHORT_POINTER,
   TYPE_COUNT_INT_POINTER,
   TYPE_COUNT_LONGINT_POINTER,
-  TYPE_COUNT_LONGLONGINT_POINTER
+  TYPE_COUNT_LONGLONGINT_POINTER,
+  TYPE_COUNT_INT8_T_POINTER,
+  TYPE_COUNT_INT16_T_POINTER,
+  TYPE_COUNT_INT32_T_POINTER,
+  TYPE_COUNT_INT64_T_POINTER,
+  TYPE_COUNT_INT_FAST8_T_POINTER,
+  TYPE_COUNT_INT_FAST16_T_POINTER,
+  TYPE_COUNT_INT_FAST32_T_POINTER,
+  TYPE_COUNT_INT_FAST64_T_POINTER
 #if ENABLE_UNISTDIO
   /* The unistdio extensions.  */
 , TYPE_U8_STRING
@@ -99,7 +130,23 @@ typedef struct
     unsigned long int           a_ulongint;
     long long int               a_longlongint;
     unsigned long long int      a_ulonglongint;
-    float                       a_float;
+    int8_t                      a_int8_t;
+    uint8_t                     a_uint8_t;
+    int16_t                     a_int16_t;
+    uint16_t                    a_uint16_t;
+    int32_t                     a_int32_t;
+    uint32_t                    a_uint32_t;
+    int64_t                     a_int64_t;
+    uint64_t                    a_uint64_t;
+    int_fast8_t                 a_int_fast8_t;
+    uint_fast8_t                a_uint_fast8_t;
+    int_fast16_t                a_int_fast16_t;
+    uint_fast16_t               a_uint_fast16_t;
+    int_fast32_t                a_int_fast32_t;
+    uint_fast32_t               a_uint_fast32_t;
+    int_fast64_t                a_int_fast64_t;
+    uint_fast64_t               a_uint_fast64_t;
+    float                       a_float;                     /* unused */
     double                      a_double;
     long double                 a_longdouble;
     int                         a_char;
@@ -116,6 +163,14 @@ typedef struct
     int *                       a_count_int_pointer;
     long int *                  a_count_longint_pointer;
     long long int *             a_count_longlongint_pointer;
+    int8_t *                    a_count_int8_t_pointer;
+    int16_t *                   a_count_int16_t_pointer;
+    int32_t *                   a_count_int32_t_pointer;
+    int64_t *                   a_count_int64_t_pointer;
+    int_fast8_t *               a_count_int_fast8_t_pointer;
+    int_fast16_t *              a_count_int_fast16_t_pointer;
+    int_fast32_t *              a_count_int_fast32_t_pointer;
+    int_fast64_t *              a_count_int_fast64_t_pointer;
 #if ENABLE_UNISTDIO
     /* The unistdio extensions.  */
     const uint8_t *             a_u8_string;
diff --git a/gnulib-tests/printf-parse.c b/gnulib-tests/printf-parse.c
index aab02dc5..d3f2c3cb 100644
--- a/gnulib-tests/printf-parse.c
+++ b/gnulib-tests/printf-parse.c
@@ -1,5 +1,5 @@
 /* Formatted output to strings.
-   Copyright (C) 1999-2000, 2002-2003, 2006-2022 Free Software Foundation, Inc.
+   Copyright (C) 1999-2000, 2002-2003, 2006-2023 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
@@ -326,226 +326,317 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
             arg_type type;
 
             /* Parse argument type/size specifiers.  */
-            {
-              int flags = 0;
-
-              for (;;)
-                {
-                  if (*cp == 'h')
-                    {
-                      flags |= (1 << (flags & 1));
-                      cp++;
-                    }
-                  else if (*cp == 'L')
-                    {
-                      flags |= 4;
-                      cp++;
-                    }
-                  else if (*cp == 'l')
-                    {
-                      flags += 8;
-                      cp++;
-                    }
-                  else if (*cp == 'j')
-                    {
-                      if (sizeof (intmax_t) > sizeof (long))
-                        {
-                          /* intmax_t = long long */
-                          flags += 16;
-                        }
-                      else if (sizeof (intmax_t) > sizeof (int))
-                        {
-                          /* intmax_t = long */
-                          flags += 8;
-                        }
-                      cp++;
-                    }
-                  else if (*cp == 'z' || *cp == 'Z')
-                    {
-                      /* 'z' is standardized in ISO C 99, but glibc uses 'Z'
-                         because the warning facility in gcc-2.95.2 understands
-                         only 'Z' (see gcc-2.95.2/gcc/c-common.c:1784).  */
-                      if (sizeof (size_t) > sizeof (long))
-                        {
-                          /* size_t = long long */
-                          flags += 16;
-                        }
-                      else if (sizeof (size_t) > sizeof (int))
-                        {
-                          /* size_t = long */
-                          flags += 8;
-                        }
-                      cp++;
-                    }
-                  else if (*cp == 't')
-                    {
-                      if (sizeof (ptrdiff_t) > sizeof (long))
-                        {
-                          /* ptrdiff_t = long long */
-                          flags += 16;
-                        }
-                      else if (sizeof (ptrdiff_t) > sizeof (int))
-                        {
-                          /* ptrdiff_t = long */
-                          flags += 8;
-                        }
-                      cp++;
-                    }
+            /* Relevant for the conversion characters d, i.  */
+            arg_type signed_type = TYPE_INT;
+            /* Relevant for the conversion characters b, o, u, x, X.  */
+            arg_type unsigned_type = TYPE_UINT;
+            /* Relevant for the conversion characters n.  */
+            arg_type pointer_type = TYPE_COUNT_INT_POINTER;
+            /* Relevant for the conversion characters a, A, e, E, f, F, g, G.  */
+            arg_type floatingpoint_type = TYPE_DOUBLE;
+
+            if (*cp == 'h')
+              {
+                if (cp[1] == 'h')
+                  {
+                    signed_type = TYPE_SCHAR;
+                    unsigned_type = TYPE_UCHAR;
+                    pointer_type = TYPE_COUNT_SCHAR_POINTER;
+                    cp += 2;
+                  }
+                else
+                  {
+                    signed_type = TYPE_SHORT;
+                    unsigned_type = TYPE_USHORT;
+                    pointer_type = TYPE_COUNT_SHORT_POINTER;
+                    cp++;
+                  }
+              }
+            else if (*cp == 'l')
+              {
+                if (cp[1] == 'l')
+                  {
+                    signed_type = TYPE_LONGLONGINT;
+                    unsigned_type = TYPE_ULONGLONGINT;
+                    pointer_type = TYPE_COUNT_LONGLONGINT_POINTER;
+                    /* For backward compatibility only.  */
+                    floatingpoint_type = TYPE_LONGDOUBLE;
+                    cp += 2;
+                  }
+                else
+                  {
+                    signed_type = TYPE_LONGINT;
+                    unsigned_type = TYPE_ULONGINT;
+                    pointer_type = TYPE_COUNT_LONGINT_POINTER;
+                    cp++;
+                  }
+              }
+            else if (*cp == 'j')
+              {
+                if (sizeof (intmax_t) > sizeof (long))
+                  {
+                    /* intmax_t = long long */
+                    signed_type = TYPE_LONGLONGINT;
+                    unsigned_type = TYPE_ULONGLONGINT;
+                    pointer_type = TYPE_COUNT_LONGLONGINT_POINTER;
+                    /* For backward compatibility only.  */
+                    floatingpoint_type = TYPE_LONGDOUBLE;
+                  }
+                else if (sizeof (intmax_t) > sizeof (int))
+                  {
+                    /* intmax_t = long */
+                    signed_type = TYPE_LONGINT;
+                    unsigned_type = TYPE_ULONGINT;
+                    pointer_type = TYPE_COUNT_LONGINT_POINTER;
+                  }
+                cp++;
+              }
+            else if (*cp == 'z' || *cp == 'Z')
+              {
+                /* 'z' is standardized in ISO C 99, but glibc uses 'Z'
+                   because the warning facility in gcc-2.95.2 understands
+                   only 'Z' (see gcc-2.95.2/gcc/c-common.c:1784).  */
+                if (sizeof (size_t) > sizeof (long))
+                  {
+                    /* size_t = unsigned long long */
+                    signed_type = TYPE_LONGLONGINT;
+                    unsigned_type = TYPE_ULONGLONGINT;
+                    pointer_type = TYPE_COUNT_LONGLONGINT_POINTER;
+                    /* For backward compatibility only.  */
+                    floatingpoint_type = TYPE_LONGDOUBLE;
+                  }
+                else if (sizeof (size_t) > sizeof (int))
+                  {
+                    /* size_t = unsigned long */
+                    signed_type = TYPE_LONGINT;
+                    unsigned_type = TYPE_ULONGINT;
+                    pointer_type = TYPE_COUNT_LONGINT_POINTER;
+                  }
+                cp++;
+              }
+            else if (*cp == 't')
+              {
+                if (sizeof (ptrdiff_t) > sizeof (long))
+                  {
+                    /* ptrdiff_t = long long */
+                    signed_type = TYPE_LONGLONGINT;
+                    unsigned_type = TYPE_ULONGLONGINT;
+                    pointer_type = TYPE_COUNT_LONGLONGINT_POINTER;
+                    /* For backward compatibility only.  */
+                    floatingpoint_type = TYPE_LONGDOUBLE;
+                  }
+                else if (sizeof (ptrdiff_t) > sizeof (int))
+                  {
+                    /* ptrdiff_t = long */
+                    signed_type = TYPE_LONGINT;
+                    unsigned_type = TYPE_ULONGINT;
+                    pointer_type = TYPE_COUNT_LONGINT_POINTER;
+                  }
+                cp++;
+              }
+            else if (*cp == 'w')
+              {
+                /* wN and wfN are standardized in ISO C 23.  */
+                if (cp[1] == 'f')
+                  {
+                    if (cp[2] == '8')
+                      {
+                        signed_type = TYPE_INT_FAST8_T;
+                        unsigned_type = TYPE_UINT_FAST8_T;
+                        pointer_type = TYPE_COUNT_INT_FAST8_T_POINTER;
+                        cp += 3;
+                      }
+                    else if (cp[2] == '1' && cp[3] == '6')
+                      {
+                        signed_type = TYPE_INT_FAST16_T;
+                        unsigned_type = TYPE_UINT_FAST16_T;
+                        pointer_type = TYPE_COUNT_INT_FAST16_T_POINTER;
+                        cp += 4;
+                      }
+                    else if (cp[2] == '3' && cp[3] == '2')
+                      {
+                        signed_type = TYPE_INT_FAST32_T;
+                        unsigned_type = TYPE_UINT_FAST32_T;
+                        pointer_type = TYPE_COUNT_INT_FAST32_T_POINTER;
+                        cp += 4;
+                      }
+                    else if (cp[2] == '6' && cp[3] == '4')
+                      {
+                        signed_type = TYPE_INT_FAST64_T;
+                        unsigned_type = TYPE_UINT_FAST64_T;
+                        pointer_type = TYPE_COUNT_INT_FAST64_T_POINTER;
+                        cp += 4;
+                      }
+                  }
+                else
+                  {
+                    if (cp[1] == '8')
+                      {
+                        signed_type = TYPE_INT8_T;
+                        unsigned_type = TYPE_UINT8_T;
+                        pointer_type = TYPE_COUNT_INT8_T_POINTER;
+                        cp += 2;
+                      }
+                    else if (cp[1] == '1' && cp[2] == '6')
+                      {
+                        signed_type = TYPE_INT16_T;
+                        unsigned_type = TYPE_UINT16_T;
+                        pointer_type = TYPE_COUNT_INT16_T_POINTER;
+                        cp += 3;
+                      }
+                    else if (cp[1] == '3' && cp[2] == '2')
+                      {
+                        signed_type = TYPE_INT32_T;
+                        unsigned_type = TYPE_UINT32_T;
+                        pointer_type = TYPE_COUNT_INT32_T_POINTER;
+                        cp += 3;
+                      }
+                    else if (cp[1] == '6' && cp[2] == '4')
+                      {
+                        signed_type = TYPE_INT64_T;
+                        unsigned_type = TYPE_UINT64_T;
+                        pointer_type = TYPE_COUNT_INT64_T_POINTER;
+                        cp += 3;
+                      }
+                  }
+              }
+            else if (*cp == 'L')
+              {
+                signed_type = TYPE_LONGLONGINT;
+                unsigned_type = TYPE_ULONGLONGINT;
+                pointer_type = TYPE_COUNT_LONGLONGINT_POINTER;
+                floatingpoint_type = TYPE_LONGDOUBLE;
+                cp++;
+              }
 #if defined __APPLE__ && defined __MACH__
-                  /* On Mac OS X 10.3, PRIdMAX is defined as "qd".
-                     We cannot change it to "lld" because PRIdMAX must also
-                     be understood by the system's printf routines.  */
-                  else if (*cp == 'q')
-                    {
-                      if (64 / 8 > sizeof (long))
-                        {
-                          /* int64_t = long long */
-                          flags += 16;
-                        }
-                      else
-                        {
-                          /* int64_t = long */
-                          flags += 8;
-                        }
-                      cp++;
-                    }
+            /* On Mac OS X 10.3, PRIdMAX is defined as "qd".
+               We cannot change it to "lld" because PRIdMAX must also
+               be understood by the system's printf routines.  */
+            else if (*cp == 'q')
+              {
+                if (64 / 8 > sizeof (long))
+                  {
+                    /* int64_t = long long */
+                    signed_type = TYPE_LONGLONGINT;
+                    unsigned_type = TYPE_ULONGLONGINT;
+                    pointer_type = TYPE_COUNT_LONGLONGINT_POINTER;
+                    /* For backward compatibility only.  */
+                    floatingpoint_type = TYPE_LONGDOUBLE;
+                  }
+                else
+                  {
+                    /* int64_t = long */
+                    signed_type = TYPE_LONGINT;
+                    unsigned_type = TYPE_ULONGINT;
+                    pointer_type = TYPE_COUNT_LONGINT_POINTER;
+                  }
+                cp++;
+              }
 #endif
 #if defined _WIN32 && ! defined __CYGWIN__
-                  /* On native Windows, PRIdMAX is defined as "I64d".
-                     We cannot change it to "lld" because PRIdMAX must also
-                     be understood by the system's printf routines.  */
-                  else if (*cp == 'I' && cp[1] == '6' && cp[2] == '4')
-                    {
-                      if (64 / 8 > sizeof (long))
-                        {
-                          /* __int64 = long long */
-                          flags += 16;
-                        }
-                      else
-                        {
-                          /* __int64 = long */
-                          flags += 8;
-                        }
-                      cp += 3;
-                    }
+            /* On native Windows, PRIdMAX is defined as "I64d".
+               We cannot change it to "lld" because PRIdMAX must also
+               be understood by the system's printf routines.  */
+            else if (*cp == 'I' && cp[1] == '6' && cp[2] == '4')
+              {
+                if (64 / 8 > sizeof (long))
+                  {
+                    /* __int64_t = long long */
+                    signed_type = TYPE_LONGLONGINT;
+                    unsigned_type = TYPE_ULONGLONGINT;
+                    pointer_type = TYPE_COUNT_LONGLONGINT_POINTER;
+                    /* For backward compatibility only.  */
+                    floatingpoint_type = TYPE_LONGDOUBLE;
+                  }
+                else
+                  {
+                    /* __int64_t = long */
+                    signed_type = TYPE_LONGINT;
+                    unsigned_type = TYPE_ULONGINT;
+                    pointer_type = TYPE_COUNT_LONGINT_POINTER;
+                  }
+                cp++;
+              }
 #endif
-                  else
-                    break;
-                }
 
-              /* Read the conversion character.  */
-              c = *cp++;
-              switch (c)
-                {
-                case 'd': case 'i':
-                  /* If 'long long' is larger than 'long':  */
-                  if (flags >= 16 || (flags & 4))
-                    type = TYPE_LONGLONGINT;
-                  else
-                  /* If 'long long' is the same as 'long', we parse "lld" into
-                     TYPE_LONGINT.  */
-                  if (flags >= 8)
-                    type = TYPE_LONGINT;
-                  else if (flags & 2)
-                    type = TYPE_SCHAR;
-                  else if (flags & 1)
-                    type = TYPE_SHORT;
-                  else
-                    type = TYPE_INT;
-                  break;
-                case 'o': case 'u': case 'x': case 'X':
-                  /* If 'unsigned long long' is larger than 'unsigned long':  */
-                  if (flags >= 16 || (flags & 4))
-                    type = TYPE_ULONGLONGINT;
-                  else
-                  /* If 'unsigned long long' is the same as 'unsigned long', we
-                     parse "llu" into TYPE_ULONGINT.  */
-                  if (flags >= 8)
-                    type = TYPE_ULONGINT;
-                  else if (flags & 2)
-                    type = TYPE_UCHAR;
-                  else if (flags & 1)
-                    type = TYPE_USHORT;
-                  else
-                    type = TYPE_UINT;
-                  break;
-                case 'f': case 'F': case 'e': case 'E': case 'g': case 'G':
-                case 'a': case 'A':
-                  if (flags >= 16 || (flags & 4))
-                    type = TYPE_LONGDOUBLE;
-                  else
-                    type = TYPE_DOUBLE;
-                  break;
-                case 'c':
-                  if (flags >= 8)
+            /* Read the conversion character.  */
+            c = *cp++;
+            switch (c)
+              {
+              case 'd': case 'i':
+                type = signed_type;
+                break;
+              case 'b': case 'o': case 'u': case 'x': case 'X':
+              #if SUPPORT_GNU_PRINTF_DIRECTIVES \
+                  || (__GLIBC__ + (__GLIBC_MINOR__ >= 35) > 2)
+              case 'B':
+              #endif
+                type = unsigned_type;
+                break;
+              case 'f': case 'F': case 'e': case 'E': case 'g': case 'G':
+              case 'a': case 'A':
+                type = floatingpoint_type;
+                break;
+              case 'c':
+                if (signed_type == TYPE_LONGINT
+                    /* For backward compatibility only.  */
+                    || signed_type == TYPE_LONGLONGINT)
 #if HAVE_WINT_T
-                    type = TYPE_WIDE_CHAR;
+                  type = TYPE_WIDE_CHAR;
 #else
-                    goto error;
+                  goto error;
 #endif
-                  else
-                    type = TYPE_CHAR;
-                  break;
+                else
+                  type = TYPE_CHAR;
+                break;
 #if HAVE_WINT_T
-                case 'C':
-                  type = TYPE_WIDE_CHAR;
-                  c = 'c';
-                  break;
+              case 'C':
+                type = TYPE_WIDE_CHAR;
+                c = 'c';
+                break;
 #endif
-                case 's':
-                  if (flags >= 8)
+              case 's':
+                if (signed_type == TYPE_LONGINT
+                    /* For backward compatibility only.  */
+                    || signed_type == TYPE_LONGLONGINT)
 #if HAVE_WCHAR_T
-                    type = TYPE_WIDE_STRING;
+                  type = TYPE_WIDE_STRING;
 #else
-                    goto error;
+                  goto error;
 #endif
-                  else
-                    type = TYPE_STRING;
-                  break;
+                else
+                  type = TYPE_STRING;
+                break;
 #if HAVE_WCHAR_T
-                case 'S':
-                  type = TYPE_WIDE_STRING;
-                  c = 's';
-                  break;
+              case 'S':
+                type = TYPE_WIDE_STRING;
+                c = 's';
+                break;
 #endif
-                case 'p':
-                  type = TYPE_POINTER;
-                  break;
-                case 'n':
-                  /* If 'long long' is larger than 'long':  */
-                  if (flags >= 16 || (flags & 4))
-                    type = TYPE_COUNT_LONGLONGINT_POINTER;
-                  else
-                  /* If 'long long' is the same as 'long', we parse "lln" into
-                     TYPE_COUNT_LONGINT_POINTER.  */
-                  if (flags >= 8)
-                    type = TYPE_COUNT_LONGINT_POINTER;
-                  else if (flags & 2)
-                    type = TYPE_COUNT_SCHAR_POINTER;
-                  else if (flags & 1)
-                    type = TYPE_COUNT_SHORT_POINTER;
-                  else
-                    type = TYPE_COUNT_INT_POINTER;
-                  break;
+              case 'p':
+                type = TYPE_POINTER;
+                break;
+              case 'n':
+                type = pointer_type;
+                break;
 #if ENABLE_UNISTDIO
-                /* The unistdio extensions.  */
-                case 'U':
-                  if (flags >= 16)
-                    type = TYPE_U32_STRING;
-                  else if (flags >= 8)
-                    type = TYPE_U16_STRING;
-                  else
-                    type = TYPE_U8_STRING;
-                  break;
+              /* The unistdio extensions.  */
+              case 'U':
+                if (signed_type == TYPE_LONGLONGINT)
+                  type = TYPE_U32_STRING;
+                else if (signed_type == TYPE_LONGINT)
+                  type = TYPE_U16_STRING;
+                else
+                  type = TYPE_U8_STRING;
+                break;
 #endif
-                case '%':
-                  type = TYPE_NONE;
-                  break;
-                default:
-                  /* Unknown conversion character.  */
-                  goto error;
-                }
-            }
+              case '%':
+                type = TYPE_NONE;
+                break;
+              default:
+                /* Unknown conversion character.  */
+                goto error;
+              }
 
             if (type != TYPE_NONE)
               {
diff --git a/gnulib-tests/printf-parse.h b/gnulib-tests/printf-parse.h
index b12ccea3..45febac1 100644
--- a/gnulib-tests/printf-parse.h
+++ b/gnulib-tests/printf-parse.h
@@ -1,5 +1,5 @@
 /* Parse printf format string.
-   Copyright (C) 1999, 2002-2003, 2005, 2007, 2010-2022 Free Software
+   Copyright (C) 1999, 2002-2003, 2005, 2007, 2010-2023 Free Software
    Foundation, Inc.
 
    This file is free software: you can redistribute it and/or modify
@@ -61,7 +61,7 @@ typedef struct
   const char* precision_start;
   const char* precision_end;
   size_t precision_arg_index;
-  char conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */
+  char conversion; /* d i b B o u x X f F e E g G a A c s p n U % but not C S */
   size_t arg_index;
 }
 char_directive;
@@ -91,7 +91,7 @@ typedef struct
   const uint8_t* precision_start;
   const uint8_t* precision_end;
   size_t precision_arg_index;
-  uint8_t conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */
+  uint8_t conversion; /* d i b B o u x X f F e E g G a A c s p n U % but not C S */
   size_t arg_index;
 }
 u8_directive;
@@ -119,7 +119,7 @@ typedef struct
   const uint16_t* precision_start;
   const uint16_t* precision_end;
   size_t precision_arg_index;
-  uint16_t conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */
+  uint16_t conversion; /* d i b B o u x X f F e E g G a A c s p n U % but not C S */
   size_t arg_index;
 }
 u16_directive;
@@ -147,7 +147,7 @@ typedef struct
   const uint32_t* precision_start;
   const uint32_t* precision_end;
   size_t precision_arg_index;
-  uint32_t conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */
+  uint32_t conversion; /* d i b B o u x X f F e E g G a A c s p n U % but not C S */
   size_t arg_index;
 }
 u32_directive;
diff --git a/gnulib-tests/pselect.c b/gnulib-tests/pselect.c
index a1eca0c6..52d38378 100644
--- a/gnulib-tests/pselect.c
+++ b/gnulib-tests/pselect.c
@@ -1,6 +1,6 @@
 /* pselect - synchronous I/O multiplexing
 
-   Copyright 2011-2022 Free Software Foundation, Inc.
+   Copyright 2011-2023 Free Software Foundation, Inc.
 
    This file is part of gnulib.
 
@@ -45,6 +45,12 @@ pselect (int nfds, fd_set *restrict rfds,
   sigset_t origmask;
   struct timeval tv, *tvp;
 
+  if (nfds < 0 || nfds > FD_SETSIZE)
+    {
+      errno = EINVAL;
+      return -1;
+    }
+
   if (timeout)
     {
       if (! (0 <= timeout->tv_nsec && timeout->tv_nsec < 1000000000))
diff --git a/gnulib-tests/pthread-thread.c b/gnulib-tests/pthread-thread.c
index a5f07fb2..5a4e4662 100644
--- a/gnulib-tests/pthread-thread.c
+++ b/gnulib-tests/pthread-thread.c
@@ -1,5 +1,5 @@
 /* Creating and controlling POSIX threads.
-   Copyright (C) 2010-2022 Free Software Foundation, Inc.
+   Copyright (C) 2010-2023 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
diff --git a/gnulib-tests/pthread.in.h b/gnulib-tests/pthread.in.h
index 5a658db9..966f58bf 100644
--- a/gnulib-tests/pthread.in.h
+++ b/gnulib-tests/pthread.in.h
@@ -1,6 +1,6 @@
 /* Implement the most essential subset of POSIX 1003.1-2008 pthread.h.
 
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 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
@@ -51,6 +51,12 @@
 #ifndef _@GUARD_PREFIX@_PTHREAD_H_
 #define _@GUARD_PREFIX@_PTHREAD_H_
 
+/* This file uses _Noreturn, _GL_ATTRIBUTE_PURE, GNULIB_POSIXCHECK,
+   HAVE_RAW_DECL_*.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #define __need_system_stdlib_h
 #include <stdlib.h>
 #undef __need_system_stdlib_h
@@ -1968,6 +1974,35 @@ _GL_WARN_ON_USE (pthread_spin_destroy, "pthread_spin_destroy is not portable - "
 #endif
 
 
+#if defined __cplusplus && defined GNULIB_NAMESPACE && !@HAVE_PTHREAD_H@ && defined __MINGW32__
+/* Provide the symbols required by mingw's <bits/gthr-default.h>.  */
+using GNULIB_NAMESPACE::pthread_create;
+using GNULIB_NAMESPACE::pthread_self;
+using GNULIB_NAMESPACE::pthread_equal;
+using GNULIB_NAMESPACE::pthread_detach;
+using GNULIB_NAMESPACE::pthread_join;
+using GNULIB_NAMESPACE::pthread_once;
+using GNULIB_NAMESPACE::pthread_mutex_init;
+using GNULIB_NAMESPACE::pthread_mutexattr_init;
+using GNULIB_NAMESPACE::pthread_mutexattr_settype;
+using GNULIB_NAMESPACE::pthread_mutexattr_destroy;
+using GNULIB_NAMESPACE::pthread_mutex_lock;
+using GNULIB_NAMESPACE::pthread_mutex_trylock;
+using GNULIB_NAMESPACE::pthread_mutex_timedlock;
+using GNULIB_NAMESPACE::pthread_mutex_unlock;
+using GNULIB_NAMESPACE::pthread_mutex_destroy;
+using GNULIB_NAMESPACE::pthread_cond_wait;
+using GNULIB_NAMESPACE::pthread_cond_timedwait;
+using GNULIB_NAMESPACE::pthread_cond_signal;
+using GNULIB_NAMESPACE::pthread_cond_broadcast;
+using GNULIB_NAMESPACE::pthread_cond_destroy;
+using GNULIB_NAMESPACE::pthread_key_create;
+using GNULIB_NAMESPACE::pthread_setspecific;
+using GNULIB_NAMESPACE::pthread_getspecific;
+using GNULIB_NAMESPACE::pthread_key_delete;
+#endif
+
+
 #endif /* _@GUARD_PREFIX@_PTHREAD_H_ */
 #endif /* _@GUARD_PREFIX@_PTHREAD_H_ */
 #endif
diff --git a/gnulib-tests/pthread_sigmask.c b/gnulib-tests/pthread_sigmask.c
index cd4eb807..12810758 100644
--- a/gnulib-tests/pthread_sigmask.c
+++ b/gnulib-tests/pthread_sigmask.c
@@ -1,5 +1,5 @@
 /* POSIX compatible signal blocking for threads.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 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
diff --git a/gnulib-tests/putenv.c b/gnulib-tests/putenv.c
index b0d27e2f..5d339407 100644
--- a/gnulib-tests/putenv.c
+++ b/gnulib-tests/putenv.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1994, 1997-1998, 2000, 2003-2022 Free Software
+/* Copyright (C) 1991, 1994, 1997-1998, 2000, 2003-2023 Free Software
    Foundation, Inc.
 
    NOTE: The canonical source of this file is maintained with the GNU C
diff --git a/gnulib-tests/sched.in.h b/gnulib-tests/sched.in.h
index d19c5022..21aab519 100644
--- a/gnulib-tests/sched.in.h
+++ b/gnulib-tests/sched.in.h
@@ -1,5 +1,5 @@
 /* A GNU-like <sched.h>.
-   Copyright (C) 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 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
@@ -21,6 +21,13 @@
 #endif
 @PRAGMA_COLUMNS@
 
+/* This file uses #include_next of a system file that defines time_t.
+   For the 'year2038' module to work right, <config.h> needs to have been
+   included before.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 /* The include_next requires a split double-inclusion guard.  */
 #if @HAVE_SCHED_H@
 # if @HAVE_SYS_CDEFS_H@
@@ -32,6 +39,11 @@
 #ifndef _@GUARD_PREFIX@_SCHED_H
 #define _@GUARD_PREFIX@_SCHED_H
 
+/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 /* Get pid_t.
    This is needed on glibc 2.11 (see
    glibc bug <https://sourceware.org/bugzilla/show_bug.cgi?id=13198>)
diff --git a/gnulib-tests/select.c b/gnulib-tests/select.c
index c2424982..6b6ca415 100644
--- a/gnulib-tests/select.c
+++ b/gnulib-tests/select.c
@@ -1,7 +1,7 @@
 /* Emulation for select(2)
    Contributed by Paolo Bonzini.
 
-   Copyright 2008-2022 Free Software Foundation, Inc.
+   Copyright 2008-2023 Free Software Foundation, Inc.
 
    This file is part of gnulib.
 
@@ -279,8 +279,11 @@ rpl_select (int nfds, fd_set *rfds, fd_set *wfds, fd_set *xfds,
   int i, fd, rc;
   clock_t tend;
 
-  if (nfds > FD_SETSIZE)
-    nfds = FD_SETSIZE;
+  if (nfds < 0 || nfds > FD_SETSIZE)
+    {
+      errno = EINVAL;
+      return -1;
+    }
 
   if (!timeout)
     wait_timeout = INFINITE;
diff --git a/gnulib-tests/setenv.c b/gnulib-tests/setenv.c
index ebfd4e55..f0b88996 100644
--- a/gnulib-tests/setenv.c
+++ b/gnulib-tests/setenv.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995-2003, 2005-2022 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995-2003, 2005-2023 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    This file is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/setlocale.c b/gnulib-tests/setlocale.c
index b9a29ee6..d3b453c2 100644
--- a/gnulib-tests/setlocale.c
+++ b/gnulib-tests/setlocale.c
@@ -1,5 +1,5 @@
 /* Set the current locale.  -*- coding: utf-8 -*-
-   Copyright (C) 2009, 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009, 2011-2023 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
diff --git a/gnulib-tests/setsockopt.c b/gnulib-tests/setsockopt.c
index 2811c19a..d435741a 100644
--- a/gnulib-tests/setsockopt.c
+++ b/gnulib-tests/setsockopt.c
@@ -1,6 +1,6 @@
 /* setsockopt.c --- wrappers for Windows setsockopt function
 
-   Copyright (C) 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 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
diff --git a/gnulib-tests/signature.h b/gnulib-tests/signature.h
index 7a8ef91a..e939fec9 100644
--- a/gnulib-tests/signature.h
+++ b/gnulib-tests/signature.h
@@ -1,5 +1,5 @@
 /* Macro for checking that a function declaration is compliant.
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/sigprocmask.c b/gnulib-tests/sigprocmask.c
index a805da66..943383e2 100644
--- a/gnulib-tests/sigprocmask.c
+++ b/gnulib-tests/sigprocmask.c
@@ -1,5 +1,5 @@
 /* POSIX compatible signal blocking.
-   Copyright (C) 2006-2022 Free Software Foundation, Inc.
+   Copyright (C) 2006-2023 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2006.
 
    This file is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/size_max.h b/gnulib-tests/size_max.h
index dee2b8ee..2cfd31a5 100644
--- a/gnulib-tests/size_max.h
+++ b/gnulib-tests/size_max.h
@@ -1,5 +1,5 @@
 /* size_max.h -- declare SIZE_MAX through system headers
-   Copyright (C) 2005-2006, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2005-2006, 2009-2023 Free Software Foundation, Inc.
    Written by Simon Josefsson.
 
    This file is free software: you can redistribute it and/or modify
@@ -18,6 +18,11 @@
 #ifndef GNULIB_SIZE_MAX_H
 #define GNULIB_SIZE_MAX_H
 
+/* This file uses HAVE_STDINT_H.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 /* Get SIZE_MAX declaration on systems like Solaris 7/8/9.  */
 # include <limits.h>
 /* Get SIZE_MAX declaration on systems like glibc 2.  */
diff --git a/gnulib-tests/sleep.c b/gnulib-tests/sleep.c
index 7a6fb152..37c1213c 100644
--- a/gnulib-tests/sleep.c
+++ b/gnulib-tests/sleep.c
@@ -1,5 +1,5 @@
 /* Pausing execution of the current thread.
-   Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009-2023 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2007.
 
    This file is free software: you can redistribute it and/or modify
@@ -22,8 +22,6 @@
 
 #include <limits.h>
 
-#include "verify.h"
-
 #if defined _WIN32 && ! defined __CYGWIN__
 
 # define WIN32_LEAN_AND_MEAN  /* avoid including junk */
@@ -56,7 +54,7 @@ unsigned int
 rpl_sleep (unsigned int seconds)
 {
   /* This requires int larger than 16 bits.  */
-  verify (UINT_MAX / 24 / 24 / 60 / 60);
+  static_assert (UINT_MAX / 24 / 24 / 60 / 60);
   const unsigned int limit = 24 * 24 * 60 * 60;
   while (limit < seconds)
     {
diff --git a/gnulib-tests/snprintf.c b/gnulib-tests/snprintf.c
index 3d87854e..cdff3149 100644
--- a/gnulib-tests/snprintf.c
+++ b/gnulib-tests/snprintf.c
@@ -1,5 +1,5 @@
 /* Formatted output to strings.
-   Copyright (C) 2004, 2006-2022 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2006-2023 Free Software Foundation, Inc.
    Written by Simon Josefsson and Paul Eggert.
 
    This file is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/socket.c b/gnulib-tests/socket.c
index 49e013c7..7ad6eb95 100644
--- a/gnulib-tests/socket.c
+++ b/gnulib-tests/socket.c
@@ -1,6 +1,6 @@
 /* socket.c --- wrappers for Windows socket function
 
-   Copyright (C) 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 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
diff --git a/gnulib-tests/sockets.c b/gnulib-tests/sockets.c
index 31b43029..ca99db8b 100644
--- a/gnulib-tests/sockets.c
+++ b/gnulib-tests/sockets.c
@@ -1,6 +1,6 @@
 /* sockets.c --- wrappers for Windows socket functions
 
-   Copyright (C) 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 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
diff --git a/gnulib-tests/sockets.h b/gnulib-tests/sockets.h
index 75e49fce..55d5e3a4 100644
--- a/gnulib-tests/sockets.h
+++ b/gnulib-tests/sockets.h
@@ -1,6 +1,6 @@
 /* sockets.h - wrappers for Windows socket functions
 
-   Copyright (C) 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 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
@@ -20,6 +20,11 @@
 #ifndef SOCKETS_H
 #define SOCKETS_H 1
 
+/* This file uses _GL_ATTRIBUTE_CONST.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #define SOCKETS_1_0 0x0001
 #define SOCKETS_1_1 0x0101
 #define SOCKETS_2_0 0x0002
diff --git a/gnulib-tests/str-two-way.h b/gnulib-tests/str-two-way.h
new file mode 100644
index 00000000..dfe70224
--- /dev/null
+++ b/gnulib-tests/str-two-way.h
@@ -0,0 +1,452 @@
+/* Byte-wise substring search, using the Two-Way algorithm.
+   Copyright (C) 2008-2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Written by Eric Blake <ebb9@byu.net>, 2008.
+
+   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 <https://www.gnu.org/licenses/>.  */
+
+/* Before including this file, you need to include <config.h> and
+   <string.h>, and define:
+     RETURN_TYPE             A macro that expands to the return type.
+     AVAILABLE(h, h_l, j, n_l)
+                             A macro that returns nonzero if there are
+                             at least N_L bytes left starting at H[J].
+                             H is 'unsigned char *', H_L, J, and N_L
+                             are 'size_t'; H_L is an lvalue.  For
+                             NUL-terminated searches, H_L can be
+                             modified each iteration to avoid having
+                             to compute the end of H up front.
+
+  For case-insensitivity, you may optionally define:
+     CMP_FUNC(p1, p2, l)     A macro that returns 0 iff the first L
+                             characters of P1 and P2 are equal.
+     CANON_ELEMENT(c)        A macro that canonicalizes an element right after
+                             it has been fetched from one of the two strings.
+                             The argument is an 'unsigned char'; the result
+                             must be an 'unsigned char' as well.
+
+  This file undefines the macros documented above, and defines
+  LONG_NEEDLE_THRESHOLD.
+*/
+
+#include <limits.h>
+#include <stdint.h>
+
+/* We use the Two-Way string matching algorithm (also known as
+   Chrochemore-Perrin), which guarantees linear complexity with
+   constant space.  Additionally, for long needles, we also use a bad
+   character shift table similar to the Boyer-Moore algorithm to
+   achieve improved (potentially sub-linear) performance.
+
+   See https://www-igm.univ-mlv.fr/~lecroq/string/node26.html#SECTION00260,
+   https://en.wikipedia.org/wiki/Boyer-Moore_string_search_algorithm,
+   https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.34.6641&rep=rep1&type=pdf
+*/
+
+/* Point at which computing a bad-byte shift table is likely to be
+   worthwhile.  Small needles should not compute a table, since it
+   adds (1 << CHAR_BIT) + NEEDLE_LEN computations of preparation for a
+   speedup no greater than a factor of NEEDLE_LEN.  The larger the
+   needle, the better the potential performance gain.  On the other
+   hand, on non-POSIX systems with CHAR_BIT larger than eight, the
+   memory required for the table is prohibitive.  */
+#if CHAR_BIT < 10
+# define LONG_NEEDLE_THRESHOLD 32U
+#else
+# define LONG_NEEDLE_THRESHOLD SIZE_MAX
+#endif
+
+#ifndef MAX
+# define MAX(a, b) ((a < b) ? (b) : (a))
+#endif
+
+#ifndef CANON_ELEMENT
+# define CANON_ELEMENT(c) c
+#endif
+#ifndef CMP_FUNC
+# define CMP_FUNC memcmp
+#endif
+
+/* Perform a critical factorization of NEEDLE, of length NEEDLE_LEN.
+   Return the index of the first byte in the right half, and set
+   *PERIOD to the global period of the right half.
+
+   The global period of a string is the smallest index (possibly its
+   length) at which all remaining bytes in the string are repetitions
+   of the prefix (the last repetition may be a subset of the prefix).
+
+   When NEEDLE is factored into two halves, a local period is the
+   length of the smallest word that shares a suffix with the left half
+   and shares a prefix with the right half.  All factorizations of a
+   non-empty NEEDLE have a local period of at least 1 and no greater
+   than NEEDLE_LEN.
+
+   A critical factorization has the property that the local period
+   equals the global period.  All strings have at least one critical
+   factorization with the left half smaller than the global period.
+   And while some strings have more than one critical factorization,
+   it is provable that with an ordered alphabet, at least one of the
+   critical factorizations corresponds to a maximal suffix.
+
+   Given an ordered alphabet, a critical factorization can be computed
+   in linear time, with 2 * NEEDLE_LEN comparisons, by computing the
+   shorter of two ordered maximal suffixes.  The ordered maximal
+   suffixes are determined by lexicographic comparison while tracking
+   periodicity.  */
+static size_t
+critical_factorization (const unsigned char *needle, size_t needle_len,
+                        size_t *period)
+{
+  /* Index of last byte of left half, or SIZE_MAX.  */
+  size_t max_suffix, max_suffix_rev;
+  size_t j; /* Index into NEEDLE for current candidate suffix.  */
+  size_t k; /* Offset into current period.  */
+  size_t p; /* Intermediate period.  */
+  unsigned char a, b; /* Current comparison bytes.  */
+
+  /* Special case NEEDLE_LEN of 1 or 2 (all callers already filtered
+     out 0-length needles.  */
+  if (needle_len < 3)
+    {
+      *period = 1;
+      return needle_len - 1;
+    }
+
+  /* Invariants:
+     0 <= j < NEEDLE_LEN - 1
+     -1 <= max_suffix{,_rev} < j (treating SIZE_MAX as if it were signed)
+     min(max_suffix, max_suffix_rev) < global period of NEEDLE
+     1 <= p <= global period of NEEDLE
+     p == global period of the substring NEEDLE[max_suffix{,_rev}+1...j]
+     1 <= k <= p
+  */
+
+  /* Perform lexicographic search.  */
+  max_suffix = SIZE_MAX;
+  j = 0;
+  k = p = 1;
+  while (j + k < needle_len)
+    {
+      a = CANON_ELEMENT (needle[j + k]);
+      b = CANON_ELEMENT (needle[max_suffix + k]);
+      if (a < b)
+        {
+          /* Suffix is smaller, period is entire prefix so far.  */
+          j += k;
+          k = 1;
+          p = j - max_suffix;
+        }
+      else if (a == b)
+        {
+          /* Advance through repetition of the current period.  */
+          if (k != p)
+            ++k;
+          else
+            {
+              j += p;
+              k = 1;
+            }
+        }
+      else /* b < a */
+        {
+          /* Suffix is larger, start over from current location.  */
+          max_suffix = j++;
+          k = p = 1;
+        }
+    }
+  *period = p;
+
+  /* Perform reverse lexicographic search.  */
+  max_suffix_rev = SIZE_MAX;
+  j = 0;
+  k = p = 1;
+  while (j + k < needle_len)
+    {
+      a = CANON_ELEMENT (needle[j + k]);
+      b = CANON_ELEMENT (needle[max_suffix_rev + k]);
+      if (b < a)
+        {
+          /* Suffix is smaller, period is entire prefix so far.  */
+          j += k;
+          k = 1;
+          p = j - max_suffix_rev;
+        }
+      else if (a == b)
+        {
+          /* Advance through repetition of the current period.  */
+          if (k != p)
+            ++k;
+          else
+            {
+              j += p;
+              k = 1;
+            }
+        }
+      else /* a < b */
+        {
+          /* Suffix is larger, start over from current location.  */
+          max_suffix_rev = j++;
+          k = p = 1;
+        }
+    }
+
+  /* Choose the shorter suffix.  Return the index of the first byte of
+     the right half, rather than the last byte of the left half.
+
+     For some examples, 'banana' has two critical factorizations, both
+     exposed by the two lexicographic extreme suffixes of 'anana' and
+     'nana', where both suffixes have a period of 2.  On the other
+     hand, with 'aab' and 'bba', both strings have a single critical
+     factorization of the last byte, with the suffix having a period
+     of 1.  While the maximal lexicographic suffix of 'aab' is 'b',
+     the maximal lexicographic suffix of 'bba' is 'ba', which is not a
+     critical factorization.  Conversely, the maximal reverse
+     lexicographic suffix of 'a' works for 'bba', but not 'ab' for
+     'aab'.  The shorter suffix of the two will always be a critical
+     factorization.  */
+  if (max_suffix_rev + 1 < max_suffix + 1)
+    return max_suffix + 1;
+  *period = p;
+  return max_suffix_rev + 1;
+}
+
+/* Return the first location of non-empty NEEDLE within HAYSTACK, or
+   NULL.  HAYSTACK_LEN is the minimum known length of HAYSTACK.  This
+   method is optimized for NEEDLE_LEN < LONG_NEEDLE_THRESHOLD.
+   Performance is guaranteed to be linear, with an initialization cost
+   of 2 * NEEDLE_LEN comparisons.
+
+   If AVAILABLE does not modify HAYSTACK_LEN (as in memmem), then at
+   most 2 * HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching.
+   If AVAILABLE modifies HAYSTACK_LEN (as in strstr), then at most 3 *
+   HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching.  */
+static RETURN_TYPE _GL_ATTRIBUTE_PURE
+two_way_short_needle (const unsigned char *haystack, size_t haystack_len,
+                      const unsigned char *needle, size_t needle_len)
+{
+  size_t i; /* Index into current byte of NEEDLE.  */
+  size_t j; /* Index into current window of HAYSTACK.  */
+  size_t period; /* The period of the right half of needle.  */
+  size_t suffix; /* The index of the right half of needle.  */
+
+  /* Factor the needle into two halves, such that the left half is
+     smaller than the global period, and the right half is
+     periodic (with a period as large as NEEDLE_LEN - suffix).  */
+  suffix = critical_factorization (needle, needle_len, &period);
+
+  /* Perform the search.  Each iteration compares the right half
+     first.  */
+  if (CMP_FUNC (needle, needle + period, suffix) == 0)
+    {
+      /* Entire needle is periodic; a mismatch in the left half can
+         only advance by the period, so use memory to avoid rescanning
+         known occurrences of the period in the right half.  */
+      size_t memory = 0;
+      j = 0;
+      while (AVAILABLE (haystack, haystack_len, j, needle_len))
+        {
+          /* Scan for matches in right half.  */
+          i = MAX (suffix, memory);
+          while (i < needle_len && (CANON_ELEMENT (needle[i])
+                                    == CANON_ELEMENT (haystack[i + j])))
+            ++i;
+          if (needle_len <= i)
+            {
+              /* Scan for matches in left half.  */
+              i = suffix - 1;
+              while (memory < i + 1 && (CANON_ELEMENT (needle[i])
+                                        == CANON_ELEMENT (haystack[i + j])))
+                --i;
+              if (i + 1 < memory + 1)
+                return (RETURN_TYPE) (haystack + j);
+              /* No match, so remember how many repetitions of period
+                 on the right half were scanned.  */
+              j += period;
+              memory = needle_len - period;
+            }
+          else
+            {
+              j += i - suffix + 1;
+              memory = 0;
+            }
+        }
+    }
+  else
+    {
+      /* The two halves of needle are distinct; no extra memory is
+         required, and any mismatch results in a maximal shift.  */
+      period = MAX (suffix, needle_len - suffix) + 1;
+      j = 0;
+      while (AVAILABLE (haystack, haystack_len, j, needle_len))
+        {
+          /* Scan for matches in right half.  */
+          i = suffix;
+          while (i < needle_len && (CANON_ELEMENT (needle[i])
+                                    == CANON_ELEMENT (haystack[i + j])))
+            ++i;
+          if (needle_len <= i)
+            {
+              /* Scan for matches in left half.  */
+              i = suffix - 1;
+              while (i != SIZE_MAX && (CANON_ELEMENT (needle[i])
+                                       == CANON_ELEMENT (haystack[i + j])))
+                --i;
+              if (i == SIZE_MAX)
+                return (RETURN_TYPE) (haystack + j);
+              j += period;
+            }
+          else
+            j += i - suffix + 1;
+        }
+    }
+  return NULL;
+}
+
+/* Return the first location of non-empty NEEDLE within HAYSTACK, or
+   NULL.  HAYSTACK_LEN is the minimum known length of HAYSTACK.  This
+   method is optimized for LONG_NEEDLE_THRESHOLD <= NEEDLE_LEN.
+   Performance is guaranteed to be linear, with an initialization cost
+   of 3 * NEEDLE_LEN + (1 << CHAR_BIT) operations.
+
+   If AVAILABLE does not modify HAYSTACK_LEN (as in memmem), then at
+   most 2 * HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching,
+   and sublinear performance O(HAYSTACK_LEN / NEEDLE_LEN) is possible.
+   If AVAILABLE modifies HAYSTACK_LEN (as in strstr), then at most 3 *
+   HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching, and
+   sublinear performance is not possible.  */
+static RETURN_TYPE _GL_ATTRIBUTE_PURE
+two_way_long_needle (const unsigned char *haystack, size_t haystack_len,
+                     const unsigned char *needle, size_t needle_len)
+{
+  size_t i; /* Index into current byte of NEEDLE.  */
+  size_t j; /* Index into current window of HAYSTACK.  */
+  size_t period; /* The period of the right half of needle.  */
+  size_t suffix; /* The index of the right half of needle.  */
+  size_t shift_table[1U << CHAR_BIT]; /* See below.  */
+
+  /* Factor the needle into two halves, such that the left half is
+     smaller than the global period, and the right half is
+     periodic (with a period as large as NEEDLE_LEN - suffix).  */
+  suffix = critical_factorization (needle, needle_len, &period);
+
+  /* Populate shift_table.  For each possible byte value c,
+     shift_table[c] is the distance from the last occurrence of c to
+     the end of NEEDLE, or NEEDLE_LEN if c is absent from the NEEDLE.
+     shift_table[NEEDLE[NEEDLE_LEN - 1]] contains the only 0.  */
+  for (i = 0; i < 1U << CHAR_BIT; i++)
+    shift_table[i] = needle_len;
+  for (i = 0; i < needle_len; i++)
+    shift_table[CANON_ELEMENT (needle[i])] = needle_len - i - 1;
+
+  /* Perform the search.  Each iteration compares the right half
+     first.  */
+  if (CMP_FUNC (needle, needle + period, suffix) == 0)
+    {
+      /* Entire needle is periodic; a mismatch in the left half can
+         only advance by the period, so use memory to avoid rescanning
+         known occurrences of the period in the right half.  */
+      size_t memory = 0;
+      size_t shift;
+      j = 0;
+      while (AVAILABLE (haystack, haystack_len, j, needle_len))
+        {
+          /* Check the last byte first; if it does not match, then
+             shift to the next possible match location.  */
+          shift = shift_table[CANON_ELEMENT (haystack[j + needle_len - 1])];
+          if (0 < shift)
+            {
+              if (memory && shift < period)
+                {
+                  /* Since needle is periodic, but the last period has
+                     a byte out of place, there can be no match until
+                     after the mismatch.  */
+                  shift = needle_len - period;
+                }
+              memory = 0;
+              j += shift;
+              continue;
+            }
+          /* Scan for matches in right half.  The last byte has
+             already been matched, by virtue of the shift table.  */
+          i = MAX (suffix, memory);
+          while (i < needle_len - 1 && (CANON_ELEMENT (needle[i])
+                                        == CANON_ELEMENT (haystack[i + j])))
+            ++i;
+          if (needle_len - 1 <= i)
+            {
+              /* Scan for matches in left half.  */
+              i = suffix - 1;
+              while (memory < i + 1 && (CANON_ELEMENT (needle[i])
+                                        == CANON_ELEMENT (haystack[i + j])))
+                --i;
+              if (i + 1 < memory + 1)
+                return (RETURN_TYPE) (haystack + j);
+              /* No match, so remember how many repetitions of period
+                 on the right half were scanned.  */
+              j += period;
+              memory = needle_len - period;
+            }
+          else
+            {
+              j += i - suffix + 1;
+              memory = 0;
+            }
+        }
+    }
+  else
+    {
+      /* The two halves of needle are distinct; no extra memory is
+         required, and any mismatch results in a maximal shift.  */
+      size_t shift;
+      period = MAX (suffix, needle_len - suffix) + 1;
+      j = 0;
+      while (AVAILABLE (haystack, haystack_len, j, needle_len))
+        {
+          /* Check the last byte first; if it does not match, then
+             shift to the next possible match location.  */
+          shift = shift_table[CANON_ELEMENT (haystack[j + needle_len - 1])];
+          if (0 < shift)
+            {
+              j += shift;
+              continue;
+            }
+          /* Scan for matches in right half.  The last byte has
+             already been matched, by virtue of the shift table.  */
+          i = suffix;
+          while (i < needle_len - 1 && (CANON_ELEMENT (needle[i])
+                                        == CANON_ELEMENT (haystack[i + j])))
+            ++i;
+          if (needle_len - 1 <= i)
+            {
+              /* Scan for matches in left half.  */
+              i = suffix - 1;
+              while (i != SIZE_MAX && (CANON_ELEMENT (needle[i])
+                                       == CANON_ELEMENT (haystack[i + j])))
+                --i;
+              if (i == SIZE_MAX)
+                return (RETURN_TYPE) (haystack + j);
+              j += period;
+            }
+          else
+            j += i - suffix + 1;
+        }
+    }
+  return NULL;
+}
+
+#undef AVAILABLE
+#undef CANON_ELEMENT
+#undef CMP_FUNC
+#undef MAX
+#undef RETURN_TYPE
diff --git a/gnulib-tests/strerror_r.c b/gnulib-tests/strerror_r.c
index 85a21893..ffe12669 100644
--- a/gnulib-tests/strerror_r.c
+++ b/gnulib-tests/strerror_r.c
@@ -1,6 +1,6 @@
 /* strerror_r.c --- POSIX compatible system error routine
 
-   Copyright (C) 2010-2022 Free Software Foundation, Inc.
+   Copyright (C) 2010-2023 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
@@ -166,16 +166,19 @@ strerror_r (int errnum, char *buf, size_t buflen)
 
 # if HAVE___XPG_STRERROR_R
       ret = __xpg_strerror_r (errnum, buf, buflen);
-      if (ret < 0)
-        ret = errno;
+      /* ret is 0 upon success, or EINVAL or ERANGE upon failure.  */
 # endif
 
       if (!*buf)
         {
-          /* glibc 2.13 would not touch buf on err, so we have to fall
-             back to GNU strerror_r which always returns a thread-safe
-             untruncated string to (partially) copy into our buf.  */
-          char *errstring = strerror_r (errnum, buf, buflen);
+          /* glibc 2.13 ... 2.34 (at least) don't touch buf upon failure.
+             Therefore we have to fall back to strerror_r which, for valid
+             errnum, returns a thread-safe untruncated string.  For invalid
+             errnum, though, it returns a truncated string, which does not
+             allow us to determine whether to return ERANGE or 0.  Thus we
+             need to pass a sufficiently large buffer.  */
+          char stackbuf[80];
+          char *errstring = strerror_r (errnum, stackbuf, sizeof stackbuf);
           ret = errstring ? safe_copy (buf, buflen, errstring) : errno;
         }
     }
diff --git a/gnulib-tests/symlink.c b/gnulib-tests/symlink.c
index 26310af7..b5009ae8 100644
--- a/gnulib-tests/symlink.c
+++ b/gnulib-tests/symlink.c
@@ -1,5 +1,5 @@
 /* Stub for symlink().
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 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
diff --git a/gnulib-tests/sys_ioctl.in.h b/gnulib-tests/sys_ioctl.in.h
index 7f1cdc86..78a79036 100644
--- a/gnulib-tests/sys_ioctl.in.h
+++ b/gnulib-tests/sys_ioctl.in.h
@@ -1,5 +1,5 @@
 /* Substitute for and wrapper around <sys/ioctl.h>.
-   Copyright (C) 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 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
@@ -29,6 +29,11 @@
 #ifndef _@GUARD_PREFIX@_SYS_IOCTL_H
 #define _@GUARD_PREFIX@_SYS_IOCTL_H
 
+/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 /* AIX 5.1 and Solaris 10 declare ioctl() in <unistd.h> and in <stropts.h>,
    but not in <sys/ioctl.h>.
    Haiku declares ioctl() in <unistd.h>, but not in <sys/ioctl.h>.
@@ -62,7 +67,9 @@ _GL_FUNCDECL_SYS (ioctl, int,
 _GL_CXXALIAS_SYS (ioctl, int,
                   (int fd, int request, ... /* {void *,char *} arg */));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (ioctl);
+# endif
 #elif @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
 # undef ioctl
 # define ioctl ioctl_used_without_requesting_gnulib_module_ioctl
diff --git a/gnulib-tests/sys_select.in.h b/gnulib-tests/sys_select.in.h
index 2bd0e0f7..3abfc48a 100644
--- a/gnulib-tests/sys_select.in.h
+++ b/gnulib-tests/sys_select.in.h
@@ -1,5 +1,5 @@
 /* Substitute for <sys/select.h>.
-   Copyright (C) 2007-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007-2023 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
@@ -19,6 +19,13 @@
 # endif
 @PRAGMA_COLUMNS@
 
+/* This file uses #include_next of a system file that defines time_t.
+   For the 'year2038' module to work right, <config.h> needs to have been
+   included before.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 /* On OSF/1 and Solaris 2.6, <sys/types.h> and <sys/time.h>
    both include <sys/select.h>.
    On Cygwin and OpenBSD, <sys/time.h> includes <sys/select.h>.
@@ -71,6 +78,11 @@
 
 #ifndef _@GUARD_PREFIX@_SYS_SELECT_H
 
+/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 /* On many platforms, <sys/select.h> assumes prior inclusion of
    <sys/types.h>.  Also, mingw defines sigset_t there, instead of
    in <signal.h> where it belongs.  */
@@ -82,9 +94,10 @@
    of 'struct timeval', and no definition of this type.
    Also, Mac OS X, AIX, HP-UX, IRIX, Solaris, Interix declare select()
    in <sys/time.h>.
-   But avoid namespace pollution on glibc systems and "unknown type
-   name" problems on Cygwin.  */
-# if !(defined __GLIBC__ || defined __CYGWIN__)
+   But avoid namespace pollution on glibc systems, a circular include
+   <sys/select.h> -> <sys/time.h> -> <sys/select.h> on FreeBSD 13.1, and
+   "unknown type name" problems on Cygwin.  */
+# if !(defined __GLIBC__ || defined __FreeBSD__ || defined __CYGWIN__)
 #  include <sys/time.h>
 # endif
 
@@ -287,7 +300,9 @@ _GL_CXXALIAS_SYS_CAST (pselect, int,
                         struct timespec const *restrict,
                         const sigset_t *restrict));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (pselect);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef pselect
 # if HAVE_RAW_DECL_PSELECT
diff --git a/gnulib-tests/sys_socket.c b/gnulib-tests/sys_socket.c
index 0bfd60f2..b7388cec 100644
--- a/gnulib-tests/sys_socket.c
+++ b/gnulib-tests/sys_socket.c
@@ -1,6 +1,6 @@
 /* Inline functions for <sys/socket.h>.
 
-   Copyright (C) 2012-2022 Free Software Foundation, Inc.
+   Copyright (C) 2012-2023 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
diff --git a/gnulib-tests/sys_socket.in.h b/gnulib-tests/sys_socket.in.h
index acdf7eee..afeedf07 100644
--- a/gnulib-tests/sys_socket.in.h
+++ b/gnulib-tests/sys_socket.in.h
@@ -1,6 +1,6 @@
 /* Provide a sys/socket header file for systems lacking it (read: MinGW)
    and for systems where it is incomplete.
-   Copyright (C) 2005-2022 Free Software Foundation, Inc.
+   Copyright (C) 2005-2023 Free Software Foundation, Inc.
    Written by Simon Josefsson.
 
    This file is free software: you can redistribute it and/or modify
@@ -63,9 +63,12 @@
 #ifndef _@GUARD_PREFIX@_SYS_SOCKET_H
 #define _@GUARD_PREFIX@_SYS_SOCKET_H
 
-#ifndef _GL_INLINE_HEADER_BEGIN
+/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, GNULIB_POSIXCHECK,
+   HAVE_RAW_DECL_*, alignof.  */
+#if !_GL_CONFIG_H_INCLUDED
  #error "Please include config.h first."
 #endif
+
 _GL_INLINE_HEADER_BEGIN
 #ifndef _GL_SYS_SOCKET_INLINE
 # define _GL_SYS_SOCKET_INLINE _GL_INLINE
@@ -97,7 +100,6 @@ typedef unsigned char   sa_family_t;
 #  endif
 # endif
 #else
-# include <stdalign.h>
 /* Code taken from glibc sysdeps/unix/sysv/linux/bits/socket.h on
    2009-05-08, licensed under LGPLv2.1+, plus portability fixes. */
 # define __ss_aligntype unsigned long int
diff --git a/gnulib-tests/sys_time.in.h b/gnulib-tests/sys_time.in.h
index 87db1a88..59cce144 100644
--- a/gnulib-tests/sys_time.in.h
+++ b/gnulib-tests/sys_time.in.h
@@ -1,6 +1,6 @@
 /* Provide a more complete sys/time.h.
 
-   Copyright (C) 2007-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007-2023 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
@@ -24,6 +24,13 @@
 #endif
 @PRAGMA_COLUMNS@
 
+/* This file uses #include_next of a system file that defines time_t.
+   For the 'year2038' module to work right, <config.h> needs to have been
+   included before.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 /* On Cygwin and on many BSDish systems, <sys/time.h> includes itself
    recursively via <sys/select.h>.
    Simply delegate to the system's header in this case; it is a no-op.
@@ -41,6 +48,11 @@
 #ifndef _@GUARD_PREFIX@_SYS_TIME_H
 #define _@GUARD_PREFIX@_SYS_TIME_H
 
+/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #if ! @HAVE_SYS_TIME_H@
 # include <time.h>
 #endif
diff --git a/gnulib-tests/sys_uio.in.h b/gnulib-tests/sys_uio.in.h
index 788d461f..64c4fb6d 100644
--- a/gnulib-tests/sys_uio.in.h
+++ b/gnulib-tests/sys_uio.in.h
@@ -1,5 +1,5 @@
 /* Substitute for <sys/uio.h>.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 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
diff --git a/gnulib-tests/test-accept.c b/gnulib-tests/test-accept.c
index 234de641..1d56efc9 100644
--- a/gnulib-tests/test-accept.c
+++ b/gnulib-tests/test-accept.c
@@ -1,5 +1,5 @@
 /* Test accepting a connection to a server socket.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-stdalign.c b/gnulib-tests/test-alignasof.c
similarity index 73%
rename from gnulib-tests/test-stdalign.c
rename to gnulib-tests/test-alignasof.c
index 85d23a6e..18c0d488 100644
--- a/gnulib-tests/test-stdalign.c
+++ b/gnulib-tests/test-alignasof.c
@@ -1,5 +1,5 @@
-/* Test of <stdalign.h>.
-   Copyright 2009-2022 Free Software Foundation, Inc.
+/* Test of alignasof module.
+   Copyright 2009-2023 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
@@ -18,13 +18,9 @@
 
 #include <config.h>
 
-#include <stdalign.h>
-
 #include <stddef.h>
 #include <stdint.h>
 
-#include "verify.h"
-
 #include "macros.h"
 
 typedef long double longdouble;
@@ -33,32 +29,22 @@ typedef struct { char a[2]; } struct2;
 typedef struct { char a[3]; } struct3;
 typedef struct { char a[4]; } struct4;
 
-verify (__alignof_is_defined == 1);
-#ifndef alignof
-# error "alignof is not a macro"
-#endif
-
-#if __alignas_is_defined
-verify (__alignas_is_defined == 1);
-# ifndef alignas
-#  error "alignas is not a macro"
-# endif
+#if (202311 <= __STDC_VERSION__ || __alignas_is_defined \
+     || 201103 <= __cplusplus)
 /* mingw can go up only to 8.  8 is all that GNU Emacs needs, so let's
    limit the test to 8 for now.  */
 # define TEST_ALIGNMENT 8
 #else
-# define _Alignas(alignment)
+# undef alignas
 # define alignas(alignment)
 # define TEST_ALIGNMENT 1
 #endif
 
 #define CHECK_STATIC(type) \
   typedef struct { char slot1; type slot2; } type##_helper; \
-  verify (alignof (type) == offsetof (type##_helper, slot2)); \
-  verify (_Alignof (type) == alignof (type)); \
+  static_assert (alignof (type) == offsetof (type##_helper, slot2)); \
   const int type##_alignment = alignof (type); \
-  type alignas (TEST_ALIGNMENT) static_##type##_alignas; \
-  type _Alignas (TEST_ALIGNMENT) static_##type##_Alignas
+  type alignas (TEST_ALIGNMENT) static_##type##_alignas
 
 #define CHECK_ALIGNED(var) ASSERT ((uintptr_t) &(var) % TEST_ALIGNMENT == 0)
 
@@ -96,31 +82,19 @@ main ()
   return 77;
 #else
   CHECK_ALIGNED (static_char_alignas);
-  CHECK_ALIGNED (static_char_Alignas);
   CHECK_ALIGNED (static_short_alignas);
-  CHECK_ALIGNED (static_short_Alignas);
   CHECK_ALIGNED (static_int_alignas);
-  CHECK_ALIGNED (static_int_Alignas);
   CHECK_ALIGNED (static_long_alignas);
-  CHECK_ALIGNED (static_long_Alignas);
 # ifdef INT64_MAX
   CHECK_ALIGNED (static_int64_t_alignas);
-  CHECK_ALIGNED (static_int64_t_Alignas);
 # endif
   CHECK_ALIGNED (static_float_alignas);
-  CHECK_ALIGNED (static_float_Alignas);
   CHECK_ALIGNED (static_double_alignas);
-  CHECK_ALIGNED (static_double_Alignas);
   /* CHECK_ALIGNED (static_longdouble_alignas); */
-  /* CHECK_ALIGNED (static_longdouble_Alignas); */
   CHECK_ALIGNED (static_struct1_alignas);
-  CHECK_ALIGNED (static_struct1_Alignas);
   CHECK_ALIGNED (static_struct2_alignas);
-  CHECK_ALIGNED (static_struct2_Alignas);
   CHECK_ALIGNED (static_struct3_alignas);
-  CHECK_ALIGNED (static_struct3_Alignas);
   CHECK_ALIGNED (static_struct4_alignas);
-  CHECK_ALIGNED (static_struct4_Alignas);
   return 0;
 #endif
 }
diff --git a/gnulib-tests/test-alignof.c b/gnulib-tests/test-alignof.c
index fd117899..4b737e94 100644
--- a/gnulib-tests/test-alignof.c
+++ b/gnulib-tests/test-alignof.c
@@ -1,5 +1,5 @@
 /* Test of <alignof.h>.
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 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
@@ -23,8 +23,6 @@
 #include <stddef.h>
 #include <stdint.h>
 
-#include "verify.h"
-
 typedef long double longdouble;
 typedef struct { char a[1]; } struct1;
 typedef struct { char a[2]; } struct2;
@@ -33,7 +31,7 @@ typedef struct { char a[4]; } struct4;
 
 #define CHECK(type) \
   typedef struct { char slot1; type slot2; } type##_helper; \
-  verify (alignof_slot (type) == offsetof (type##_helper, slot2)); \
+  static_assert (alignof_slot (type) == offsetof (type##_helper, slot2)); \
   const int type##_slot_alignment = alignof_slot (type); \
   const int type##_type_alignment = alignof_type (type);
 
diff --git a/gnulib-tests/test-alloca-opt.c b/gnulib-tests/test-alloca-opt.c
index a64ed82a..b059439c 100644
--- a/gnulib-tests/test-alloca-opt.c
+++ b/gnulib-tests/test-alloca-opt.c
@@ -1,5 +1,5 @@
 /* Test of optional automatic memory allocation.
-   Copyright (C) 2005, 2007, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2007, 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-argmatch.c b/gnulib-tests/test-argmatch.c
index b05e4312..80aba527 100644
--- a/gnulib-tests/test-argmatch.c
+++ b/gnulib-tests/test-argmatch.c
@@ -1,5 +1,5 @@
 /* Test of exact or abbreviated match search.
-   Copyright (C) 1990, 1998-1999, 2001-2022 Free Software Foundation, Inc.
+   Copyright (C) 1990, 1998-1999, 2001-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-arpa_inet.c b/gnulib-tests/test-arpa_inet.c
index cfe4a7a2..a19192be 100644
--- a/gnulib-tests/test-arpa_inet.c
+++ b/gnulib-tests/test-arpa_inet.c
@@ -1,5 +1,5 @@
 /* Test of <arpa/inet.h> substitute.
-   Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-assert.c b/gnulib-tests/test-assert.c
new file mode 100644
index 00000000..1bb79ae1
--- /dev/null
+++ b/gnulib-tests/test-assert.c
@@ -0,0 +1,71 @@
+/* Test assert.h and static_assert.
+   Copyright 2022-2023 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Paul Eggert.  */
+
+#include <config.h>
+
+#define STATIC_ASSERT_TESTS \
+  static_assert (2 + 2 == 4, "arithmetic does not work"); \
+  static_assert (2 + 2 == 4); \
+  static_assert (sizeof (char) == 1, "sizeof does not work"); \
+  static_assert (sizeof (char) == 1)
+
+STATIC_ASSERT_TESTS;
+
+static char const *
+assert (char const *p, int i)
+{
+  return p + i;
+}
+
+static char const *
+f (char const *p)
+{
+  return assert (p, 0);
+}
+
+#include <assert.h>
+
+STATIC_ASSERT_TESTS;
+
+static int
+g (void)
+{
+  assert (f ("this should work"));
+  return 0;
+}
+
+#define NDEBUG 1
+#include <assert.h>
+
+STATIC_ASSERT_TESTS;
+
+static int
+h (void)
+{
+  assert (f ("this should work"));
+  return 0;
+}
+
+int
+main (void)
+{
+  STATIC_ASSERT_TESTS;
+  g ();
+  h ();
+  return 0;
+}
diff --git a/gnulib-tests/test-binary-io.c b/gnulib-tests/test-binary-io.c
index 2d71ae9c..a474d371 100644
--- a/gnulib-tests/test-binary-io.c
+++ b/gnulib-tests/test-binary-io.c
@@ -1,5 +1,5 @@
 /* Test of binary mode I/O.
-   Copyright (C) 2005, 2007-2022 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2007-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-binary-io.sh b/gnulib-tests/test-binary-io.sh
index a177d947..7bc5aa07 100755
--- a/gnulib-tests/test-binary-io.sh
+++ b/gnulib-tests/test-binary-io.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
+trap 'rm -fr $tmpfiles' HUP INT QUIT TERM
 
 tmpfiles="$tmpfiles t-bin-out0.tmp t-bin-out1.tmp"
 ${CHECKER} ./test-binary-io${EXEEXT} 1 > t-bin-out1.tmp || exit 1
diff --git a/gnulib-tests/test-bind.c b/gnulib-tests/test-bind.c
index 17063bf7..98b3e5b0 100644
--- a/gnulib-tests/test-bind.c
+++ b/gnulib-tests/test-bind.c
@@ -1,5 +1,5 @@
 /* Test binding a server socket to a port.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-bitrotate.c b/gnulib-tests/test-bitrotate.c
index da5f951f..f92b31b5 100644
--- a/gnulib-tests/test-bitrotate.c
+++ b/gnulib-tests/test-bitrotate.c
@@ -1,5 +1,5 @@
 /* Test of <bitrotate.h> substitute.
-   Copyright (C) 2007-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-btowc.c b/gnulib-tests/test-btowc.c
index 32806f07..8a803e53 100644
--- a/gnulib-tests/test-btowc.c
+++ b/gnulib-tests/test-btowc.c
@@ -1,5 +1,5 @@
 /* Test of conversion of unibyte character to wide character.
-   Copyright (C) 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 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
@@ -39,6 +39,15 @@ main (int argc, char *argv[])
 
   ASSERT (btowc (EOF) == WEOF);
 
+#ifdef __ANDROID__
+  /* On Android ≥ 5.0, the default locale is the "C.UTF-8" locale, not the
+     "C" locale.  Furthermore, when you attempt to set the "C" or "POSIX"
+     locale via setlocale(), what you get is a "C" locale with UTF-8 encoding,
+     that is, effectively the "C.UTF-8" locale.  */
+  if (argc > 1 && strcmp (argv[1], "3") == 0 && MB_CUR_MAX > 1)
+    argv[1] = "2";
+#endif
+
   if (argc > 1)
     switch (argv[1][0])
       {
@@ -57,6 +66,25 @@ main (int argc, char *argv[])
         for (c = 0x80; c < 0x100; c++)
           ASSERT (btowc (c) == WEOF);
         return 0;
+
+      case '3':
+        /* C or POSIX locale.  */
+        for (c = 0; c < 0x100; c++)
+          if (c != 0)
+            {
+              /* We are testing all nonnull bytes.  */
+              wint_t wc = btowc (c);
+              /* POSIX:2018 says: "In the POSIX locale, btowc() shall not return
+                 WEOF if c has a value in the range 0 to 255 inclusive."  */
+              if (c < 0x80)
+                /* c is an ASCII character.  */
+                ASSERT (wc == c);
+              else
+                /* On most platforms, the bytes 0x80..0xFF map to U+0080..U+00FF.
+                   But on musl libc, the bytes 0x80..0xFF map to U+DF80..U+DFFF.  */
+                ASSERT (wc == c || wc == 0xDF00 + c);
+            }
+        return 0;
       }
 
   return 1;
diff --git a/gnulib-tests/test-btowc1.sh b/gnulib-tests/test-btowc1.sh
index ab4b2876..e51e1c5c 100755
--- a/gnulib-tests/test-btowc1.sh
+++ b/gnulib-tests/test-btowc1.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test in an ISO-8859-1 or ISO-8859-15 locale.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no traditional french locale is installed"
diff --git a/gnulib-tests/test-btowc2.sh b/gnulib-tests/test-btowc2.sh
index d7d4d9cc..9f38f4e8 100755
--- a/gnulib-tests/test-btowc2.sh
+++ b/gnulib-tests/test-btowc2.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific UTF-8 locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no french Unicode locale is installed"
diff --git a/gnulib-tests/test-btowc3.sh b/gnulib-tests/test-btowc3.sh
new file mode 100755
index 00000000..ee9e143c
--- /dev/null
+++ b/gnulib-tests/test-btowc3.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+# Test whether the POSIX locale has encoding errors.
+LC_ALL=C \
+${CHECKER} ./test-btowc${EXEEXT} 3 || exit 1
+LC_ALL=POSIX \
+${CHECKER} ./test-btowc${EXEEXT} 3 || exit 1
+
+exit 0
diff --git a/gnulib-tests/test-c-ctype.c b/gnulib-tests/test-c-ctype.c
index 9870520d..ad306b68 100644
--- a/gnulib-tests/test-c-ctype.c
+++ b/gnulib-tests/test-c-ctype.c
@@ -1,5 +1,5 @@
 /* Test of character handling in C locale.
-   Copyright (C) 2005, 2007-2022 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2007-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-c-stack.c b/gnulib-tests/test-c-stack.c
index 8642437e..2f689d91 100644
--- a/gnulib-tests/test-c-stack.c
+++ b/gnulib-tests/test-c-stack.c
@@ -1,5 +1,5 @@
 /* Test of c-stack module.
-   Copyright (C) 2002, 2004, 2006, 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2004, 2006, 2008-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-c-stack.sh b/gnulib-tests/test-c-stack.sh
index 54009d3c..f0bec55e 100755
--- a/gnulib-tests/test-c-stack.sh
+++ b/gnulib-tests/test-c-stack.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
+trap 'rm -fr $tmpfiles' HUP INT QUIT TERM
 
 tmpfiles="t-c-stack.tmp"
 ${CHECKER} ./test-c-stack${EXEEXT} 2> t-c-stack.tmp
diff --git a/gnulib-tests/test-c-stack2.sh b/gnulib-tests/test-c-stack2.sh
index 7f035933..b7f8b26b 100755
--- a/gnulib-tests/test-c-stack2.sh
+++ b/gnulib-tests/test-c-stack2.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
+trap 'rm -fr $tmpfiles' HUP INT QUIT TERM
 
 tmpfiles="t-c-stack2.tmp"
 
diff --git a/gnulib-tests/test-c-strcase.sh b/gnulib-tests/test-c-strcase.sh
index 14bdfb24..9f491e0f 100755
--- a/gnulib-tests/test-c-strcase.sh
+++ b/gnulib-tests/test-c-strcase.sh
@@ -5,14 +5,14 @@ ${CHECKER} ./test-c-strcasecmp${EXEEXT} || exit 1
 ${CHECKER} ./test-c-strncasecmp${EXEEXT} || exit 1
 
 # Test in an ISO-8859-1 or ISO-8859-15 locale.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR != none; then
   LC_ALL=$LOCALE_FR ${CHECKER} ./test-c-strcasecmp${EXEEXT} locale || exit 1
   LC_ALL=$LOCALE_FR ${CHECKER} ./test-c-strncasecmp${EXEEXT} locale || exit 1
 fi
 
 # Test in a Turkish UTF-8 locale.
-: ${LOCALE_TR_UTF8=tr_TR.UTF-8}
+: "${LOCALE_TR_UTF8=tr_TR.UTF-8}"
 if test $LOCALE_TR_UTF8 != none; then
   LC_ALL=$LOCALE_TR_UTF8 ${CHECKER} ./test-c-strcasecmp${EXEEXT} locale || exit 1
   LC_ALL=$LOCALE_TR_UTF8 ${CHECKER} ./test-c-strncasecmp${EXEEXT} locale || exit 1
diff --git a/gnulib-tests/test-c-strcasecmp.c b/gnulib-tests/test-c-strcasecmp.c
index 1bb518da..ad33a68e 100644
--- a/gnulib-tests/test-c-strcasecmp.c
+++ b/gnulib-tests/test-c-strcasecmp.c
@@ -1,5 +1,5 @@
 /* Test of case-insensitive string comparison function.
-   Copyright (C) 2007-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-c-strcasestr.c b/gnulib-tests/test-c-strcasestr.c
new file mode 100644
index 00000000..4f0a6c26
--- /dev/null
+++ b/gnulib-tests/test-c-strcasestr.c
@@ -0,0 +1,272 @@
+/* Test of case-insensitive searching in a string.
+   Copyright (C) 2007-2023 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007.  */
+
+#include <config.h>
+
+#include "c-strcasestr.h"
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "macros.h"
+
+int
+main ()
+{
+  {
+    const char input[] = "foo";
+    const char *result = c_strcasestr (input, "");
+    ASSERT (result == input);
+  }
+
+  {
+    const char input[] = "foo";
+    const char *result = c_strcasestr (input, "O");
+    ASSERT (result == input + 1);
+  }
+
+  {
+    const char input[] = "ABC ABCDAB ABCDABCDABDE";
+    const char *result = c_strcasestr (input, "ABCDaBD");
+    ASSERT (result == input + 15);
+  }
+
+  {
+    const char input[] = "ABC ABCDAB ABCDABCDABDE";
+    const char *result = c_strcasestr (input, "ABCDaBE");
+    ASSERT (result == NULL);
+  }
+
+  {
+    const char input[] = "ABC ABCDAB ABCDABCDABDE";
+    const char *result = c_strcasestr (input, "ABCDaBCD");
+    ASSERT (result == input + 11);
+  }
+
+  /* Check that a long periodic needle does not cause false positives.  */
+  {
+    const char input[] = "F_BD_CE_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD"
+                         "_C3_88_20_EF_BF_BD_EF_BF_BD_EF_BF_BD"
+                         "_C3_A7_20_EF_BF_BD";
+    const char need[] = "_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD";
+    const char *result = c_strcasestr (input, need);
+    ASSERT (result == NULL);
+  }
+  {
+    const char input[] = "F_BD_CE_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD"
+                         "_C3_88_20_EF_BF_BD_EF_BF_BD_EF_BF_BD"
+                         "_C3_A7_20_EF_BF_BD_DA_B5_C2_A6_20"
+                         "_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD";
+    const char need[] = "_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD";
+    const char *result = c_strcasestr (input, need);
+    ASSERT (result == input + 115);
+  }
+
+  /* Check that a very long haystack is handled quickly if the needle is
+     short and occurs near the beginning.  */
+  {
+    size_t repeat = 10000;
+    size_t m = 1000000;
+    const char *needle =
+      "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+      "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaAaaaaaaAAAAaaaaaaa"
+      "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
+    char *haystack = (char *) malloc (m + 1);
+    if (haystack != NULL)
+      {
+        memset (haystack, 'A', m);
+        haystack[0] = 'B';
+        haystack[m] = '\0';
+
+        for (; repeat > 0; repeat--)
+          {
+            ASSERT (c_strcasestr (haystack, needle) == haystack + 1);
+          }
+
+        free (haystack);
+      }
+  }
+
+  /* Check that a very long needle is discarded quickly if the haystack is
+     short.  */
+  {
+    size_t repeat = 10000;
+    size_t m = 1000000;
+    const char *haystack =
+      "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+      "ABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABAB";
+    char *needle = (char *) malloc (m + 1);
+    if (needle != NULL)
+      {
+        memset (needle, 'A', m);
+        needle[m] = '\0';
+
+        for (; repeat > 0; repeat--)
+          {
+            ASSERT (c_strcasestr (haystack, needle) == NULL);
+          }
+
+        free (needle);
+      }
+  }
+
+  /* Check that the asymptotic worst-case complexity is not quadratic.  */
+  {
+    size_t m = 1000000;
+    char *haystack = (char *) malloc (2 * m + 2);
+    char *needle = (char *) malloc (m + 2);
+    if (haystack != NULL && needle != NULL)
+      {
+        const char *result;
+
+        memset (haystack, 'A', 2 * m);
+        haystack[2 * m] = 'B';
+        haystack[2 * m + 1] = '\0';
+
+        memset (needle, 'a', m);
+        needle[m] = 'B';
+        needle[m + 1] = '\0';
+
+        result = c_strcasestr (haystack, needle);
+        ASSERT (result == haystack + m);
+      }
+    free (needle);
+    free (haystack);
+  }
+
+  {
+    /* Ensure that with a barely periodic "short" needle, c_strcasestr's
+       search does not mistakenly skip just past the match point.
+       This use of c_strcasestr would mistakenly return NULL before
+       gnulib v0.0-4927.  */
+    const char *haystack =
+      "\n"
+      "with_build_libsubdir\n"
+      "with_local_prefix\n"
+      "with_gxx_include_dir\n"
+      "with_cpp_install_dir\n"
+      "enable_generated_files_in_srcdir\n"
+      "with_gnu_ld\n"
+      "with_ld\n"
+      "with_demangler_in_ld\n"
+      "with_gnu_as\n"
+      "with_as\n"
+      "enable_largefile\n"
+      "enable_werror_always\n"
+      "enable_checking\n"
+      "enable_coverage\n"
+      "enable_gather_detailed_mem_stats\n"
+      "enable_build_with_cxx\n"
+      "with_stabs\n"
+      "enable_multilib\n"
+      "enable___cxa_atexit\n"
+      "enable_decimal_float\n"
+      "enable_fixed_point\n"
+      "enable_threads\n"
+      "enable_tls\n"
+      "enable_objc_gc\n"
+      "with_dwarf2\n"
+      "enable_shared\n"
+      "with_build_sysroot\n"
+      "with_sysroot\n"
+      "with_specs\n"
+      "with_pkgversion\n"
+      "with_bugurl\n"
+      "enable_languages\n"
+      "with_multilib_list\n";
+    const char *needle = "\n"
+      "with_GNU_ld\n";
+    const char* p = c_strcasestr (haystack, needle);
+    ASSERT (p - haystack == 114);
+  }
+
+  {
+    /* Same bug, shorter trigger.  */
+    const char *haystack = "..wi.D.";
+    const char *needle = ".d.";
+    const char* p = c_strcasestr (haystack, needle);
+    ASSERT (p - haystack == 4);
+  }
+
+  {
+    /* Like the above, but trigger the flaw in two_way_long_needle
+       by using a needle of length LONG_NEEDLE_THRESHOLD (32) or greater.
+       Rather than trying to find the right alignment manually, I've
+       arbitrarily chosen the following needle and template for the
+       haystack, and ensure that for each placement of the needle in
+       that haystack, c_strcasestr finds it.  */
+    const char *needle = "\nwith_gnu_ld-extend-to-len-32-b\n";
+    const char *h =
+      "\n"
+      "with_build_libsubdir\n"
+      "with_local_prefix\n"
+      "with_gxx_include_dir\n"
+      "with_cpp_install_dir\n"
+      "with_e_\n"
+      "..............................\n"
+      "with_FGHIJKLMNOPQRSTUVWXYZ\n"
+      "with_567890123456789\n"
+      "with_multilib_list\n";
+    size_t h_len = strlen (h);
+    char *haystack = malloc (h_len + 1);
+    size_t i;
+    ASSERT (haystack);
+    for (i = 0; i < h_len - strlen (needle); i++)
+      {
+        const char *p;
+        memcpy (haystack, h, h_len + 1);
+        memcpy (haystack + i, needle, strlen (needle) + 1);
+        p = c_strcasestr (haystack, needle);
+        ASSERT (p);
+        ASSERT (p - haystack == i);
+      }
+    free (haystack);
+  }
+
+  /* Test case from Yves Bastide.
+     <https://www.openwall.com/lists/musl/2014/04/18/2>  */
+  {
+    const char input[] = "playing PLAY play PLAY always";
+    const char *result = c_strcasestr (input, "play PLAY play");
+    ASSERT (result == input + 8);
+  }
+
+  /* Test long needles.  */
+  {
+    size_t m = 1024;
+    char *haystack = (char *) malloc (2 * m + 1);
+    char *needle = (char *) malloc (m + 1);
+    if (haystack != NULL && needle != NULL)
+      {
+        const char *p;
+        haystack[0] = 'x';
+        memset (haystack + 1, ' ', m - 1);
+        memset (haystack + m, 'x', m);
+        haystack[2 * m] = '\0';
+        memset (needle, 'X', m);
+        needle[m] = '\0';
+        p = c_strcasestr (haystack, needle);
+        ASSERT (p);
+        ASSERT (p - haystack == m);
+      }
+    free (needle);
+    free (haystack);
+  }
+
+  return 0;
+}
diff --git a/gnulib-tests/test-c-strncasecmp.c b/gnulib-tests/test-c-strncasecmp.c
index 734eb87b..c8501a2e 100644
--- a/gnulib-tests/test-c-strncasecmp.c
+++ b/gnulib-tests/test-c-strncasecmp.c
@@ -1,5 +1,5 @@
 /* Test of case-insensitive string comparison function.
-   Copyright (C) 2007-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-calloc-gnu.c b/gnulib-tests/test-calloc-gnu.c
index 4a7b7745..fd72c44c 100644
--- a/gnulib-tests/test-calloc-gnu.c
+++ b/gnulib-tests/test-calloc-gnu.c
@@ -1,5 +1,5 @@
 /* Test of calloc function.
-   Copyright (C) 2010-2022 Free Software Foundation, Inc.
+   Copyright (C) 2010-2023 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
@@ -63,7 +63,7 @@ main ()
         ASSERT (p == NULL);
         ASSERT (errno == ENOMEM);
 
-	p = calloc (SIZE_MAX / n + 1, identity (n));
+        p = calloc (SIZE_MAX / n + 1, identity (n));
         ASSERT (p == NULL);
         ASSERT (errno == ENOMEM);
       }
diff --git a/gnulib-tests/test-chdir.c b/gnulib-tests/test-chdir.c
index e6497533..80c74290 100644
--- a/gnulib-tests/test-chdir.c
+++ b/gnulib-tests/test-chdir.c
@@ -1,5 +1,5 @@
 /* Test changing to a directory.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-cloexec.c b/gnulib-tests/test-cloexec.c
index 6069e537..e8c8eb61 100644
--- a/gnulib-tests/test-cloexec.c
+++ b/gnulib-tests/test-cloexec.c
@@ -1,5 +1,5 @@
 /* Test duplicating non-inheritable file descriptors.
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-close.c b/gnulib-tests/test-close.c
index db25aab0..9e3ec867 100644
--- a/gnulib-tests/test-close.c
+++ b/gnulib-tests/test-close.c
@@ -1,5 +1,5 @@
 /* Test closing a file or socket.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-connect.c b/gnulib-tests/test-connect.c
index 2a93d01f..84b1367b 100644
--- a/gnulib-tests/test-connect.c
+++ b/gnulib-tests/test-connect.c
@@ -1,5 +1,5 @@
 /* Test connecting a client socket.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-ctype.c b/gnulib-tests/test-ctype.c
index 93c4e32b..3b385fd6 100644
--- a/gnulib-tests/test-ctype.c
+++ b/gnulib-tests/test-ctype.c
@@ -1,5 +1,5 @@
 /* Test of <ctype.h> substitute.
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-dfa-invalid-char-class.sh b/gnulib-tests/test-dfa-invalid-char-class.sh
index 5ec73b66..1428d796 100755
--- a/gnulib-tests/test-dfa-invalid-char-class.sh
+++ b/gnulib-tests/test-dfa-invalid-char-class.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 # This use of our DFA-testing helper would fail for grep-2.21.
 
-# Copyright 2014-2022 Free Software Foundation, Inc.
+# Copyright 2014-2023 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-dfa-invalid-merge.sh b/gnulib-tests/test-dfa-invalid-merge.sh
index 937a6ae4..d5314cb6 100755
--- a/gnulib-tests/test-dfa-invalid-merge.sh
+++ b/gnulib-tests/test-dfa-invalid-merge.sh
@@ -3,7 +3,7 @@
 # a+a+a to a+a, thus possibly reporting a false match.
 # Introduced in v0.1-2111-g4299106ce
 
-# Copyright 2020-2022 Free Software Foundation, Inc.
+# Copyright 2020-2023 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-dfa-match-aux.c b/gnulib-tests/test-dfa-match-aux.c
index 8e1c9088..bbe24683 100644
--- a/gnulib-tests/test-dfa-match-aux.c
+++ b/gnulib-tests/test-dfa-match-aux.c
@@ -1,6 +1,6 @@
 /* Auxiliary program to test a DFA code path that cannot be triggered
    by grep or gawk.
-   Copyright 2014-2022 Free Software Foundation, Inc.
+   Copyright 2014-2023 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
@@ -22,10 +22,13 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <unistd.h>
 #include <regex.h>
 #include <dfa.h>
 #include <localeinfo.h>
 
+#include "binary-io.h"
+
 _Noreturn void
 dfaerror (char const *mesg)
 {
@@ -53,6 +56,11 @@ main (int argc, char **argv)
   if (argc < 3)
     exit (EXIT_FAILURE);
 
+  /* This test's fixture needs to compare this program's output with an expected
+     output.  On native Windows, the CR-LF newlines would cause this comparison
+     to fail.  But we don't want to postprocess this program's output.  */
+  set_binary_mode (STDOUT_FILENO, O_BINARY);
+
   setlocale (LC_ALL, "");
   init_localeinfo (&localeinfo);
 
diff --git a/gnulib-tests/test-dfa-match.sh b/gnulib-tests/test-dfa-match.sh
index 4561584c..a5aa68c6 100755
--- a/gnulib-tests/test-dfa-match.sh
+++ b/gnulib-tests/test-dfa-match.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 # This would fail with grep-2.21's dfa.c.
 
-# Copyright 2014-2022 Free Software Foundation, Inc.
+# Copyright 2014-2023 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-dirent.c b/gnulib-tests/test-dirent.c
index f3468b8b..68970566 100644
--- a/gnulib-tests/test-dirent.c
+++ b/gnulib-tests/test-dirent.c
@@ -1,5 +1,5 @@
 /* Test of <dirent.h> substitute.
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-dup-safer.c b/gnulib-tests/test-dup-safer.c
index 467351ee..c2de3003 100644
--- a/gnulib-tests/test-dup-safer.c
+++ b/gnulib-tests/test-dup-safer.c
@@ -1,5 +1,5 @@
 /* Test that dup_safer leaves standard fds alone.
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 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
@@ -22,7 +22,6 @@
 
 #include <fcntl.h>
 #include <errno.h>
-#include <stdbool.h>
 #include <stdio.h>
 #include <unistd.h>
 
diff --git a/gnulib-tests/test-dup.c b/gnulib-tests/test-dup.c
index 87bf6c7f..0390caf9 100644
--- a/gnulib-tests/test-dup.c
+++ b/gnulib-tests/test-dup.c
@@ -1,5 +1,5 @@
 /* Test duplicating a file descriptor.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-dup2.c b/gnulib-tests/test-dup2.c
index e4ec1c25..8acbc038 100644
--- a/gnulib-tests/test-dup2.c
+++ b/gnulib-tests/test-dup2.c
@@ -1,5 +1,5 @@
 /* Test duplicating file descriptors.
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 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
@@ -50,6 +50,12 @@ SIGNATURE_CHECK (dup2, int, (int, int));
 
 #include "macros.h"
 
+/* Tell GCC not to warn about the specific edge cases tested here.  */
+#if __GNUC__ >= 13
+# pragma GCC diagnostic ignored "-Wanalyzer-fd-leak"
+# pragma GCC diagnostic ignored "-Wanalyzer-fd-use-without-check"
+#endif
+
 /* Return non-zero if FD is open.  */
 static int
 is_open (int fd)
diff --git a/gnulib-tests/test-dynarray.c b/gnulib-tests/test-dynarray.c
index 0e4eeda2..b4624169 100644
--- a/gnulib-tests/test-dynarray.c
+++ b/gnulib-tests/test-dynarray.c
@@ -1,5 +1,5 @@
 /* Test of type-safe arrays that grow dynamically.
-   Copyright (C) 2021-2022 Free Software Foundation, Inc.
+   Copyright (C) 2021-2023 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-environ.c b/gnulib-tests/test-environ.c
index 6242205f..3df1f0f6 100644
--- a/gnulib-tests/test-environ.c
+++ b/gnulib-tests/test-environ.c
@@ -1,5 +1,5 @@
 /* Test of environ variable.
-   Copyright (C) 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-errno.c b/gnulib-tests/test-errno.c
index bbfd5da6..c665e28e 100644
--- a/gnulib-tests/test-errno.c
+++ b/gnulib-tests/test-errno.c
@@ -1,5 +1,5 @@
 /* Test of <errno.h> substitute.
-   Copyright (C) 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-error.c b/gnulib-tests/test-error.c
new file mode 100644
index 00000000..697e783e
--- /dev/null
+++ b/gnulib-tests/test-error.c
@@ -0,0 +1,88 @@
+/* Test of error.h functions.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2023.  */
+
+#include <config.h>
+
+#include "error.h"
+
+#include <errno.h>
+
+#include "macros.h"
+
+/* Custom function to not show the program name in error messages.  */
+static void
+print_no_progname (void)
+{
+}
+
+int
+main (int argc, char *argv[])
+{
+  /* Test error() function with zero STATUS and zero ERRNUM.  */
+  error (0, 0, "bummer");
+  /* With format string arguments.  */
+  errno = EINVAL; /* should be ignored */
+  error (0, 0, "Zonk %d%d%d is too large", 1, 2, 3);
+  /* With non-ASCII characters.  */
+  error (0, 0, "Pokémon started");
+  /* Verify error_message_count.  */
+  ASSERT (error_message_count == 3);
+
+  /* Test error_at_line() function with zero STATUS and zero ERRNUM.  */
+  error_at_line (0, 0, "d1/foo.c", 10, "invalid blub");
+  error_at_line (0, 0, "d1/foo.c", 10, "invalid blarn");
+  /* Verify error_message_count.  */
+  ASSERT (error_message_count == 5);
+
+  /* Test error_one_per_line.  */
+  error_one_per_line = 1;
+  error_at_line (0, 0, "d1/foo.c", 10, "unsupported glink");
+  /* Another line number.  */
+  error_at_line (0, 0, "d1/foo.c", 13, "invalid brump");
+  /* Another file name.  */
+  error_at_line (0, 0, "d2/foo.c", 13, "unsupported flinge");
+  /* Same file name and same line number => message not shown.  */
+  error_at_line (0, 0, "d2/foo.c", 13, "invalid bark");
+  /* Verify error_message_count.  */
+  ASSERT (error_message_count == 8);
+  error_one_per_line = 0;
+
+  /* Test error_print_progname.  */
+  error_print_progname = print_no_progname;
+  error (0, 0, "hammer");
+  error (0, 0, "boing %d%d%d is too large", 1, 2, 3);
+  #if 0
+  /* The documentation does not describe the output if the file name is NULL. */
+  error_at_line (0, 0, NULL, 42, "drummer too loud");
+  #endif
+  error_at_line (0, 0, "d2/bar.c", 11, "bark too loud");
+  /* Verify error_message_count.  */
+  ASSERT (error_message_count == 11);
+  error_print_progname = NULL;
+
+  /* Test error() function with nonzero ERRNUM.  */
+  errno = EINVAL; /* should be ignored */
+  error (0, EACCES, "can't steal");
+  /* Verify error_message_count.  */
+  ASSERT (error_message_count == 12);
+
+  /* Test error() function with nonzero STATUS.  */
+  error (4, 0, "fatal error");
+
+  return 0;
+}
diff --git a/gnulib-tests/test-error.sh b/gnulib-tests/test-error.sh
new file mode 100755
index 00000000..d173e183
--- /dev/null
+++ b/gnulib-tests/test-error.sh
@@ -0,0 +1,36 @@
+#!/bin/sh
+# Test of the 'error' module.
+
+. "${srcdir=.}/init.sh"; path_prepend_ .
+
+${CHECKER} test-error${EXEEXT} > out 2> err
+# Verify the exit code.
+case $? in
+  4) ;;
+  *) Exit 1;;
+esac
+
+# Normalize the stderr output on Windows platforms.
+tr -d '\015' < err | sed 's,.*test-error[.ex]*:,test-error:,' > err2 || Exit 1
+
+# Verify the stderr output.
+compare - err2 <<\EOF || Exit 1
+test-error: bummer
+test-error: Zonk 123 is too large
+test-error: Pokémon started
+test-error:d1/foo.c:10: invalid blub
+test-error:d1/foo.c:10: invalid blarn
+test-error:d1/foo.c:10: unsupported glink
+test-error:d1/foo.c:13: invalid brump
+test-error:d2/foo.c:13: unsupported flinge
+hammer
+boing 123 is too large
+d2/bar.c:11: bark too loud
+test-error: can't steal: Permission denied
+test-error: fatal error
+EOF
+
+# Verify the stdout output.
+test -s out && Exit 1
+
+Exit 0
diff --git a/gnulib-tests/test-exclude.c b/gnulib-tests/test-exclude.c
index 388b73bb..5a81cab4 100644
--- a/gnulib-tests/test-exclude.c
+++ b/gnulib-tests/test-exclude.c
@@ -1,5 +1,5 @@
 /* Test suite for exclude.
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 Free Software Foundation, Inc.
    This file is part of the GNUlib Library.
 
    This program is free software: you can redistribute it and/or modify
@@ -20,7 +20,6 @@
 #include <stdlib.h>
 #include <errno.h>
 #include <string.h>
-#include <stdbool.h>
 #include <fnmatch.h>
 
 #include "exclude.h"
diff --git a/gnulib-tests/test-exclude1.sh b/gnulib-tests/test-exclude1.sh
index 4a11c7b3..9aca1d89 100755
--- a/gnulib-tests/test-exclude1.sh
+++ b/gnulib-tests/test-exclude1.sh
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Test suite for exclude.
-# Copyright (C) 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2009-2023 Free Software Foundation, Inc.
 # This file is part of the GNUlib Library.
 #
 # This program is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/test-exclude2.sh b/gnulib-tests/test-exclude2.sh
index 4cb1c6be..ff7ced08 100755
--- a/gnulib-tests/test-exclude2.sh
+++ b/gnulib-tests/test-exclude2.sh
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Test suite for exclude.
-# Copyright (C) 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2009-2023 Free Software Foundation, Inc.
 # This file is part of the GNUlib Library.
 #
 # This program is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/test-exclude3.sh b/gnulib-tests/test-exclude3.sh
index fa026880..97744dc8 100755
--- a/gnulib-tests/test-exclude3.sh
+++ b/gnulib-tests/test-exclude3.sh
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Test suite for exclude.
-# Copyright (C) 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2009-2023 Free Software Foundation, Inc.
 # This file is part of the GNUlib Library.
 #
 # This program is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/test-exclude4.sh b/gnulib-tests/test-exclude4.sh
index 4d58e116..998dae08 100755
--- a/gnulib-tests/test-exclude4.sh
+++ b/gnulib-tests/test-exclude4.sh
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Test suite for exclude.
-# Copyright (C) 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2009-2023 Free Software Foundation, Inc.
 # This file is part of the GNUlib Library.
 #
 # This program is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/test-exclude5.sh b/gnulib-tests/test-exclude5.sh
index 3f514af9..f386df84 100755
--- a/gnulib-tests/test-exclude5.sh
+++ b/gnulib-tests/test-exclude5.sh
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Test suite for exclude.
-# Copyright (C) 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2009-2023 Free Software Foundation, Inc.
 # This file is part of the GNUlib Library.
 #
 # This program is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/test-exclude6.sh b/gnulib-tests/test-exclude6.sh
index eacdcc63..8362b019 100755
--- a/gnulib-tests/test-exclude6.sh
+++ b/gnulib-tests/test-exclude6.sh
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Test suite for exclude.
-# Copyright (C) 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2009-2023 Free Software Foundation, Inc.
 # This file is part of the GNUlib Library.
 #
 # This program is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/test-exclude7.sh b/gnulib-tests/test-exclude7.sh
index b5c975d6..08f67efc 100755
--- a/gnulib-tests/test-exclude7.sh
+++ b/gnulib-tests/test-exclude7.sh
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Test suite for exclude.
-# Copyright (C) 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2009-2023 Free Software Foundation, Inc.
 # This file is part of the GNUlib Library.
 #
 # This program is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/test-exclude8.sh b/gnulib-tests/test-exclude8.sh
index 52536f22..a2e007d4 100755
--- a/gnulib-tests/test-exclude8.sh
+++ b/gnulib-tests/test-exclude8.sh
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Test suite for exclude.
-# Copyright (C) 2010-2022 Free Software Foundation, Inc.
+# Copyright (C) 2010-2023 Free Software Foundation, Inc.
 # This file is part of the GNUlib Library.
 #
 # This program is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/test-fchdir.c b/gnulib-tests/test-fchdir.c
index 5eee2ab0..79258771 100644
--- a/gnulib-tests/test-fchdir.c
+++ b/gnulib-tests/test-fchdir.c
@@ -1,5 +1,5 @@
 /* Test changing to a directory named by a file descriptor.
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-fcntl-h.c b/gnulib-tests/test-fcntl-h.c
index 15019792..c2552132 100644
--- a/gnulib-tests/test-fcntl-h.c
+++ b/gnulib-tests/test-fcntl-h.c
@@ -1,5 +1,5 @@
 /* Test of <fcntl.h> substitute.
-   Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-fcntl-safer.c b/gnulib-tests/test-fcntl-safer.c
index 667a6871..c1b2acf5 100644
--- a/gnulib-tests/test-fcntl-safer.c
+++ b/gnulib-tests/test-fcntl-safer.c
@@ -1,5 +1,5 @@
 /* Test of opening a file descriptor.
-   Copyright (C) 2007-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007-2023 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
@@ -21,7 +21,6 @@
 #include "fcntl--.h"
 
 #include <errno.h>
-#include <stdbool.h>
 #include <stdio.h>
 #include <unistd.h>
 
diff --git a/gnulib-tests/test-fcntl.c b/gnulib-tests/test-fcntl.c
index cd7d1882..5fb554af 100644
--- a/gnulib-tests/test-fcntl.c
+++ b/gnulib-tests/test-fcntl.c
@@ -1,5 +1,5 @@
 /* Test of fcntl(2).
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 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
@@ -27,7 +27,6 @@ SIGNATURE_CHECK (fcntl, int, (int, int, ...));
 /* Helpers.  */
 #include <errno.h>
 #include <stdarg.h>
-#include <stdbool.h>
 #include <unistd.h>
 
 #if defined _WIN32 && ! defined __CYGWIN__
@@ -45,6 +44,12 @@ SIGNATURE_CHECK (fcntl, int, (int, int, ...));
 #include "binary-io.h"
 #include "macros.h"
 
+/* Tell GCC not to warn about the specific edge cases tested here.  */
+#if __GNUC__ >= 13
+# pragma GCC diagnostic ignored "-Wanalyzer-fd-leak"
+# pragma GCC diagnostic ignored "-Wanalyzer-va-arg-type-mismatch"
+#endif
+
 #if !O_BINARY
 # define set_binary_mode(f,m) zero ()
 static int zero (void) { return 0; }
diff --git a/gnulib-tests/test-fdopen.c b/gnulib-tests/test-fdopen.c
index d67beedd..cf28f8e7 100644
--- a/gnulib-tests/test-fdopen.c
+++ b/gnulib-tests/test-fdopen.c
@@ -1,5 +1,5 @@
 /* Test opening a stream with a file descriptor.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 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
@@ -33,9 +33,14 @@ main (void)
      failure, since the behavior is not well-defined on invalid file
      descriptors, so try fdopen 1000 times and if that's not enough to
      fail due to EMFILE, so be it.  */
+  #if defined __ANDROID__ /* fdsan */
+    #define COUNT 1
+  #else
+    #define COUNT 1000
+  #endif
 
   int i;
-  for (i = 0; i < 1000; i++)
+  for (i = 0; i < COUNT; i++)
     {
       errno = 0;
       if (! fdopen (STDOUT_FILENO, "w"))
diff --git a/gnulib-tests/test-fdopendir.c b/gnulib-tests/test-fdopendir.c
index 89079ead..41b15f3e 100644
--- a/gnulib-tests/test-fdopendir.c
+++ b/gnulib-tests/test-fdopendir.c
@@ -1,5 +1,5 @@
 /* Test opening a directory stream from a file descriptor.
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-fgetc.c b/gnulib-tests/test-fgetc.c
index 2b289dc1..c8c65f58 100644
--- a/gnulib-tests/test-fgetc.c
+++ b/gnulib-tests/test-fgetc.c
@@ -1,5 +1,5 @@
 /* Test of fgetc() function.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 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
@@ -54,6 +54,7 @@ main (int argc, char **argv)
 
   /* Test that fgetc() sets errno if someone else closes the stream
      fd behind the back of stdio.  */
+  #if !defined __ANDROID__ /* fdsan */
   {
     FILE *fp = fopen (filename, "r");
     ASSERT (fp != NULL);
@@ -64,6 +65,7 @@ main (int argc, char **argv)
     ASSERT (ferror (fp));
     fclose (fp);
   }
+  #endif
 
   /* Test that fgetc() sets errno if the stream was constructed with
      an invalid file descriptor.  */
diff --git a/gnulib-tests/test-float.c b/gnulib-tests/test-float.c
index 986f7da8..07c3ad1c 100644
--- a/gnulib-tests/test-float.c
+++ b/gnulib-tests/test-float.c
@@ -1,5 +1,5 @@
 /* Test of <float.h> substitute.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 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
@@ -20,12 +20,48 @@
 
 #include <float.h>
 
-#include "fpucw.h"
-#include "macros.h"
-
 /* Check that FLT_RADIX is a constant expression.  */
 int a[] = { FLT_RADIX };
 
+/* ----------------------- Check macros for 'float' ----------------------- */
+
+/* Check that the FLT_* macros expand to constant expressions.  */
+int fb[] =
+  {
+    FLT_MANT_DIG, FLT_MIN_EXP, FLT_MAX_EXP,
+    FLT_DIG, FLT_MIN_10_EXP, FLT_MAX_10_EXP
+  };
+float fc[] = { FLT_EPSILON, FLT_MIN, FLT_MAX };
+
+/* ----------------------- Check macros for 'double' ----------------------- */
+
+/* Check that the DBL_* macros expand to constant expressions.  */
+int db[] =
+  {
+    DBL_MANT_DIG, DBL_MIN_EXP, DBL_MAX_EXP,
+    DBL_DIG, DBL_MIN_10_EXP, DBL_MAX_10_EXP
+  };
+double dc[] = { DBL_EPSILON, DBL_MIN, DBL_MAX };
+
+/* -------------------- Check macros for 'long double' -------------------- */
+
+/* Check that the LDBL_* macros expand to constant expressions.  */
+int lb[] =
+  {
+    LDBL_MANT_DIG, LDBL_MIN_EXP, LDBL_MAX_EXP,
+    LDBL_DIG, LDBL_MIN_10_EXP, LDBL_MAX_10_EXP
+  };
+long double lc1 = LDBL_EPSILON;
+long double lc2 = LDBL_MIN;
+#if 0 /* LDBL_MAX is not a constant expression on some platforms.  */
+long double lc3 = LDBL_MAX;
+#endif
+
+/* ------------------------------------------------------------------------- */
+
+#include "fpucw.h"
+#include "macros.h"
+
 #if FLT_RADIX == 2
 
 /* Return 2^n.  */
@@ -117,14 +153,6 @@ pow2l (int n)
 
 /* ----------------------- Check macros for 'float' ----------------------- */
 
-/* Check that the FLT_* macros expand to constant expressions.  */
-int fb[] =
-  {
-    FLT_MANT_DIG, FLT_MIN_EXP, FLT_MAX_EXP,
-    FLT_DIG, FLT_MIN_10_EXP, FLT_MAX_10_EXP
-  };
-float fc[] = { FLT_EPSILON, FLT_MIN, FLT_MAX };
-
 static void
 test_float (void)
 {
@@ -196,14 +224,6 @@ test_float (void)
 
 /* ----------------------- Check macros for 'double' ----------------------- */
 
-/* Check that the DBL_* macros expand to constant expressions.  */
-int db[] =
-  {
-    DBL_MANT_DIG, DBL_MIN_EXP, DBL_MAX_EXP,
-    DBL_DIG, DBL_MIN_10_EXP, DBL_MAX_10_EXP
-  };
-double dc[] = { DBL_EPSILON, DBL_MIN, DBL_MAX };
-
 static void
 test_double (void)
 {
@@ -275,18 +295,6 @@ test_double (void)
 
 /* -------------------- Check macros for 'long double' -------------------- */
 
-/* Check that the LDBL_* macros expand to constant expressions.  */
-int lb[] =
-  {
-    LDBL_MANT_DIG, LDBL_MIN_EXP, LDBL_MAX_EXP,
-    LDBL_DIG, LDBL_MIN_10_EXP, LDBL_MAX_10_EXP
-  };
-long double lc1 = LDBL_EPSILON;
-long double lc2 = LDBL_MIN;
-#if 0 /* LDBL_MAX is not a constant expression on some platforms.  */
-long double lc3 = LDBL_MAX;
-#endif
-
 static void
 test_long_double (void)
 {
diff --git a/gnulib-tests/test-fnmatch-h.c b/gnulib-tests/test-fnmatch-h.c
index b72c0fc4..e26b640b 100644
--- a/gnulib-tests/test-fnmatch-h.c
+++ b/gnulib-tests/test-fnmatch-h.c
@@ -1,5 +1,5 @@
 /* Test of <fnmatch.h> substitute.
-   Copyright (C) 2018-2022 Free Software Foundation, Inc.
+   Copyright (C) 2018-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-fnmatch.c b/gnulib-tests/test-fnmatch.c
index 07ae5eb8..3777aa27 100644
--- a/gnulib-tests/test-fnmatch.c
+++ b/gnulib-tests/test-fnmatch.c
@@ -1,5 +1,5 @@
 /* Test of fnmatch string matching function.
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-fopen-gnu.c b/gnulib-tests/test-fopen-gnu.c
index bba2decc..1fa8824c 100644
--- a/gnulib-tests/test-fopen-gnu.c
+++ b/gnulib-tests/test-fopen-gnu.c
@@ -1,5 +1,5 @@
 /* Test of opening a file stream.
-   Copyright (C) 2020-2022 Free Software Foundation, Inc.
+   Copyright (C) 2020-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-fopen.c b/gnulib-tests/test-fopen.c
index 5020ed08..17984e05 100644
--- a/gnulib-tests/test-fopen.c
+++ b/gnulib-tests/test-fopen.c
@@ -1,5 +1,5 @@
 /* Test of opening a file stream.
-   Copyright (C) 2007-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-fopen.h b/gnulib-tests/test-fopen.h
index 4b66ec70..751afd8c 100644
--- a/gnulib-tests/test-fopen.h
+++ b/gnulib-tests/test-fopen.h
@@ -1,5 +1,5 @@
 /* Test of opening a file stream.
-   Copyright (C) 2007-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007-2023 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
@@ -23,6 +23,11 @@
 
 #include "macros.h"
 
+/* Tell GCC not to warn about the specific edge cases tested here.  */
+#if __GNUC__ >= 10
+# pragma GCC diagnostic ignored "-Wanalyzer-file-leak"
+#endif
+
 /* Test fopen.  Assumes BASE is defined.  */
 
 static int
diff --git a/gnulib-tests/test-fpending.c b/gnulib-tests/test-fpending.c
index 405fb82f..3a5d6894 100644
--- a/gnulib-tests/test-fpending.c
+++ b/gnulib-tests/test-fpending.c
@@ -1,6 +1,6 @@
 /* Ensure that __fpending works.
 
-   Copyright (C) 2004, 2007-2022 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2007-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-fpending.sh b/gnulib-tests/test-fpending.sh
index abe7d83b..4acd60a9 100755
--- a/gnulib-tests/test-fpending.sh
+++ b/gnulib-tests/test-fpending.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 tmpfile=
-trap 'rm -fr $tmpfile' 1 2 3 15
+trap 'rm -fr $tmpfile' HUP INT QUIT TERM
 
 tmpfile=test-fpending.t
 
diff --git a/gnulib-tests/test-fputc.c b/gnulib-tests/test-fputc.c
index 34f4cf53..3a9e7c38 100644
--- a/gnulib-tests/test-fputc.c
+++ b/gnulib-tests/test-fputc.c
@@ -1,5 +1,5 @@
 /* Test of fputc() function.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 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
@@ -45,6 +45,7 @@ main (int argc, char **argv)
 
   /* Test that fputc() on an unbuffered stream sets errno if someone else
      closes the stream fd behind the back of stdio.  */
+  #if !defined __ANDROID__ /* fdsan */
   {
     FILE *fp = fopen (filename, "w");
     ASSERT (fp != NULL);
@@ -56,6 +57,7 @@ main (int argc, char **argv)
     ASSERT (ferror (fp));
     fclose (fp);
   }
+  #endif
 
   /* Test that fputc() on an unbuffered stream sets errno if the stream
      was constructed with an invalid file descriptor.  */
diff --git a/gnulib-tests/test-fread.c b/gnulib-tests/test-fread.c
index e85ce052..d6d16ec3 100644
--- a/gnulib-tests/test-fread.c
+++ b/gnulib-tests/test-fread.c
@@ -1,5 +1,5 @@
 /* Test of fread() function.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 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
@@ -54,6 +54,7 @@ main (int argc, char **argv)
 
   /* Test that fread() sets errno if someone else closes the stream
      fd behind the back of stdio.  */
+  #if !defined __ANDROID__ /* fdsan */
   {
     FILE *fp = fopen (filename, "r");
     char buf[5];
@@ -65,6 +66,7 @@ main (int argc, char **argv)
     ASSERT (ferror (fp));
     fclose (fp);
   }
+  #endif
 
   /* Test that fread() sets errno if the stream was constructed with
      an invalid file descriptor.  */
diff --git a/gnulib-tests/test-free.c b/gnulib-tests/test-free.c
index 9248712b..c530e861 100644
--- a/gnulib-tests/test-free.c
+++ b/gnulib-tests/test-free.c
@@ -1,5 +1,5 @@
 /* Test of free() function.
-   Copyright (C) 2020-2022 Free Software Foundation, Inc.
+   Copyright (C) 2020-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-fstat.c b/gnulib-tests/test-fstat.c
index f2cb2137..59c2dc4d 100644
--- a/gnulib-tests/test-fstat.c
+++ b/gnulib-tests/test-fstat.c
@@ -1,5 +1,5 @@
 /* Tests of fstat() function.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-fstatat.c b/gnulib-tests/test-fstatat.c
index 01aabf7c..fe8a6940 100644
--- a/gnulib-tests/test-fstatat.c
+++ b/gnulib-tests/test-fstatat.c
@@ -1,5 +1,5 @@
 /* Tests of fstatat.
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -25,7 +25,6 @@ SIGNATURE_CHECK (fstatat, int, (int, char const *, struct stat *, int));
 
 #include <fcntl.h>
 #include <errno.h>
-#include <stdbool.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
diff --git a/gnulib-tests/test-ftruncate.c b/gnulib-tests/test-ftruncate.c
index 64e1152a..bcd63932 100644
--- a/gnulib-tests/test-ftruncate.c
+++ b/gnulib-tests/test-ftruncate.c
@@ -1,5 +1,5 @@
 /* Test truncating a file.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-fwrite.c b/gnulib-tests/test-fwrite.c
index d362c40b..503e849b 100644
--- a/gnulib-tests/test-fwrite.c
+++ b/gnulib-tests/test-fwrite.c
@@ -1,5 +1,5 @@
 /* Test of fwrite() function.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 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
@@ -45,6 +45,7 @@ main (int argc, char **argv)
 
   /* Test that fwrite() on an unbuffered stream sets errno if someone else
      closes the stream fd behind the back of stdio.  */
+  #if !defined __ANDROID__ /* fdsan */
   {
     FILE *fp = fopen (filename, "w");
     char buf[5] = "world";
@@ -57,6 +58,7 @@ main (int argc, char **argv)
     ASSERT (ferror (fp));
     fclose (fp);
   }
+  #endif
 
   /* Test that fwrite() on an unbuffered stream sets errno if the stream
      was constructed with an invalid file descriptor.  */
diff --git a/gnulib-tests/test-getcwd-lgpl.c b/gnulib-tests/test-getcwd-lgpl.c
index 73fad473..821244f3 100644
--- a/gnulib-tests/test-getcwd-lgpl.c
+++ b/gnulib-tests/test-getcwd-lgpl.c
@@ -1,5 +1,5 @@
 /* Test of getcwd() function.
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-getdtablesize.c b/gnulib-tests/test-getdtablesize.c
index 48164279..d2c93f19 100644
--- a/gnulib-tests/test-getdtablesize.c
+++ b/gnulib-tests/test-getdtablesize.c
@@ -1,5 +1,5 @@
 /* Test of getdtablesize() function.
-   Copyright (C) 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -25,6 +25,11 @@ SIGNATURE_CHECK (getdtablesize, int, (void));
 
 #include "macros.h"
 
+/* Tell GCC not to warn about the specific edge cases tested here.  */
+#if __GNUC__ >= 13
+# pragma GCC diagnostic ignored "-Wanalyzer-fd-leak"
+#endif
+
 int
 main (int argc, char *argv[])
 {
diff --git a/gnulib-tests/test-getopt-gnu.c b/gnulib-tests/test-getopt-gnu.c
index d64ade6f..8289a3c4 100644
--- a/gnulib-tests/test-getopt-gnu.c
+++ b/gnulib-tests/test-getopt-gnu.c
@@ -1,5 +1,5 @@
 /* Test of command line argument processing.
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-getopt-main.h b/gnulib-tests/test-getopt-main.h
index 34ec2b35..510685d6 100644
--- a/gnulib-tests/test-getopt-main.h
+++ b/gnulib-tests/test-getopt-main.h
@@ -1,5 +1,5 @@
 /* Test of command line argument processing.
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-getopt-posix.c b/gnulib-tests/test-getopt-posix.c
index 3e0b71bf..f933b38c 100644
--- a/gnulib-tests/test-getopt-posix.c
+++ b/gnulib-tests/test-getopt-posix.c
@@ -1,5 +1,5 @@
 /* Test of command line argument processing.
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-getopt.h b/gnulib-tests/test-getopt.h
index 8538f631..781acc1f 100644
--- a/gnulib-tests/test-getopt.h
+++ b/gnulib-tests/test-getopt.h
@@ -1,5 +1,5 @@
 /* Test of command line argument processing.
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 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
@@ -16,7 +16,6 @@
 
 /* Written by Bruno Haible <bruno@clisp.org>, 2009.  */
 
-#include <stdbool.h>
 
 /* The glibc/gnulib implementation of getopt supports setting optind =
    0, but not all other implementations do.  This matters for getopt.
diff --git a/gnulib-tests/test-getopt_long.h b/gnulib-tests/test-getopt_long.h
index faa5954e..c686aed4 100644
--- a/gnulib-tests/test-getopt_long.h
+++ b/gnulib-tests/test-getopt_long.h
@@ -1,5 +1,5 @@
 /* Test of command line argument processing.
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-getprogname.c b/gnulib-tests/test-getprogname.c
index 8503f3c3..168c0cb9 100644
--- a/gnulib-tests/test-getprogname.c
+++ b/gnulib-tests/test-getprogname.c
@@ -1,5 +1,5 @@
 /* Test the gnulib getprogname module.
-   Copyright (C) 2016-2022 Free Software Foundation, Inc.
+   Copyright (C) 2016-2023 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
@@ -16,7 +16,8 @@
 
 #include <config.h>
 
-#include "getprogname.h"
+#include <stdlib.h>
+
 #include <string.h>
 #include <assert.h>
 
diff --git a/gnulib-tests/test-gettimeofday.c b/gnulib-tests/test-gettimeofday.c
index 47a5b58f..d1d52067 100644
--- a/gnulib-tests/test-gettimeofday.c
+++ b/gnulib-tests/test-gettimeofday.c
@@ -1,6 +1,5 @@
 /*
- * Copyright (C) 2005, 2007, 2009-2022 Free Software Foundation, Inc.
- * Written by Jim Meyering.
+ * Copyright (C) 2005, 2007, 2009-2023 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
@@ -15,6 +14,8 @@
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
+/* Written by Jim Meyering and Bruno Haible.  */
+
 #include <config.h>
 
 #include <sys/time.h>
@@ -26,10 +27,13 @@ SIGNATURE_CHECK (gettimeofday, int,
 #include <time.h>
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 
-int
-main (void)
+#include "macros.h"
+
+static void
+test_clobber ()
 {
   time_t t = 0;
   struct tm *lt;
@@ -41,7 +45,44 @@ main (void)
   if (memcmp (lt, &saved_lt, sizeof (struct tm)) != 0)
     {
       fprintf (stderr, "gettimeofday still clobbers the localtime buffer!\n");
-      return 1;
+      exit (1);
     }
+}
+
+static void
+test_consistency ()
+{
+  struct timeval tv1;
+  time_t tt2;
+  struct timeval tv3;
+  time_t tt4;
+
+  ASSERT (gettimeofday (&tv1, NULL) == 0);
+  tt2 = time (NULL);
+  ASSERT (gettimeofday (&tv3, NULL) == 0);
+  tt4 = time (NULL);
+
+  /* Verify monotonicity of gettimeofday().  */
+  ASSERT (tv1.tv_sec < tv3.tv_sec
+          || (tv1.tv_sec == tv3.tv_sec && tv1.tv_usec <= tv3.tv_usec));
+
+  /* Verify monotonicity of time().  */
+  ASSERT (tt2 <= tt4);
+
+  /* Verify that the tv_sec field of the result is the same as time(NULL).  */
+  /* Note: It's here that the dependency to the 'time' module is needed.
+     Without it, this assertion would sometimes fail on glibc systems, see
+     https://sourceware.org/bugzilla/show_bug.cgi?id=30200  */
+  ASSERT (tv1.tv_sec <= tt2);
+  ASSERT (tt2 <= tv3.tv_sec);
+  ASSERT (tv3.tv_sec <= tt4);
+}
+
+int
+main (void)
+{
+  test_clobber ();
+  test_consistency ();
+
   return 0;
 }
diff --git a/gnulib-tests/test-hard-locale.c b/gnulib-tests/test-hard-locale.c
index 004e14aa..6f94e6c3 100644
--- a/gnulib-tests/test-hard-locale.c
+++ b/gnulib-tests/test-hard-locale.c
@@ -1,5 +1,5 @@
 /* Test of determination whether a locale is different from the "C" locale.
-   Copyright (C) 2019-2022 Free Software Foundation, Inc.
+   Copyright (C) 2019-2023 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
@@ -21,7 +21,6 @@
 #include "hard-locale.h"
 
 #include <locale.h>
-#include <stdbool.h>
 #include <stdio.h>
 #include <string.h>
 
@@ -39,8 +38,10 @@ test_one (const char *name, int failure_bitmask)
       /* musl libc has special code for the C.UTF-8 locale; other than that,
          all locale names are accepted and all locales are trivial.
          OpenBSD returns the locale name that was set, but we don't know how it
-         behaves under the hood.  Likewise for Haiku.  */
-#if defined MUSL_LIBC || defined __OpenBSD__ || defined __HAIKU__
+         behaves under the hood.  Likewise for Haiku.
+         On Android >= 5.0, the "C" locale may have UTF-8 encoding, and we don't
+         know how it will behave in the future.  */
+#if defined MUSL_LIBC || defined __OpenBSD__ || defined __HAIKU__ || defined __ANDROID__
       expected = true;
 #else
       expected = !all_trivial;
@@ -58,12 +59,14 @@ test_one (const char *name, int failure_bitmask)
 
       /* On NetBSD 7.0, some locales such as de_DE.ISO8859-1 and de_DE.UTF-8
          have the LC_COLLATE category set to "C".
-         Similarly, on musl libc, with the C.UTF-8 locale.  */
+         Similarly, on musl libc, with the C.UTF-8 locale.
+         On Android >= 5.0, the "C" locale may have UTF-8 encoding, and we don't
+         know how it will behave in the future.  */
 #if defined __NetBSD__
       expected = false;
 #elif defined MUSL_LIBC
       expected = strcmp (name, "C.UTF-8") != 0;
-#elif (defined __OpenBSD__ && HAVE_DUPLOCALE) || defined __HAIKU__ /* OpenBSD >= 6.2, Haiku */
+#elif (defined __OpenBSD__ && HAVE_DUPLOCALE) || defined __HAIKU__ || defined __ANDROID__ /* OpenBSD >= 6.2, Haiku, Android */
       expected = true;
 #else
       expected = !all_trivial;
@@ -87,12 +90,16 @@ main ()
 {
   int fail = 0;
 
-  /* The initial locale is the "C" or "POSIX" locale.  */
+  /* The initial locale is the "C" or "POSIX" locale.
+     On Android >= 5.0, it is equivalent to the "C.UTF-8" locale, cf.
+     <https://lists.gnu.org/archive/html/bug-gnulib/2023-01/msg00141.html>.  */
+#if ! defined __ANDROID__
   if (hard_locale (LC_CTYPE) || hard_locale (LC_COLLATE))
     {
       fprintf (stderr, "The initial locale should not be hard!\n");
       fail |= 1;
     }
+#endif
 
   all_trivial = (setlocale (LC_ALL, "foobar") != NULL);
 
diff --git a/gnulib-tests/test-hash.c b/gnulib-tests/test-hash.c
index 5e36f830..08a14e2f 100644
--- a/gnulib-tests/test-hash.c
+++ b/gnulib-tests/test-hash.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2009-2022 Free Software Foundation, Inc.
+ * Copyright (C) 2009-2023 Free Software Foundation, Inc.
  * Written by Jim Meyering
  *
  * This program is free software: you can redistribute it and/or modify
@@ -23,7 +23,6 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include <stdbool.h>
 #include <string.h>
 #include <unistd.h>
 
diff --git a/gnulib-tests/test-i-ring.c b/gnulib-tests/test-i-ring.c
index fff3328d..1f202fa4 100644
--- a/gnulib-tests/test-i-ring.c
+++ b/gnulib-tests/test-i-ring.c
@@ -1,5 +1,5 @@
 /* Test the simple ring buffer.
-   Copyright (C) 2006-2022 Free Software Foundation, Inc.
+   Copyright (C) 2006-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-iconv-h.c b/gnulib-tests/test-iconv-h.c
index 32bba5e8..98d8a9f8 100644
--- a/gnulib-tests/test-iconv-h.c
+++ b/gnulib-tests/test-iconv-h.c
@@ -1,5 +1,5 @@
 /* Test of <iconv.h> substitute.
-   Copyright (C) 2007-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-iconv.c b/gnulib-tests/test-iconv.c
index c92ac8aa..2b6a0199 100644
--- a/gnulib-tests/test-iconv.c
+++ b/gnulib-tests/test-iconv.c
@@ -1,5 +1,5 @@
 /* Test of character set conversion.
-   Copyright (C) 2007-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-ignore-value.c b/gnulib-tests/test-ignore-value.c
index d35314b3..c2e6aaf7 100644
--- a/gnulib-tests/test-ignore-value.c
+++ b/gnulib-tests/test-ignore-value.c
@@ -1,6 +1,6 @@
 /* Test the "ignore-value" module.
 
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-inet_pton.c b/gnulib-tests/test-inet_pton.c
index 9ea0218f..b6c1571f 100644
--- a/gnulib-tests/test-inet_pton.c
+++ b/gnulib-tests/test-inet_pton.c
@@ -1,5 +1,5 @@
 /* Test of inet_pton function.
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-init.sh b/gnulib-tests/test-init.sh
index 75ebaf0f..badc1396 100755
--- a/gnulib-tests/test-init.sh
+++ b/gnulib-tests/test-init.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 # Unit tests for init.sh
-# Copyright (C) 2011-2022 Free Software Foundation, Inc.
+# Copyright (C) 2011-2023 Free Software Foundation, Inc.
 # This file is part of the GNUlib Library.
 #
 # This program is free software: you can redistribute it and/or modify
@@ -16,7 +16,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
-: ${srcdir=.}
+: "${srcdir=.}"
 . "$srcdir/init.sh"; path_prepend_ .
 
 fail=0
diff --git a/gnulib-tests/test-intprops.c b/gnulib-tests/test-intprops.c
index 277746a0..5785706c 100644
--- a/gnulib-tests/test-intprops.c
+++ b/gnulib-tests/test-intprops.c
@@ -1,5 +1,5 @@
 /* Test intprops.h.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -30,10 +30,12 @@
 
 #include <config.h>
 
-#include "intprops.h"
-#include "verify.h"
+#ifdef TEST_STDCKDINT
+# include <stdckdint.h>
+#else
+# include "intprops.h"
+#endif
 
-#include <stdbool.h>
 #include <inttypes.h>
 #include <limits.h>
 
@@ -41,14 +43,17 @@
 
 /* Compile-time verification of expression X.
    In this file, we need it as a statement, rather than as a declaration.  */
-#define verify_stmt(x) do { verify (x); } while (0)
+#define verify_stmt(x) do { static_assert (x); } while (0)
 
 /* VERIFY (X) uses a static assertion for compilers that are known to work,
    and falls back on a dynamic assertion for other compilers.
+   But it ignores X if testing stdckdint.h.
    These tests should be checkable via 'verify' rather than 'ASSERT', but
    using 'verify' would run into a bug with HP-UX 11.23 cc; see
    <https://lists.gnu.org/r/bug-gnulib/2011-05/msg00401.html>.  */
-#if __GNUC__ || __clang__ || __SUNPRO_C
+#ifdef TEST_STDCKDINT
+# define VERIFY(x) ((void) 0)
+#elif __GNUC__ || __clang__ || __SUNPRO_C
 # define VERIFY(x) verify_stmt (x)
 #else
 # define VERIFY(x) ASSERT (x)
@@ -65,6 +70,7 @@ main (void)
   /* Use VERIFY for tests that must be integer constant expressions,
      ASSERT otherwise.  */
 
+#ifndef TEST_STDCKDINT
   /* TYPE_IS_INTEGER.  */
   ASSERT (TYPE_IS_INTEGER (bool));
   ASSERT (TYPE_IS_INTEGER (char));
@@ -161,6 +167,7 @@ main (void)
   VERIFY (INT_STRLEN_BOUND (int64_t) == sizeof ("-9223372036854775808") - 1);
   VERIFY (INT_BUFSIZE_BOUND (int64_t) == sizeof ("-9223372036854775808"));
   #endif
+#endif
 
   /* All the INT_<op>_RANGE_OVERFLOW tests are equally valid as
      INT_<op>_OVERFLOW tests, so define macros to do both.  OP is the
diff --git a/gnulib-tests/test-inttostr.c b/gnulib-tests/test-inttostr.c
index bf305c18..a8870b74 100644
--- a/gnulib-tests/test-inttostr.c
+++ b/gnulib-tests/test-inttostr.c
@@ -1,5 +1,5 @@
 /* Test inttostr functions, and incidentally, INT_BUFSIZE_BOUND
-   Copyright (C) 2010-2022 Free Software Foundation, Inc.
+   Copyright (C) 2010-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-inttypes.c b/gnulib-tests/test-inttypes.c
index 161b19c8..6c272756 100644
--- a/gnulib-tests/test-inttypes.c
+++ b/gnulib-tests/test-inttypes.c
@@ -1,5 +1,5 @@
 /* Test of <inttypes.h> substitute.
-   Copyright (C) 2006-2007, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2006-2007, 2009-2023 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
@@ -20,8 +20,6 @@
 
 #include <inttypes.h>
 
-#include <stddef.h>
-
 /* Tests for macros supposed to be defined in inttypes.h.  */
 
 const char *k = /* implicit string concatenation */
diff --git a/gnulib-tests/test-ioctl.c b/gnulib-tests/test-ioctl.c
index 0db59c74..646fe57a 100644
--- a/gnulib-tests/test-ioctl.c
+++ b/gnulib-tests/test-ioctl.c
@@ -1,5 +1,5 @@
 /* Test of ioctl() function.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-isatty.c b/gnulib-tests/test-isatty.c
index 251e9bfe..352365b6 100644
--- a/gnulib-tests/test-isatty.c
+++ b/gnulib-tests/test-isatty.c
@@ -1,5 +1,5 @@
 /* Test isatty() function.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-isblank.c b/gnulib-tests/test-isblank.c
index 2af87f42..5f2a1838 100644
--- a/gnulib-tests/test-isblank.c
+++ b/gnulib-tests/test-isblank.c
@@ -1,5 +1,5 @@
 /* Test of isblank() function.
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-iswblank.c b/gnulib-tests/test-iswblank.c
index fe9a9a1f..d8db5ff8 100644
--- a/gnulib-tests/test-iswblank.c
+++ b/gnulib-tests/test-iswblank.c
@@ -1,5 +1,5 @@
 /* Test of iswblank() function.
-   Copyright (C) 2007-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-iswdigit.c b/gnulib-tests/test-iswdigit.c
index ef024dc6..c2beb8d1 100644
--- a/gnulib-tests/test-iswdigit.c
+++ b/gnulib-tests/test-iswdigit.c
@@ -1,5 +1,5 @@
 /* Test of iswdigit() function.
-   Copyright (C) 2020-2022 Free Software Foundation, Inc.
+   Copyright (C) 2020-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-iswdigit.sh b/gnulib-tests/test-iswdigit.sh
index 1bde6026..142a224f 100755
--- a/gnulib-tests/test-iswdigit.sh
+++ b/gnulib-tests/test-iswdigit.sh
@@ -5,7 +5,7 @@ LC_ALL=C     ${CHECKER} ./test-iswdigit${EXEEXT} 0 || exit 1
 LC_ALL=POSIX ${CHECKER} ./test-iswdigit${EXEEXT} 0 || exit 1
 
 # Test in an ISO-8859-1 or ISO-8859-15 locale.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR != none; then
   LC_ALL=$LOCALE_FR \
   ${CHECKER} ./test-iswdigit${EXEEXT} 1 \
@@ -13,7 +13,7 @@ if test $LOCALE_FR != none; then
 fi
 
 # Test whether a specific EUC-JP locale is installed.
-: ${LOCALE_JA=ja_JP}
+: "${LOCALE_JA=ja_JP}"
 if test $LOCALE_JA != none; then
   LC_ALL=$LOCALE_JA \
   ${CHECKER} ./test-iswdigit${EXEEXT} 2 \
@@ -21,7 +21,7 @@ if test $LOCALE_JA != none; then
 fi
 
 # Test whether a specific UTF-8 locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 != none; then
   LC_ALL=$LOCALE_FR_UTF8 \
   ${CHECKER} ./test-iswdigit${EXEEXT} 3 \
@@ -29,7 +29,7 @@ if test $LOCALE_FR_UTF8 != none; then
 fi
 
 # Test whether a specific GB18030 locale is installed.
-: ${LOCALE_ZH_CN=zh_CN.GB18030}
+: "${LOCALE_ZH_CN=zh_CN.GB18030}"
 if test $LOCALE_ZH_CN != none; then
   LC_ALL=$LOCALE_ZH_CN \
   ${CHECKER} ./test-iswdigit${EXEEXT} 4 \
diff --git a/gnulib-tests/test-iswxdigit.c b/gnulib-tests/test-iswxdigit.c
index 96e578b0..84101fd8 100644
--- a/gnulib-tests/test-iswxdigit.c
+++ b/gnulib-tests/test-iswxdigit.c
@@ -1,5 +1,5 @@
 /* Test of iswxdigit() function.
-   Copyright (C) 2020-2022 Free Software Foundation, Inc.
+   Copyright (C) 2020-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-iswxdigit.sh b/gnulib-tests/test-iswxdigit.sh
index f5454388..9bdaff4a 100755
--- a/gnulib-tests/test-iswxdigit.sh
+++ b/gnulib-tests/test-iswxdigit.sh
@@ -5,7 +5,7 @@ LC_ALL=C     ${CHECKER} ./test-iswxdigit${EXEEXT} 0 || exit 1
 LC_ALL=POSIX ${CHECKER} ./test-iswxdigit${EXEEXT} 0 || exit 1
 
 # Test in an ISO-8859-1 or ISO-8859-15 locale.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR != none; then
   LC_ALL=$LOCALE_FR \
   ${CHECKER} ./test-iswxdigit${EXEEXT} 1 \
@@ -13,7 +13,7 @@ if test $LOCALE_FR != none; then
 fi
 
 # Test whether a specific EUC-JP locale is installed.
-: ${LOCALE_JA=ja_JP}
+: "${LOCALE_JA=ja_JP}"
 if test $LOCALE_JA != none; then
   LC_ALL=$LOCALE_JA \
   ${CHECKER} ./test-iswxdigit${EXEEXT} 2 \
@@ -21,7 +21,7 @@ if test $LOCALE_JA != none; then
 fi
 
 # Test whether a specific UTF-8 locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 != none; then
   LC_ALL=$LOCALE_FR_UTF8 \
   ${CHECKER} ./test-iswxdigit${EXEEXT} 3 \
@@ -29,7 +29,7 @@ if test $LOCALE_FR_UTF8 != none; then
 fi
 
 # Test whether a specific GB18030 locale is installed.
-: ${LOCALE_ZH_CN=zh_CN.GB18030}
+: "${LOCALE_ZH_CN=zh_CN.GB18030}"
 if test $LOCALE_ZH_CN != none; then
   LC_ALL=$LOCALE_ZH_CN \
   ${CHECKER} ./test-iswxdigit${EXEEXT} 4 \
diff --git a/gnulib-tests/test-langinfo.c b/gnulib-tests/test-langinfo.c
index 1a909b16..743cd126 100644
--- a/gnulib-tests/test-langinfo.c
+++ b/gnulib-tests/test-langinfo.c
@@ -1,5 +1,5 @@
 /* Test of <langinfo.h> substitute.
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-largefile.c b/gnulib-tests/test-largefile.c
new file mode 100644
index 00000000..eb7861da
--- /dev/null
+++ b/gnulib-tests/test-largefile.c
@@ -0,0 +1,51 @@
+/* Test of largefile module.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2023.  */
+
+/* This test may fail if AC_SYS_LARGEFILE could not arrange for a 64-bit off_t.
+   This should be rare, though: only very old systems don't have support for
+   files larger than 2 GiB.  */
+
+#include <config.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include "intprops.h"
+
+/* Although these tests could be done with static_assert, the test
+   harness prefers dynamic checking.  */
+
+int
+main (void)
+{
+  int result = 0;
+
+  /* Check the range of off_t.
+     With MSVC, this test succeeds only thanks to the 'sys_types' module.  */
+  if (TYPE_MAXIMUM (off_t) >> 31 >> 31 == 0)
+    result |= 1;
+
+  /* Check the size of the 'struct stat' field 'st_size'.
+     With MSVC, this test succeeds only thanks to the 'sys_stat' module.  */
+  {
+    struct stat st;
+    if (sizeof st.st_size != sizeof (off_t))
+      result |= 2;
+  }
+
+  return result;
+}
diff --git a/gnulib-tests/test-limits-h.c b/gnulib-tests/test-limits-h.c
index 5da02f05..d8cdac28 100644
--- a/gnulib-tests/test-limits-h.c
+++ b/gnulib-tests/test-limits-h.c
@@ -1,5 +1,5 @@
 /* Test of <limits.h> substitute.
-   Copyright 2016-2022 Free Software Foundation, Inc.
+   Copyright 2016-2023 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
@@ -20,14 +20,12 @@
 
 #include <limits.h>
 
-#include "verify.h"
-
 #if 4 < __GNUC__ + (3 <= __GNUC_MINOR__)
 # pragma GCC diagnostic ignored "-Woverlength-strings"
 #endif
 
 #define verify_width(width, min, max) \
-  verify ((max) >> ((width) - 1 - ((min) < 0)) == 1)
+  static_assert ((max) >> ((width) - 1 - ((min) < 0)) == 1)
 
 /* Macros borrowed from intprops.h.  */
 #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
@@ -53,50 +51,50 @@ verify_width (LONG_BIT, LONG_MIN, LONG_MAX);
 /* Numerical limit macros.  */
 
 char               limits1[]  = { CHAR_MIN, CHAR_MAX };
-verify (TYPE_MINIMUM (char) == CHAR_MIN);
-verify (TYPE_MAXIMUM (char) == CHAR_MAX);
+static_assert (TYPE_MINIMUM (char) == CHAR_MIN);
+static_assert (TYPE_MAXIMUM (char) == CHAR_MAX);
 
 signed char        limits2[]  = { SCHAR_MIN, SCHAR_MAX };
-verify (TYPE_MINIMUM (signed char) == SCHAR_MIN);
-verify (TYPE_MAXIMUM (signed char) == SCHAR_MAX);
+static_assert (TYPE_MINIMUM (signed char) == SCHAR_MIN);
+static_assert (TYPE_MAXIMUM (signed char) == SCHAR_MAX);
 
 unsigned char      limits3[]  = { UCHAR_MAX };
-verify (TYPE_MINIMUM (unsigned char) == 0);
-verify (TYPE_MAXIMUM (unsigned char) == UCHAR_MAX);
+static_assert (TYPE_MINIMUM (unsigned char) == 0);
+static_assert (TYPE_MAXIMUM (unsigned char) == UCHAR_MAX);
 
 short              limits4[]  = { SHRT_MIN, SHRT_MAX };
-verify (TYPE_MINIMUM (short int) == SHRT_MIN);
-verify (TYPE_MAXIMUM (short int) == SHRT_MAX);
+static_assert (TYPE_MINIMUM (short int) == SHRT_MIN);
+static_assert (TYPE_MAXIMUM (short int) == SHRT_MAX);
 
 unsigned short     limits5[]  = { USHRT_MAX };
-verify (TYPE_MINIMUM (unsigned short int) == 0);
-verify (TYPE_MAXIMUM (unsigned short int) == USHRT_MAX);
+static_assert (TYPE_MINIMUM (unsigned short int) == 0);
+static_assert (TYPE_MAXIMUM (unsigned short int) == USHRT_MAX);
 
 int                limits6[]  = { INT_MIN, INT_MAX };
-verify (TYPE_MINIMUM (int) == INT_MIN);
-verify (TYPE_MAXIMUM (int) == INT_MAX);
+static_assert (TYPE_MINIMUM (int) == INT_MIN);
+static_assert (TYPE_MAXIMUM (int) == INT_MAX);
 
 unsigned int       limits7[]  = { UINT_MAX };
-verify (TYPE_MINIMUM (unsigned int) == 0);
-verify (TYPE_MAXIMUM (unsigned int) == UINT_MAX);
+static_assert (TYPE_MINIMUM (unsigned int) == 0);
+static_assert (TYPE_MAXIMUM (unsigned int) == UINT_MAX);
 
 long               limits8[]  = { LONG_MIN, LONG_MAX };
-verify (TYPE_MINIMUM (long int) == LONG_MIN);
-verify (TYPE_MAXIMUM (long int) == LONG_MAX);
+static_assert (TYPE_MINIMUM (long int) == LONG_MIN);
+static_assert (TYPE_MAXIMUM (long int) == LONG_MAX);
 
 unsigned long      limits9[]  = { ULONG_MAX };
-verify (TYPE_MINIMUM (unsigned long int) == 0);
-verify (TYPE_MAXIMUM (unsigned long int) == ULONG_MAX);
+static_assert (TYPE_MINIMUM (unsigned long int) == 0);
+static_assert (TYPE_MAXIMUM (unsigned long int) == ULONG_MAX);
 
 long long          limits10[] = { LLONG_MIN, LLONG_MAX };
-verify (TYPE_MINIMUM (long long int) == LLONG_MIN);
-verify (TYPE_MAXIMUM (long long int) == LLONG_MAX);
+static_assert (TYPE_MINIMUM (long long int) == LLONG_MIN);
+static_assert (TYPE_MAXIMUM (long long int) == LLONG_MAX);
 
 unsigned long long limits11[] = { ULLONG_MAX };
-verify (TYPE_MINIMUM (unsigned long long int) == 0);
-verify (TYPE_MAXIMUM (unsigned long long int) == ULLONG_MAX);
+static_assert (TYPE_MINIMUM (unsigned long long int) == 0);
+static_assert (TYPE_MAXIMUM (unsigned long long int) == ULLONG_MAX);
 
-/* Macros specified by ISO/IEC TS 18661-1:2014.  */
+/* Macros specified by C23 and by ISO/IEC TS 18661-1:2014.  */
 
 verify_width (CHAR_WIDTH, CHAR_MIN, CHAR_MAX);
 verify_width (SCHAR_WIDTH, SCHAR_MIN, SCHAR_MAX);
@@ -110,10 +108,10 @@ verify_width (ULONG_WIDTH, 0, ULONG_MAX);
 verify_width (LLONG_WIDTH, LLONG_MIN, LLONG_MAX);
 verify_width (ULLONG_WIDTH, 0, ULLONG_MAX);
 
-/* Macros specified by C2x.  */
+/* Macros specified by C23.  */
 
 int bool_attrs[] = { BOOL_MAX, BOOL_WIDTH };
-verify (BOOL_MAX == (((1U << (BOOL_WIDTH - 1)) - 1) * 2) + 1);
+static_assert (BOOL_MAX == (((1U << (BOOL_WIDTH - 1)) - 1) * 2) + 1);
 
 int
 main (void)
diff --git a/gnulib-tests/test-listen.c b/gnulib-tests/test-listen.c
index e9d34568..8d85779b 100644
--- a/gnulib-tests/test-listen.c
+++ b/gnulib-tests/test-listen.c
@@ -1,5 +1,5 @@
 /* Test listen() function.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 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
@@ -27,6 +27,11 @@ SIGNATURE_CHECK (listen, int, (int, int));
 #include "sockets.h"
 #include "macros.h"
 
+/* Tell GCC not to warn about the specific edge cases tested here.  */
+#if __GNUC__ >= 13
+# pragma GCC diagnostic ignored "-Wanalyzer-fd-use-without-check"
+#endif
+
 int
 main (void)
 {
diff --git a/gnulib-tests/test-localcharset.c b/gnulib-tests/test-localcharset.c
index 9d6f941c..e0ea591b 100644
--- a/gnulib-tests/test-localcharset.c
+++ b/gnulib-tests/test-localcharset.c
@@ -1,5 +1,5 @@
 /* Manual test of localcharset() function.
-   Copyright (C) 2018-2022 Free Software Foundation, Inc.
+   Copyright (C) 2018-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-locale.c b/gnulib-tests/test-locale.c
index 5c2bac10..83146790 100644
--- a/gnulib-tests/test-locale.c
+++ b/gnulib-tests/test-locale.c
@@ -1,5 +1,5 @@
 /* Test of <locale.h> substitute.
-   Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009-2023 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
@@ -20,8 +20,6 @@
 
 #include <locale.h>
 
-#include "verify.h"
-
 int a[] =
   {
     LC_ALL,
@@ -39,7 +37,7 @@ int ls;
 
 /* Check that NULL can be passed through varargs as a pointer type,
    per POSIX 2008.  */
-verify (sizeof NULL == sizeof (void *));
+static_assert (sizeof NULL == sizeof (void *));
 
 int
 main ()
diff --git a/gnulib-tests/test-localeconv.c b/gnulib-tests/test-localeconv.c
index e90a83d3..ab3f5feb 100644
--- a/gnulib-tests/test-localeconv.c
+++ b/gnulib-tests/test-localeconv.c
@@ -1,5 +1,5 @@
 /* Test of localeconv() function.
-   Copyright (C) 2012-2022 Free Software Foundation, Inc.
+   Copyright (C) 2012-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-localename.c b/gnulib-tests/test-localename.c
index 9ba388f3..6d97efb0 100644
--- a/gnulib-tests/test-localename.c
+++ b/gnulib-tests/test-localename.c
@@ -1,5 +1,5 @@
 /* Test of gl_locale_name function and its variants.
-   Copyright (C) 2007-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -30,6 +30,15 @@
 # define HAVE_GOOD_USELOCALE 1
 #endif
 
+#ifdef __HAIKU__
+/* Work around Haiku bug <https://dev.haiku-os.org/ticket/18344>.  */
+# define freelocale(loc) ((void) (loc))
+#endif
+
+/* Suppress GCC false positive.  */
+#if __GNUC__ >= 12
+# pragma GCC diagnostic ignored "-Wanalyzer-use-of-uninitialized-value"
+#endif
 
 #if HAVE_GOOD_USELOCALE
 
diff --git a/gnulib-tests/test-lseek.c b/gnulib-tests/test-lseek.c
index 1bcb06fe..3be4891b 100644
--- a/gnulib-tests/test-lseek.c
+++ b/gnulib-tests/test-lseek.c
@@ -1,5 +1,5 @@
 /* Test of lseek() function.
-   Copyright (C) 2007-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-lseek.sh b/gnulib-tests/test-lseek.sh
index ff206c66..ff553c93 100755
--- a/gnulib-tests/test-lseek.sh
+++ b/gnulib-tests/test-lseek.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 tmpfiles=
-trap 'rm -fr $tmpfiles' 1 2 3 15
+trap 'rm -fr $tmpfiles' HUP INT QUIT TERM
 
 tmpfiles=t-lseek.tmp
 # seekable files
diff --git a/gnulib-tests/test-lstat.c b/gnulib-tests/test-lstat.c
index 46c2683b..61aed867 100644
--- a/gnulib-tests/test-lstat.c
+++ b/gnulib-tests/test-lstat.c
@@ -1,5 +1,5 @@
 /* Test of lstat() function.
-   Copyright (C) 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -29,7 +29,6 @@ SIGNATURE_CHECK (lstat, int, (char const *, struct stat *));
 
 #include <fcntl.h>
 #include <errno.h>
-#include <stdbool.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
diff --git a/gnulib-tests/test-lstat.h b/gnulib-tests/test-lstat.h
index 3982d160..8a367678 100644
--- a/gnulib-tests/test-lstat.h
+++ b/gnulib-tests/test-lstat.h
@@ -1,5 +1,5 @@
 /* Test of lstat() function.
-   Copyright (C) 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-malloc-gnu.c b/gnulib-tests/test-malloc-gnu.c
index 8873eb89..e2462dad 100644
--- a/gnulib-tests/test-malloc-gnu.c
+++ b/gnulib-tests/test-malloc-gnu.c
@@ -1,5 +1,5 @@
 /* Test of malloc function.
-   Copyright (C) 2010-2022 Free Software Foundation, Inc.
+   Copyright (C) 2010-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-malloca.c b/gnulib-tests/test-malloca.c
index 8665f465..ad3dc1b2 100644
--- a/gnulib-tests/test-malloca.c
+++ b/gnulib-tests/test-malloca.c
@@ -1,5 +1,5 @@
 /* Test of safe automatic memory allocation.
-   Copyright (C) 2005, 2007, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2007, 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-mbrlen-w32-1.sh b/gnulib-tests/test-mbrlen-w32-1.sh
new file mode 100755
index 00000000..ccf4c538
--- /dev/null
+++ b/gnulib-tests/test-mbrlen-w32-1.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# Test a CP1252 locale.
+${CHECKER} ./test-mbrlen-w32${EXEEXT} French_France 1252
diff --git a/gnulib-tests/test-mbrlen-w32-2.sh b/gnulib-tests/test-mbrlen-w32-2.sh
new file mode 100755
index 00000000..22c5388d
--- /dev/null
+++ b/gnulib-tests/test-mbrlen-w32-2.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# Test a CP1256 locale.
+${CHECKER} ./test-mbrlen-w32${EXEEXT} "Arabic_Saudi Arabia" 1256
diff --git a/gnulib-tests/test-mbrlen-w32-3.sh b/gnulib-tests/test-mbrlen-w32-3.sh
new file mode 100755
index 00000000..12c2857b
--- /dev/null
+++ b/gnulib-tests/test-mbrlen-w32-3.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# Test a CP932 locale.
+${CHECKER} ./test-mbrlen-w32${EXEEXT} Japanese_Japan 932
diff --git a/gnulib-tests/test-mbrlen-w32-4.sh b/gnulib-tests/test-mbrlen-w32-4.sh
new file mode 100755
index 00000000..0746b240
--- /dev/null
+++ b/gnulib-tests/test-mbrlen-w32-4.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# Test a CP950 locale.
+${CHECKER} ./test-mbrlen-w32${EXEEXT} Chinese_Taiwan 950
diff --git a/gnulib-tests/test-mbrlen-w32-5.sh b/gnulib-tests/test-mbrlen-w32-5.sh
new file mode 100755
index 00000000..eb2cec24
--- /dev/null
+++ b/gnulib-tests/test-mbrlen-w32-5.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# Test a CP936 locale.
+${CHECKER} ./test-mbrlen-w32${EXEEXT} Chinese_China 936
diff --git a/gnulib-tests/test-mbrlen-w32-6.sh b/gnulib-tests/test-mbrlen-w32-6.sh
new file mode 100755
index 00000000..d586b7dd
--- /dev/null
+++ b/gnulib-tests/test-mbrlen-w32-6.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# Test a GB18030 locale.
+${CHECKER} ./test-mbrlen-w32${EXEEXT} Chinese_China 54936
diff --git a/gnulib-tests/test-mbrlen-w32-7.sh b/gnulib-tests/test-mbrlen-w32-7.sh
new file mode 100755
index 00000000..dbf82d4a
--- /dev/null
+++ b/gnulib-tests/test-mbrlen-w32-7.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# Test some UTF-8 locales.
+${CHECKER} ./test-mbrlen-w32${EXEEXT} French_France Japanese_Japan Chinese_Taiwan Chinese_China 65001
diff --git a/gnulib-tests/test-mbrlen-w32.c b/gnulib-tests/test-mbrlen-w32.c
new file mode 100644
index 00000000..2916cf10
--- /dev/null
+++ b/gnulib-tests/test-mbrlen-w32.c
@@ -0,0 +1,565 @@
+/* Test of conversion of multibyte character to wide character.
+   Copyright (C) 2008-2023 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+#include <config.h>
+
+#include <wchar.h>
+
+#include <errno.h>
+#include <locale.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "localcharset.h"
+#include "macros.h"
+
+#if defined _WIN32 && !defined __CYGWIN__
+
+static int
+test_one_locale (const char *name, int codepage)
+{
+  mbstate_t state;
+  size_t ret;
+
+# if 1
+  /* Portable code to set the locale.  */
+  {
+    char name_with_codepage[1024];
+
+    sprintf (name_with_codepage, "%s.%d", name, codepage);
+
+    /* Set the locale.  */
+    if (setlocale (LC_ALL, name_with_codepage) == NULL)
+      return 77;
+  }
+# else
+  /* Hacky way to set a locale.codepage combination that setlocale() refuses
+     to set.  */
+  {
+    /* Codepage of the current locale, set with setlocale().
+       Not necessarily the same as GetACP().  */
+    extern __declspec(dllimport) unsigned int __lc_codepage;
+
+    /* Set the locale.  */
+    if (setlocale (LC_ALL, name) == NULL)
+      return 77;
+
+    /* Clobber the codepage and MB_CUR_MAX, both set by setlocale().  */
+    __lc_codepage = codepage;
+    switch (codepage)
+      {
+      case 1252:
+      case 1256:
+        MB_CUR_MAX = 1;
+        break;
+      case 932:
+      case 950:
+      case 936:
+        MB_CUR_MAX = 2;
+        break;
+      case 54936:
+      case 65001:
+        MB_CUR_MAX = 4;
+        break;
+      }
+
+    /* Test whether the codepage is really available.  */
+    memset (&state, '\0', sizeof (mbstate_t));
+    if (mbrlen (" ", 1, &state) == (size_t)(-1))
+      return 77;
+  }
+# endif
+
+  /* Test zero-length input.  */
+  {
+    memset (&state, '\0', sizeof (mbstate_t));
+    ret = mbrlen ("x", 0, &state);
+    /* gnulib's implementation returns (size_t)(-2).
+       The AIX 5.1 implementation returns (size_t)(-1).
+       glibc's implementation returns 0.  */
+    ASSERT (ret == (size_t)(-2) || ret == (size_t)(-1) || ret == 0);
+    ASSERT (mbsinit (&state));
+  }
+
+  /* Test NUL byte input.  */
+  {
+    memset (&state, '\0', sizeof (mbstate_t));
+    ret = mbrlen ("", 1, &state);
+    ASSERT (ret == 0);
+    ASSERT (mbsinit (&state));
+  }
+
+  /* Test single-byte input.  */
+  {
+    int c;
+    char buf[1];
+
+    memset (&state, '\0', sizeof (mbstate_t));
+    for (c = 0; c < 0x100; c++)
+      switch (c)
+        {
+        case '\t': case '\v': case '\f':
+        case ' ': case '!': case '"': case '#': case '%':
+        case '&': case '\'': case '(': case ')': case '*':
+        case '+': case ',': case '-': case '.': case '/':
+        case '0': case '1': case '2': case '3': case '4':
+        case '5': case '6': case '7': case '8': case '9':
+        case ':': case ';': case '<': case '=': case '>':
+        case '?':
+        case 'A': case 'B': case 'C': case 'D': case 'E':
+        case 'F': case 'G': case 'H': case 'I': case 'J':
+        case 'K': case 'L': case 'M': case 'N': case 'O':
+        case 'P': case 'Q': case 'R': case 'S': case 'T':
+        case 'U': case 'V': case 'W': case 'X': case 'Y':
+        case 'Z':
+        case '[': case '\\': case ']': case '^': case '_':
+        case 'a': case 'b': case 'c': case 'd': case 'e':
+        case 'f': case 'g': case 'h': case 'i': case 'j':
+        case 'k': case 'l': case 'm': case 'n': case 'o':
+        case 'p': case 'q': case 'r': case 's': case 't':
+        case 'u': case 'v': case 'w': case 'x': case 'y':
+        case 'z': case '{': case '|': case '}': case '~':
+          /* c is in the ISO C "basic character set".  */
+          buf[0] = c;
+          ret = mbrlen (buf, 1, &state);
+          ASSERT (ret == 1);
+          ASSERT (mbsinit (&state));
+          break;
+        }
+  }
+
+  /* Test special calling convention, passing a NULL pointer.  */
+  {
+    memset (&state, '\0', sizeof (mbstate_t));
+    ret = mbrlen (NULL, 5, &state);
+    ASSERT (ret == 0);
+    ASSERT (mbsinit (&state));
+  }
+
+  switch (codepage)
+    {
+    case 1252:
+      /* Locale encoding is CP1252, an extension of ISO-8859-1.  */
+      {
+        char input[] = "B\374\337er"; /* "Büßer" */
+        memset (&state, '\0', sizeof (mbstate_t));
+
+        ret = mbrlen (input, 1, &state);
+        ASSERT (ret == 1);
+        ASSERT (mbsinit (&state));
+        input[0] = '\0';
+
+        ret = mbrlen (input + 1, 1, &state);
+        ASSERT (ret == 1);
+        ASSERT (mbsinit (&state));
+        input[1] = '\0';
+
+        ret = mbrlen (input + 2, 3, &state);
+        ASSERT (ret == 1);
+        ASSERT (mbsinit (&state));
+        input[2] = '\0';
+
+        ret = mbrlen (input + 3, 2, &state);
+        ASSERT (ret == 1);
+        ASSERT (mbsinit (&state));
+        input[3] = '\0';
+
+        ret = mbrlen (input + 4, 1, &state);
+        ASSERT (ret == 1);
+        ASSERT (mbsinit (&state));
+      }
+      return 0;
+
+    case 1256:
+      /* Locale encoding is CP1256, not the same as ISO-8859-6.  */
+      {
+        char input[] = "x\302\341\346y"; /* "xآلوy" */
+        memset (&state, '\0', sizeof (mbstate_t));
+
+        ret = mbrlen (input, 1, &state);
+        ASSERT (ret == 1);
+        ASSERT (mbsinit (&state));
+        input[0] = '\0';
+
+        ret = mbrlen (input + 1, 1, &state);
+        ASSERT (ret == 1);
+        ASSERT (mbsinit (&state));
+        input[1] = '\0';
+
+        ret = mbrlen (input + 2, 3, &state);
+        ASSERT (ret == 1);
+        ASSERT (mbsinit (&state));
+        input[2] = '\0';
+
+        ret = mbrlen (input + 3, 2, &state);
+        ASSERT (ret == 1);
+        ASSERT (mbsinit (&state));
+        input[3] = '\0';
+
+        ret = mbrlen (input + 4, 1, &state);
+        ASSERT (ret == 1);
+        ASSERT (mbsinit (&state));
+      }
+      return 0;
+
+    case 932:
+      /* Locale encoding is CP932, similar to Shift_JIS.  */
+      {
+        char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
+        memset (&state, '\0', sizeof (mbstate_t));
+
+        ret = mbrlen (input, 1, &state);
+        ASSERT (ret == 1);
+        ASSERT (mbsinit (&state));
+        input[0] = '\0';
+
+        ret = mbrlen (input + 1, 2, &state);
+        ASSERT (ret == 2);
+        ASSERT (mbsinit (&state));
+        input[1] = '\0';
+        input[2] = '\0';
+
+        ret = mbrlen (input + 3, 1, &state);
+        ASSERT (ret == (size_t)(-2));
+        ASSERT (!mbsinit (&state));
+        input[3] = '\0';
+
+        ret = mbrlen (input + 4, 4, &state);
+        ASSERT (ret == 1);
+        ASSERT (mbsinit (&state));
+        input[4] = '\0';
+
+        ret = mbrlen (input + 5, 3, &state);
+        ASSERT (ret == 2);
+        ASSERT (mbsinit (&state));
+        input[5] = '\0';
+        input[6] = '\0';
+
+        ret = mbrlen (input + 7, 1, &state);
+        ASSERT (ret == 1);
+        ASSERT (mbsinit (&state));
+
+        /* Test some invalid input.  */
+        memset (&state, '\0', sizeof (mbstate_t));
+        ret = mbrlen ("\377", 1, &state); /* 0xFF */
+        ASSERT ((ret == (size_t)-1 && errno == EILSEQ) || ret == (size_t)-2);
+
+        memset (&state, '\0', sizeof (mbstate_t));
+        ret = mbrlen ("\225\377", 2, &state); /* 0x95 0xFF */
+        ASSERT ((ret == (size_t)-1 && errno == EILSEQ) || ret == 2);
+      }
+      return 0;
+
+    case 950:
+      /* Locale encoding is CP950, similar to Big5.  */
+      {
+        char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
+        memset (&state, '\0', sizeof (mbstate_t));
+
+        ret = mbrlen (input, 1, &state);
+        ASSERT (ret == 1);
+        ASSERT (mbsinit (&state));
+        input[0] = '\0';
+
+        ret = mbrlen (input + 1, 2, &state);
+        ASSERT (ret == 2);
+        ASSERT (mbsinit (&state));
+        input[1] = '\0';
+        input[2] = '\0';
+
+        ret = mbrlen (input + 3, 1, &state);
+        ASSERT (ret == (size_t)(-2));
+        ASSERT (!mbsinit (&state));
+        input[3] = '\0';
+
+        ret = mbrlen (input + 4, 4, &state);
+        ASSERT (ret == 1);
+        ASSERT (mbsinit (&state));
+        input[4] = '\0';
+
+        ret = mbrlen (input + 5, 3, &state);
+        ASSERT (ret == 2);
+        ASSERT (mbsinit (&state));
+        input[5] = '\0';
+        input[6] = '\0';
+
+        ret = mbrlen (input + 7, 1, &state);
+        ASSERT (ret == 1);
+        ASSERT (mbsinit (&state));
+
+        /* Test some invalid input.  */
+        memset (&state, '\0', sizeof (mbstate_t));
+        ret = mbrlen ("\377", 1, &state); /* 0xFF */
+        ASSERT ((ret == (size_t)-1 && errno == EILSEQ) || ret == (size_t)-2);
+
+        memset (&state, '\0', sizeof (mbstate_t));
+        ret = mbrlen ("\225\377", 2, &state); /* 0x95 0xFF */
+        ASSERT ((ret == (size_t)-1 && errno == EILSEQ) || ret == 2);
+      }
+      return 0;
+
+    case 936:
+      /* Locale encoding is CP936 = GBK, an extension of GB2312.  */
+      {
+        char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
+        memset (&state, '\0', sizeof (mbstate_t));
+
+        ret = mbrlen (input, 1, &state);
+        ASSERT (ret == 1);
+        ASSERT (mbsinit (&state));
+        input[0] = '\0';
+
+        ret = mbrlen (input + 1, 2, &state);
+        ASSERT (ret == 2);
+        ASSERT (mbsinit (&state));
+        input[1] = '\0';
+        input[2] = '\0';
+
+        ret = mbrlen (input + 3, 1, &state);
+        ASSERT (ret == (size_t)(-2));
+        ASSERT (!mbsinit (&state));
+        input[3] = '\0';
+
+        ret = mbrlen (input + 4, 4, &state);
+        ASSERT (ret == 1);
+        ASSERT (mbsinit (&state));
+        input[4] = '\0';
+
+        ret = mbrlen (input + 5, 3, &state);
+        ASSERT (ret == 2);
+        ASSERT (mbsinit (&state));
+        input[5] = '\0';
+        input[6] = '\0';
+
+        ret = mbrlen (input + 7, 1, &state);
+        ASSERT (ret == 1);
+        ASSERT (mbsinit (&state));
+
+        /* Test some invalid input.  */
+        memset (&state, '\0', sizeof (mbstate_t));
+        ret = mbrlen ("\377", 1, &state); /* 0xFF */
+        ASSERT ((ret == (size_t)-1 && errno == EILSEQ) || ret == (size_t)-2);
+
+        memset (&state, '\0', sizeof (mbstate_t));
+        ret = mbrlen ("\225\377", 2, &state); /* 0x95 0xFF */
+        ASSERT ((ret == (size_t)-1 && errno == EILSEQ) || ret == 2);
+      }
+      return 0;
+
+    case 54936:
+      /* Locale encoding is CP54936 = GB18030.  */
+      if (strcmp (locale_charset (), "GB18030") != 0)
+        return 77;
+      {
+        char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
+        memset (&state, '\0', sizeof (mbstate_t));
+
+        ret = mbrlen (input, 1, &state);
+        ASSERT (ret == 1);
+        ASSERT (mbsinit (&state));
+        input[0] = '\0';
+
+        ret = mbrlen (input + 1, 1, &state);
+        ASSERT (ret == (size_t)(-2));
+        ASSERT (!mbsinit (&state));
+        input[1] = '\0';
+
+        ret = mbrlen (input + 2, 7, &state);
+        ASSERT (ret == 1);
+        ASSERT (mbsinit (&state));
+        input[2] = '\0';
+
+        ret = mbrlen (input + 3, 6, &state);
+        ASSERT (ret == 4);
+        ASSERT (mbsinit (&state));
+        input[3] = '\0';
+        input[4] = '\0';
+        input[5] = '\0';
+        input[6] = '\0';
+
+        ret = mbrlen (input + 7, 2, &state);
+        ASSERT (ret == 1);
+        ASSERT (mbsinit (&state));
+        input[7] = '\0';
+
+        ret = mbrlen (input + 8, 1, &state);
+        ASSERT (ret == 1);
+        ASSERT (mbsinit (&state));
+
+        /* Test some invalid input.  */
+        memset (&state, '\0', sizeof (mbstate_t));
+        ret = mbrlen ("\377", 1, &state); /* 0xFF */
+        ASSERT (ret == (size_t)-1);
+        ASSERT (errno == EILSEQ);
+
+        memset (&state, '\0', sizeof (mbstate_t));
+        ret = mbrlen ("\225\377", 2, &state); /* 0x95 0xFF */
+        ASSERT (ret == (size_t)-1);
+        ASSERT (errno == EILSEQ);
+
+        memset (&state, '\0', sizeof (mbstate_t));
+        ret = mbrlen ("\201\045", 2, &state); /* 0x81 0x25 */
+        ASSERT (ret == (size_t)-1);
+        ASSERT (errno == EILSEQ);
+
+        memset (&state, '\0', sizeof (mbstate_t));
+        ret = mbrlen ("\201\060\377", 3, &state); /* 0x81 0x30 0xFF */
+        ASSERT (ret == (size_t)-1);
+        ASSERT (errno == EILSEQ);
+
+        memset (&state, '\0', sizeof (mbstate_t));
+        ret = mbrlen ("\201\060\377\064", 4, &state); /* 0x81 0x30 0xFF 0x34 */
+        ASSERT (ret == (size_t)-1);
+        ASSERT (errno == EILSEQ);
+
+        memset (&state, '\0', sizeof (mbstate_t));
+        ret = mbrlen ("\201\060\211\072", 4, &state); /* 0x81 0x30 0x89 0x3A */
+        ASSERT (ret == (size_t)-1);
+        ASSERT (errno == EILSEQ);
+      }
+      return 0;
+
+    case 65001:
+      /* Locale encoding is CP65001 = UTF-8.  */
+      if (strcmp (locale_charset (), "UTF-8") != 0)
+        return 77;
+      {
+        char input[] = "B\303\274\303\237er"; /* "Büßer" */
+        memset (&state, '\0', sizeof (mbstate_t));
+
+        ret = mbrlen (input, 1, &state);
+        ASSERT (ret == 1);
+        ASSERT (mbsinit (&state));
+        input[0] = '\0';
+
+        ret = mbrlen (input + 1, 1, &state);
+        ASSERT (ret == (size_t)(-2));
+        ASSERT (!mbsinit (&state));
+        input[1] = '\0';
+
+        ret = mbrlen (input + 2, 5, &state);
+        ASSERT (ret == 1);
+        ASSERT (mbsinit (&state));
+        input[2] = '\0';
+
+        ret = mbrlen (input + 3, 4, &state);
+        ASSERT (ret == 2);
+        ASSERT (mbsinit (&state));
+        input[3] = '\0';
+        input[4] = '\0';
+
+        ret = mbrlen (input + 5, 2, &state);
+        ASSERT (ret == 1);
+        ASSERT (mbsinit (&state));
+        input[5] = '\0';
+
+        ret = mbrlen (input + 6, 1, &state);
+        ASSERT (ret == 1);
+        ASSERT (mbsinit (&state));
+
+        /* Test some invalid input.  */
+        memset (&state, '\0', sizeof (mbstate_t));
+        ret = mbrlen ("\377", 1, &state); /* 0xFF */
+        ASSERT (ret == (size_t)-1);
+        ASSERT (errno == EILSEQ);
+
+        memset (&state, '\0', sizeof (mbstate_t));
+        ret = mbrlen ("\303\300", 2, &state); /* 0xC3 0xC0 */
+        ASSERT (ret == (size_t)-1);
+        ASSERT (errno == EILSEQ);
+
+        memset (&state, '\0', sizeof (mbstate_t));
+        ret = mbrlen ("\343\300", 2, &state); /* 0xE3 0xC0 */
+        ASSERT (ret == (size_t)-1);
+        ASSERT (errno == EILSEQ);
+
+        memset (&state, '\0', sizeof (mbstate_t));
+        ret = mbrlen ("\343\300\200", 3, &state); /* 0xE3 0xC0 0x80 */
+        ASSERT (ret == (size_t)-1);
+        ASSERT (errno == EILSEQ);
+
+        memset (&state, '\0', sizeof (mbstate_t));
+        ret = mbrlen ("\343\200\300", 3, &state); /* 0xE3 0x80 0xC0 */
+        ASSERT (ret == (size_t)-1);
+        ASSERT (errno == EILSEQ);
+
+        memset (&state, '\0', sizeof (mbstate_t));
+        ret = mbrlen ("\363\300", 2, &state); /* 0xF3 0xC0 */
+        ASSERT (ret == (size_t)-1);
+        ASSERT (errno == EILSEQ);
+
+        memset (&state, '\0', sizeof (mbstate_t));
+        ret = mbrlen ("\363\300\200\200", 4, &state); /* 0xF3 0xC0 0x80 0x80 */
+        ASSERT (ret == (size_t)-1);
+        ASSERT (errno == EILSEQ);
+
+        memset (&state, '\0', sizeof (mbstate_t));
+        ret = mbrlen ("\363\200\300", 3, &state); /* 0xF3 0x80 0xC0 */
+        ASSERT (ret == (size_t)-1);
+        ASSERT (errno == EILSEQ);
+
+        memset (&state, '\0', sizeof (mbstate_t));
+        ret = mbrlen ("\363\200\300\200", 4, &state); /* 0xF3 0x80 0xC0 0x80 */
+        ASSERT (ret == (size_t)-1);
+        ASSERT (errno == EILSEQ);
+
+        memset (&state, '\0', sizeof (mbstate_t));
+        ret = mbrlen ("\363\200\200\300", 4, &state); /* 0xF3 0x80 0x80 0xC0 */
+        ASSERT (ret == (size_t)-1);
+        ASSERT (errno == EILSEQ);
+      }
+      return 0;
+
+    default:
+      return 1;
+    }
+}
+
+int
+main (int argc, char *argv[])
+{
+  int codepage = atoi (argv[argc - 1]);
+  int result;
+  int i;
+
+  result = 77;
+  for (i = 1; i < argc - 1; i++)
+    {
+      int ret = test_one_locale (argv[i], codepage);
+
+      if (ret != 77)
+        result = ret;
+    }
+
+  if (result == 77)
+    {
+      fprintf (stderr, "Skipping test: found no locale with codepage %d\n",
+               codepage);
+    }
+  return result;
+}
+
+#else
+
+int
+main (int argc, char *argv[])
+{
+  fputs ("Skipping test: not a native Windows system\n", stderr);
+  return 77;
+}
+
+#endif
diff --git a/gnulib-tests/test-mbrlen.c b/gnulib-tests/test-mbrlen.c
new file mode 100644
index 00000000..005d0c80
--- /dev/null
+++ b/gnulib-tests/test-mbrlen.c
@@ -0,0 +1,297 @@
+/* Test of conversion of multibyte character to wide character.
+   Copyright (C) 2008-2023 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2023.  */
+
+#include <config.h>
+
+#include <wchar.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (mbrlen, size_t, (char const *, size_t, mbstate_t *));
+
+#include <locale.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "macros.h"
+
+int
+main (int argc, char *argv[])
+{
+  mbstate_t state;
+  size_t ret;
+
+  /* configure should already have checked that the locale is supported.  */
+  if (setlocale (LC_ALL, "") == NULL)
+    return 1;
+
+  /* Test zero-length input.  */
+  {
+    memset (&state, '\0', sizeof (mbstate_t));
+    ret = mbrlen ("x", 0, &state);
+    ASSERT (ret == (size_t)(-2));
+    ASSERT (mbsinit (&state));
+  }
+
+  /* Test NUL byte input.  */
+  {
+    memset (&state, '\0', sizeof (mbstate_t));
+    ret = mbrlen ("", 1, &state);
+    ASSERT (ret == 0);
+    ASSERT (mbsinit (&state));
+  }
+
+  /* Test single-byte input.  */
+  {
+    int c;
+    char buf[1];
+
+    memset (&state, '\0', sizeof (mbstate_t));
+    for (c = 0; c < 0x100; c++)
+      switch (c)
+        {
+        case '\t': case '\v': case '\f':
+        case ' ': case '!': case '"': case '#': case '%':
+        case '&': case '\'': case '(': case ')': case '*':
+        case '+': case ',': case '-': case '.': case '/':
+        case '0': case '1': case '2': case '3': case '4':
+        case '5': case '6': case '7': case '8': case '9':
+        case ':': case ';': case '<': case '=': case '>':
+        case '?':
+        case 'A': case 'B': case 'C': case 'D': case 'E':
+        case 'F': case 'G': case 'H': case 'I': case 'J':
+        case 'K': case 'L': case 'M': case 'N': case 'O':
+        case 'P': case 'Q': case 'R': case 'S': case 'T':
+        case 'U': case 'V': case 'W': case 'X': case 'Y':
+        case 'Z':
+        case '[': case '\\': case ']': case '^': case '_':
+        case 'a': case 'b': case 'c': case 'd': case 'e':
+        case 'f': case 'g': case 'h': case 'i': case 'j':
+        case 'k': case 'l': case 'm': case 'n': case 'o':
+        case 'p': case 'q': case 'r': case 's': case 't':
+        case 'u': case 'v': case 'w': case 'x': case 'y':
+        case 'z': case '{': case '|': case '}': case '~':
+          /* c is in the ISO C "basic character set".  */
+          ASSERT (c < 0x80);
+          /* c is an ASCII character.  */
+          buf[0] = c;
+
+          ret = mbrlen (buf, 1, &state);
+          ASSERT (ret == 1);
+          ASSERT (mbsinit (&state));
+
+          break;
+        default:
+          break;
+        }
+  }
+
+  /* Test special calling convention, passing a NULL pointer.  */
+  {
+    memset (&state, '\0', sizeof (mbstate_t));
+    ret = mbrlen (NULL, 5, &state);
+    ASSERT (ret == 0);
+    ASSERT (mbsinit (&state));
+  }
+
+#ifdef __ANDROID__
+  /* On Android ≥ 5.0, the default locale is the "C.UTF-8" locale, not the
+     "C" locale.  Furthermore, when you attempt to set the "C" or "POSIX"
+     locale via setlocale(), what you get is a "C" locale with UTF-8 encoding,
+     that is, effectively the "C.UTF-8" locale.  */
+  if (argc > 1 && strcmp (argv[1], "5") == 0 && MB_CUR_MAX > 1)
+    argv[1] = "2";
+#endif
+
+  if (argc > 1)
+    switch (argv[1][0])
+      {
+      case '1':
+        /* Locale encoding is ISO-8859-1 or ISO-8859-15.  */
+        {
+          char input[] = "B\374\337er"; /* "Büßer" */
+          memset (&state, '\0', sizeof (mbstate_t));
+
+          ret = mbrlen (input, 1, &state);
+          ASSERT (ret == 1);
+          ASSERT (mbsinit (&state));
+          input[0] = '\0';
+
+          ret = mbrlen (input + 1, 1, &state);
+          ASSERT (ret == 1);
+          ASSERT (mbsinit (&state));
+          input[1] = '\0';
+
+          ret = mbrlen (input + 2, 3, &state);
+          ASSERT (ret == 1);
+          ASSERT (mbsinit (&state));
+          input[2] = '\0';
+
+          ret = mbrlen (input + 3, 2, &state);
+          ASSERT (ret == 1);
+          ASSERT (mbsinit (&state));
+          input[3] = '\0';
+
+          ret = mbrlen (input + 4, 1, &state);
+          ASSERT (ret == 1);
+          ASSERT (mbsinit (&state));
+        }
+        return 0;
+
+      case '2':
+        /* Locale encoding is UTF-8.  */
+        {
+          char input[] = "B\303\274\303\237er"; /* "Büßer" */
+          memset (&state, '\0', sizeof (mbstate_t));
+
+          ret = mbrlen (input, 1, &state);
+          ASSERT (ret == 1);
+          ASSERT (mbsinit (&state));
+          input[0] = '\0';
+
+          ret = mbrlen (input + 1, 1, &state);
+          ASSERT (ret == (size_t)(-2));
+          ASSERT (!mbsinit (&state));
+          input[1] = '\0';
+
+          ret = mbrlen (input + 2, 5, &state);
+          ASSERT (ret == 1);
+          ASSERT (mbsinit (&state));
+          input[2] = '\0';
+
+          ret = mbrlen (input + 3, 4, &state);
+          ASSERT (ret == 2);
+          ASSERT (mbsinit (&state));
+          input[3] = '\0';
+          input[4] = '\0';
+
+          ret = mbrlen (input + 5, 2, &state);
+          ASSERT (ret == 1);
+          ASSERT (mbsinit (&state));
+          input[5] = '\0';
+
+          ret = mbrlen (input + 6, 1, &state);
+          ASSERT (ret == 1);
+          ASSERT (mbsinit (&state));
+        }
+        return 0;
+
+      case '3':
+        /* Locale encoding is EUC-JP.  */
+        {
+          char input[] = "<\306\374\313\334\270\354>"; /* "<日本語>" */
+          memset (&state, '\0', sizeof (mbstate_t));
+
+          ret = mbrlen (input, 1, &state);
+          ASSERT (ret == 1);
+          ASSERT (mbsinit (&state));
+          input[0] = '\0';
+
+          ret = mbrlen (input + 1, 2, &state);
+          ASSERT (ret == 2);
+          ASSERT (mbsinit (&state));
+          input[1] = '\0';
+          input[2] = '\0';
+
+          ret = mbrlen (input + 3, 1, &state);
+          ASSERT (ret == (size_t)(-2));
+          ASSERT (!mbsinit (&state));
+          input[3] = '\0';
+
+          ret = mbrlen (input + 4, 4, &state);
+          ASSERT (ret == 1);
+          ASSERT (mbsinit (&state));
+          input[4] = '\0';
+
+          ret = mbrlen (input + 5, 3, &state);
+          ASSERT (ret == 2);
+          ASSERT (mbsinit (&state));
+          input[5] = '\0';
+          input[6] = '\0';
+
+          ret = mbrlen (input + 7, 1, &state);
+          ASSERT (ret == 1);
+          ASSERT (mbsinit (&state));
+        }
+        return 0;
+
+      case '4':
+        /* Locale encoding is GB18030.  */
+        {
+          char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
+          memset (&state, '\0', sizeof (mbstate_t));
+
+          ret = mbrlen (input, 1, &state);
+          ASSERT (ret == 1);
+          ASSERT (mbsinit (&state));
+          input[0] = '\0';
+
+          ret = mbrlen (input + 1, 1, &state);
+          ASSERT (ret == (size_t)(-2));
+          ASSERT (!mbsinit (&state));
+          input[1] = '\0';
+
+          ret = mbrlen (input + 2, 7, &state);
+          ASSERT (ret == 1);
+          ASSERT (mbsinit (&state));
+          input[2] = '\0';
+
+          ret = mbrlen (input + 3, 6, &state);
+          ASSERT (ret == 4);
+          ASSERT (mbsinit (&state));
+          input[3] = '\0';
+          input[4] = '\0';
+          input[5] = '\0';
+          input[6] = '\0';
+
+          ret = mbrlen (input + 7, 2, &state);
+          ASSERT (ret == 1);
+          ASSERT (mbsinit (&state));
+          input[7] = '\0';
+
+          ret = mbrlen (input + 8, 1, &state);
+          ASSERT (ret == 1);
+          ASSERT (mbsinit (&state));
+        }
+        return 0;
+
+      case '5':
+        /* C or POSIX locale.  */
+        {
+          int c;
+          char buf[1];
+
+          memset (&state, '\0', sizeof (mbstate_t));
+          for (c = 0; c < 0x100; c++)
+            if (c != 0)
+              {
+                /* We are testing all nonnull bytes.  */
+                buf[0] = c;
+
+                ret = mbrlen (buf, 1, &state);
+                /* POSIX:2018 says: "In the POSIX locale an [EILSEQ] error
+                   cannot occur since all byte values are valid characters."  */
+                ASSERT (ret == 1);
+                ASSERT (mbsinit (&state));
+              }
+        }
+        return 0;
+      }
+
+  return 1;
+}
diff --git a/gnulib-tests/test-mbrlen1.sh b/gnulib-tests/test-mbrlen1.sh
new file mode 100755
index 00000000..f07bc37e
--- /dev/null
+++ b/gnulib-tests/test-mbrlen1.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Test in an ISO-8859-1 or ISO-8859-15 locale.
+: "${LOCALE_FR=fr_FR}"
+if test $LOCALE_FR = none; then
+  if test -f /usr/bin/localedef; then
+    echo "Skipping test: no traditional french locale is installed"
+  else
+    echo "Skipping test: no traditional french locale is supported"
+  fi
+  exit 77
+fi
+
+LC_ALL=$LOCALE_FR \
+${CHECKER} ./test-mbrlen${EXEEXT} 1
diff --git a/gnulib-tests/test-mbrlen2.sh b/gnulib-tests/test-mbrlen2.sh
new file mode 100755
index 00000000..108394a6
--- /dev/null
+++ b/gnulib-tests/test-mbrlen2.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Test whether a specific UTF-8 locale is installed.
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
+if test $LOCALE_FR_UTF8 = none; then
+  if test -f /usr/bin/localedef; then
+    echo "Skipping test: no french Unicode locale is installed"
+  else
+    echo "Skipping test: no french Unicode locale is supported"
+  fi
+  exit 77
+fi
+
+LC_ALL=$LOCALE_FR_UTF8 \
+${CHECKER} ./test-mbrlen${EXEEXT} 2
diff --git a/gnulib-tests/test-mbrlen3.sh b/gnulib-tests/test-mbrlen3.sh
new file mode 100755
index 00000000..57199a0c
--- /dev/null
+++ b/gnulib-tests/test-mbrlen3.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Test whether a specific EUC-JP locale is installed.
+: "${LOCALE_JA=ja_JP}"
+if test $LOCALE_JA = none; then
+  if test -f /usr/bin/localedef; then
+    echo "Skipping test: no traditional japanese locale is installed"
+  else
+    echo "Skipping test: no traditional japanese locale is supported"
+  fi
+  exit 77
+fi
+
+LC_ALL=$LOCALE_JA \
+${CHECKER} ./test-mbrlen${EXEEXT} 3
diff --git a/gnulib-tests/test-mbrlen4.sh b/gnulib-tests/test-mbrlen4.sh
new file mode 100755
index 00000000..8f83d4d0
--- /dev/null
+++ b/gnulib-tests/test-mbrlen4.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Test whether a specific GB18030 locale is installed.
+: "${LOCALE_ZH_CN=zh_CN.GB18030}"
+if test $LOCALE_ZH_CN = none; then
+  if test -f /usr/bin/localedef; then
+    echo "Skipping test: no transitional chinese locale is installed"
+  else
+    echo "Skipping test: no transitional chinese locale is supported"
+  fi
+  exit 77
+fi
+
+LC_ALL=$LOCALE_ZH_CN \
+${CHECKER} ./test-mbrlen${EXEEXT} 4
diff --git a/gnulib-tests/test-mbrlen5.sh b/gnulib-tests/test-mbrlen5.sh
new file mode 100755
index 00000000..9b14cb1e
--- /dev/null
+++ b/gnulib-tests/test-mbrlen5.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+# Test whether the POSIX locale has encoding errors.
+LC_ALL=C \
+${CHECKER} ./test-mbrlen${EXEEXT} 5 || exit 1
+LC_ALL=POSIX \
+${CHECKER} ./test-mbrlen${EXEEXT} 5 || exit 1
+
+exit 0
diff --git a/gnulib-tests/test-mbscasecmp.c b/gnulib-tests/test-mbscasecmp.c
index a4069aeb..9ecff601 100644
--- a/gnulib-tests/test-mbscasecmp.c
+++ b/gnulib-tests/test-mbscasecmp.c
@@ -1,5 +1,5 @@
 /* Test of case-insensitive string comparison function.
-   Copyright (C) 2007-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-mbscasecmp.sh b/gnulib-tests/test-mbscasecmp.sh
index 5201951d..73e62b5f 100755
--- a/gnulib-tests/test-mbscasecmp.sh
+++ b/gnulib-tests/test-mbscasecmp.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific Turkish locale is installed.
-: ${LOCALE_TR_UTF8=tr_TR.UTF-8}
+: "${LOCALE_TR_UTF8=tr_TR.UTF-8}"
 if test $LOCALE_TR_UTF8 = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no turkish Unicode locale is installed"
diff --git a/gnulib-tests/test-mbsinit.c b/gnulib-tests/test-mbsinit.c
index 699701eb..8b9779ca 100644
--- a/gnulib-tests/test-mbsinit.c
+++ b/gnulib-tests/test-mbsinit.c
@@ -1,5 +1,5 @@
 /* Test of test for initial conversion state.
-   Copyright (C) 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-mbsinit.sh b/gnulib-tests/test-mbsinit.sh
index 7308714c..25d4b2e4 100755
--- a/gnulib-tests/test-mbsinit.sh
+++ b/gnulib-tests/test-mbsinit.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific UTF-8 locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no french Unicode locale is installed"
diff --git a/gnulib-tests/test-mbsrtowcs.c b/gnulib-tests/test-mbsrtowcs.c
index 60ec329a..3c351f23 100644
--- a/gnulib-tests/test-mbsrtowcs.c
+++ b/gnulib-tests/test-mbsrtowcs.c
@@ -1,5 +1,5 @@
 /* Test of conversion of string to wide string.
-   Copyright (C) 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 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
@@ -72,6 +72,15 @@ main (int argc, char *argv[])
     ASSERT (mbsinit (&state));
   }
 
+#ifdef __ANDROID__
+  /* On Android ≥ 5.0, the default locale is the "C.UTF-8" locale, not the
+     "C" locale.  Furthermore, when you attempt to set the "C" or "POSIX"
+     locale via setlocale(), what you get is a "C" locale with UTF-8 encoding,
+     that is, effectively the "C.UTF-8" locale.  */
+  if (argc > 1 && strcmp (argv[1], "5") == 0 && MB_CUR_MAX > 1)
+    argv[1] = "2";
+#endif
+
   if (argc > 1)
     {
       int unlimited;
@@ -281,6 +290,72 @@ main (int argc, char *argv[])
               }
               break;
 
+            case '5':
+              /* C or POSIX locale.  */
+              {
+                char input[] = "n/a";
+                memset (&state, '\0', sizeof (mbstate_t));
+
+                src = input;
+                temp_state = state;
+                ret = mbsrtowcs (NULL, &src, unlimited ? BUFSIZE : 1, &temp_state);
+                ASSERT (ret == 3);
+                ASSERT (src == input);
+                ASSERT (mbsinit (&state));
+
+                src = input;
+                ret = mbsrtowcs (buf, &src, unlimited ? BUFSIZE : 1, &state);
+                ASSERT (ret == (unlimited ? 3 : 1));
+                ASSERT (src == (unlimited ? NULL : input + 1));
+                ASSERT (buf[0] == 'n');
+                if (unlimited)
+                  {
+                    ASSERT (buf[1] == '/');
+                    ASSERT (buf[2] == 'a');
+                    ASSERT (buf[3] == 0);
+                    ASSERT (buf[4] == (wchar_t) 0xBADFACE);
+                  }
+                else
+                  ASSERT (buf[1] == (wchar_t) 0xBADFACE);
+                ASSERT (mbsinit (&state));
+              }
+              {
+                int c;
+                char input[2];
+
+                memset (&state, '\0', sizeof (mbstate_t));
+                for (c = 0; c < 0x100; c++)
+                  if (c != 0)
+                    {
+                      /* We are testing all nonnull bytes.  */
+                      input[0] = c;
+                      input[1] = '\0';
+
+                      src = input;
+                      ret = mbsrtowcs (NULL, &src, unlimited ? BUFSIZE : 1, &state);
+                      ASSERT (ret == 1);
+                      ASSERT (src == input);
+                      ASSERT (mbsinit (&state));
+
+                      buf[0] = buf[1] = (wchar_t) 0xBADFACE;
+                      src = input;
+                      ret = mbsrtowcs (buf, &src, unlimited ? BUFSIZE : 1, &state);
+                      /* POSIX:2018 says: "In the POSIX locale an [EILSEQ] error
+                         cannot occur since all byte values are valid characters."  */
+                      ASSERT (ret == 1);
+                      ASSERT (src == (unlimited ? NULL : input + 1));
+                      if (c < 0x80)
+                        /* c is an ASCII character.  */
+                        ASSERT (buf[0] == c);
+                      else
+                        /* On most platforms, the bytes 0x80..0xFF map to U+0080..U+00FF.
+                           But on musl libc, the bytes 0x80..0xFF map to U+DF80..U+DFFF.  */
+                        ASSERT (buf[0] == (btowc (c) == 0xDF00 + c ? btowc (c) : c));
+                      ASSERT (mbsinit (&state));
+                    }
+              }
+              break;
+
             default:
               return 1;
             }
diff --git a/gnulib-tests/test-mbsrtowcs1.sh b/gnulib-tests/test-mbsrtowcs1.sh
index 66ba231a..f8c54ab2 100755
--- a/gnulib-tests/test-mbsrtowcs1.sh
+++ b/gnulib-tests/test-mbsrtowcs1.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test in an ISO-8859-1 or ISO-8859-15 locale.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no traditional french locale is installed"
diff --git a/gnulib-tests/test-mbsrtowcs2.sh b/gnulib-tests/test-mbsrtowcs2.sh
index 6786efd7..1cae31cb 100755
--- a/gnulib-tests/test-mbsrtowcs2.sh
+++ b/gnulib-tests/test-mbsrtowcs2.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific UTF-8 locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no french Unicode locale is installed"
diff --git a/gnulib-tests/test-mbsrtowcs3.sh b/gnulib-tests/test-mbsrtowcs3.sh
index 54e98326..908c140e 100755
--- a/gnulib-tests/test-mbsrtowcs3.sh
+++ b/gnulib-tests/test-mbsrtowcs3.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific EUC-JP locale is installed.
-: ${LOCALE_JA=ja_JP}
+: "${LOCALE_JA=ja_JP}"
 if test $LOCALE_JA = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no traditional japanese locale is installed"
diff --git a/gnulib-tests/test-mbsrtowcs4.sh b/gnulib-tests/test-mbsrtowcs4.sh
index 8acda085..135bc5f7 100755
--- a/gnulib-tests/test-mbsrtowcs4.sh
+++ b/gnulib-tests/test-mbsrtowcs4.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific GB18030 locale is installed.
-: ${LOCALE_ZH_CN=zh_CN.GB18030}
+: "${LOCALE_ZH_CN=zh_CN.GB18030}"
 if test $LOCALE_ZH_CN = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no transitional chinese locale is installed"
diff --git a/gnulib-tests/test-mbsrtowcs5.sh b/gnulib-tests/test-mbsrtowcs5.sh
new file mode 100755
index 00000000..96734a73
--- /dev/null
+++ b/gnulib-tests/test-mbsrtowcs5.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+# Test whether the POSIX locale has encoding errors.
+LC_ALL=C \
+${CHECKER} ./test-mbsrtowcs${EXEEXT} 5 || exit 1
+LC_ALL=POSIX \
+${CHECKER} ./test-mbsrtowcs${EXEEXT} 5 || exit 1
+
+exit 0
diff --git a/gnulib-tests/test-mbsstr1.c b/gnulib-tests/test-mbsstr1.c
index 3bdb47c2..0de4a9ac 100644
--- a/gnulib-tests/test-mbsstr1.c
+++ b/gnulib-tests/test-mbsstr1.c
@@ -1,5 +1,5 @@
 /* Test of searching in a string.
-   Copyright (C) 2007-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-mbsstr2.c b/gnulib-tests/test-mbsstr2.c
index fe99cb0e..2f034ab0 100644
--- a/gnulib-tests/test-mbsstr2.c
+++ b/gnulib-tests/test-mbsstr2.c
@@ -1,5 +1,5 @@
 /* Test of searching in a string.
-   Copyright (C) 2007-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-mbsstr2.sh b/gnulib-tests/test-mbsstr2.sh
index 5ef71392..d1905d61 100755
--- a/gnulib-tests/test-mbsstr2.sh
+++ b/gnulib-tests/test-mbsstr2.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific UTF-8 locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no french Unicode locale is installed"
diff --git a/gnulib-tests/test-mbsstr3.c b/gnulib-tests/test-mbsstr3.c
index c9f38fb6..5831f170 100644
--- a/gnulib-tests/test-mbsstr3.c
+++ b/gnulib-tests/test-mbsstr3.c
@@ -1,5 +1,5 @@
 /* Test of searching in a string.
-   Copyright (C) 2007-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-mbsstr3.sh b/gnulib-tests/test-mbsstr3.sh
index 539f9c03..5e781bfc 100755
--- a/gnulib-tests/test-mbsstr3.sh
+++ b/gnulib-tests/test-mbsstr3.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific GB18030 locale is installed.
-: ${LOCALE_ZH_CN=zh_CN.GB18030}
+: "${LOCALE_ZH_CN=zh_CN.GB18030}"
 if test $LOCALE_ZH_CN = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no chinese GB18030 locale is installed"
diff --git a/gnulib-tests/test-memchr.c b/gnulib-tests/test-memchr.c
index 8a2d3de4..9d313534 100644
--- a/gnulib-tests/test-memchr.c
+++ b/gnulib-tests/test-memchr.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2008-2022 Free Software Foundation, Inc.
+ * Copyright (C) 2008-2023 Free Software Foundation, Inc.
  * Written by Eric Blake and Bruno Haible
  *
  * This program is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/test-memchr2.c b/gnulib-tests/test-memchr2.c
index 3f5e665f..328463fb 100644
--- a/gnulib-tests/test-memchr2.c
+++ b/gnulib-tests/test-memchr2.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2008-2022 Free Software Foundation, Inc.
+ * Copyright (C) 2008-2023 Free Software Foundation, Inc.
  * Written by Eric Blake
  *
  * This program is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/test-memrchr.c b/gnulib-tests/test-memrchr.c
index 3d2c0cdc..7c52e7ca 100644
--- a/gnulib-tests/test-memrchr.c
+++ b/gnulib-tests/test-memrchr.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2008-2022 Free Software Foundation, Inc.
+ * Copyright (C) 2008-2023 Free Software Foundation, Inc.
  * Written by Eric Blake and Bruno Haible
  *
  * This program is free software: you can redistribute it and/or modify
@@ -28,7 +28,7 @@ SIGNATURE_CHECK (memrchr, void *, (void const *, int, size_t));
 #include "macros.h"
 
 /* Work around GCC bug 101494.  */
-#if 4 < __GNUC__ + (3 <= __GNUC_MINOR__) && __GNUC__ < 12
+#if 4 < __GNUC__ + (7 <= __GNUC_MINOR__) && __GNUC__ < 12
 # pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
 #endif
 
diff --git a/gnulib-tests/test-nanosleep.c b/gnulib-tests/test-nanosleep.c
index e7edeffc..c2f2a192 100644
--- a/gnulib-tests/test-nanosleep.c
+++ b/gnulib-tests/test-nanosleep.c
@@ -1,5 +1,5 @@
 /* Test of nanosleep() function.
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 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
@@ -43,16 +43,27 @@ main (void)
 {
   struct timespec ts;
 
+  /* Check that negative nanosecond values cause failure.  */
+  ts.tv_sec = 1;
+  ts.tv_nsec = -1;
+  errno = 0;
+  ASSERT (nanosleep (&ts, NULL) == -1);
+  ASSERT (errno == EINVAL);
+
   ts.tv_sec = 1000;
   ts.tv_nsec = -1;
   errno = 0;
   ASSERT (nanosleep (&ts, NULL) == -1);
   ASSERT (errno == EINVAL);
+
+  /* Check that too large nanosecond values cause failure.  */
+  ts.tv_sec = 1000;
   ts.tv_nsec = 1000000000;
   errno = 0;
   ASSERT (nanosleep (&ts, NULL) == -1);
   ASSERT (errno == EINVAL);
 
+  /* Check successful call.  */
   ts.tv_sec = 0;
   ts.tv_nsec = 1;
   ASSERT (nanosleep (&ts, &ts) == 0);
diff --git a/gnulib-tests/test-netinet_in.c b/gnulib-tests/test-netinet_in.c
index 3bc110e5..0639d2f5 100644
--- a/gnulib-tests/test-netinet_in.c
+++ b/gnulib-tests/test-netinet_in.c
@@ -1,5 +1,5 @@
 /* Test of <netinet/in.h> substitute.
-   Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-nl_langinfo-mt.c b/gnulib-tests/test-nl_langinfo-mt.c
index 1912e0db..806a093d 100644
--- a/gnulib-tests/test-nl_langinfo-mt.c
+++ b/gnulib-tests/test-nl_langinfo-mt.c
@@ -1,5 +1,5 @@
 /* Multithread-safety test for nl_langinfo().
-   Copyright (C) 2019-2022 Free Software Foundation, Inc.
+   Copyright (C) 2019-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-nl_langinfo.sh b/gnulib-tests/test-nl_langinfo.sh
deleted file mode 100755
index b1ce46ce..00000000
--- a/gnulib-tests/test-nl_langinfo.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-
-LC_ALL=C ${CHECKER} ./test-nl_langinfo${EXEEXT} 0 || exit 1
-
-# Test whether a specific traditional locale is installed.
-: ${LOCALE_FR=fr_FR}
-if test $LOCALE_FR != none; then
-  LC_ALL=$LOCALE_FR ${CHECKER} ./test-nl_langinfo${EXEEXT} 1 || exit 1
-fi
-
-# Test whether a specific UTF-8 locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
-if test $LOCALE_FR_UTF8 != none; then
-  LC_ALL=$LOCALE_FR_UTF8 ${CHECKER} ./test-nl_langinfo${EXEEXT} 2 || exit 1
-fi
-
-exit 0
diff --git a/gnulib-tests/test-nl_langinfo.c b/gnulib-tests/test-nl_langinfo1.c
similarity index 99%
rename from gnulib-tests/test-nl_langinfo.c
rename to gnulib-tests/test-nl_langinfo1.c
index f1a1d728..5254f862 100644
--- a/gnulib-tests/test-nl_langinfo.c
+++ b/gnulib-tests/test-nl_langinfo1.c
@@ -1,5 +1,5 @@
 /* Test of nl_langinfo replacement.
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-nl_langinfo1.sh b/gnulib-tests/test-nl_langinfo1.sh
new file mode 100755
index 00000000..9acfcdd9
--- /dev/null
+++ b/gnulib-tests/test-nl_langinfo1.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+LC_ALL=C ${CHECKER} ./test-nl_langinfo1${EXEEXT} 0 || exit 1
+
+# Test whether a specific traditional locale is installed.
+: "${LOCALE_FR=fr_FR}"
+if test $LOCALE_FR != none; then
+  LC_ALL=$LOCALE_FR ${CHECKER} ./test-nl_langinfo1${EXEEXT} 1 || exit 1
+fi
+
+# Test whether a specific UTF-8 locale is installed.
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
+if test $LOCALE_FR_UTF8 != none; then
+  LC_ALL=$LOCALE_FR_UTF8 ${CHECKER} ./test-nl_langinfo1${EXEEXT} 2 || exit 1
+fi
+
+exit 0
diff --git a/gnulib-tests/test-nl_langinfo2.c b/gnulib-tests/test-nl_langinfo2.c
new file mode 100644
index 00000000..7f276da8
--- /dev/null
+++ b/gnulib-tests/test-nl_langinfo2.c
@@ -0,0 +1,136 @@
+/* Test of nl_langinfo replacement.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2023.  */
+
+#include <config.h>
+
+#include <langinfo.h>
+
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "c-strcase.h"
+#include "c-strcasestr.h"
+#include "macros.h"
+
+int
+main (int argc, char *argv[])
+{
+#if HAVE_WORKING_USELOCALE
+  /* Check that nl_langinfo() uses the per-thread locale.  */
+  int pass;
+  bool skipped_all = true;
+
+  /* Extract a few items from the C locale.  */
+  /* nl_langinfo items of the LC_CTYPE category */
+  const char *c_CODESET = nl_langinfo (CODESET);
+  /* nl_langinfo items of the LC_NUMERIC category */
+  const char *c_RADIXCHAR = nl_langinfo (RADIXCHAR);
+  /* nl_langinfo items of the LC_TIME category */
+  const char *c_T_FMT_AMPM = nl_langinfo (T_FMT_AMPM);
+  const char *c_AM_STR = nl_langinfo (AM_STR);
+  const char *c_PM_STR = nl_langinfo (PM_STR);
+  /* nl_langinfo items of the LC_MONETARY category */
+  const char *c_CRNCYSTR = nl_langinfo (CRNCYSTR);
+  /* nl_langinfo items of the LC_MESSAGES category */
+  const char *c_YESEXPR = nl_langinfo (YESEXPR);
+
+  /* Sanity checks.  */
+  (void) c_CODESET;
+  ASSERT (strcmp (c_RADIXCHAR, ".") == 0);
+  ASSERT (strlen (c_T_FMT_AMPM) > 0);
+  ASSERT (strlen (c_AM_STR) > 0);
+  ASSERT (strlen (c_PM_STR) > 0);
+  ASSERT (strlen (c_CRNCYSTR) <= 1); /* "-", "+", ".", or "" */
+  ASSERT (c_strcasestr (c_YESEXPR, "y" /* from "yes" */) != NULL);
+
+  for (pass = 1; pass <= 2; pass++)
+    {
+      /* pass    locale
+          1        traditional French locale
+          2        French UTF-8 locale
+       */
+      const char *fr_locale_name =
+        getenv (pass == 1 ? "LOCALE_FR" : "LOCALE_FR_UTF8");
+      if (strcmp (fr_locale_name, "none") != 0)
+        {
+          /* Use a per-thread locale.  */
+          locale_t fr_locale = newlocale (LC_ALL_MASK, fr_locale_name, NULL);
+          if (fr_locale != NULL)
+            {
+              uselocale (fr_locale);
+
+              /* Extract a few items from the current locale, and check the
+                 values.  */
+
+              /* nl_langinfo items of the LC_CTYPE category */
+              const char *fr_CODESET = nl_langinfo (CODESET);
+              if (pass == 1)
+                ASSERT (strstr (fr_CODESET, "8859") != NULL);
+              else if (pass == 2)
+                ASSERT (c_strcasecmp (fr_CODESET, "UTF-8") == 0
+                        || c_strcasecmp (fr_CODESET, "UTF8") == 0);
+
+              /* nl_langinfo items of the LC_NUMERIC category */
+              const char *fr_RADIXCHAR = nl_langinfo (RADIXCHAR);
+              ASSERT (strcmp (fr_RADIXCHAR, ",") == 0);
+
+              /* nl_langinfo items of the LC_TIME category */
+              /* macOS and Solaris 11 don't get the LC_TIME values right.
+                 Poor.  */
+              #if !((defined __APPLE__ && defined __MACH__) || defined __sun)
+              const char *fr_T_FMT_AMPM = nl_langinfo (T_FMT_AMPM);
+              const char *fr_AM_STR = nl_langinfo (AM_STR);
+              const char *fr_PM_STR = nl_langinfo (PM_STR);
+              ASSERT (strlen (fr_T_FMT_AMPM) == 0
+                      || strcmp (fr_T_FMT_AMPM, "%I:%M:%S") == 0);
+              ASSERT (strlen (fr_AM_STR) == 0);
+              ASSERT (strlen (fr_PM_STR) == 0);
+              #endif
+
+              /* nl_langinfo items of the LC_MONETARY category */
+              /* macOS doesn't get the EUR currency symbol or abbreviation
+                 right.  Very poor.  */
+              #if !(defined __APPLE__ && defined __MACH__)
+              const char *fr_CRNCYSTR = nl_langinfo (CRNCYSTR);
+              if (pass == 2)
+                ASSERT (strlen (fr_CRNCYSTR) >= 1
+                        && strcmp (fr_CRNCYSTR + 1, "€") == 0);
+              #endif
+
+              /* nl_langinfo items of the LC_MESSAGES category */
+              const char *fr_YESEXPR = nl_langinfo (YESEXPR);
+              ASSERT (c_strcasestr (fr_YESEXPR, "o" /* from "oui" */) != NULL);
+
+              skipped_all = false;
+            }
+        }
+    }
+
+  if (skipped_all)
+    {
+      fputs ("Skipping test: French locale is not installed\n", stderr);
+      return 77;
+    }
+
+  return 0;
+#else
+  fputs ("Skipping test: uselocale() not available\n", stderr);
+  return 77;
+#endif
+}
diff --git a/gnulib-tests/test-nl_langinfo2.sh b/gnulib-tests/test-nl_langinfo2.sh
new file mode 100755
index 00000000..6333c900
--- /dev/null
+++ b/gnulib-tests/test-nl_langinfo2.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# The name of a specific traditional locale.
+: "${LOCALE_FR=fr_FR}"
+
+# The name of a specific UTF-8 locale.
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
+
+# Make them accessible as environment variables.
+export LOCALE_FR LOCALE_FR_UTF8
+
+${CHECKER} ./test-nl_langinfo2${EXEEXT}
diff --git a/gnulib-tests/test-open.c b/gnulib-tests/test-open.c
index 3812bac0..e137cef8 100644
--- a/gnulib-tests/test-open.c
+++ b/gnulib-tests/test-open.c
@@ -1,5 +1,5 @@
 /* Test of opening a file descriptor.
-   Copyright (C) 2007-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007-2023 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
@@ -24,7 +24,6 @@
 SIGNATURE_CHECK (open, int, (char const *, int, ...));
 
 #include <errno.h>
-#include <stdbool.h>
 #include <stdio.h>
 #include <unistd.h>
 
diff --git a/gnulib-tests/test-open.h b/gnulib-tests/test-open.h
index 0da20a17..d3af8215 100644
--- a/gnulib-tests/test-open.h
+++ b/gnulib-tests/test-open.h
@@ -1,5 +1,5 @@
 /* Test of opening a file descriptor.
-   Copyright (C) 2007-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007-2023 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
@@ -16,6 +16,11 @@
 
 /* Written by Bruno Haible <bruno@clisp.org>, 2007.  */
 
+/* Tell GCC not to warn about the specific edge cases tested here.  */
+#if __GNUC__ >= 13
+# pragma GCC diagnostic ignored "-Wanalyzer-fd-leak"
+#endif
+
 /* Make test_open always inline if we're using Fortify, which defines
    __always_inline to do that.  Do nothing otherwise.  This works
    around a glibc bug whereby 'open' cannot be used as a function
diff --git a/gnulib-tests/test-openat-safer.c b/gnulib-tests/test-openat-safer.c
index c5c37992..94dcda68 100644
--- a/gnulib-tests/test-openat-safer.c
+++ b/gnulib-tests/test-openat-safer.c
@@ -1,5 +1,5 @@
 /* Test that openat_safer leave standard fds alone.
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-openat.c b/gnulib-tests/test-openat.c
index 3571fcc3..ff6cd988 100644
--- a/gnulib-tests/test-openat.c
+++ b/gnulib-tests/test-openat.c
@@ -1,5 +1,5 @@
 /* Test that openat works.
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -25,7 +25,6 @@ SIGNATURE_CHECK (openat, int, (int, char const *, int, ...));
 
 #include <errno.h>
 #include <stdarg.h>
-#include <stdbool.h>
 #include <stdio.h>
 #include <unistd.h>
 
diff --git a/gnulib-tests/test-pathmax.c b/gnulib-tests/test-pathmax.c
index 5f1f9cc2..f65b2d85 100644
--- a/gnulib-tests/test-pathmax.c
+++ b/gnulib-tests/test-pathmax.c
@@ -1,5 +1,5 @@
 /* Test of "pathmax.h".
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-perror.c b/gnulib-tests/test-perror.c
index e1ab3d6b..3ef0bc8b 100644
--- a/gnulib-tests/test-perror.c
+++ b/gnulib-tests/test-perror.c
@@ -1,5 +1,5 @@
 /* Test of perror() function.
-   Copyright (C) 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-perror.sh b/gnulib-tests/test-perror.sh
index e776609a..e6244413 100755
--- a/gnulib-tests/test-perror.sh
+++ b/gnulib-tests/test-perror.sh
@@ -1,5 +1,5 @@
 #!/bin/sh
-: ${srcdir=.}
+: "${srcdir=.}"
 . "$srcdir/init.sh"; path_prepend_ .
 
 # Test NULL prefix. Result should not contain a number, except in lines that
diff --git a/gnulib-tests/test-perror2.c b/gnulib-tests/test-perror2.c
index f1eb5110..25390ff5 100644
--- a/gnulib-tests/test-perror2.c
+++ b/gnulib-tests/test-perror2.c
@@ -1,5 +1,5 @@
 /* Test of perror() function.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 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
@@ -22,6 +22,11 @@
 #include <string.h>
 #include <unistd.h>
 
+/* Tell GCC not to warn about myerr being leaked.  */
+#if __GNUC__ >= 13
+# pragma GCC diagnostic ignored "-Wanalyzer-fd-leak"
+#endif
+
 /* This test intentionally parses stderr.  So, we arrange to have fd 10
    (outside the range of interesting fd's during the test) set up to
    duplicate the original stderr.  */
diff --git a/gnulib-tests/test-pipe.c b/gnulib-tests/test-pipe.c
index e0d5bd50..de1dd2ff 100644
--- a/gnulib-tests/test-pipe.c
+++ b/gnulib-tests/test-pipe.c
@@ -1,5 +1,5 @@
 /* Test of pipe.
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 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
@@ -22,7 +22,6 @@
 SIGNATURE_CHECK (pipe, int, (int[2]));
 
 #include <fcntl.h>
-#include <stdbool.h>
 
 #if defined _WIN32 && ! defined __CYGWIN__
 /* Get declarations of the native Windows API functions.  */
diff --git a/gnulib-tests/test-pselect.c b/gnulib-tests/test-pselect.c
index 898578be..a383f1d1 100644
--- a/gnulib-tests/test-pselect.c
+++ b/gnulib-tests/test-pselect.c
@@ -1,5 +1,5 @@
 /* Test of pselect() substitute.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 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
@@ -24,6 +24,7 @@ SIGNATURE_CHECK (pselect, int,
                  (int, fd_set *restrict, fd_set *restrict, fd_set *restrict,
                   struct timespec const *restrict, const sigset_t *restrict));
 
+#define TEST_PORT 12347
 #include "test-select.h"
 
 static int
diff --git a/gnulib-tests/test-pthread-thread.c b/gnulib-tests/test-pthread-thread.c
index 3c08084d..5a5bce56 100644
--- a/gnulib-tests/test-pthread-thread.c
+++ b/gnulib-tests/test-pthread-thread.c
@@ -1,5 +1,5 @@
 /* Test of pthread_create () function.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-pthread.c b/gnulib-tests/test-pthread.c
index 86131d86..0c677621 100644
--- a/gnulib-tests/test-pthread.c
+++ b/gnulib-tests/test-pthread.c
@@ -1,5 +1,5 @@
 /* Test of <pthread.h> substitute.
-   Copyright (C) 2019-2022 Free Software Foundation, Inc.
+   Copyright (C) 2019-2023 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
@@ -20,8 +20,6 @@
 
 #include <pthread.h>
 
-#include "verify.h"
-
 /* Check that the types are all defined.  */
 
 pthread_t t1;
diff --git a/gnulib-tests/test-pthread_sigmask1.c b/gnulib-tests/test-pthread_sigmask1.c
index a7816b5e..b1b6eb5a 100644
--- a/gnulib-tests/test-pthread_sigmask1.c
+++ b/gnulib-tests/test-pthread_sigmask1.c
@@ -1,5 +1,5 @@
 /* Test of pthread_sigmask in a single-threaded program.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 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
@@ -24,6 +24,7 @@
 SIGNATURE_CHECK (pthread_sigmask, int, (int, const sigset_t *, sigset_t *));
 
 #include <errno.h>
+#include <limits.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
@@ -44,9 +45,15 @@ int
 main (int argc, char *argv[])
 {
   sigset_t set;
-  int pid = getpid ();
+  pid_t pid = getpid ();
   char command[80];
 
+  if (LONG_MAX < pid)
+    {
+      fputs ("Skipping test: pid too large\n", stderr);
+      return 77;
+    }
+
   signal (SIGINT, sigint_handler);
 
   sigemptyset (&set);
@@ -59,7 +66,7 @@ main (int argc, char *argv[])
   ASSERT (pthread_sigmask (SIG_BLOCK, &set, NULL) == 0);
 
   /* Request a SIGINT signal from outside.  */
-  sprintf (command, "sh -c 'sleep 1; kill -%d %d' &", SIGINT, pid);
+  sprintf (command, "sh -c 'sleep 1; kill -INT %ld' &", (long) pid);
   ASSERT (system (command) == 0);
 
   /* Wait.  */
diff --git a/gnulib-tests/test-pthread_sigmask2.c b/gnulib-tests/test-pthread_sigmask2.c
index 20349fe0..94f951f3 100644
--- a/gnulib-tests/test-pthread_sigmask2.c
+++ b/gnulib-tests/test-pthread_sigmask2.c
@@ -1,5 +1,5 @@
 /* Test of pthread_sigmask in a multi-threaded program.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-quotearg-simple.c b/gnulib-tests/test-quotearg-simple.c
index b07b7159..896c4bfe 100644
--- a/gnulib-tests/test-quotearg-simple.c
+++ b/gnulib-tests/test-quotearg-simple.c
@@ -1,5 +1,5 @@
 /* Test of quotearg family of functions.
-   Copyright (C) 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 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
@@ -21,7 +21,6 @@
 #include "quotearg.h"
 
 #include <ctype.h>
-#include <stdbool.h>
 #include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
diff --git a/gnulib-tests/test-quotearg.h b/gnulib-tests/test-quotearg.h
index 5fc65e88..4cd27761 100644
--- a/gnulib-tests/test-quotearg.h
+++ b/gnulib-tests/test-quotearg.h
@@ -1,5 +1,5 @@
 /* Test of quotearg family of functions.
-   Copyright (C) 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-raise.c b/gnulib-tests/test-raise.c
index b1a3c8a4..7574b2b4 100644
--- a/gnulib-tests/test-raise.c
+++ b/gnulib-tests/test-raise.c
@@ -1,5 +1,5 @@
 /* Test raising a signal.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-rawmemchr.c b/gnulib-tests/test-rawmemchr.c
index 7f2949a2..c2f6416e 100644
--- a/gnulib-tests/test-rawmemchr.c
+++ b/gnulib-tests/test-rawmemchr.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2008-2022 Free Software Foundation, Inc.
+ * Copyright (C) 2008-2023 Free Software Foundation, Inc.
  * Written by Eric Blake and Bruno Haible
  *
  * This program is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/test-read.c b/gnulib-tests/test-read.c
index cf238e0f..dc7bb3c7 100644
--- a/gnulib-tests/test-read.c
+++ b/gnulib-tests/test-read.c
@@ -1,5 +1,5 @@
 /* Test the read() function.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-realloc-gnu.c b/gnulib-tests/test-realloc-gnu.c
index c3bca67a..28afc628 100644
--- a/gnulib-tests/test-realloc-gnu.c
+++ b/gnulib-tests/test-realloc-gnu.c
@@ -1,5 +1,5 @@
 /* Test of realloc function.
-   Copyright (C) 2010-2022 Free Software Foundation, Inc.
+   Copyright (C) 2010-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-reallocarray.c b/gnulib-tests/test-reallocarray.c
index b830361d..26a366a4 100644
--- a/gnulib-tests/test-reallocarray.c
+++ b/gnulib-tests/test-reallocarray.c
@@ -1,5 +1,5 @@
 /* Test of reallocarray function.
-   Copyright (C) 2010-2022 Free Software Foundation, Inc.
+   Copyright (C) 2010-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-regex.c b/gnulib-tests/test-regex.c
index 22b63904..787ca514 100644
--- a/gnulib-tests/test-regex.c
+++ b/gnulib-tests/test-regex.c
@@ -1,5 +1,5 @@
 /* Test regular expressions
-   Copyright 1996-2001, 2003-2022 Free Software Foundation, Inc.
+   Copyright 1996-2001, 2003-2023 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
@@ -134,31 +134,31 @@ bug_regex11 (void)
     {
       n = regcomp (&re, tests[i].pattern, tests[i].flags);
       if (n != 0)
-	{
-	  char buf[500];
-	  regerror (n, &re, buf, sizeof (buf));
-	  report_error ("%s: regcomp %zd failed: %s", tests[i].pattern, i, buf);
-	  continue;
-	}
+        {
+          char buf[500];
+          regerror (n, &re, buf, sizeof (buf));
+          report_error ("%s: regcomp %zd failed: %s", tests[i].pattern, i, buf);
+          continue;
+        }
 
       if (regexec (&re, tests[i].string, tests[i].nmatch, rm, 0))
-	{
-	  report_error ("%s: regexec %zd failed", tests[i].pattern, i);
-	  regfree (&re);
-	  continue;
-	}
+        {
+          report_error ("%s: regexec %zd failed", tests[i].pattern, i);
+          regfree (&re);
+          continue;
+        }
 
       for (n = 0; n < tests[i].nmatch; ++n)
-	if (rm[n].rm_so != tests[i].rm[n].rm_so
+        if (rm[n].rm_so != tests[i].rm[n].rm_so
               || rm[n].rm_eo != tests[i].rm[n].rm_eo)
-	  {
-	    if (tests[i].rm[n].rm_so == -1 && tests[i].rm[n].rm_eo == -1)
-	      break;
-	    report_error ("%s: regexec %zd match failure rm[%d] %d..%d",
+          {
+            if (tests[i].rm[n].rm_so == -1 && tests[i].rm[n].rm_eo == -1)
+              break;
+            report_error ("%s: regexec %zd match failure rm[%d] %d..%d",
                           tests[i].pattern, i, n,
                           (int) rm[n].rm_so, (int) rm[n].rm_eo);
-	    break;
-	  }
+            break;
+          }
 
       regfree (&re);
     }
diff --git a/gnulib-tests/test-sched.c b/gnulib-tests/test-sched.c
index 1326815b..b379714c 100644
--- a/gnulib-tests/test-sched.c
+++ b/gnulib-tests/test-sched.c
@@ -1,5 +1,5 @@
 /* Test of <sched.h> substitute.
-   Copyright (C) 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-select-fd.c b/gnulib-tests/test-select-fd.c
index 90699867..c99e5bba 100644
--- a/gnulib-tests/test-select-fd.c
+++ b/gnulib-tests/test-select-fd.c
@@ -1,5 +1,5 @@
 /* Test of select() substitute, reading or writing from a given file descriptor.
-   Copyright (C) 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-select-in.sh b/gnulib-tests/test-select-in.sh
index 68176d30..ad86ea25 100755
--- a/gnulib-tests/test-select-in.sh
+++ b/gnulib-tests/test-select-in.sh
@@ -5,7 +5,7 @@
 # of /dev/null.
 
 tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
+trap 'rm -fr $tmpfiles' HUP INT QUIT TERM
 
 tmpfiles="$tmpfiles t-select-in.tmp"
 
diff --git a/gnulib-tests/test-select-out.sh b/gnulib-tests/test-select-out.sh
index dbeace50..cfa5e179 100755
--- a/gnulib-tests/test-select-out.sh
+++ b/gnulib-tests/test-select-out.sh
@@ -2,7 +2,7 @@
 # Test select() on file descriptors opened for writing.
 
 tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
+trap 'rm -fr $tmpfiles' HUP INT QUIT TERM
 
 tmpfiles="$tmpfiles t-select-out.out t-select-out.tmp"
 
diff --git a/gnulib-tests/test-select-stdin.c b/gnulib-tests/test-select-stdin.c
index bf7e82b3..11823910 100644
--- a/gnulib-tests/test-select-stdin.c
+++ b/gnulib-tests/test-select-stdin.c
@@ -1,5 +1,5 @@
 /* Test of select() substitute, reading from stdin.
-   Copyright (C) 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-select.c b/gnulib-tests/test-select.c
index 7cca5517..b4600603 100644
--- a/gnulib-tests/test-select.c
+++ b/gnulib-tests/test-select.c
@@ -1,5 +1,5 @@
 /* Test of select() substitute.
-   Copyright (C) 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -25,6 +25,7 @@
 SIGNATURE_CHECK (select, int, (int, fd_set *, fd_set *, fd_set *,
                                struct timeval *));
 
+#define TEST_PORT 12346
 #include "test-select.h"
 
 int
diff --git a/gnulib-tests/test-select.h b/gnulib-tests/test-select.h
index 5c678416..902e085b 100644
--- a/gnulib-tests/test-select.h
+++ b/gnulib-tests/test-select.h
@@ -1,5 +1,5 @@
 /* Test of select() substitute.
-   Copyright (C) 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 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
@@ -24,7 +24,6 @@
 #include <unistd.h>
 #include <fcntl.h>
 #include <stdlib.h>
-#include <stdbool.h>
 #include <sys/ioctl.h>
 #include <errno.h>
 
@@ -38,8 +37,10 @@
 # include <sys/wait.h>
 #endif
 
-#define TEST_PORT       12345
-
+/* Tell GCC not to warn about the specific edge cases tested here.  */
+#if __GNUC__ >= 13
+# pragma GCC diagnostic ignored "-Wanalyzer-fd-use-without-check"
+#endif
 
 typedef int (*select_fn) (int, fd_set *, fd_set *, fd_set *, struct timeval *);
 
diff --git a/gnulib-tests/test-setenv.c b/gnulib-tests/test-setenv.c
index 2362c2e1..422d9b76 100644
--- a/gnulib-tests/test-setenv.c
+++ b/gnulib-tests/test-setenv.c
@@ -1,5 +1,5 @@
 /* Tests of setenv.
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-setlocale1.c b/gnulib-tests/test-setlocale1.c
index 6e50e657..7376258e 100644
--- a/gnulib-tests/test-setlocale1.c
+++ b/gnulib-tests/test-setlocale1.c
@@ -1,5 +1,5 @@
 /* Test of setting the current locale.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-setlocale1.sh b/gnulib-tests/test-setlocale1.sh
index 53ad09f9..3c187f5d 100755
--- a/gnulib-tests/test-setlocale1.sh
+++ b/gnulib-tests/test-setlocale1.sh
@@ -1,9 +1,9 @@
 #!/bin/sh
 
-: ${LOCALE_FR=fr_FR}
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
-: ${LOCALE_JA=ja_JP}
-: ${LOCALE_ZH_CN=zh_CN.GB18030}
+: "${LOCALE_FR=fr_FR}"
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
+: "${LOCALE_JA=ja_JP}"
+: "${LOCALE_ZH_CN=zh_CN.GB18030}"
 
 if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none \
    && test $LOCALE_JA = none && test $LOCALE_ZH_CN = none; then
diff --git a/gnulib-tests/test-setlocale2.c b/gnulib-tests/test-setlocale2.c
index 905c1939..ae78604f 100644
--- a/gnulib-tests/test-setlocale2.c
+++ b/gnulib-tests/test-setlocale2.c
@@ -1,5 +1,5 @@
 /* Test of setting the current locale.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-setlocale_null-mt-all.c b/gnulib-tests/test-setlocale_null-mt-all.c
index 2739f111..74804066 100644
--- a/gnulib-tests/test-setlocale_null-mt-all.c
+++ b/gnulib-tests/test-setlocale_null-mt-all.c
@@ -1,5 +1,5 @@
 /* Multithread-safety test for setlocale_null_r (LC_ALL, ...).
-   Copyright (C) 2019-2022 Free Software Foundation, Inc.
+   Copyright (C) 2019-2023 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
@@ -166,7 +166,7 @@ Solaris 11.0         OK
 Solaris 11.4         OK
 Solaris OpenIndiana  OK
 Haiku                crash < 1 sec
-Cygwin               crash < 1 sec
+Cygwin < 3.4.6       crash < 1 sec
 mingw                OK
 MSVC                 OK (assuming compiler option /MD !)
 */
diff --git a/gnulib-tests/test-setlocale_null-mt-one.c b/gnulib-tests/test-setlocale_null-mt-one.c
index 9320efd6..4829082a 100644
--- a/gnulib-tests/test-setlocale_null-mt-one.c
+++ b/gnulib-tests/test-setlocale_null-mt-one.c
@@ -1,5 +1,5 @@
 /* Multithread-safety test for setlocale_null_r (LC_xxx, ...).
-   Copyright (C) 2019-2022 Free Software Foundation, Inc.
+   Copyright (C) 2019-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-setlocale_null.c b/gnulib-tests/test-setlocale_null.c
index 9b8a663a..2495964b 100644
--- a/gnulib-tests/test-setlocale_null.c
+++ b/gnulib-tests/test-setlocale_null.c
@@ -1,5 +1,5 @@
 /* Test of setlocale_null_r function.
-   Copyright (C) 2019-2022 Free Software Foundation, Inc.
+   Copyright (C) 2019-2023 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
@@ -27,6 +27,6 @@ static char buf[SETLOCALE_NULL_ALL_MAX];
 int
 main ()
 {
-  /* Check that setlocale_null_r() can be used with $(LIB_SETLOCALE_NULL).  */
+  /* Check that setlocale_null_r() can be used with $(SETLOCALE_NULL_LIB).  */
   return setlocale_null_r (LC_ALL, buf, sizeof (buf)) != 0;
 }
diff --git a/gnulib-tests/test-setsockopt.c b/gnulib-tests/test-setsockopt.c
index 03376848..0543e39c 100644
--- a/gnulib-tests/test-setsockopt.c
+++ b/gnulib-tests/test-setsockopt.c
@@ -1,5 +1,5 @@
 /* Test setsockopt() function.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-signal-h.c b/gnulib-tests/test-signal-h.c
index 06c97274..05ec06c2 100644
--- a/gnulib-tests/test-signal-h.c
+++ b/gnulib-tests/test-signal-h.c
@@ -1,5 +1,5 @@
 /* Test of <signal.h> substitute.
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-sigprocmask.c b/gnulib-tests/test-sigprocmask.c
index 4bab4c1c..b6d0114c 100644
--- a/gnulib-tests/test-sigprocmask.c
+++ b/gnulib-tests/test-sigprocmask.c
@@ -1,5 +1,5 @@
 /* Test of sigprocmask.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 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
@@ -24,6 +24,7 @@
 SIGNATURE_CHECK (sigprocmask, int, (int, const sigset_t *, sigset_t *));
 
 #include <errno.h>
+#include <limits.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
@@ -47,7 +48,7 @@ main (int argc, char *argv[])
   pid_t pid = getpid ();
   char command[80];
 
-  if (sizeof (int) < sizeof pid && 0x7fffffff < pid)
+  if (LONG_MAX < pid)
     {
       fputs ("Skipping test: pid too large\n", stderr);
       return 77;
@@ -66,7 +67,7 @@ main (int argc, char *argv[])
   ASSERT (sigprocmask (SIG_BLOCK, &set, NULL) == 0);
 
   /* Request a SIGINT signal from outside.  */
-  sprintf (command, "sh -c 'sleep 1; kill -%d %d' &", SIGINT, (int) pid);
+  sprintf (command, "sh -c 'sleep 1; kill -INT %ld' &", (long) pid);
   ASSERT (system (command) == 0);
 
   /* Wait.  */
diff --git a/gnulib-tests/test-sigsegv-catch-segv1.c b/gnulib-tests/test-sigsegv-catch-segv1.c
index a682a2ac..55effac6 100644
--- a/gnulib-tests/test-sigsegv-catch-segv1.c
+++ b/gnulib-tests/test-sigsegv-catch-segv1.c
@@ -1,5 +1,5 @@
 /* Test that the handler is called, with the right fault address.
-   Copyright (C) 2002-2022 Free Software Foundation, Inc.
+   Copyright (C) 2002-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-sigsegv-catch-segv2.c b/gnulib-tests/test-sigsegv-catch-segv2.c
index 28cc4ec0..1628f1a0 100644
--- a/gnulib-tests/test-sigsegv-catch-segv2.c
+++ b/gnulib-tests/test-sigsegv-catch-segv2.c
@@ -1,5 +1,5 @@
 /* Test that the handler can be exited multiple times.
-   Copyright (C) 2002-2022 Free Software Foundation, Inc.
+   Copyright (C) 2002-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-sigsegv-catch-stackoverflow1.c b/gnulib-tests/test-sigsegv-catch-stackoverflow1.c
index bb25e2ae..0c4f1d49 100644
--- a/gnulib-tests/test-sigsegv-catch-stackoverflow1.c
+++ b/gnulib-tests/test-sigsegv-catch-stackoverflow1.c
@@ -1,5 +1,5 @@
 /* Test the stack overflow handler.
-   Copyright (C) 2002-2022 Free Software Foundation, Inc.
+   Copyright (C) 2002-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-sigsegv-catch-stackoverflow2.c b/gnulib-tests/test-sigsegv-catch-stackoverflow2.c
index 4cfd58b8..73309386 100644
--- a/gnulib-tests/test-sigsegv-catch-stackoverflow2.c
+++ b/gnulib-tests/test-sigsegv-catch-stackoverflow2.c
@@ -1,5 +1,5 @@
 /* Test that stack overflow and SIGSEGV are correctly distinguished.
-   Copyright (C) 2002-2022 Free Software Foundation, Inc.
+   Copyright (C) 2002-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-sleep.c b/gnulib-tests/test-sleep.c
index 37af3525..391c4905 100644
--- a/gnulib-tests/test-sleep.c
+++ b/gnulib-tests/test-sleep.c
@@ -1,5 +1,5 @@
 /* Test of sleep() function.
-   Copyright (C) 2007-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-snprintf.c b/gnulib-tests/test-snprintf.c
index 526fd299..d106ad65 100644
--- a/gnulib-tests/test-snprintf.c
+++ b/gnulib-tests/test-snprintf.c
@@ -1,5 +1,5 @@
 /* Test of snprintf() function.
-   Copyright (C) 2007-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-sockets.c b/gnulib-tests/test-sockets.c
index 714da6c0..9293b7cd 100644
--- a/gnulib-tests/test-sockets.c
+++ b/gnulib-tests/test-sockets.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2008-2022 Free Software Foundation, Inc.
+ * Copyright (C) 2008-2023 Free Software Foundation, Inc.
  * Written by Simon Josefsson.
  *
  * This program is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/test-stat-time.c b/gnulib-tests/test-stat-time.c
index 7e961f2f..f20f5e2f 100644
--- a/gnulib-tests/test-stat-time.c
+++ b/gnulib-tests/test-stat-time.c
@@ -1,5 +1,5 @@
 /* Test of <stat-time.h>.
-   Copyright (C) 2007-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-stat.c b/gnulib-tests/test-stat.c
index cf0d9687..47fe8942 100644
--- a/gnulib-tests/test-stat.c
+++ b/gnulib-tests/test-stat.c
@@ -1,5 +1,5 @@
 /* Tests of stat.
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -29,7 +29,6 @@ SIGNATURE_CHECK (stat, int, (char const *, struct stat *));
 
 #include <fcntl.h>
 #include <errno.h>
-#include <stdbool.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
diff --git a/gnulib-tests/test-stat.h b/gnulib-tests/test-stat.h
index 82f88970..f2132c2a 100644
--- a/gnulib-tests/test-stat.h
+++ b/gnulib-tests/test-stat.h
@@ -1,5 +1,5 @@
 /* Tests of stat.
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-stdbool.c b/gnulib-tests/test-stdbool.c
index 3574a9e7..a4ff4d4b 100644
--- a/gnulib-tests/test-stdbool.c
+++ b/gnulib-tests/test-stdbool.c
@@ -1,5 +1,5 @@
-/* Test of <stdbool.h> substitute.
-   Copyright (C) 2002-2007, 2009-2022 Free Software Foundation, Inc.
+/* Test bool.
+   Copyright (C) 2002-2007, 2009-2023 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
@@ -33,37 +33,34 @@
 
 #include <config.h>
 
-#include <stdbool.h>
-
-#ifndef bool
- "error: bool is not defined"
-#endif
-#ifndef false
- "error: false is not defined"
+#ifdef TEST_STDBOOL_H
+# include <stdbool.h>
 #endif
+
 #if false
  "error: false is not 0"
 #endif
-#ifndef true
- "error: true is not defined"
-#endif
 #if true != 1
  "error: true is not 1"
 #endif
-#ifndef __bool_true_false_are_defined
- "error: __bool_true_false_are_defined is not defined"
-#endif
 
 /* Several tests cannot be guaranteed with gnulib's <stdbool.h>, at
    least, not for all compilers and compiler options.  */
-#if HAVE_STDBOOL_H || 3 <= __GNUC__ || 4 <= __clang_major__
-struct s { _Bool s: 1; _Bool t; } s;
+#if ((HAVE_C_BOOL || defined __cplusplus \
+      || HAVE_STDBOOL_H || 3 <= __GNUC__ || 4 <= __clang_major__) \
+     && !(defined _MSC_VER || defined __SUNPRO_C))
+# define WORKING_BOOL 1
+#else
+# define WORKING_BOOL 0
+#endif
+
+#if WORKING_BOOL
+struct s { bool s: 1; bool t; } s;
 #endif
 
 char a[true == 1 ? 1 : -1];
 char b[false == 0 ? 1 : -1];
-char c[__bool_true_false_are_defined == 1 ? 1 : -1];
-#if HAVE_STDBOOL_H || 3 <= __GNUC__ || 4 <= __clang_major__ /* See above.  */
+#if WORKING_BOOL
 char d[(bool) 0.5 == true ? 1 : -1];
 # ifdef ADDRESS_CHECK_OKAY /* Avoid gcc warning.  */
 /* C99 may plausibly be interpreted as not requiring support for a cast from
@@ -73,30 +70,30 @@ char d[(bool) 0.5 == true ? 1 : -1];
 bool e = &s;
 #  endif
 # endif
-char f[(_Bool) 0.0 == false ? 1 : -1];
+char f[(bool) 0.0 == false ? 1 : -1];
 #endif
 char g[true];
-char h[sizeof (_Bool)];
-#if HAVE_STDBOOL_H || 3 <= __GNUC__ || 4 <= __clang_major__ /* See above.  */
+char h[sizeof (bool)];
+#if WORKING_BOOL
 char i[sizeof s.t];
 #endif
 enum { j = false, k = true, l = false * true, m = true * 256 };
-_Bool n[m];
+bool n[m];
 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
-char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
+char p[-1 - (bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
 /* Catch a bug in an HP-UX C compiler.  See
    https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
    https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html
  */
-_Bool q = true;
-_Bool *pq = &q;
+bool q = true;
+bool *pq = &q;
 
 int
 main ()
 {
   int error = 0;
 
-#if HAVE_STDBOOL_H || 3 <= __GNUC_ || 4 <= __clang_major___ /* See above.  */
+#if WORKING_BOOL
 # ifdef ADDRESS_CHECK_OKAY /* Avoid gcc warning.  */
   /* A cast from a variable's address to bool is valid in expressions.  */
   {
diff --git a/gnulib-tests/test-stdckdint.c b/gnulib-tests/test-stdckdint.c
new file mode 100644
index 00000000..43d5e809
--- /dev/null
+++ b/gnulib-tests/test-stdckdint.c
@@ -0,0 +1,30 @@
+/* Test <stdckdint.h>.
+   Copyright 2022-2023 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Paul Eggert.  */
+
+/* Tell test-intprops.c to test <stdckdint.h> instead of <intprops.h>.  */
+
+#define TEST_STDCKDINT 1
+
+#define INT_ADD_WRAPV(a, b, r) ckd_add (r, a, b)
+#define INT_SUBTRACT_WRAPV(a, b, r) ckd_sub (r, a, b)
+#define INT_MULTIPLY_WRAPV(a, b, r) ckd_mul (r, a, b)
+
+/* Luckily, test-intprops.c uses INT_NEGATE_OVERFLOW only on INT_MIN.  */
+#define INT_NEGATE_OVERFLOW(a) ((a) < -INT_MAX)
+
+#include "test-intprops.c"
diff --git a/gnulib-tests/test-stddef.c b/gnulib-tests/test-stddef.c
index 9983154e..359fece6 100644
--- a/gnulib-tests/test-stddef.c
+++ b/gnulib-tests/test-stddef.c
@@ -1,5 +1,5 @@
 /* Test of <stddef.h> substitute.
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 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
@@ -19,9 +19,6 @@
 #include <config.h>
 
 #include <stddef.h>
-#include <limits.h>
-#include <stdalign.h>
-#include "verify.h"
 
 /* Check that appropriate types are defined.  */
 wchar_t a = 'c';
@@ -31,7 +28,7 @@ max_align_t x;
 
 /* Check that NULL can be passed through varargs as a pointer type,
    per POSIX 2008.  */
-verify (sizeof NULL == sizeof (void *));
+static_assert (sizeof NULL == sizeof (void *));
 
 /* Check that offsetof produces integer constants with correct type.  */
 struct d
@@ -42,34 +39,60 @@ struct d
 /* Solaris 10 has a bug where offsetof is under-parenthesized, and
    cannot be used as an arbitrary expression.  However, since it is
    unlikely to bite real code, we ignore that short-coming.  */
-/* verify (sizeof offsetof (struct d, e) == sizeof (size_t)); */
-verify (sizeof (offsetof (struct d, e)) == sizeof (size_t));
-verify (offsetof (struct d, f) == 1);
-
-/* offsetof promotes to an unsigned integer if and only if sizes do
-   not fit in int.  */
-verify ((offsetof (struct d, e) < -1) == (INT_MAX < (size_t) -1));
+/* static_assert (sizeof offsetof (struct d, e) == sizeof (size_t)); */
+static_assert (sizeof (offsetof (struct d, e)) == sizeof (size_t));
+static_assert (offsetof (struct d, f) == 1);
 
 /* Check max_align_t's alignment.  */
-verify (alignof (double) <= alignof (max_align_t));
-verify (alignof (int) <= alignof (max_align_t));
-verify (alignof (long double) <= alignof (max_align_t));
-verify (alignof (long int) <= alignof (max_align_t));
-verify (alignof (ptrdiff_t) <= alignof (max_align_t));
-verify (alignof (size_t) <= alignof (max_align_t));
-verify (alignof (wchar_t) <= alignof (max_align_t));
-verify (alignof (struct d) <= alignof (max_align_t));
+static_assert (alignof (double) <= alignof (max_align_t));
+static_assert (alignof (int) <= alignof (max_align_t));
+static_assert (alignof (long double) <= alignof (max_align_t));
+static_assert (alignof (long int) <= alignof (max_align_t));
+static_assert (alignof (ptrdiff_t) <= alignof (max_align_t));
+static_assert (alignof (size_t) <= alignof (max_align_t));
+static_assert (alignof (wchar_t) <= alignof (max_align_t));
+static_assert (alignof (struct d) <= alignof (max_align_t));
 #if defined __GNUC__ || defined __clang__ || defined __IBM__ALIGNOF__
-verify (__alignof__ (double) <= __alignof__ (max_align_t));
-verify (__alignof__ (int) <= __alignof__ (max_align_t));
-verify (__alignof__ (long double) <= __alignof__ (max_align_t));
-verify (__alignof__ (long int) <= __alignof__ (max_align_t));
-verify (__alignof__ (ptrdiff_t) <= __alignof__ (max_align_t));
-verify (__alignof__ (size_t) <= __alignof__ (max_align_t));
-verify (__alignof__ (wchar_t) <= __alignof__ (max_align_t));
-verify (__alignof__ (struct d) <= __alignof__ (max_align_t));
+static_assert (__alignof__ (double) <= __alignof__ (max_align_t));
+static_assert (__alignof__ (int) <= __alignof__ (max_align_t));
+static_assert (__alignof__ (long double) <= __alignof__ (max_align_t));
+static_assert (__alignof__ (long int) <= __alignof__ (max_align_t));
+static_assert (__alignof__ (ptrdiff_t) <= __alignof__ (max_align_t));
+static_assert (__alignof__ (size_t) <= __alignof__ (max_align_t));
+static_assert (__alignof__ (wchar_t) <= __alignof__ (max_align_t));
+static_assert (__alignof__ (struct d) <= __alignof__ (max_align_t));
 #endif
 
+int test_unreachable_optimization (int x);
+_Noreturn void test_unreachable_noreturn (void);
+
+int
+test_unreachable_optimization (int x)
+{
+  /* Check that the compiler uses 'unreachable' for optimization.
+     This function, when compiled with optimization, should have code
+     equivalent to
+       return x + 3;
+     Use 'objdump --disassemble test-stddef.o' to verify this.  */
+  if (x < 4)
+    unreachable ();
+  return (x > 1 ? x + 3 : 2 * x + 10);
+}
+
+_Noreturn void
+test_unreachable_noreturn (void)
+{
+  /* Check that the compiler's data-flow analysis recognizes 'unreachable ()'.
+     This function should not elicit a warning.  */
+  unreachable ();
+}
+
+#include <limits.h> /* INT_MAX */
+
+/* offsetof promotes to an unsigned integer if and only if sizes do
+   not fit in int.  */
+static_assert ((offsetof (struct d, e) < -1) == (INT_MAX < (size_t) -1));
+
 int
 main (void)
 {
diff --git a/gnulib-tests/test-stdint.c b/gnulib-tests/test-stdint.c
index 7d71f687..a34c33f1 100644
--- a/gnulib-tests/test-stdint.c
+++ b/gnulib-tests/test-stdint.c
@@ -1,5 +1,5 @@
 /* Test of <stdint.h> substitute.
-   Copyright (C) 2006-2022 Free Software Foundation, Inc.
+   Copyright (C) 2006-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-stdio.c b/gnulib-tests/test-stdio.c
index 695532ad..9794f4d8 100644
--- a/gnulib-tests/test-stdio.c
+++ b/gnulib-tests/test-stdio.c
@@ -1,5 +1,5 @@
 /* Test of <stdio.h> substitute.
-   Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009-2023 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
@@ -20,14 +20,15 @@
 
 #include <stdio.h>
 
-#include "verify.h"
-
 /* Check that the various SEEK_* macros are defined.  */
 int sk[] = { SEEK_CUR, SEEK_END, SEEK_SET };
 
+/* Check that the _PRINTF_NAN_LEN_MAX macro is defined.  */
+int pnlm[] = { _PRINTF_NAN_LEN_MAX };
+
 /* Check that NULL can be passed through varargs as a pointer type,
    per POSIX 2008.  */
-verify (sizeof NULL == sizeof (void *));
+static_assert (sizeof NULL == sizeof (void *));
 
 /* Check that the types are all defined.  */
 fpos_t t1;
@@ -36,8 +37,37 @@ size_t t3;
 ssize_t t4;
 va_list t5;
 
+#include <string.h>
+
+#include "nan.h"
+#include "macros.h"
+
 int
 main (void)
 {
+#if defined DBL_EXPBIT0_WORD && defined DBL_EXPBIT0_BIT
+  /* Check the value of _PRINTF_NAN_LEN_MAX.  */
+  {
+    #define NWORDS \
+      ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+    typedef union { double value; unsigned int word[NWORDS]; } memory_double;
+
+    double value1;
+    memory_double value2;
+    char buf[64];
+
+    value1 = NaNd();
+    sprintf (buf, "%g", value1);
+    ASSERT (strlen (buf) <= _PRINTF_NAN_LEN_MAX);
+
+    value2.value = NaNd ();
+    #if DBL_EXPBIT0_BIT == 20
+    value2.word[DBL_EXPBIT0_WORD] ^= 0x54321;
+    #endif
+    sprintf (buf, "%g", value2.value);
+    ASSERT (strlen (buf) <= _PRINTF_NAN_LEN_MAX);
+  }
+#endif
+
   return 0;
 }
diff --git a/gnulib-tests/test-stdlib.c b/gnulib-tests/test-stdlib.c
index 4f1b9658..0d398470 100644
--- a/gnulib-tests/test-stdlib.c
+++ b/gnulib-tests/test-stdlib.c
@@ -1,5 +1,5 @@
 /* Test of <stdlib.h> substitute.
-   Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009-2023 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
@@ -20,8 +20,6 @@
 
 #include <stdlib.h>
 
-#include "verify.h"
-
 /* Check that EXIT_SUCCESS is 0, per POSIX.  */
 static int exitcode = EXIT_SUCCESS;
 #if EXIT_SUCCESS
@@ -36,7 +34,7 @@ static int exitcode = EXIT_SUCCESS;
 
 /* Check that NULL can be passed through varargs as a pointer type,
    per POSIX 2008.  */
-verify (sizeof NULL == sizeof (void *));
+static_assert (sizeof NULL == sizeof (void *));
 
 #if GNULIB_TEST_SYSTEM_POSIX
 # include "test-sys_wait.h"
@@ -47,8 +45,19 @@ verify (sizeof NULL == sizeof (void *));
 int
 main (void)
 {
-  if (test_sys_wait_macros ())
+  /* POSIX:2018 says:
+     "In the POSIX locale the value of MB_CUR_MAX shall be 1."  */
+  /* On Android ≥ 5.0, the default locale is the "C.UTF-8" locale, not the
+     "C" locale.  Furthermore, when you attempt to set the "C" or "POSIX"
+     locale via setlocale(), what you get is a "C" locale with UTF-8 encoding,
+     that is, effectively the "C.UTF-8" locale.  */
+#ifndef __ANDROID__
+  if (MB_CUR_MAX != 1)
     return 1;
+#endif
+
+  if (test_sys_wait_macros ())
+    return 2;
 
   return exitcode;
 }
diff --git a/gnulib-tests/test-strerror.c b/gnulib-tests/test-strerror.c
index b9ec040a..d23e982c 100644
--- a/gnulib-tests/test-strerror.c
+++ b/gnulib-tests/test-strerror.c
@@ -1,5 +1,5 @@
 /* Test of strerror() function.
-   Copyright (C) 2007-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007-2023 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-strerror_r.c b/gnulib-tests/test-strerror_r.c
index 916ce3fc..7ad44243 100644
--- a/gnulib-tests/test-strerror_r.c
+++ b/gnulib-tests/test-strerror_r.c
@@ -1,5 +1,5 @@
 /* Test of strerror_r() function.
-   Copyright (C) 2007-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007-2023 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-striconv.c b/gnulib-tests/test-striconv.c
index a0030016..461886eb 100644
--- a/gnulib-tests/test-striconv.c
+++ b/gnulib-tests/test-striconv.c
@@ -1,5 +1,5 @@
 /* Test of character set conversion.
-   Copyright (C) 2007-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-string.c b/gnulib-tests/test-string.c
index 9509a6a5..054d7dd2 100644
--- a/gnulib-tests/test-string.c
+++ b/gnulib-tests/test-string.c
@@ -1,5 +1,5 @@
 /* Test of <string.h> substitute.
-   Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009-2023 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
@@ -20,11 +20,9 @@
 
 #include <string.h>
 
-#include "verify.h"
-
 /* Check that NULL can be passed through varargs as a pointer type,
    per POSIX 2008.  */
-verify (sizeof NULL == sizeof (void *));
+static_assert (sizeof NULL == sizeof (void *));
 
 int
 main (void)
diff --git a/gnulib-tests/test-strnlen.c b/gnulib-tests/test-strnlen.c
index e77fb279..2102d748 100644
--- a/gnulib-tests/test-strnlen.c
+++ b/gnulib-tests/test-strnlen.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010-2022 Free Software Foundation, Inc.
+ * Copyright (C) 2010-2023 Free Software Foundation, Inc.
  * Written by Eric Blake
  *
  * This program is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/test-strstr.c b/gnulib-tests/test-strstr.c
index f59dda67..1ff9953d 100644
--- a/gnulib-tests/test-strstr.c
+++ b/gnulib-tests/test-strstr.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2004, 2007-2022 Free Software Foundation, Inc.
+ * Copyright (C) 2004, 2007-2023 Free Software Foundation, Inc.
  * Written by Bruno Haible and Eric Blake
  *
  * This program is free software: you can redistribute it and/or modify
@@ -275,6 +275,14 @@ main (int argc, char *argv[])
     free (haystack);
   }
 
+  /* Test case from Yves Bastide.
+     <https://www.openwall.com/lists/musl/2014/04/18/2>  */
+  {
+    const char input[] = "playing play play play always";
+    const char *result = strstr (input, "play play play");
+    ASSERT (result == input + 8);
+  }
+
   /* Test long needles.  */
   {
     size_t m = 1024;
diff --git a/gnulib-tests/test-strtoimax.c b/gnulib-tests/test-strtoimax.c
index a6886fe0..7d770b5c 100644
--- a/gnulib-tests/test-strtoimax.c
+++ b/gnulib-tests/test-strtoimax.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011-2022 Free Software Foundation, Inc.
+ * Copyright (C) 2011-2023 Free Software Foundation, Inc.
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-strtoll.c b/gnulib-tests/test-strtoll.c
index 9b7388eb..24cb4eb1 100644
--- a/gnulib-tests/test-strtoll.c
+++ b/gnulib-tests/test-strtoll.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011-2022 Free Software Foundation, Inc.
+ * Copyright (C) 2011-2023 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
@@ -239,5 +239,67 @@ main (void)
     ASSERT (errno == 0);
   }
 
+  /* Binary integer syntax.  */
+  {
+    const char input[] = "0b111010";
+    char *ptr;
+    long long result;
+    errno = 0;
+    result = strtoll (input, &ptr, 10);
+    ASSERT (result == 0LL);
+    ASSERT (ptr == input + 1);
+    ASSERT (errno == 0);
+  }
+  {
+    const char input[] = "0b111010";
+    char *ptr;
+    long long result;
+    errno = 0;
+    result = strtoll (input, &ptr, 2);
+    ASSERT (result == 58LL);
+    ASSERT (ptr == input + 8);
+    ASSERT (errno == 0);
+  }
+  {
+    const char input[] = "0b111010";
+    char *ptr;
+    long long result;
+    errno = 0;
+    result = strtoll (input, &ptr, 0);
+    ASSERT (result == 58LL);
+    ASSERT (ptr == input + 8);
+    ASSERT (errno == 0);
+  }
+  {
+    const char input[] = "0b";
+    char *ptr;
+    long long result;
+    errno = 0;
+    result = strtoll (input, &ptr, 10);
+    ASSERT (result == 0LL);
+    ASSERT (ptr == input + 1);
+    ASSERT (errno == 0);
+  }
+  {
+    const char input[] = "0b";
+    char *ptr;
+    long long result;
+    errno = 0;
+    result = strtoll (input, &ptr, 2);
+    ASSERT (result == 0LL);
+    ASSERT (ptr == input + 1);
+    ASSERT (errno == 0);
+  }
+  {
+    const char input[] = "0b";
+    char *ptr;
+    long long result;
+    errno = 0;
+    result = strtoll (input, &ptr, 0);
+    ASSERT (result == 0LL);
+    ASSERT (ptr == input + 1);
+    ASSERT (errno == 0);
+  }
+
   return 0;
 }
diff --git a/gnulib-tests/test-strtoull.c b/gnulib-tests/test-strtoull.c
index 5859459c..7b0027f6 100644
--- a/gnulib-tests/test-strtoull.c
+++ b/gnulib-tests/test-strtoull.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011-2022 Free Software Foundation, Inc.
+ * Copyright (C) 2011-2023 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
@@ -238,5 +238,67 @@ main (void)
     ASSERT (errno == 0);
   }
 
+  /* Binary integer syntax.  */
+  {
+    const char input[] = "0b111010";
+    char *ptr;
+    unsigned long long result;
+    errno = 0;
+    result = strtoull (input, &ptr, 10);
+    ASSERT (result == 0ULL);
+    ASSERT (ptr == input + 1);
+    ASSERT (errno == 0);
+  }
+  {
+    const char input[] = "0b111010";
+    char *ptr;
+    unsigned long long result;
+    errno = 0;
+    result = strtoull (input, &ptr, 2);
+    ASSERT (result == 58ULL);
+    ASSERT (ptr == input + 8);
+    ASSERT (errno == 0);
+  }
+  {
+    const char input[] = "0b111010";
+    char *ptr;
+    unsigned long long result;
+    errno = 0;
+    result = strtoull (input, &ptr, 0);
+    ASSERT (result == 58ULL);
+    ASSERT (ptr == input + 8);
+    ASSERT (errno == 0);
+  }
+  {
+    const char input[] = "0b";
+    char *ptr;
+    unsigned long long result;
+    errno = 0;
+    result = strtoull (input, &ptr, 10);
+    ASSERT (result == 0ULL);
+    ASSERT (ptr == input + 1);
+    ASSERT (errno == 0);
+  }
+  {
+    const char input[] = "0b";
+    char *ptr;
+    unsigned long long result;
+    errno = 0;
+    result = strtoull (input, &ptr, 2);
+    ASSERT (result == 0ULL);
+    ASSERT (ptr == input + 1);
+    ASSERT (errno == 0);
+  }
+  {
+    const char input[] = "0b";
+    char *ptr;
+    unsigned long long result;
+    errno = 0;
+    result = strtoull (input, &ptr, 0);
+    ASSERT (result == 0ULL);
+    ASSERT (ptr == input + 1);
+    ASSERT (errno == 0);
+  }
+
   return 0;
 }
diff --git a/gnulib-tests/test-strtoumax.c b/gnulib-tests/test-strtoumax.c
index d8cd0d5d..899fb766 100644
--- a/gnulib-tests/test-strtoumax.c
+++ b/gnulib-tests/test-strtoumax.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011-2022 Free Software Foundation, Inc.
+ * Copyright (C) 2011-2023 Free Software Foundation, Inc.
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-symlink.c b/gnulib-tests/test-symlink.c
index 5752f8f8..c3cd8314 100644
--- a/gnulib-tests/test-symlink.c
+++ b/gnulib-tests/test-symlink.c
@@ -1,5 +1,5 @@
 /* Tests of symlink.
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -25,7 +25,6 @@ SIGNATURE_CHECK (symlink, int, (char const *, char const *));
 
 #include <fcntl.h>
 #include <errno.h>
-#include <stdbool.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <sys/stat.h>
diff --git a/gnulib-tests/test-symlink.h b/gnulib-tests/test-symlink.h
index 0ce5ad4a..46a5c77f 100644
--- a/gnulib-tests/test-symlink.h
+++ b/gnulib-tests/test-symlink.h
@@ -1,5 +1,5 @@
 /* Tests of symlink.
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-sys_ioctl.c b/gnulib-tests/test-sys_ioctl.c
index 72c9d49a..dd053d42 100644
--- a/gnulib-tests/test-sys_ioctl.c
+++ b/gnulib-tests/test-sys_ioctl.c
@@ -1,5 +1,5 @@
 /* Test of <sys/ioctl.h> substitute.
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-sys_select.c b/gnulib-tests/test-sys_select.c
index c895fe2b..f8905ce0 100644
--- a/gnulib-tests/test-sys_select.c
+++ b/gnulib-tests/test-sys_select.c
@@ -1,5 +1,5 @@
 /* Test of <sys/select.h> substitute.
-   Copyright (C) 2007-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007-2023 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
@@ -20,6 +20,16 @@
 
 #include <sys/select.h>
 
+/* Check that the 'struct timeval' type is defined.  */
+struct timeval a;
+
+/* Check that a.tv_sec is wide enough to hold a time_t, ignoring
+   signedness issues.  */
+typedef int verify_tv_sec_type[sizeof (time_t) <= sizeof (a.tv_sec) ? 1 : -1];
+
+/* Check that sigset_t is defined.  */
+sigset_t t2;
+
 #include "signature.h"
 
 /* The following may be macros without underlying functions, so only
@@ -37,16 +47,6 @@ SIGNATURE_CHECK (FD_SET, int, (int, fd_set *));
 SIGNATURE_CHECK (FD_ZERO, void, (fd_set *));
 #endif
 
-/* Check that the 'struct timeval' type is defined.  */
-struct timeval a;
-
-/* Check that a.tv_sec is wide enough to hold a time_t, ignoring
-   signedness issues.  */
-typedef int verify_tv_sec_type[sizeof (time_t) <= sizeof (a.tv_sec) ? 1 : -1];
-
-/* Check that sigset_t is defined.  */
-sigset_t t2;
-
 int
 main (void)
 {
diff --git a/gnulib-tests/test-sys_socket.c b/gnulib-tests/test-sys_socket.c
index f230d5b4..02ec6373 100644
--- a/gnulib-tests/test-sys_socket.c
+++ b/gnulib-tests/test-sys_socket.c
@@ -1,5 +1,5 @@
 /* Test of <sys/socket.h> substitute.
-   Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009-2023 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
@@ -20,8 +20,6 @@
 
 #include <sys/socket.h>
 
-#include <errno.h>
-
 #if HAVE_SHUTDOWN
 /* Check some integer constant expressions.  */
 int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };
@@ -40,6 +38,8 @@ struct iovec io;
 /* Check that a minimal set of 'struct msghdr' is defined.  */
 struct msghdr msg;
 
+#include <errno.h>
+
 int
 main (void)
 {
diff --git a/gnulib-tests/test-sys_stat.c b/gnulib-tests/test-sys_stat.c
index 913b17e9..8453fc4a 100644
--- a/gnulib-tests/test-sys_stat.c
+++ b/gnulib-tests/test-sys_stat.c
@@ -1,5 +1,5 @@
 /* Test of <sys/stat.h> substitute.
-   Copyright (C) 2007-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007-2023 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
@@ -20,8 +20,6 @@
 
 #include <sys/stat.h>
 
-#include "verify.h"
-
 /* Check the existence of some macros.  */
 int a[] =
   {
@@ -61,264 +59,264 @@ int a[] =
 
 /* Sanity checks.  */
 
-verify (S_IRWXU == (S_IRUSR | S_IWUSR | S_IXUSR));
-verify (S_IRWXG == (S_IRGRP | S_IWGRP | S_IXGRP));
-verify (S_IRWXO == (S_IROTH | S_IWOTH | S_IXOTH));
+static_assert (S_IRWXU == (S_IRUSR | S_IWUSR | S_IXUSR));
+static_assert (S_IRWXG == (S_IRGRP | S_IWGRP | S_IXGRP));
+static_assert (S_IRWXO == (S_IROTH | S_IWOTH | S_IXOTH));
 
 #ifdef S_IFBLK
-verify (S_ISBLK (S_IFBLK));
+static_assert (S_ISBLK (S_IFBLK));
 #endif
-verify (!S_ISBLK (S_IFCHR));
-verify (!S_ISBLK (S_IFDIR));
-verify (!S_ISBLK (S_IFIFO));
-verify (!S_ISBLK (S_IFREG));
+static_assert (!S_ISBLK (S_IFCHR));
+static_assert (!S_ISBLK (S_IFDIR));
+static_assert (!S_ISBLK (S_IFIFO));
+static_assert (!S_ISBLK (S_IFREG));
 #ifdef S_IFLNK
-verify (!S_ISBLK (S_IFLNK));
+static_assert (!S_ISBLK (S_IFLNK));
 #endif
 #ifdef S_IFSOCK
-verify (!S_ISBLK (S_IFSOCK));
+static_assert (!S_ISBLK (S_IFSOCK));
 #endif
 
 #ifdef S_IFBLK
-verify (!S_ISCHR (S_IFBLK));
+static_assert (!S_ISCHR (S_IFBLK));
 #endif
-verify (S_ISCHR (S_IFCHR));
-verify (!S_ISCHR (S_IFDIR));
-verify (!S_ISCHR (S_IFIFO));
-verify (!S_ISCHR (S_IFREG));
+static_assert (S_ISCHR (S_IFCHR));
+static_assert (!S_ISCHR (S_IFDIR));
+static_assert (!S_ISCHR (S_IFIFO));
+static_assert (!S_ISCHR (S_IFREG));
 #ifdef S_IFLNK
-verify (!S_ISCHR (S_IFLNK));
+static_assert (!S_ISCHR (S_IFLNK));
 #endif
 #ifdef S_IFSOCK
-verify (!S_ISCHR (S_IFSOCK));
+static_assert (!S_ISCHR (S_IFSOCK));
 #endif
 
 #ifdef S_IFBLK
-verify (!S_ISDIR (S_IFBLK));
+static_assert (!S_ISDIR (S_IFBLK));
 #endif
-verify (!S_ISDIR (S_IFCHR));
-verify (S_ISDIR (S_IFDIR));
-verify (!S_ISDIR (S_IFIFO));
-verify (!S_ISDIR (S_IFREG));
+static_assert (!S_ISDIR (S_IFCHR));
+static_assert (S_ISDIR (S_IFDIR));
+static_assert (!S_ISDIR (S_IFIFO));
+static_assert (!S_ISDIR (S_IFREG));
 #ifdef S_IFLNK
-verify (!S_ISDIR (S_IFLNK));
+static_assert (!S_ISDIR (S_IFLNK));
 #endif
 #ifdef S_IFSOCK
-verify (!S_ISDIR (S_IFSOCK));
+static_assert (!S_ISDIR (S_IFSOCK));
 #endif
 
 #ifdef S_IFBLK
-verify (!S_ISFIFO (S_IFBLK));
+static_assert (!S_ISFIFO (S_IFBLK));
 #endif
-verify (!S_ISFIFO (S_IFCHR));
-verify (!S_ISFIFO (S_IFDIR));
-verify (S_ISFIFO (S_IFIFO));
-verify (!S_ISFIFO (S_IFREG));
+static_assert (!S_ISFIFO (S_IFCHR));
+static_assert (!S_ISFIFO (S_IFDIR));
+static_assert (S_ISFIFO (S_IFIFO));
+static_assert (!S_ISFIFO (S_IFREG));
 #ifdef S_IFLNK
-verify (!S_ISFIFO (S_IFLNK));
+static_assert (!S_ISFIFO (S_IFLNK));
 #endif
 #ifdef S_IFSOCK
-verify (!S_ISFIFO (S_IFSOCK));
+static_assert (!S_ISFIFO (S_IFSOCK));
 #endif
 
 #ifdef S_IFBLK
-verify (!S_ISREG (S_IFBLK));
+static_assert (!S_ISREG (S_IFBLK));
 #endif
-verify (!S_ISREG (S_IFCHR));
-verify (!S_ISREG (S_IFDIR));
-verify (!S_ISREG (S_IFIFO));
-verify (S_ISREG (S_IFREG));
+static_assert (!S_ISREG (S_IFCHR));
+static_assert (!S_ISREG (S_IFDIR));
+static_assert (!S_ISREG (S_IFIFO));
+static_assert (S_ISREG (S_IFREG));
 #ifdef S_IFLNK
-verify (!S_ISREG (S_IFLNK));
+static_assert (!S_ISREG (S_IFLNK));
 #endif
 #ifdef S_IFSOCK
-verify (!S_ISREG (S_IFSOCK));
+static_assert (!S_ISREG (S_IFSOCK));
 #endif
 
 #ifdef S_IFBLK
-verify (!S_ISLNK (S_IFBLK));
+static_assert (!S_ISLNK (S_IFBLK));
 #endif
-verify (!S_ISLNK (S_IFCHR));
-verify (!S_ISLNK (S_IFDIR));
-verify (!S_ISLNK (S_IFIFO));
-verify (!S_ISLNK (S_IFREG));
+static_assert (!S_ISLNK (S_IFCHR));
+static_assert (!S_ISLNK (S_IFDIR));
+static_assert (!S_ISLNK (S_IFIFO));
+static_assert (!S_ISLNK (S_IFREG));
 #ifdef S_IFLNK
-verify (S_ISLNK (S_IFLNK));
+static_assert (S_ISLNK (S_IFLNK));
 #endif
 #ifdef S_IFSOCK
-verify (!S_ISLNK (S_IFSOCK));
+static_assert (!S_ISLNK (S_IFSOCK));
 #endif
 
 #ifdef S_IFBLK
-verify (!S_ISSOCK (S_IFBLK));
+static_assert (!S_ISSOCK (S_IFBLK));
 #endif
-verify (!S_ISSOCK (S_IFCHR));
-verify (!S_ISSOCK (S_IFDIR));
-verify (!S_ISSOCK (S_IFIFO));
-verify (!S_ISSOCK (S_IFREG));
+static_assert (!S_ISSOCK (S_IFCHR));
+static_assert (!S_ISSOCK (S_IFDIR));
+static_assert (!S_ISSOCK (S_IFIFO));
+static_assert (!S_ISSOCK (S_IFREG));
 #ifdef S_IFLNK
-verify (!S_ISSOCK (S_IFLNK));
+static_assert (!S_ISSOCK (S_IFLNK));
 #endif
 #ifdef S_IFSOCK
-verify (S_ISSOCK (S_IFSOCK));
+static_assert (S_ISSOCK (S_IFSOCK));
 #endif
 
 #ifdef S_IFBLK
-verify (!S_ISDOOR (S_IFBLK));
+static_assert (!S_ISDOOR (S_IFBLK));
 #endif
-verify (!S_ISDOOR (S_IFCHR));
-verify (!S_ISDOOR (S_IFDIR));
-verify (!S_ISDOOR (S_IFIFO));
-verify (!S_ISDOOR (S_IFREG));
+static_assert (!S_ISDOOR (S_IFCHR));
+static_assert (!S_ISDOOR (S_IFDIR));
+static_assert (!S_ISDOOR (S_IFIFO));
+static_assert (!S_ISDOOR (S_IFREG));
 #ifdef S_IFLNK
-verify (!S_ISDOOR (S_IFLNK));
+static_assert (!S_ISDOOR (S_IFLNK));
 #endif
 #ifdef S_IFSOCK
-verify (!S_ISDOOR (S_IFSOCK));
+static_assert (!S_ISDOOR (S_IFSOCK));
 #endif
 
 #ifdef S_IFBLK
-verify (!S_ISMPB (S_IFBLK));
+static_assert (!S_ISMPB (S_IFBLK));
 #endif
-verify (!S_ISMPB (S_IFCHR));
-verify (!S_ISMPB (S_IFDIR));
-verify (!S_ISMPB (S_IFIFO));
-verify (!S_ISMPB (S_IFREG));
+static_assert (!S_ISMPB (S_IFCHR));
+static_assert (!S_ISMPB (S_IFDIR));
+static_assert (!S_ISMPB (S_IFIFO));
+static_assert (!S_ISMPB (S_IFREG));
 #ifdef S_IFLNK
-verify (!S_ISMPB (S_IFLNK));
+static_assert (!S_ISMPB (S_IFLNK));
 #endif
 #ifdef S_IFSOCK
-verify (!S_ISMPB (S_IFSOCK));
+static_assert (!S_ISMPB (S_IFSOCK));
 #endif
 
 #ifdef S_IFBLK
-verify (!S_ISMPX (S_IFBLK));
+static_assert (!S_ISMPX (S_IFBLK));
 #endif
-verify (!S_ISMPX (S_IFCHR));
-verify (!S_ISMPX (S_IFDIR));
-verify (!S_ISMPX (S_IFIFO));
-verify (!S_ISMPX (S_IFREG));
+static_assert (!S_ISMPX (S_IFCHR));
+static_assert (!S_ISMPX (S_IFDIR));
+static_assert (!S_ISMPX (S_IFIFO));
+static_assert (!S_ISMPX (S_IFREG));
 #ifdef S_IFLNK
-verify (!S_ISMPX (S_IFLNK));
+static_assert (!S_ISMPX (S_IFLNK));
 #endif
 #ifdef S_IFSOCK
-verify (!S_ISMPX (S_IFSOCK));
+static_assert (!S_ISMPX (S_IFSOCK));
 #endif
 
 #ifdef S_IFBLK
-verify (!S_ISNAM (S_IFBLK));
+static_assert (!S_ISNAM (S_IFBLK));
 #endif
-verify (!S_ISNAM (S_IFCHR));
-verify (!S_ISNAM (S_IFDIR));
-verify (!S_ISNAM (S_IFIFO));
-verify (!S_ISNAM (S_IFREG));
+static_assert (!S_ISNAM (S_IFCHR));
+static_assert (!S_ISNAM (S_IFDIR));
+static_assert (!S_ISNAM (S_IFIFO));
+static_assert (!S_ISNAM (S_IFREG));
 #ifdef S_IFLNK
-verify (!S_ISNAM (S_IFLNK));
+static_assert (!S_ISNAM (S_IFLNK));
 #endif
 #ifdef S_IFSOCK
-verify (!S_ISNAM (S_IFSOCK));
+static_assert (!S_ISNAM (S_IFSOCK));
 #endif
 
 #ifdef S_IFBLK
-verify (!S_ISNWK (S_IFBLK));
+static_assert (!S_ISNWK (S_IFBLK));
 #endif
-verify (!S_ISNWK (S_IFCHR));
-verify (!S_ISNWK (S_IFDIR));
-verify (!S_ISNWK (S_IFIFO));
-verify (!S_ISNWK (S_IFREG));
+static_assert (!S_ISNWK (S_IFCHR));
+static_assert (!S_ISNWK (S_IFDIR));
+static_assert (!S_ISNWK (S_IFIFO));
+static_assert (!S_ISNWK (S_IFREG));
 #ifdef S_IFLNK
-verify (!S_ISNWK (S_IFLNK));
+static_assert (!S_ISNWK (S_IFLNK));
 #endif
 #ifdef S_IFSOCK
-verify (!S_ISNWK (S_IFSOCK));
+static_assert (!S_ISNWK (S_IFSOCK));
 #endif
 
 #ifdef S_IFBLK
-verify (!S_ISPORT (S_IFBLK));
+static_assert (!S_ISPORT (S_IFBLK));
 #endif
-verify (!S_ISPORT (S_IFCHR));
-verify (!S_ISPORT (S_IFDIR));
-verify (!S_ISPORT (S_IFIFO));
-verify (!S_ISPORT (S_IFREG));
+static_assert (!S_ISPORT (S_IFCHR));
+static_assert (!S_ISPORT (S_IFDIR));
+static_assert (!S_ISPORT (S_IFIFO));
+static_assert (!S_ISPORT (S_IFREG));
 #ifdef S_IFLNK
-verify (!S_ISPORT (S_IFLNK));
+static_assert (!S_ISPORT (S_IFLNK));
 #endif
 #ifdef S_IFSOCK
-verify (!S_ISPORT (S_IFSOCK));
+static_assert (!S_ISPORT (S_IFSOCK));
 #endif
 
 #ifdef S_IFBLK
-verify (!S_ISCTG (S_IFBLK));
+static_assert (!S_ISCTG (S_IFBLK));
 #endif
-verify (!S_ISCTG (S_IFCHR));
-verify (!S_ISCTG (S_IFDIR));
-verify (!S_ISCTG (S_IFIFO));
-verify (!S_ISCTG (S_IFREG));
+static_assert (!S_ISCTG (S_IFCHR));
+static_assert (!S_ISCTG (S_IFDIR));
+static_assert (!S_ISCTG (S_IFIFO));
+static_assert (!S_ISCTG (S_IFREG));
 #ifdef S_IFLNK
-verify (!S_ISCTG (S_IFLNK));
+static_assert (!S_ISCTG (S_IFLNK));
 #endif
 #ifdef S_IFSOCK
-verify (!S_ISCTG (S_IFSOCK));
+static_assert (!S_ISCTG (S_IFSOCK));
 #endif
 
 #ifdef S_IFBLK
-verify (!S_ISOFD (S_IFBLK));
+static_assert (!S_ISOFD (S_IFBLK));
 #endif
-verify (!S_ISOFD (S_IFCHR));
-verify (!S_ISOFD (S_IFDIR));
-verify (!S_ISOFD (S_IFIFO));
-verify (!S_ISOFD (S_IFREG));
+static_assert (!S_ISOFD (S_IFCHR));
+static_assert (!S_ISOFD (S_IFDIR));
+static_assert (!S_ISOFD (S_IFIFO));
+static_assert (!S_ISOFD (S_IFREG));
 #ifdef S_IFLNK
-verify (!S_ISOFD (S_IFLNK));
+static_assert (!S_ISOFD (S_IFLNK));
 #endif
 #ifdef S_IFSOCK
-verify (!S_ISOFD (S_IFSOCK));
+static_assert (!S_ISOFD (S_IFSOCK));
 #endif
 
 #ifdef S_IFBLK
-verify (!S_ISOFL (S_IFBLK));
+static_assert (!S_ISOFL (S_IFBLK));
 #endif
-verify (!S_ISOFL (S_IFCHR));
-verify (!S_ISOFL (S_IFDIR));
-verify (!S_ISOFL (S_IFIFO));
-verify (!S_ISOFL (S_IFREG));
+static_assert (!S_ISOFL (S_IFCHR));
+static_assert (!S_ISOFL (S_IFDIR));
+static_assert (!S_ISOFL (S_IFIFO));
+static_assert (!S_ISOFL (S_IFREG));
 #ifdef S_IFLNK
-verify (!S_ISOFL (S_IFLNK));
+static_assert (!S_ISOFL (S_IFLNK));
 #endif
 #ifdef S_IFSOCK
-verify (!S_ISOFL (S_IFSOCK));
+static_assert (!S_ISOFL (S_IFSOCK));
 #endif
 
 #ifdef S_IFBLK
-verify (!S_ISWHT (S_IFBLK));
+static_assert (!S_ISWHT (S_IFBLK));
 #endif
-verify (!S_ISWHT (S_IFCHR));
-verify (!S_ISWHT (S_IFDIR));
-verify (!S_ISWHT (S_IFIFO));
-verify (!S_ISWHT (S_IFREG));
+static_assert (!S_ISWHT (S_IFCHR));
+static_assert (!S_ISWHT (S_IFDIR));
+static_assert (!S_ISWHT (S_IFIFO));
+static_assert (!S_ISWHT (S_IFREG));
 #ifdef S_IFLNK
-verify (!S_ISWHT (S_IFLNK));
+static_assert (!S_ISWHT (S_IFLNK));
 #endif
 #ifdef S_IFSOCK
-verify (!S_ISWHT (S_IFSOCK));
+static_assert (!S_ISWHT (S_IFSOCK));
 #endif
 
 /* POSIX 2008 requires traditional encoding of permission constants.  */
-verify (S_IRWXU == 00700);
-verify (S_IRUSR == 00400);
-verify (S_IWUSR == 00200);
-verify (S_IXUSR == 00100);
-verify (S_IRWXG == 00070);
-verify (S_IRGRP == 00040);
-verify (S_IWGRP == 00020);
-verify (S_IXGRP == 00010);
-verify (S_IRWXO == 00007);
-verify (S_IROTH == 00004);
-verify (S_IWOTH == 00002);
-verify (S_IXOTH == 00001);
-verify (S_ISUID == 04000);
-verify (S_ISGID == 02000);
-verify (S_ISVTX == 01000);
+static_assert (S_IRWXU == 00700);
+static_assert (S_IRUSR == 00400);
+static_assert (S_IWUSR == 00200);
+static_assert (S_IXUSR == 00100);
+static_assert (S_IRWXG == 00070);
+static_assert (S_IRGRP == 00040);
+static_assert (S_IWGRP == 00020);
+static_assert (S_IXGRP == 00010);
+static_assert (S_IRWXO == 00007);
+static_assert (S_IROTH == 00004);
+static_assert (S_IWOTH == 00002);
+static_assert (S_IXOTH == 00001);
+static_assert (S_ISUID == 04000);
+static_assert (S_ISGID == 02000);
+static_assert (S_ISVTX == 01000);
 
 #if ((0 <= UTIME_NOW && UTIME_NOW < 1000000000)           \
      || (0 <= UTIME_OMIT && UTIME_OMIT < 1000000000)      \
diff --git a/gnulib-tests/test-sys_time.c b/gnulib-tests/test-sys_time.c
index b952243e..f0df8b8d 100644
--- a/gnulib-tests/test-sys_time.c
+++ b/gnulib-tests/test-sys_time.c
@@ -1,5 +1,5 @@
 /* Test of <sys/time.h> substitute.
-   Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-sys_types.c b/gnulib-tests/test-sys_types.c
index 290bd0d5..f9f2bb70 100644
--- a/gnulib-tests/test-sys_types.c
+++ b/gnulib-tests/test-sys_types.c
@@ -1,5 +1,5 @@
 /* Test of <sys/types.h> substitute.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-sys_uio.c b/gnulib-tests/test-sys_uio.c
index f4f7b7ac..3ecd170d 100644
--- a/gnulib-tests/test-sys_uio.c
+++ b/gnulib-tests/test-sys_uio.c
@@ -1,5 +1,5 @@
 /* Test of <sys/uio.h> substitute.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-sys_wait.h b/gnulib-tests/test-sys_wait.h
index 9becf28e..376a3155 100644
--- a/gnulib-tests/test-sys_wait.h
+++ b/gnulib-tests/test-sys_wait.h
@@ -1,5 +1,5 @@
 /* Test of macros shared between <sys/wait.h> and <stdlib.h>.
-   Copyright (C) 2010-2022 Free Software Foundation, Inc.
+   Copyright (C) 2010-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-thread_create.c b/gnulib-tests/test-thread_create.c
index 17e6942b..9312d8e9 100644
--- a/gnulib-tests/test-thread_create.c
+++ b/gnulib-tests/test-thread_create.c
@@ -1,5 +1,5 @@
 /* Test of gl_thread_create () macro.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-thread_self.c b/gnulib-tests/test-thread_self.c
index 30d46380..30736050 100644
--- a/gnulib-tests/test-thread_self.c
+++ b/gnulib-tests/test-thread_self.c
@@ -1,5 +1,5 @@
 /* Test of gl_thread_self () macro.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-time-h.c b/gnulib-tests/test-time-h.c
new file mode 100644
index 00000000..2240705b
--- /dev/null
+++ b/gnulib-tests/test-time-h.c
@@ -0,0 +1,43 @@
+/* Test of <time.h> substitute.
+   Copyright (C) 2007, 2009-2023 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007.  */
+
+#include <config.h>
+
+#include <time.h>
+
+/* Check that the types are all defined.  */
+struct timespec t1;
+#if 0
+/* POSIX:2008 does not require pid_t in <time.h> unconditionally, and indeed
+   it's missing on Mac OS X 10.5, FreeBSD 6.4, OpenBSD 4.9, mingw.  */
+pid_t t2;
+#endif
+
+/* Check that NULL can be passed through varargs as a pointer type,
+   per POSIX 2008.  */
+static_assert (sizeof NULL == sizeof (void *));
+
+/* Check that TIME_UTC is defined and a positive integer.  */
+int t3 = TIME_UTC;
+static_assert (TIME_UTC > 0);
+
+int
+main (void)
+{
+  return 0;
+}
diff --git a/gnulib-tests/test-time.c b/gnulib-tests/test-time.c
index 3c00a4ef..3986ee2f 100644
--- a/gnulib-tests/test-time.c
+++ b/gnulib-tests/test-time.c
@@ -1,5 +1,5 @@
-/* Test of <time.h> substitute.
-   Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
+/* Test of time() function.
+   Copyright (C) 2023 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
@@ -14,32 +14,36 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
-/* Written by Bruno Haible <bruno@clisp.org>, 2007.  */
+/* Written by Bruno Haible.  */
 
 #include <config.h>
 
 #include <time.h>
 
-#include "verify.h"
+#include "signature.h"
+SIGNATURE_CHECK (time, time_t, (time_t *));
 
-/* Check that the types are all defined.  */
-struct timespec t1;
-#if 0
-/* POSIX:2008 does not require pid_t in <time.h> unconditionally, and indeed
-   it's missing on Mac OS X 10.5, FreeBSD 6.4, OpenBSD 4.9, mingw.  */
-pid_t t2;
-#endif
+#include <sys/time.h>
 
-/* Check that NULL can be passed through varargs as a pointer type,
-   per POSIX 2008.  */
-verify (sizeof NULL == sizeof (void *));
-
-/* Check that TIME_UTC is defined and a positive integer.  */
-int t3 = TIME_UTC;
-verify (TIME_UTC > 0);
+#include "macros.h"
 
 int
 main (void)
 {
+  /* Check consistency of time() with gettimeofday().tv_sec.  */
+  struct timeval tv1;
+  struct timeval tv2;
+  time_t tt3;
+
+  /* Wait until gettimeofday() reports an increase in tv_sec.  */
+  ASSERT (gettimeofday (&tv1, NULL) == 0);
+  do
+    ASSERT (gettimeofday (&tv2, NULL) == 0);
+  while (tv2.tv_sec == tv1.tv_sec);
+  /* We are now at the beginning of a second.  Test whether time() reports
+     the new second or the previous one.  */
+  tt3 = time (NULL);
+  ASSERT (tt3 >= tv2.tv_sec);
+
   return 0;
 }
diff --git a/gnulib-tests/test-trim.c b/gnulib-tests/test-trim.c
new file mode 100644
index 00000000..e2f5043e
--- /dev/null
+++ b/gnulib-tests/test-trim.c
@@ -0,0 +1,158 @@
+/* Tests of removing leading and/or trailing whitespaces.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2023.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include "trim.h"
+
+#include <locale.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "macros.h"
+
+static void
+test_ascii (void)
+{
+  {
+    char *result = trim ("");
+    ASSERT (strcmp (result, "") == 0);
+    free (result);
+    result = trim_leading ("");
+    ASSERT (strcmp (result, "") == 0);
+    free (result);
+    result = trim_trailing ("");
+    ASSERT (strcmp (result, "") == 0);
+    free (result);
+  }
+
+  {
+    char *result = trim ("  ");
+    ASSERT (strcmp (result, "") == 0);
+    free (result);
+    result = trim_leading ("  ");
+    ASSERT (strcmp (result, "") == 0);
+    free (result);
+    result = trim_trailing ("  ");
+    ASSERT (strcmp (result, "") == 0);
+    free (result);
+  }
+
+  {
+    char *result = trim ("Hello world");
+    ASSERT (strcmp (result, "Hello world") == 0);
+    free (result);
+    result = trim_leading ("Hello world");
+    ASSERT (strcmp (result, "Hello world") == 0);
+    free (result);
+    result = trim_trailing ("Hello world");
+    ASSERT (strcmp (result, "Hello world") == 0);
+    free (result);
+  }
+
+  {
+    char *result = trim ("   Hello world");
+    ASSERT (strcmp (result, "Hello world") == 0);
+    free (result);
+    result = trim_leading ("   Hello world");
+    ASSERT (strcmp (result, "Hello world") == 0);
+    free (result);
+    result = trim_trailing ("   Hello world");
+    ASSERT (strcmp (result, "   Hello world") == 0);
+    free (result);
+  }
+
+  {
+    char *result = trim ("Hello world  ");
+    ASSERT (strcmp (result, "Hello world") == 0);
+    free (result);
+    result = trim_leading ("Hello world  ");
+    ASSERT (strcmp (result, "Hello world  ") == 0);
+    free (result);
+    result = trim_trailing ("Hello world  ");
+    ASSERT (strcmp (result, "Hello world") == 0);
+    free (result);
+  }
+
+  {
+    char *result = trim ("   Hello world  ");
+    ASSERT (strcmp (result, "Hello world") == 0);
+    free (result);
+    result = trim_leading ("   Hello world  ");
+    ASSERT (strcmp (result, "Hello world  ") == 0);
+    free (result);
+    result = trim_trailing ("   Hello world  ");
+    ASSERT (strcmp (result, "   Hello world") == 0);
+    free (result);
+  }
+}
+
+int
+main (int argc, char *argv[])
+{
+  /* configure should already have checked that the locale is supported.  */
+  if (setlocale (LC_ALL, "") == NULL)
+    return 1;
+
+  /* Test ASCII arguments.  */
+  test_ascii ();
+
+  if (argc > 1)
+    switch (argv[1][0])
+      {
+      case '1':
+        /* C or POSIX locale.  */
+        return 0;
+
+      case '2':
+        /* Locale encoding is UTF-8.  */
+        { /* U+2002 EN SPACE */
+          char *result = trim ("\342\200\202\302\267foo\342\200\202");
+          ASSERT (strcmp (result, "\302\267foo") == 0);
+          free (result);
+        }
+        { /* U+3000 IDEOGRAPHIC SPACE */
+          char *result = trim ("\343\200\200\302\267foo\343\200\200");
+          ASSERT (strcmp (result, "\302\267foo") == 0);
+          free (result);
+        }
+        return 0;
+
+      case '3':
+        /* Locale encoding is GB18030.  */
+        #if !(defined __FreeBSD__ || defined __DragonFly__ || defined __sun)
+        { /* U+2002 EN SPACE */
+          char *result = trim ("\201\066\243\070\241\244foo\201\066\243\070");
+          ASSERT (strcmp (result, "\241\244foo") == 0);
+          free (result);
+        }
+        #endif
+        #if !(defined __FreeBSD__ || defined __DragonFly__)
+        { /* U+3000 IDEOGRAPHIC SPACE */
+          char *result = trim ("\241\241\241\244foo\241\241");
+          ASSERT (strcmp (result, "\241\244foo") == 0);
+          free (result);
+        }
+        #endif
+        return 0;
+      }
+
+  return 1;
+}
diff --git a/gnulib-tests/test-trim1.sh b/gnulib-tests/test-trim1.sh
new file mode 100755
index 00000000..7d6ffe0a
--- /dev/null
+++ b/gnulib-tests/test-trim1.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+# Test in the "C" or "POSIX" locale.
+LC_ALL=C \
+${CHECKER} ./test-trim${EXEEXT} 1
diff --git a/gnulib-tests/test-trim2.sh b/gnulib-tests/test-trim2.sh
new file mode 100755
index 00000000..1c14bd5d
--- /dev/null
+++ b/gnulib-tests/test-trim2.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Test whether a specific UTF-8 locale is installed.
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
+if test $LOCALE_FR_UTF8 = none; then
+  if test -f /usr/bin/localedef; then
+    echo "Skipping test: no french Unicode locale is installed"
+  else
+    echo "Skipping test: no french Unicode locale is supported"
+  fi
+  exit 77
+fi
+
+LC_ALL=$LOCALE_FR_UTF8 \
+${CHECKER} ./test-trim${EXEEXT} 2
diff --git a/gnulib-tests/test-trim3.sh b/gnulib-tests/test-trim3.sh
new file mode 100755
index 00000000..1da4307a
--- /dev/null
+++ b/gnulib-tests/test-trim3.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Test whether a specific GB18030 locale is installed.
+: "${LOCALE_ZH_CN=zh_CN.GB18030}"
+if test $LOCALE_ZH_CN = none; then
+  if test -f /usr/bin/localedef; then
+    echo "Skipping test: no transitional chinese locale is installed"
+  else
+    echo "Skipping test: no transitional chinese locale is supported"
+  fi
+  exit 77
+fi
+
+LC_ALL=$LOCALE_ZH_CN \
+${CHECKER} ./test-trim${EXEEXT} 3
diff --git a/gnulib-tests/test-unistd.c b/gnulib-tests/test-unistd.c
index 2c04b286..08c58324 100644
--- a/gnulib-tests/test-unistd.c
+++ b/gnulib-tests/test-unistd.c
@@ -1,5 +1,5 @@
 /* Test of <unistd.h> substitute.
-   Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009-2023 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
@@ -20,11 +20,9 @@
 
 #include <unistd.h>
 
-#include "verify.h"
-
 /* Check that NULL can be passed through varargs as a pointer type,
    per POSIX 2008.  */
-verify (sizeof NULL == sizeof (void *));
+static_assert (sizeof NULL == sizeof (void *));
 
 /* Check that the various SEEK_* macros are defined.  */
 int sk[] = { SEEK_CUR, SEEK_END, SEEK_SET };
diff --git a/gnulib-tests/test-unsetenv.c b/gnulib-tests/test-unsetenv.c
index 61dbc81a..d8e5b011 100644
--- a/gnulib-tests/test-unsetenv.c
+++ b/gnulib-tests/test-unsetenv.c
@@ -1,5 +1,5 @@
 /* Tests of unsetenv.
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -32,7 +32,8 @@ SIGNATURE_CHECK (unsetenv, int, (char const *));
 int
 main (void)
 {
-  char entry[] = "b=2";
+  /* Static to pacify gcc -Wanalyzer-putenv-of-auto-var.  */
+  static char entry[] = "b=2";
 
   /* Test removal when multiple entries present.  */
   ASSERT (putenv ((char *) "a=1") == 0);
diff --git a/gnulib-tests/test-vasnprintf.c b/gnulib-tests/test-vasnprintf.c
index d73a0f6d..635654bb 100644
--- a/gnulib-tests/test-vasnprintf.c
+++ b/gnulib-tests/test-vasnprintf.c
@@ -1,5 +1,5 @@
 /* Test of vasnprintf() and asnprintf() functions.
-   Copyright (C) 2007-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-vc-list-files-cvs.sh b/gnulib-tests/test-vc-list-files-cvs.sh
index 38c74a66..40723fac 100755
--- a/gnulib-tests/test-vc-list-files-cvs.sh
+++ b/gnulib-tests/test-vc-list-files-cvs.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 # Unit tests for vc-list-files
-# Copyright (C) 2008-2022 Free Software Foundation, Inc.
+# Copyright (C) 2008-2023 Free Software Foundation, Inc.
 # This file is part of the GNUlib Library.
 #
 # This program is free software: you can redistribute it and/or modify
@@ -16,7 +16,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
-: ${srcdir=.}
+: "${srcdir=.}"
 . "$srcdir/init.sh"; path_prepend_ .
 
 tmpdir=vc-cvs
diff --git a/gnulib-tests/test-vc-list-files-git.sh b/gnulib-tests/test-vc-list-files-git.sh
index 7c4da79e..ab108008 100755
--- a/gnulib-tests/test-vc-list-files-git.sh
+++ b/gnulib-tests/test-vc-list-files-git.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 # Unit tests for vc-list-files
-# Copyright (C) 2008-2022 Free Software Foundation, Inc.
+# Copyright (C) 2008-2023 Free Software Foundation, Inc.
 # This file is part of the GNUlib Library.
 #
 # This program is free software: you can redistribute it and/or modify
@@ -16,12 +16,19 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
-: ${srcdir=.}
+: "${srcdir=.}"
 . "$srcdir/init.sh"; path_prepend_ .
 
 tmpdir=vc-git-$$
 GIT_DIR= GIT_WORK_TREE=; unset GIT_DIR GIT_WORK_TREE
 
+# Ignore local git configurations that may interact badly with
+# commands below.  For example, if the user has set
+# commit.gpgsign=true in ~/.gitconfig the 'git commit' below will
+# require a OpenPGP private key operation which trigger PIN prompts
+# and unwanted hardware access on the developer's machine.
+GIT_CONFIG_GLOBAL=/dev/null; export GIT_CONFIG_GLOBAL
+
 fail=1
 mkdir $tmpdir && cd $tmpdir &&
   # without git, skip the test
diff --git a/gnulib-tests/test-verify-try.c b/gnulib-tests/test-verify-try.c
index 2456133d..ed7a1c39 100644
--- a/gnulib-tests/test-verify-try.c
+++ b/gnulib-tests/test-verify-try.c
@@ -1,6 +1,6 @@
 /* Test the "verify" module.
 
-   Copyright (C) 2017-2022 Free Software Foundation, Inc.
+   Copyright (C) 2017-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-verify.c b/gnulib-tests/test-verify.c
index 4ba89c03..e581a107 100644
--- a/gnulib-tests/test-verify.c
+++ b/gnulib-tests/test-verify.c
@@ -1,6 +1,6 @@
 /* Test the "verify" module.
 
-   Copyright (C) 2005, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-version-etc.c b/gnulib-tests/test-version-etc.c
index dc89c217..c81f228b 100644
--- a/gnulib-tests/test-version-etc.c
+++ b/gnulib-tests/test-version-etc.c
@@ -1,5 +1,5 @@
 /* Test suite for version-etc.
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 Free Software Foundation, Inc.
    This file is part of the GNUlib Library.
 
    This program is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/test-version-etc.sh b/gnulib-tests/test-version-etc.sh
index f339d69d..11dcc288 100755
--- a/gnulib-tests/test-version-etc.sh
+++ b/gnulib-tests/test-version-etc.sh
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Test suite for version-etc.
-# Copyright (C) 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2009-2023 Free Software Foundation, Inc.
 # This file is part of the GNUlib Library.
 #
 # This program is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/test-wchar.c b/gnulib-tests/test-wchar.c
index 97c3bfb3..4b8d5370 100644
--- a/gnulib-tests/test-wchar.c
+++ b/gnulib-tests/test-wchar.c
@@ -1,5 +1,5 @@
 /* Test of <wchar.h> substitute.
-   Copyright (C) 2007-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007-2023 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
@@ -20,15 +20,13 @@
 
 #include <wchar.h>
 
-#include "verify.h"
-
 /* Check that the types wchar_t and wint_t are defined.  */
 wchar_t a = 'c';
 wint_t b = 'x';
 
 /* Check that NULL can be passed through varargs as a pointer type,
    per POSIX 2008.  */
-verify (sizeof NULL == sizeof (void *));
+static_assert (sizeof NULL == sizeof (void *));
 
 int
 main (void)
diff --git a/gnulib-tests/test-wcrtomb-w32.c b/gnulib-tests/test-wcrtomb-w32.c
index 67fa5a31..4e75fe0e 100644
--- a/gnulib-tests/test-wcrtomb-w32.c
+++ b/gnulib-tests/test-wcrtomb-w32.c
@@ -1,5 +1,5 @@
 /* Test of conversion of wide character to multibyte character.
-   Copyright (C) 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-wcrtomb.c b/gnulib-tests/test-wcrtomb.c
index 71d0faf3..6ec07508 100644
--- a/gnulib-tests/test-wcrtomb.c
+++ b/gnulib-tests/test-wcrtomb.c
@@ -1,5 +1,5 @@
 /* Test of conversion of wide character to multibyte character.
-   Copyright (C) 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-wcrtomb.sh b/gnulib-tests/test-wcrtomb.sh
index 1a31b6ee..01d8d53b 100755
--- a/gnulib-tests/test-wcrtomb.sh
+++ b/gnulib-tests/test-wcrtomb.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test in an ISO-8859-1 or ISO-8859-15 locale.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR != none; then
   LC_ALL=$LOCALE_FR \
   ${CHECKER} ./test-wcrtomb${EXEEXT} 1 \
@@ -9,7 +9,7 @@ if test $LOCALE_FR != none; then
 fi
 
 # Test whether a specific UTF-8 locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 != none; then
   LC_ALL=$LOCALE_FR_UTF8 \
   ${CHECKER} ./test-wcrtomb${EXEEXT} 2 \
@@ -17,7 +17,7 @@ if test $LOCALE_FR_UTF8 != none; then
 fi
 
 # Test whether a specific EUC-JP locale is installed.
-: ${LOCALE_JA=ja_JP}
+: "${LOCALE_JA=ja_JP}"
 if test $LOCALE_JA != none; then
   LC_ALL=$LOCALE_JA \
   ${CHECKER} ./test-wcrtomb${EXEEXT} 3 \
@@ -25,7 +25,7 @@ if test $LOCALE_JA != none; then
 fi
 
 # Test whether a specific GB18030 locale is installed.
-: ${LOCALE_ZH_CN=zh_CN.GB18030}
+: "${LOCALE_ZH_CN=zh_CN.GB18030}"
 if test $LOCALE_ZH_CN != none; then
   LC_ALL=$LOCALE_ZH_CN \
   ${CHECKER} ./test-wcrtomb${EXEEXT} 4 \
diff --git a/gnulib-tests/test-wctype-h.c b/gnulib-tests/test-wctype-h.c
index 08da56b5..ceee02bc 100644
--- a/gnulib-tests/test-wctype-h.c
+++ b/gnulib-tests/test-wctype-h.c
@@ -1,5 +1,5 @@
 /* Test of <wctype.h> substitute.
-   Copyright (C) 2007-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007-2023 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
@@ -20,8 +20,6 @@
 
 #include <wctype.h>
 
-#include "macros.h"
-
 /* Check that the type wint_t is defined.  */
 wint_t a = 'x';
 /* Check that WEOF is defined.  */
@@ -33,6 +31,8 @@ wctype_t p;
 /* Check that the type wctrans_t is defined.  */
 wctrans_t q;
 
+#include "macros.h"
+
 int
 main (void)
 {
diff --git a/gnulib-tests/test-wcwidth.c b/gnulib-tests/test-wcwidth.c
index 7e522eec..b6aa41fa 100644
--- a/gnulib-tests/test-wcwidth.c
+++ b/gnulib-tests/test-wcwidth.c
@@ -1,5 +1,5 @@
 /* Test of wcwidth() function.
-   Copyright (C) 2007-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-xalloc-die.c b/gnulib-tests/test-xalloc-die.c
index 78781306..07dcb1db 100644
--- a/gnulib-tests/test-xalloc-die.c
+++ b/gnulib-tests/test-xalloc-die.c
@@ -1,5 +1,5 @@
 /* Test of xalloc_die() function.
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-xalloc-die.sh b/gnulib-tests/test-xalloc-die.sh
index 2a891110..822a2700 100755
--- a/gnulib-tests/test-xalloc-die.sh
+++ b/gnulib-tests/test-xalloc-die.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 # Test suite for xalloc_die.
-# Copyright (C) 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2009-2023 Free Software Foundation, Inc.
 # This file is part of the GNUlib Library.
 #
 # This program is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/test-xstrtoimax.sh b/gnulib-tests/test-xstrtoimax.sh
index 6a48e67b..f41e52ea 100755
--- a/gnulib-tests/test-xstrtoimax.sh
+++ b/gnulib-tests/test-xstrtoimax.sh
@@ -1,5 +1,5 @@
 #!/bin/sh
-: ${srcdir=.}
+: "${srcdir=.}"
 . "$srcdir/init.sh"; path_prepend_ .
 
 too_big=99999999999999999999999999999999999999999999999999999999999999999999
diff --git a/gnulib-tests/test-xstrtol.c b/gnulib-tests/test-xstrtol.c
index 36cd9c9e..9c5d35f6 100644
--- a/gnulib-tests/test-xstrtol.c
+++ b/gnulib-tests/test-xstrtol.c
@@ -1,5 +1,5 @@
 /* Test of xstrtol module.
-   Copyright (C) 1995-1996, 1998-2001, 2003-2022 Free Software Foundation, Inc.
+   Copyright (C) 1995-1996, 1998-2001, 2003-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-xstrtol.sh b/gnulib-tests/test-xstrtol.sh
index 15dd9115..e82b585b 100755
--- a/gnulib-tests/test-xstrtol.sh
+++ b/gnulib-tests/test-xstrtol.sh
@@ -1,5 +1,5 @@
 #!/bin/sh
-: ${srcdir=.}
+: "${srcdir=.}"
 . "$srcdir/init.sh"; path_prepend_ .
 
 too_big=99999999999999999999999999999999999999999999999999999999999999999999
diff --git a/gnulib-tests/test-year2038.c b/gnulib-tests/test-year2038.c
new file mode 100644
index 00000000..d1989eb4
--- /dev/null
+++ b/gnulib-tests/test-year2038.c
@@ -0,0 +1,39 @@
+/* Test of year2038 module.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2023.  */
+
+/* This test fails if AC_SYS_YEAR2038 could not arrange for a time_t
+   that supports values > 2147483647.
+   This can happen
+     - on systems that are not year 2038 safe, or
+     - if the user specified --disable-year2038 at configure time.
+   It is intended that this test fails in these circumstances.  */
+
+#include <config.h>
+
+#include <sys/types.h>
+#include "intprops.h"
+
+/* Although this test could be done with static_assert, the test
+   harness prefers dynamic checking.  */
+
+int
+main (void)
+{
+  /* Check the range of time_t.  */
+  return TYPE_MAXIMUM (time_t) >> 31 == 0;
+}
diff --git a/gnulib-tests/thread-optim.h b/gnulib-tests/thread-optim.h
index daf887fd..b5ef15aa 100644
--- a/gnulib-tests/thread-optim.h
+++ b/gnulib-tests/thread-optim.h
@@ -1,6 +1,6 @@
 /* Optimization of multithreaded code.
 
-   Copyright (C) 2020-2022 Free Software Foundation, Inc.
+   Copyright (C) 2020-2023 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
@@ -50,9 +50,14 @@
    same optimization cannot be applied to locks that synchronize different
    processes (e.g. through shared memory mappings).  */
 
+/* This file uses HAVE_SYS_SINGLE_THREADED_H.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #if HAVE_SYS_SINGLE_THREADED_H /* glibc >= 2.32 */
 # include <sys/single_threaded.h>
-# define gl_multithreaded()  !__libc_single_threaded
+# define gl_multithreaded()  (!__libc_single_threaded)
 #else
 # define gl_multithreaded()  1
 #endif
diff --git a/gnulib-tests/time.c b/gnulib-tests/time.c
new file mode 100644
index 00000000..4e2ee31b
--- /dev/null
+++ b/gnulib-tests/time.c
@@ -0,0 +1,41 @@
+/* Provide time() for systems for which it's broken.
+   Copyright (C) 2023 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 <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <time.h>
+
+#include <stdlib.h>
+#include <sys/time.h>
+
+time_t
+time (time_t *tp)
+{
+  struct timeval tv;
+  time_t tt;
+
+  if (gettimeofday (&tv, NULL) < 0)
+    abort ();
+  tt = tv.tv_sec;
+
+  if (tp)
+    *tp = tt;
+
+  return tt;
+}
diff --git a/gnulib-tests/uinttostr.c b/gnulib-tests/uinttostr.c
index bf26974b..682eba59 100644
--- a/gnulib-tests/uinttostr.c
+++ b/gnulib-tests/uinttostr.c
@@ -1,6 +1,6 @@
 /* Convert 'unsigned int' integer to printable string.
 
-   Copyright (C) 2006-2022 Free Software Foundation, Inc.
+   Copyright (C) 2006-2023 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
diff --git a/gnulib-tests/umaxtostr.c b/gnulib-tests/umaxtostr.c
index 69cdde9d..cd81e462 100644
--- a/gnulib-tests/umaxtostr.c
+++ b/gnulib-tests/umaxtostr.c
@@ -1,6 +1,6 @@
 /* Convert 'uintmax_t' integer to printable string.
 
-   Copyright (C) 2004-2022 Free Software Foundation, Inc.
+   Copyright (C) 2004-2023 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
diff --git a/gnulib-tests/unistr/test-u8-mbtoucr.c b/gnulib-tests/unistr/test-u8-mbtoucr.c
index e6102603..6628b700 100644
--- a/gnulib-tests/unistr/test-u8-mbtoucr.c
+++ b/gnulib-tests/unistr/test-u8-mbtoucr.c
@@ -1,5 +1,5 @@
 /* Test of u8_mbtoucr() function.
-   Copyright (C) 2010-2022 Free Software Foundation, Inc.
+   Copyright (C) 2010-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/unistr/test-u8-uctomb.c b/gnulib-tests/unistr/test-u8-uctomb.c
index cf37cb9b..7e8b5188 100644
--- a/gnulib-tests/unistr/test-u8-uctomb.c
+++ b/gnulib-tests/unistr/test-u8-uctomb.c
@@ -1,5 +1,5 @@
 /* Test of u8_uctomb() function.
-   Copyright (C) 2010-2022 Free Software Foundation, Inc.
+   Copyright (C) 2010-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/uniwidth/test-uc_width.c b/gnulib-tests/uniwidth/test-uc_width.c
index 86389b26..a8bfdc99 100644
--- a/gnulib-tests/uniwidth/test-uc_width.c
+++ b/gnulib-tests/uniwidth/test-uc_width.c
@@ -1,5 +1,5 @@
 /* Test of uc_width() function.
-   Copyright (C) 2007-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/uniwidth/test-uc_width2.c b/gnulib-tests/uniwidth/test-uc_width2.c
index d088cf39..69395a34 100644
--- a/gnulib-tests/uniwidth/test-uc_width2.c
+++ b/gnulib-tests/uniwidth/test-uc_width2.c
@@ -1,5 +1,5 @@
 /* Test of uc_width() function.
-   Copyright (C) 2007-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/uniwidth/test-uc_width2.sh b/gnulib-tests/uniwidth/test-uc_width2.sh
index c4263447..ae6f8f45 100755
--- a/gnulib-tests/uniwidth/test-uc_width2.sh
+++ b/gnulib-tests/uniwidth/test-uc_width2.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
+trap 'rm -fr $tmpfiles' HUP INT QUIT TERM
 
 tmpfiles="$tmpfiles uc_width.out"
 ${CHECKER} ./test-uc_width2${EXEEXT} | LC_ALL=C tr -d '\r' > uc_width.out
@@ -200,8 +200,8 @@ cat > uc_width.ok <<\EOF
 0EB2..0EB3	A
 0EB4..0EBC	0
 0EBD..0EC7	A
-0EC8..0ECD	0
-0ECE..0F17	A
+0EC8..0ECE	0
+0ECF..0F17	A
 0F18..0F19	0
 0F1A..0F34	A
 0F35		0
@@ -560,7 +560,9 @@ FFFC..101FC	1
 10D24..10D27	0
 10D28..10EAA	1
 10EAB..10EAC	0
-10EAD..10F45	1
+10EAD..10EFC	1
+10EFD..10EFF	0
+10F00..10F45	1
 10F46..10F50	0
 10F51..10F81	1
 10F82..10F85	0
@@ -608,7 +610,9 @@ FFFC..101FC	1
 11236..11237	0
 11238..1123D	1
 1123E		0
-1123F..112DE	1
+1123F..11240	1
+11241		0
+11242..112DE	1
 112DF		0
 112E0..112E2	1
 112E3..112EA	0
@@ -730,9 +734,19 @@ FFFC..101FC	1
 11D97		0
 11D98..11EF2	1
 11EF3..11EF4	0
-11EF5..1342F	1
-13430..13438	0
-13439..16AEF	1
+11EF5..11EFF	1
+11F00..11F01	0
+11F02..11F35	1
+11F36..11F3A	0
+11F3B..11F3F	1
+11F40		0
+11F41		1
+11F42		0
+11F43..1342F	1
+13430..13440	0
+13441..13446	1
+13447..13455	0
+13456..16AEF	1
 16AF0..16AF4	0
 16AF5..16B2F	1
 16B30..16B36	0
@@ -805,13 +819,17 @@ FFFC..101FC	1
 1E023..1E024	0
 1E025		1
 1E026..1E02A	0
-1E02B..1E12F	1
+1E02B..1E08E	1
+1E08F		0
+1E090..1E12F	1
 1E130..1E136	0
 1E137..1E2AD	1
 1E2AE		0
 1E2AF..1E2EB	1
 1E2EC..1E2EF	0
-1E2F0..1E8CF	1
+1E2F0..1E4EB	1
+1E4EC..1E4EF	0
+1E4F0..1E8CF	1
 1E8D0..1E8D6	0
 1E8D7..1E943	1
 1E944..1E94A	0
@@ -912,7 +930,7 @@ E0100..E01EF	0
 E01F0..10FFFF	1
 EOF
 
-: ${DIFF=diff}
+: "${DIFF=diff}"
 ${DIFF} uc_width.ok uc_width.out
 result=$?
 
diff --git a/gnulib-tests/unsetenv.c b/gnulib-tests/unsetenv.c
index 07eac6fd..e5489490 100644
--- a/gnulib-tests/unsetenv.c
+++ b/gnulib-tests/unsetenv.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995-2002, 2005-2022 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995-2002, 2005-2023 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    This file is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/vasnprintf.c b/gnulib-tests/vasnprintf.c
index 285c674b..efd610eb 100644
--- a/gnulib-tests/vasnprintf.c
+++ b/gnulib-tests/vasnprintf.c
@@ -1,5 +1,5 @@
 /* vsprintf with automatic memory allocation.
-   Copyright (C) 1999, 2002-2022 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2002-2023 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
@@ -83,8 +83,9 @@
 #include <stdio.h>      /* snprintf(), sprintf() */
 #include <stdlib.h>     /* abort(), malloc(), realloc(), free() */
 #include <string.h>     /* memcpy(), strlen() */
+#include <wchar.h>      /* mbstate_t, mbrtowc(), mbrlen(), wcrtomb() */
 #include <errno.h>      /* errno */
-#include <limits.h>     /* CHAR_BIT */
+#include <limits.h>     /* CHAR_BIT, INT_WIDTH, LONG_WIDTH */
 #include <float.h>      /* DBL_MAX_EXP, LDBL_MAX_EXP */
 #if HAVE_NL_LANGINFO
 # include <langinfo.h>
@@ -101,31 +102,30 @@
 #include "xsize.h"
 
 #include "attribute.h"
-#include "verify.h"
 
-#if (NEED_PRINTF_DOUBLE || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL
+#if NEED_PRINTF_DOUBLE || NEED_PRINTF_LONG_DOUBLE || (NEED_WPRINTF_DIRECTIVE_LA && WIDE_CHAR_VERSION)
 # include <math.h>
 # include "float+.h"
 #endif
 
-#if (NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && !defined IN_LIBINTL
+#if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE
 # include <math.h>
 # include "isnand-nolibm.h"
 #endif
 
-#if (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE) && !defined IN_LIBINTL
+#if NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE || (NEED_WPRINTF_DIRECTIVE_LA && WIDE_CHAR_VERSION)
 # include <math.h>
 # include "isnanl-nolibm.h"
 # include "fpucw.h"
 #endif
 
-#if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL
+#if NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_DOUBLE
 # include <math.h>
 # include "isnand-nolibm.h"
 # include "printf-frexp.h"
 #endif
 
-#if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL
+#if NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE || (NEED_WPRINTF_DIRECTIVE_LA && WIDE_CHAR_VERSION)
 # include <math.h>
 # include "isnanl-nolibm.h"
 # include "printf-frexpl.h"
@@ -138,8 +138,6 @@
 #  define VASNPRINTF vasnwprintf
 #  define FCHAR_T wchar_t
 #  define DCHAR_T wchar_t
-#  define TCHAR_T wchar_t
-#  define DCHAR_IS_TCHAR 1
 #  define DIRECTIVE wchar_t_directive
 #  define DIRECTIVES wchar_t_directives
 #  define PRINTF_PARSE wprintf_parse
@@ -159,24 +157,32 @@
 # endif
 #endif
 #if WIDE_CHAR_VERSION
-  /* TCHAR_T is wchar_t.  */
-# define USE_SNPRINTF 1
-# if HAVE_DECL__SNWPRINTF
-   /* On Windows, the function swprintf() has a different signature than
-      on Unix; we use the function _snwprintf() or - on mingw - snwprintf()
-      instead.  The mingw function snwprintf() has fewer bugs than the
-      MSVCRT function _snwprintf(), so prefer that.  */
-#  if defined __MINGW32__
-#   define SNPRINTF snwprintf
+  /* DCHAR_T is wchar_t.  */
+# if HAVE_DECL__SNWPRINTF || (HAVE_SWPRINTF && HAVE_WORKING_SWPRINTF)
+#  define TCHAR_T wchar_t
+#  define DCHAR_IS_TCHAR 1
+#  define USE_SNPRINTF 1
+#  if HAVE_DECL__SNWPRINTF
+    /* On Windows, the function swprintf() has a different signature than
+       on Unix; we use the function _snwprintf() or - on mingw - snwprintf()
+       instead.  The mingw function snwprintf() has fewer bugs than the
+       MSVCRT function _snwprintf(), so prefer that.  */
+#   if defined __MINGW32__
+#    define SNPRINTF snwprintf
+#   else
+#    define SNPRINTF _snwprintf
+#    define USE_MSVC__SNPRINTF 1
+#   endif
 #  else
-#   define SNPRINTF _snwprintf
-#   define USE_MSVC__SNPRINTF 1
+    /* Unix.  */
+#   define SNPRINTF swprintf
 #  endif
 # else
-   /* Unix.  */
-#  define SNPRINTF swprintf
+   /* Old platforms such as NetBSD 3.0, OpenBSD 3.8, HP-UX 11.00, IRIX 6.5.  */
+#   define TCHAR_T char
 # endif
-#else
+#endif
+#if !WIDE_CHAR_VERSION || !DCHAR_IS_TCHAR
   /* TCHAR_T is char.  */
   /* Use snprintf if it exists under the name 'snprintf' or '_snprintf'.
      But don't use it on BeOS, since BeOS snprintf produces no output if the
@@ -241,7 +247,7 @@ local_strnlen (const char *string, size_t maxlen)
 # endif
 #endif
 
-#if (((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF) && WIDE_CHAR_VERSION) || ((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || (NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL)) && !WIDE_CHAR_VERSION && DCHAR_IS_TCHAR)) && HAVE_WCHAR_T
+#if (((!USE_SNPRINTF || WIDE_CHAR_VERSION || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF) && WIDE_CHAR_VERSION) || ((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || NEED_PRINTF_DIRECTIVE_LS) && !WIDE_CHAR_VERSION && DCHAR_IS_TCHAR)) && HAVE_WCHAR_T
 # if HAVE_WCSLEN
 #  define local_wcslen wcslen
 # else
@@ -264,8 +270,8 @@ local_wcslen (const wchar_t *s)
 # endif
 #endif
 
-#if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF) && HAVE_WCHAR_T && WIDE_CHAR_VERSION
-# if HAVE_WCSNLEN
+#if (!USE_SNPRINTF || (WIDE_CHAR_VERSION && DCHAR_IS_TCHAR) || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF) && HAVE_WCHAR_T && WIDE_CHAR_VERSION
+# if HAVE_WCSNLEN && HAVE_DECL_WCSNLEN
 #  define local_wcsnlen wcsnlen
 # else
 #  ifndef local_wcsnlen_defined
@@ -283,7 +289,7 @@ local_wcsnlen (const wchar_t *s, size_t maxlen)
 # endif
 #endif
 
-#if (((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || (NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL) || ENABLE_WCHAR_FALLBACK) && HAVE_WCHAR_T) || (ENABLE_WCHAR_FALLBACK && HAVE_WINT_T)) && !WIDE_CHAR_VERSION
+#if (((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || NEED_PRINTF_DIRECTIVE_LS || ENABLE_WCHAR_FALLBACK) && HAVE_WCHAR_T) || ((NEED_PRINTF_DIRECTIVE_LC || ENABLE_WCHAR_FALLBACK) && HAVE_WINT_T)) && !WIDE_CHAR_VERSION
 # if ENABLE_WCHAR_FALLBACK
 static size_t
 wctomb_fallback (char *s, wchar_t wc)
@@ -351,7 +357,7 @@ local_wctomb (char *s, wchar_t wc)
 # endif
 #endif
 
-#if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE || NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && !defined IN_LIBINTL
+#if NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE || NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE || (NEED_WPRINTF_DIRECTIVE_LA && WIDE_CHAR_VERSION)
 /* Determine the decimal-point character according to the current locale.  */
 # ifndef decimal_point_char_defined
 #  define decimal_point_char_defined 1
@@ -378,7 +384,7 @@ decimal_point_char (void)
 # endif
 #endif
 
-#if NEED_PRINTF_INFINITE_DOUBLE && !NEED_PRINTF_DOUBLE && !defined IN_LIBINTL
+#if NEED_PRINTF_INFINITE_DOUBLE && !NEED_PRINTF_DOUBLE
 
 /* Equivalent to !isfinite(x) || x == 0, but does not require libm.  */
 static int
@@ -389,7 +395,7 @@ is_infinite_or_zero (double x)
 
 #endif
 
-#if NEED_PRINTF_INFINITE_LONG_DOUBLE && !NEED_PRINTF_LONG_DOUBLE && !defined IN_LIBINTL
+#if NEED_PRINTF_INFINITE_LONG_DOUBLE && !NEED_PRINTF_LONG_DOUBLE
 
 /* Equivalent to !isfinite(x) || x == 0, but does not require libm.  */
 static int
@@ -400,7 +406,7 @@ is_infinite_or_zerol (long double x)
 
 #endif
 
-#if (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL
+#if NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE
 
 /* Converting 'long double' to decimal without rare rounding bugs requires
    real bignums.  We use the naming conventions of GNU gmp, but vastly simpler
@@ -408,11 +414,11 @@ is_infinite_or_zerol (long double x)
 
 typedef unsigned int mp_limb_t;
 # define GMP_LIMB_BITS 32
-verify (sizeof (mp_limb_t) * CHAR_BIT == GMP_LIMB_BITS);
+static_assert (sizeof (mp_limb_t) * CHAR_BIT == GMP_LIMB_BITS);
 
 typedef unsigned long long mp_twolimb_t;
 # define GMP_TWOLIMB_BITS 64
-verify (sizeof (mp_twolimb_t) * CHAR_BIT == GMP_TWOLIMB_BITS);
+static_assert (sizeof (mp_twolimb_t) * CHAR_BIT == GMP_TWOLIMB_BITS);
 
 /* Representation of a bignum >= 0.  */
 typedef struct
@@ -1604,7 +1610,7 @@ is_borderline (const char *digits, size_t precision)
 
 #endif
 
-#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF
+#if !USE_SNPRINTF || (WIDE_CHAR_VERSION && DCHAR_IS_TCHAR) || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF
 
 /* Use a different function name, to make it possible that the 'wchar_t'
    parametrization and the 'char' parametrization get compiled in the same
@@ -1627,24 +1633,156 @@ MAX_ROOM_NEEDED (const arguments *ap, size_t arg_index, FCHAR_T conversion,
   switch (conversion)
     {
     case 'd': case 'i': case 'u':
-      if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
-        tmp_length =
-          (unsigned int) (sizeof (unsigned long long) * CHAR_BIT
-                          * 0.30103 /* binary -> decimal */
-                         )
-          + 1; /* turn floor into ceil */
-      else if (type == TYPE_LONGINT || type == TYPE_ULONGINT)
-        tmp_length =
-          (unsigned int) (sizeof (unsigned long) * CHAR_BIT
-                          * 0.30103 /* binary -> decimal */
-                         )
-          + 1; /* turn floor into ceil */
-      else
-        tmp_length =
-          (unsigned int) (sizeof (unsigned int) * CHAR_BIT
-                          * 0.30103 /* binary -> decimal */
-                         )
-          + 1; /* turn floor into ceil */
+      switch (type)
+        {
+        default:
+          tmp_length =
+            (unsigned int) (sizeof (unsigned int) * CHAR_BIT
+                            * 0.30103 /* binary -> decimal */
+                           )
+            + 1; /* turn floor into ceil */
+          break;
+        case TYPE_LONGINT:
+          tmp_length =
+            (unsigned int) (sizeof (long int) * CHAR_BIT
+                            * 0.30103 /* binary -> decimal */
+                           )
+            + 1; /* turn floor into ceil */
+          break;
+        case TYPE_ULONGINT:
+          tmp_length =
+            (unsigned int) (sizeof (unsigned long int) * CHAR_BIT
+                            * 0.30103 /* binary -> decimal */
+                           )
+            + 1; /* turn floor into ceil */
+          break;
+        case TYPE_LONGLONGINT:
+          tmp_length =
+            (unsigned int) (sizeof (long long int) * CHAR_BIT
+                            * 0.30103 /* binary -> decimal */
+                           )
+            + 1; /* turn floor into ceil */
+          break;
+        case TYPE_ULONGLONGINT:
+          tmp_length =
+            (unsigned int) (sizeof (unsigned long long int) * CHAR_BIT
+                            * 0.30103 /* binary -> decimal */
+                           )
+            + 1; /* turn floor into ceil */
+          break;
+        case TYPE_INT8_T:
+          tmp_length =
+            (unsigned int) (sizeof (int8_t) * CHAR_BIT
+                            * 0.30103 /* binary -> decimal */
+                           )
+            + 1; /* turn floor into ceil */
+          break;
+        case TYPE_UINT8_T:
+          tmp_length =
+            (unsigned int) (sizeof (uint8_t) * CHAR_BIT
+                            * 0.30103 /* binary -> decimal */
+                           )
+            + 1; /* turn floor into ceil */
+          break;
+        case TYPE_INT16_T:
+          tmp_length =
+            (unsigned int) (sizeof (int16_t) * CHAR_BIT
+                            * 0.30103 /* binary -> decimal */
+                           )
+            + 1; /* turn floor into ceil */
+          break;
+        case TYPE_UINT16_T:
+          tmp_length =
+            (unsigned int) (sizeof (uint16_t) * CHAR_BIT
+                            * 0.30103 /* binary -> decimal */
+                           )
+            + 1; /* turn floor into ceil */
+          break;
+        case TYPE_INT32_T:
+          tmp_length =
+            (unsigned int) (sizeof (int32_t) * CHAR_BIT
+                            * 0.30103 /* binary -> decimal */
+                           )
+            + 1; /* turn floor into ceil */
+          break;
+        case TYPE_UINT32_T:
+          tmp_length =
+            (unsigned int) (sizeof (uint32_t) * CHAR_BIT
+                            * 0.30103 /* binary -> decimal */
+                           )
+            + 1; /* turn floor into ceil */
+          break;
+        case TYPE_INT64_T:
+          tmp_length =
+            (unsigned int) (sizeof (int64_t) * CHAR_BIT
+                            * 0.30103 /* binary -> decimal */
+                           )
+            + 1; /* turn floor into ceil */
+          break;
+        case TYPE_UINT64_T:
+          tmp_length =
+            (unsigned int) (sizeof (uint64_t) * CHAR_BIT
+                            * 0.30103 /* binary -> decimal */
+                           )
+            + 1; /* turn floor into ceil */
+          break;
+        case TYPE_INT_FAST8_T:
+          tmp_length =
+            (unsigned int) (sizeof (int_fast8_t) * CHAR_BIT
+                            * 0.30103 /* binary -> decimal */
+                           )
+            + 1; /* turn floor into ceil */
+          break;
+        case TYPE_UINT_FAST8_T:
+          tmp_length =
+            (unsigned int) (sizeof (uint_fast8_t) * CHAR_BIT
+                            * 0.30103 /* binary -> decimal */
+                           )
+            + 1; /* turn floor into ceil */
+          break;
+        case TYPE_INT_FAST16_T:
+          tmp_length =
+            (unsigned int) (sizeof (int_fast16_t) * CHAR_BIT
+                            * 0.30103 /* binary -> decimal */
+                           )
+            + 1; /* turn floor into ceil */
+          break;
+        case TYPE_UINT_FAST16_T:
+          tmp_length =
+            (unsigned int) (sizeof (uint_fast16_t) * CHAR_BIT
+                            * 0.30103 /* binary -> decimal */
+                           )
+            + 1; /* turn floor into ceil */
+          break;
+        case TYPE_INT_FAST32_T:
+          tmp_length =
+            (unsigned int) (sizeof (int_fast32_t) * CHAR_BIT
+                            * 0.30103 /* binary -> decimal */
+                           )
+            + 1; /* turn floor into ceil */
+          break;
+        case TYPE_UINT_FAST32_T:
+          tmp_length =
+            (unsigned int) (sizeof (uint_fast32_t) * CHAR_BIT
+                            * 0.30103 /* binary -> decimal */
+                           )
+            + 1; /* turn floor into ceil */
+          break;
+        case TYPE_INT_FAST64_T:
+          tmp_length =
+            (unsigned int) (sizeof (int_fast64_t) * CHAR_BIT
+                            * 0.30103 /* binary -> decimal */
+                           )
+            + 1; /* turn floor into ceil */
+          break;
+        case TYPE_UINT_FAST64_T:
+          tmp_length =
+            (unsigned int) (sizeof (uint_fast64_t) * CHAR_BIT
+                            * 0.30103 /* binary -> decimal */
+                           )
+            + 1; /* turn floor into ceil */
+          break;
+        }
       if (tmp_length < precision)
         tmp_length = precision;
       /* Multiply by 2, as an estimate for FLAG_GROUP.  */
@@ -1653,25 +1791,156 @@ MAX_ROOM_NEEDED (const arguments *ap, size_t arg_index, FCHAR_T conversion,
       tmp_length = xsum (tmp_length, 1);
       break;
 
+    case 'b':
+    #if SUPPORT_GNU_PRINTF_DIRECTIVES \
+        || (__GLIBC__ + (__GLIBC_MINOR__ >= 35) > 2)
+    case 'B':
+    #endif
+      switch (type)
+        {
+        default:
+          tmp_length =
+            (unsigned int) (sizeof (unsigned int) * CHAR_BIT)
+            + 1; /* turn floor into ceil */
+          break;
+        case TYPE_ULONGINT:
+          tmp_length =
+            (unsigned int) (sizeof (unsigned long int) * CHAR_BIT)
+            + 1; /* turn floor into ceil */
+          break;
+        case TYPE_ULONGLONGINT:
+          tmp_length =
+            (unsigned int) (sizeof (unsigned long long int) * CHAR_BIT)
+            + 1; /* turn floor into ceil */
+          break;
+        case TYPE_UINT8_T:
+          tmp_length =
+            (unsigned int) (sizeof (uint8_t) * CHAR_BIT)
+            + 1; /* turn floor into ceil */
+          break;
+        case TYPE_UINT16_T:
+          tmp_length =
+            (unsigned int) (sizeof (uint16_t) * CHAR_BIT)
+            + 1; /* turn floor into ceil */
+          break;
+        case TYPE_UINT32_T:
+          tmp_length =
+            (unsigned int) (sizeof (uint32_t) * CHAR_BIT)
+            + 1; /* turn floor into ceil */
+          break;
+        case TYPE_UINT64_T:
+          tmp_length =
+            (unsigned int) (sizeof (uint64_t) * CHAR_BIT)
+            + 1; /* turn floor into ceil */
+          break;
+        case TYPE_UINT_FAST8_T:
+          tmp_length =
+            (unsigned int) (sizeof (uint_fast8_t) * CHAR_BIT)
+            + 1; /* turn floor into ceil */
+          break;
+        case TYPE_UINT_FAST16_T:
+          tmp_length =
+            (unsigned int) (sizeof (uint_fast16_t) * CHAR_BIT)
+            + 1; /* turn floor into ceil */
+          break;
+        case TYPE_UINT_FAST32_T:
+          tmp_length =
+            (unsigned int) (sizeof (uint_fast32_t) * CHAR_BIT)
+            + 1; /* turn floor into ceil */
+          break;
+        case TYPE_UINT_FAST64_T:
+          tmp_length =
+            (unsigned int) (sizeof (uint_fast64_t) * CHAR_BIT)
+            + 1; /* turn floor into ceil */
+          break;
+        }
+      if (tmp_length < precision)
+        tmp_length = precision;
+      /* Add 2, to account for a prefix from the alternate form.  */
+      tmp_length = xsum (tmp_length, 2);
+      break;
+
     case 'o':
-      if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
-        tmp_length =
-          (unsigned int) (sizeof (unsigned long long) * CHAR_BIT
-                          * 0.333334 /* binary -> octal */
-                         )
-          + 1; /* turn floor into ceil */
-      else if (type == TYPE_LONGINT || type == TYPE_ULONGINT)
-        tmp_length =
-          (unsigned int) (sizeof (unsigned long) * CHAR_BIT
-                          * 0.333334 /* binary -> octal */
-                         )
-          + 1; /* turn floor into ceil */
-      else
-        tmp_length =
-          (unsigned int) (sizeof (unsigned int) * CHAR_BIT
-                          * 0.333334 /* binary -> octal */
-                         )
-          + 1; /* turn floor into ceil */
+      switch (type)
+        {
+        default:
+          tmp_length =
+            (unsigned int) (sizeof (unsigned int) * CHAR_BIT
+                            * 0.333334 /* binary -> octal */
+                           )
+            + 1; /* turn floor into ceil */
+          break;
+        case TYPE_ULONGINT:
+          tmp_length =
+            (unsigned int) (sizeof (unsigned long int) * CHAR_BIT
+                            * 0.333334 /* binary -> octal */
+                           )
+            + 1; /* turn floor into ceil */
+          break;
+        case TYPE_ULONGLONGINT:
+          tmp_length =
+            (unsigned int) (sizeof (unsigned long long int) * CHAR_BIT
+                            * 0.333334 /* binary -> octal */
+                           )
+            + 1; /* turn floor into ceil */
+          break;
+        case TYPE_UINT8_T:
+          tmp_length =
+            (unsigned int) (sizeof (uint8_t) * CHAR_BIT
+                            * 0.333334 /* binary -> octal */
+                           )
+            + 1; /* turn floor into ceil */
+          break;
+        case TYPE_UINT16_T:
+          tmp_length =
+            (unsigned int) (sizeof (uint16_t) * CHAR_BIT
+                            * 0.333334 /* binary -> octal */
+                           )
+            + 1; /* turn floor into ceil */
+          break;
+        case TYPE_UINT32_T:
+          tmp_length =
+            (unsigned int) (sizeof (uint32_t) * CHAR_BIT
+                            * 0.333334 /* binary -> octal */
+                           )
+            + 1; /* turn floor into ceil */
+          break;
+        case TYPE_UINT64_T:
+          tmp_length =
+            (unsigned int) (sizeof (uint64_t) * CHAR_BIT
+                            * 0.333334 /* binary -> octal */
+                           )
+            + 1; /* turn floor into ceil */
+          break;
+        case TYPE_UINT_FAST8_T:
+          tmp_length =
+            (unsigned int) (sizeof (uint_fast8_t) * CHAR_BIT
+                            * 0.333334 /* binary -> octal */
+                           )
+            + 1; /* turn floor into ceil */
+          break;
+        case TYPE_UINT_FAST16_T:
+          tmp_length =
+            (unsigned int) (sizeof (uint_fast16_t) * CHAR_BIT
+                            * 0.333334 /* binary -> octal */
+                           )
+            + 1; /* turn floor into ceil */
+          break;
+        case TYPE_UINT_FAST32_T:
+          tmp_length =
+            (unsigned int) (sizeof (uint_fast32_t) * CHAR_BIT
+                            * 0.333334 /* binary -> octal */
+                           )
+            + 1; /* turn floor into ceil */
+          break;
+        case TYPE_UINT_FAST64_T:
+          tmp_length =
+            (unsigned int) (sizeof (uint_fast64_t) * CHAR_BIT
+                            * 0.333334 /* binary -> octal */
+                           )
+            + 1; /* turn floor into ceil */
+          break;
+        }
       if (tmp_length < precision)
         tmp_length = precision;
       /* Add 1, to account for a leading sign.  */
@@ -1679,27 +1948,89 @@ MAX_ROOM_NEEDED (const arguments *ap, size_t arg_index, FCHAR_T conversion,
       break;
 
     case 'x': case 'X':
-      if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
-        tmp_length =
-          (unsigned int) (sizeof (unsigned long long) * CHAR_BIT
-                          * 0.25 /* binary -> hexadecimal */
-                         )
-          + 1; /* turn floor into ceil */
-      else if (type == TYPE_LONGINT || type == TYPE_ULONGINT)
-        tmp_length =
-          (unsigned int) (sizeof (unsigned long) * CHAR_BIT
-                          * 0.25 /* binary -> hexadecimal */
-                         )
-          + 1; /* turn floor into ceil */
-      else
-        tmp_length =
-          (unsigned int) (sizeof (unsigned int) * CHAR_BIT
-                          * 0.25 /* binary -> hexadecimal */
-                         )
-          + 1; /* turn floor into ceil */
+      switch (type)
+        {
+        default:
+          tmp_length =
+            (unsigned int) (sizeof (unsigned int) * CHAR_BIT
+                            * 0.25 /* binary -> hexadecimal */
+                           )
+            + 1; /* turn floor into ceil */
+          break;
+        case TYPE_ULONGINT:
+          tmp_length =
+            (unsigned int) (sizeof (unsigned long int) * CHAR_BIT
+                            * 0.25 /* binary -> hexadecimal */
+                           )
+            + 1; /* turn floor into ceil */
+          break;
+        case TYPE_ULONGLONGINT:
+          tmp_length =
+            (unsigned int) (sizeof (unsigned long long int) * CHAR_BIT
+                            * 0.25 /* binary -> hexadecimal */
+                           )
+            + 1; /* turn floor into ceil */
+          break;
+        case TYPE_UINT8_T:
+          tmp_length =
+            (unsigned int) (sizeof (uint8_t) * CHAR_BIT
+                            * 0.25 /* binary -> hexadecimal */
+                           )
+            + 1; /* turn floor into ceil */
+          break;
+        case TYPE_UINT16_T:
+          tmp_length =
+            (unsigned int) (sizeof (uint16_t) * CHAR_BIT
+                            * 0.25 /* binary -> hexadecimal */
+                           )
+            + 1; /* turn floor into ceil */
+          break;
+        case TYPE_UINT32_T:
+          tmp_length =
+            (unsigned int) (sizeof (uint32_t) * CHAR_BIT
+                            * 0.25 /* binary -> hexadecimal */
+                           )
+            + 1; /* turn floor into ceil */
+          break;
+        case TYPE_UINT64_T:
+          tmp_length =
+            (unsigned int) (sizeof (uint64_t) * CHAR_BIT
+                            * 0.25 /* binary -> hexadecimal */
+                           )
+            + 1; /* turn floor into ceil */
+          break;
+        case TYPE_UINT_FAST8_T:
+          tmp_length =
+            (unsigned int) (sizeof (uint_fast8_t) * CHAR_BIT
+                            * 0.25 /* binary -> hexadecimal */
+                           )
+            + 1; /* turn floor into ceil */
+          break;
+        case TYPE_UINT_FAST16_T:
+          tmp_length =
+            (unsigned int) (sizeof (uint_fast16_t) * CHAR_BIT
+                            * 0.25 /* binary -> hexadecimal */
+                           )
+            + 1; /* turn floor into ceil */
+          break;
+        case TYPE_UINT_FAST32_T:
+          tmp_length =
+            (unsigned int) (sizeof (uint_fast32_t) * CHAR_BIT
+                            * 0.25 /* binary -> hexadecimal */
+                           )
+            + 1; /* turn floor into ceil */
+          break;
+        case TYPE_UINT_FAST64_T:
+          tmp_length =
+            (unsigned int) (sizeof (uint_fast64_t) * CHAR_BIT
+                            * 0.25 /* binary -> hexadecimal */
+                           )
+            + 1; /* turn floor into ceil */
+          break;
+        }
       if (tmp_length < precision)
         tmp_length = precision;
-      /* Add 2, to account for a leading sign or alternate form.  */
+      /* Add 2, to account for a prefix from the alternate form.  */
       tmp_length = xsum (tmp_length, 2);
       break;
 
@@ -2005,6 +2336,30 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                   case TYPE_COUNT_LONGLONGINT_POINTER:
                     *a.arg[dp->arg_index].a.a_count_longlongint_pointer = length;
                     break;
+                  case TYPE_COUNT_INT8_T_POINTER:
+                    *a.arg[dp->arg_index].a.a_count_int8_t_pointer = length;
+                    break;
+                  case TYPE_COUNT_INT16_T_POINTER:
+                    *a.arg[dp->arg_index].a.a_count_int16_t_pointer = length;
+                    break;
+                  case TYPE_COUNT_INT32_T_POINTER:
+                    *a.arg[dp->arg_index].a.a_count_int32_t_pointer = length;
+                    break;
+                  case TYPE_COUNT_INT64_T_POINTER:
+                    *a.arg[dp->arg_index].a.a_count_int64_t_pointer = length;
+                    break;
+                  case TYPE_COUNT_INT_FAST8_T_POINTER:
+                    *a.arg[dp->arg_index].a.a_count_int_fast8_t_pointer = length;
+                    break;
+                  case TYPE_COUNT_INT_FAST16_T_POINTER:
+                    *a.arg[dp->arg_index].a.a_count_int_fast16_t_pointer = length;
+                    break;
+                  case TYPE_COUNT_INT_FAST32_T_POINTER:
+                    *a.arg[dp->arg_index].a.a_count_int_fast32_t_pointer = length;
+                    break;
+                  case TYPE_COUNT_INT_FAST64_T_POINTER:
+                    *a.arg[dp->arg_index].a.a_count_int_fast64_t_pointer = length;
+                    break;
                   default:
                     abort ();
                   }
@@ -2130,7 +2485,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                           characters = 0;
                         }
 
-                      if (characters < width && !(dp->flags & FLAG_LEFT))
+                      if (characters < width && !(flags & FLAG_LEFT))
                         {
                           size_t n = width - characters;
                           ENSURE_ALLOCATION (xsum (length, n));
@@ -2175,7 +2530,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                       }
 # endif
 
-                      if (characters < width && (dp->flags & FLAG_LEFT))
+                      if (characters < width && (flags & FLAG_LEFT))
                         {
                           size_t n = width - characters;
                           ENSURE_ALLOCATION (xsum (length, n));
@@ -2232,7 +2587,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                           characters = 0;
                         }
 
-                      if (characters < width && !(dp->flags & FLAG_LEFT))
+                      if (characters < width && !(flags & FLAG_LEFT))
                         {
                           size_t n = width - characters;
                           ENSURE_ALLOCATION (xsum (length, n));
@@ -2277,7 +2632,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                       }
 # endif
 
-                      if (characters < width && (dp->flags & FLAG_LEFT))
+                      if (characters < width && (flags & FLAG_LEFT))
                         {
                           size_t n = width - characters;
                           ENSURE_ALLOCATION (xsum (length, n));
@@ -2334,7 +2689,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                           characters = 0;
                         }
 
-                      if (characters < width && !(dp->flags & FLAG_LEFT))
+                      if (characters < width && !(flags & FLAG_LEFT))
                         {
                           size_t n = width - characters;
                           ENSURE_ALLOCATION (xsum (length, n));
@@ -2379,7 +2734,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                       }
 # endif
 
-                      if (characters < width && (dp->flags & FLAG_LEFT))
+                      if (characters < width && (flags & FLAG_LEFT))
                         {
                           size_t n = width - characters;
                           ENSURE_ALLOCATION (xsum (length, n));
@@ -2394,7 +2749,150 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                   }
               }
 #endif
-#if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || (NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL) || ENABLE_WCHAR_FALLBACK) && HAVE_WCHAR_T
+#if WIDE_CHAR_VERSION && !DCHAR_IS_TCHAR
+            else if ((dp->conversion == 's'
+                      && a.arg[dp->arg_index].type == TYPE_WIDE_STRING)
+                     || (dp->conversion == 'c'
+                         && a.arg[dp->arg_index].type == TYPE_WIDE_CHAR))
+              {
+                /* %ls or %lc in vasnwprintf.  See the specification of
+                    fwprintf.  */
+                /* It would be silly to use snprintf ("%ls", ...) and then
+                   convert back the result from a char[] to a wchar_t[].
+                   Instead, just copy the argument wchar_t[] to the result.  */
+                int flags = dp->flags;
+                size_t width;
+
+                width = 0;
+                if (dp->width_start != dp->width_end)
+                  {
+                    if (dp->width_arg_index != ARG_NONE)
+                      {
+                        int arg;
+
+                        if (!(a.arg[dp->width_arg_index].type == TYPE_INT))
+                          abort ();
+                        arg = a.arg[dp->width_arg_index].a.a_int;
+                        width = arg;
+                        if (arg < 0)
+                          {
+                            /* "A negative field width is taken as a '-' flag
+                                followed by a positive field width."  */
+                            flags |= FLAG_LEFT;
+                            width = -width;
+                          }
+                      }
+                    else
+                      {
+                        const FCHAR_T *digitp = dp->width_start;
+
+                        do
+                          width = xsum (xtimes (width, 10), *digitp++ - '0');
+                        while (digitp != dp->width_end);
+                      }
+                  }
+
+                {
+                  const wchar_t *ls_arg;
+                  wchar_t lc_arg[1];
+                  size_t characters;
+
+                  if (dp->conversion == 's')
+                    {
+                      int has_precision;
+                      size_t precision;
+
+                      has_precision = 0;
+                      precision = 6;
+                      if (dp->precision_start != dp->precision_end)
+                        {
+                          if (dp->precision_arg_index != ARG_NONE)
+                            {
+                              int arg;
+
+                              if (!(a.arg[dp->precision_arg_index].type == TYPE_INT))
+                                abort ();
+                              arg = a.arg[dp->precision_arg_index].a.a_int;
+                              /* "A negative precision is taken as if the precision
+                                  were omitted."  */
+                              if (arg >= 0)
+                                {
+                                  precision = arg;
+                                  has_precision = 1;
+                                }
+                            }
+                          else
+                            {
+                              const FCHAR_T *digitp = dp->precision_start + 1;
+
+                              precision = 0;
+                              while (digitp != dp->precision_end)
+                                precision = xsum (xtimes (precision, 10), *digitp++ - '0');
+                              has_precision = 1;
+                            }
+                        }
+
+                      ls_arg = a.arg[dp->arg_index].a.a_wide_string;
+
+                      if (has_precision)
+                        {
+                          /* Use only at most PRECISION wide characters, from
+                             the left.  */
+                          const wchar_t *ls_arg_end;
+
+                          ls_arg_end = ls_arg;
+                          characters = 0;
+                          for (; precision > 0; precision--)
+                            {
+                              if (*ls_arg_end == 0)
+                                /* Found the terminating null wide character.  */
+                                break;
+                              ls_arg_end++;
+                              characters++;
+                            }
+                        }
+                      else
+                        {
+                          /* Use the entire string, and count the number of wide
+                             characters.  */
+                          characters = local_wcslen (ls_arg);
+                        }
+                    }
+                  else /* dp->conversion == 'c' */
+                    {
+                      lc_arg[0] = (wchar_t) a.arg[dp->arg_index].a.a_wide_char;
+                      ls_arg = lc_arg;
+                      characters = 1;
+                    }
+
+                  {
+                    size_t total = (characters < width ? width : characters);
+                    ENSURE_ALLOCATION (xsum (length, total));
+
+                    if (characters < width && !(flags & FLAG_LEFT))
+                      {
+                        size_t n = width - characters;
+                        DCHAR_SET (result + length, ' ', n);
+                        length += n;
+                      }
+
+                    if (characters > 0)
+                      {
+                        DCHAR_CPY (result + length, ls_arg, characters);
+                        length += characters;
+                      }
+
+                    if (characters < width && (flags & FLAG_LEFT))
+                      {
+                        size_t n = width - characters;
+                        DCHAR_SET (result + length, ' ', n);
+                        length += n;
+                      }
+                  }
+                }
+              }
+#endif
+#if (!USE_SNPRINTF || WIDE_CHAR_VERSION || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || NEED_PRINTF_DIRECTIVE_LS || ENABLE_WCHAR_FALLBACK) && HAVE_WCHAR_T
             else if (dp->conversion == 's'
 # if WIDE_CHAR_VERSION
                      && a.arg[dp->arg_index].type != TYPE_WIDE_STRING
@@ -2551,7 +3049,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                       characters = 0;
                     }
 
-                  if (characters < width && !(dp->flags & FLAG_LEFT))
+                  if (characters < width && !(flags & FLAG_LEFT))
                     {
                       size_t n = width - characters;
                       ENSURE_ALLOCATION (xsum (length, n));
@@ -2602,17 +3100,19 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
 #  else
                           count = mbtowc (&wc, arg, arg_end - arg);
 #  endif
-                          if (count <= 0)
-                            /* mbrtowc not consistent with mbrlen, or mbtowc
-                               not consistent with mblen.  */
+                          if (count == 0)
+                            /* mbrtowc not consistent with strlen.  */
                             abort ();
+                          if (count < 0)
+                            /* Invalid or incomplete multibyte character.  */
+                            goto fail_with_EILSEQ;
                           ENSURE_ALLOCATION (xsum (length, 1));
                           result[length++] = wc;
                           arg += count;
                         }
                     }
 
-                  if (characters < width && (dp->flags & FLAG_LEFT))
+                  if (characters < width && (flags & FLAG_LEFT))
                     {
                       size_t n = width - characters;
                       ENSURE_ALLOCATION (xsum (length, n));
@@ -2628,7 +3128,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                   size_t characters;
 #  if !DCHAR_IS_TCHAR
                   /* This code assumes that TCHAR_T is 'char'.  */
-                  verify (sizeof (TCHAR_T) == 1);
+                  static_assert (sizeof (TCHAR_T) == 1);
                   TCHAR_T *tmpsrc;
                   DCHAR_T *tmpdst;
                   size_t tmpdst_len;
@@ -2768,7 +3268,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                     /* w doesn't matter.  */
                     w = 0;
 
-                  if (w < width && !(dp->flags & FLAG_LEFT))
+                  if (w < width && !(flags & FLAG_LEFT))
                     {
                       size_t n = width - w;
                       ENSURE_ALLOCATION (xsum (length, n));
@@ -2836,7 +3336,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                   length += tmpdst_len;
 #  endif
 
-                  if (w < width && (dp->flags & FLAG_LEFT))
+                  if (w < width && (flags & FLAG_LEFT))
                     {
                       size_t n = width - w;
                       ENSURE_ALLOCATION (xsum (length, n));
@@ -2847,12 +3347,13 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
 # endif
               }
 #endif
-#if ENABLE_WCHAR_FALLBACK && HAVE_WINT_T && !WIDE_CHAR_VERSION
+#if (NEED_PRINTF_DIRECTIVE_LC || ENABLE_WCHAR_FALLBACK) && HAVE_WINT_T && !WIDE_CHAR_VERSION
             else if (dp->conversion == 'c'
                      && a.arg[dp->arg_index].type == TYPE_WIDE_CHAR)
               {
                 /* Implement the 'lc' directive ourselves, in order to provide
-                   the fallback that avoids EILSEQ.  */
+                   a correct behaviour for the null wint_t argument and/or the
+                   fallback that avoids EILSEQ.  */
                 int flags = dp->flags;
                 int has_width;
                 size_t width;
@@ -2894,7 +3395,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                   size_t characters;
 # if !DCHAR_IS_TCHAR
                   /* This code assumes that TCHAR_T is 'char'.  */
-                  verify (sizeof (TCHAR_T) == 1);
+                  static_assert (sizeof (TCHAR_T) == 1);
                   TCHAR_T tmpsrc[64]; /* Assume MB_CUR_MAX <= 64.  */
                   DCHAR_T *tmpdst;
                   size_t tmpdst_len;
@@ -2918,8 +3419,8 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
 
                           count = local_wcrtomb (cbuf, arg, &state);
                           if (count < 0)
-                            /* Inconsistency.  */
-                            abort ();
+                            /* Cannot convert.  */
+                            goto fail_with_EILSEQ;
                           characters = count;
                         }
                     }
@@ -2977,7 +3478,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                     /* w doesn't matter.  */
                     w = 0;
 
-                  if (w < width && !(dp->flags & FLAG_LEFT))
+                  if (w < width && !(flags & FLAG_LEFT))
                     {
                       size_t n = width - w;
                       ENSURE_ALLOCATION (xsum (length, n));
@@ -3017,9 +3518,9 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
 #  endif
 
                           count = local_wcrtomb (cbuf, arg, &state);
-                          if (count <= 0)
-                            /* Inconsistency.  */
-                            abort ();
+                          if (count < 0)
+                            /* Cannot convert.  */
+                            goto fail_with_EILSEQ;
                           ENSURE_ALLOCATION (xsum (length, count));
                           memcpy (result + length, cbuf, count);
                           length += count;
@@ -3033,7 +3534,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                   length += tmpdst_len;
 # endif
 
-                  if (w < width && (dp->flags & FLAG_LEFT))
+                  if (w < width && (flags & FLAG_LEFT))
                     {
                       size_t n = width - w;
                       ENSURE_ALLOCATION (xsum (length, n));
@@ -3043,31 +3544,14 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                 }
               }
 #endif
-#if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL
-            else if ((dp->conversion == 'a' || dp->conversion == 'A')
-# if !(NEED_PRINTF_DIRECTIVE_A || (NEED_PRINTF_LONG_DOUBLE && NEED_PRINTF_DOUBLE))
-                     && (0
-#  if NEED_PRINTF_DOUBLE
-                         || a.arg[dp->arg_index].type == TYPE_DOUBLE
-#  endif
-#  if NEED_PRINTF_LONG_DOUBLE
-                         || a.arg[dp->arg_index].type == TYPE_LONGDOUBLE
-#  endif
-                        )
-# endif
-                    )
+#if NEED_WPRINTF_DIRECTIVE_C && WIDE_CHAR_VERSION
+            else if (dp->conversion == 'c'
+                     && a.arg[dp->arg_index].type != TYPE_WIDE_CHAR)
               {
-                arg_type type = a.arg[dp->arg_index].type;
+                /* Implement the 'c' directive ourselves, in order to avoid
+                   EILSEQ in the "C" locale.  */
                 int flags = dp->flags;
                 size_t width;
-                int has_precision;
-                size_t precision;
-                size_t tmp_length;
-                size_t count;
-                DCHAR_T tmpbuf[700];
-                DCHAR_T *tmp;
-                DCHAR_T *pad_ptr;
-                DCHAR_T *p;
 
                 width = 0;
                 if (dp->width_start != dp->width_end)
@@ -3098,20 +3582,422 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                       }
                   }
 
-                has_precision = 0;
-                precision = 0;
-                if (dp->precision_start != dp->precision_end)
-                  {
-                    if (dp->precision_arg_index != ARG_NONE)
-                      {
-                        int arg;
+                /* %c in vasnwprintf.  See the specification of fwprintf.  */
+                {
+                  char arg = (char) a.arg[dp->arg_index].a.a_char;
+                  mbstate_t state;
+                  wchar_t wc;
 
-                        if (!(a.arg[dp->precision_arg_index].type == TYPE_INT))
-                          abort ();
-                        arg = a.arg[dp->precision_arg_index].a.a_int;
-                        /* "A negative precision is taken as if the precision
-                            were omitted."  */
-                        if (arg >= 0)
+                  memset (&state, '\0', sizeof (mbstate_t));
+                  int count = mbrtowc (&wc, &arg, 1, &state);
+                  if (count < 0)
+                    /* Invalid or incomplete multibyte character.  */
+                    goto fail_with_EILSEQ;
+
+                  if (1 < width && !(flags & FLAG_LEFT))
+                    {
+                      size_t n = width - 1;
+                      ENSURE_ALLOCATION (xsum (length, n));
+                      DCHAR_SET (result + length, ' ', n);
+                      length += n;
+                    }
+
+                  ENSURE_ALLOCATION (xsum (length, 1));
+                  result[length++] = wc;
+
+                  if (1 < width && (flags & FLAG_LEFT))
+                    {
+                      size_t n = width - 1;
+                      ENSURE_ALLOCATION (xsum (length, n));
+                      DCHAR_SET (result + length, ' ', n);
+                      length += n;
+                    }
+                }
+              }
+#endif
+#if NEED_PRINTF_DIRECTIVE_B || NEED_PRINTF_DIRECTIVE_UPPERCASE_B
+            else if (0
+# if NEED_PRINTF_DIRECTIVE_B
+                     || (dp->conversion == 'b')
+# endif
+# if NEED_PRINTF_DIRECTIVE_UPPERCASE_B
+                     || (dp->conversion == 'B')
+# endif
+                    )
+              {
+                arg_type type = a.arg[dp->arg_index].type;
+                int flags = dp->flags;
+                int has_width;
+                size_t width;
+                int has_precision;
+                size_t precision;
+                size_t tmp_length;
+                size_t count;
+                DCHAR_T tmpbuf[700];
+                DCHAR_T *tmp;
+                DCHAR_T *tmp_end;
+                DCHAR_T *tmp_start;
+                DCHAR_T *pad_ptr;
+                DCHAR_T *p;
+
+                has_width = 0;
+                width = 0;
+                if (dp->width_start != dp->width_end)
+                  {
+                    if (dp->width_arg_index != ARG_NONE)
+                      {
+                        int arg;
+
+                        if (!(a.arg[dp->width_arg_index].type == TYPE_INT))
+                          abort ();
+                        arg = a.arg[dp->width_arg_index].a.a_int;
+                        width = arg;
+                        if (arg < 0)
+                          {
+                            /* "A negative field width is taken as a '-' flag
+                                followed by a positive field width."  */
+                            flags |= FLAG_LEFT;
+                            width = -width;
+                          }
+                      }
+                    else
+                      {
+                        const FCHAR_T *digitp = dp->width_start;
+
+                        do
+                          width = xsum (xtimes (width, 10), *digitp++ - '0');
+                        while (digitp != dp->width_end);
+                      }
+                    has_width = 1;
+                  }
+
+                has_precision = 0;
+                precision = 1;
+                if (dp->precision_start != dp->precision_end)
+                  {
+                    if (dp->precision_arg_index != ARG_NONE)
+                      {
+                        int arg;
+
+                        if (!(a.arg[dp->precision_arg_index].type == TYPE_INT))
+                          abort ();
+                        arg = a.arg[dp->precision_arg_index].a.a_int;
+                        /* "A negative precision is taken as if the precision
+                            were omitted."  */
+                        if (arg >= 0)
+                          {
+                            precision = arg;
+                            has_precision = 1;
+                          }
+                      }
+                    else
+                      {
+                        const FCHAR_T *digitp = dp->precision_start + 1;
+
+                        precision = 0;
+                        while (digitp != dp->precision_end)
+                          precision = xsum (xtimes (precision, 10), *digitp++ - '0');
+                        has_precision = 1;
+                      }
+                  }
+
+                /* Allocate a temporary buffer of sufficient size.  */
+                switch (type)
+                  {
+                  default:
+                    tmp_length =
+                      (unsigned int) (sizeof (unsigned int) * CHAR_BIT)
+                      + 1; /* turn floor into ceil */
+                    break;
+                  case TYPE_ULONGINT:
+                    tmp_length =
+                      (unsigned int) (sizeof (unsigned long int) * CHAR_BIT)
+                      + 1; /* turn floor into ceil */
+                    break;
+                  case TYPE_ULONGLONGINT:
+                    tmp_length =
+                      (unsigned int) (sizeof (unsigned long long int) * CHAR_BIT)
+                      + 1; /* turn floor into ceil */
+                    break;
+                  case TYPE_UINT8_T:
+                    tmp_length =
+                      (unsigned int) (sizeof (uint8_t) * CHAR_BIT)
+                      + 1; /* turn floor into ceil */
+                    break;
+                  case TYPE_UINT16_T:
+                    tmp_length =
+                      (unsigned int) (sizeof (uint16_t) * CHAR_BIT)
+                      + 1; /* turn floor into ceil */
+                    break;
+                  case TYPE_UINT32_T:
+                    tmp_length =
+                      (unsigned int) (sizeof (uint32_t) * CHAR_BIT)
+                      + 1; /* turn floor into ceil */
+                    break;
+                  case TYPE_UINT64_T:
+                    tmp_length =
+                      (unsigned int) (sizeof (uint64_t) * CHAR_BIT)
+                      + 1; /* turn floor into ceil */
+                    break;
+                  case TYPE_UINT_FAST8_T:
+                    tmp_length =
+                      (unsigned int) (sizeof (uint_fast8_t) * CHAR_BIT)
+                      + 1; /* turn floor into ceil */
+                    break;
+                  case TYPE_UINT_FAST16_T:
+                    tmp_length =
+                      (unsigned int) (sizeof (uint_fast16_t) * CHAR_BIT)
+                      + 1; /* turn floor into ceil */
+                    break;
+                  case TYPE_UINT_FAST32_T:
+                    tmp_length =
+                      (unsigned int) (sizeof (uint_fast32_t) * CHAR_BIT)
+                      + 1; /* turn floor into ceil */
+                    break;
+                  case TYPE_UINT_FAST64_T:
+                    tmp_length =
+                      (unsigned int) (sizeof (uint_fast64_t) * CHAR_BIT)
+                      + 1; /* turn floor into ceil */
+                    break;
+                  }
+                if (tmp_length < precision)
+                  tmp_length = precision;
+                /* Add 2, to account for a prefix from the alternate form.  */
+                tmp_length = xsum (tmp_length, 2);
+
+                if (tmp_length < width)
+                  tmp_length = width;
+
+                if (tmp_length <= sizeof (tmpbuf) / sizeof (DCHAR_T))
+                  tmp = tmpbuf;
+                else
+                  {
+                    size_t tmp_memsize = xtimes (tmp_length, sizeof (DCHAR_T));
+
+                    if (size_overflow_p (tmp_memsize))
+                      /* Overflow, would lead to out of memory.  */
+                      goto out_of_memory;
+                    tmp = (DCHAR_T *) malloc (tmp_memsize);
+                    if (tmp == NULL)
+                      /* Out of memory.  */
+                      goto out_of_memory;
+                  }
+
+                tmp_end = tmp + tmp_length;
+
+                unsigned long long arg;
+                switch (type)
+                  {
+                  case TYPE_UCHAR:
+                    arg = a.arg[dp->arg_index].a.a_uchar;
+                    break;
+                  case TYPE_USHORT:
+                    arg = a.arg[dp->arg_index].a.a_ushort;
+                    break;
+                  case TYPE_UINT:
+                    arg = a.arg[dp->arg_index].a.a_uint;
+                    break;
+                  case TYPE_ULONGINT:
+                    arg = a.arg[dp->arg_index].a.a_ulongint;
+                    break;
+                  case TYPE_ULONGLONGINT:
+                    arg = a.arg[dp->arg_index].a.a_ulonglongint;
+                    break;
+                  case TYPE_UINT8_T:
+                    arg = a.arg[dp->arg_index].a.a_uint8_t;
+                    break;
+                  case TYPE_UINT16_T:
+                    arg = a.arg[dp->arg_index].a.a_uint16_t;
+                    break;
+                  case TYPE_UINT32_T:
+                    arg = a.arg[dp->arg_index].a.a_uint32_t;
+                    break;
+                  case TYPE_UINT64_T:
+                    arg = a.arg[dp->arg_index].a.a_uint64_t;
+                    break;
+                  case TYPE_UINT_FAST8_T:
+                    arg = a.arg[dp->arg_index].a.a_uint_fast8_t;
+                    break;
+                  case TYPE_UINT_FAST16_T:
+                    arg = a.arg[dp->arg_index].a.a_uint_fast16_t;
+                    break;
+                  case TYPE_UINT_FAST32_T:
+                    arg = a.arg[dp->arg_index].a.a_uint_fast32_t;
+                    break;
+                  case TYPE_UINT_FAST64_T:
+                    arg = a.arg[dp->arg_index].a.a_uint_fast64_t;
+                    break;
+                  default:
+                    abort ();
+                  }
+                int need_prefix = ((flags & FLAG_ALT) && arg != 0);
+
+                p = tmp_end;
+                /* "The result of converting a zero value with a precision
+                   of zero is no characters."  */
+                if (!(has_precision && precision == 0 && arg == 0))
+                  {
+                    do
+                      {
+                        *--p = '0' + (arg & 1);
+                        arg = arg >> 1;
+                      }
+                    while (arg != 0);
+                  }
+
+                if (has_precision)
+                  {
+                    DCHAR_T *digits_start = tmp_end - precision;
+                    while (p > digits_start)
+                      *--p = '0';
+                  }
+
+                pad_ptr = p;
+
+                if (need_prefix)
+                  {
+# if NEED_PRINTF_DIRECTIVE_B && !NEED_PRINTF_DIRECTIVE_UPPERCASE_B
+                    *--p = 'b';
+# elif NEED_PRINTF_DIRECTIVE_UPPERCASE_B && !NEED_PRINTF_DIRECTIVE_B
+                    *--p = 'B';
+# else
+                    *--p = dp->conversion;
+# endif
+                    *--p = '0';
+                  }
+                tmp_start = p;
+
+                /* The generated string now extends from tmp_start to tmp_end,
+                   with the zero padding insertion point being at pad_ptr,
+                   tmp_start <= pad_ptr <= tmp_end.  */
+                count = tmp_end - tmp_start;
+
+                if (count < width)
+                  {
+                    size_t pad = width - count;
+
+                    if (flags & FLAG_LEFT)
+                      {
+                        /* Pad with spaces on the right.  */
+                        for (p = tmp_start; p < tmp_end; p++)
+                          *(p - pad) = *p;
+                        for (p = tmp_end - pad; p < tmp_end; p++)
+                          *p = ' ';
+                      }
+                    else if ((flags & FLAG_ZERO)
+                             /* Neither ISO C nor POSIX specify that the '0'
+                                flag is ignored when a width and a precision
+                                are both present.  But most implementations
+                                do so.  */
+                             && !(has_width && has_precision))
+                      {
+                        /* Pad with zeroes.  */
+                        for (p = tmp_start; p < pad_ptr; p++)
+                          *(p - pad) = *p;
+                        for (p = pad_ptr - pad; p < pad_ptr; p++)
+                          *p = '0';
+                      }
+                    else
+                      {
+                        /* Pad with spaces on the left.  */
+                        for (p = tmp_start - pad; p < tmp_start; p++)
+                          *p = ' ';
+                      }
+
+                    tmp_start = tmp_start - pad;
+                  }
+
+                count = tmp_end - tmp_start;
+
+                if (count > tmp_length)
+                  /* tmp_length was incorrectly calculated - fix the
+                     code above!  */
+                  abort ();
+
+                /* Make room for the result.  */
+                if (count >= allocated - length)
+                  {
+                    size_t n = xsum (length, count);
+
+                    ENSURE_ALLOCATION (n);
+                  }
+
+                /* Append the result.  */
+                memcpy (result + length, tmp_start, count * sizeof (DCHAR_T));
+                if (tmp != tmpbuf)
+                  free (tmp);
+                length += count;
+              }
+#endif
+#if NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE || (NEED_WPRINTF_DIRECTIVE_LA && WIDE_CHAR_VERSION)
+            else if ((dp->conversion == 'a' || dp->conversion == 'A')
+# if !(NEED_PRINTF_DIRECTIVE_A || (NEED_PRINTF_LONG_DOUBLE && NEED_PRINTF_DOUBLE))
+                     && (0
+#  if NEED_PRINTF_DOUBLE
+                         || a.arg[dp->arg_index].type == TYPE_DOUBLE
+#  endif
+#  if NEED_PRINTF_LONG_DOUBLE || (NEED_WPRINTF_DIRECTIVE_LA && WIDE_CHAR_VERSION)
+                         || a.arg[dp->arg_index].type == TYPE_LONGDOUBLE
+#  endif
+                        )
+# endif
+                    )
+              {
+                arg_type type = a.arg[dp->arg_index].type;
+                int flags = dp->flags;
+                size_t width;
+                int has_precision;
+                size_t precision;
+                size_t tmp_length;
+                size_t count;
+                DCHAR_T tmpbuf[700];
+                DCHAR_T *tmp;
+                DCHAR_T *pad_ptr;
+                DCHAR_T *p;
+
+                width = 0;
+                if (dp->width_start != dp->width_end)
+                  {
+                    if (dp->width_arg_index != ARG_NONE)
+                      {
+                        int arg;
+
+                        if (!(a.arg[dp->width_arg_index].type == TYPE_INT))
+                          abort ();
+                        arg = a.arg[dp->width_arg_index].a.a_int;
+                        width = arg;
+                        if (arg < 0)
+                          {
+                            /* "A negative field width is taken as a '-' flag
+                                followed by a positive field width."  */
+                            flags |= FLAG_LEFT;
+                            width = -width;
+                          }
+                      }
+                    else
+                      {
+                        const FCHAR_T *digitp = dp->width_start;
+
+                        do
+                          width = xsum (xtimes (width, 10), *digitp++ - '0');
+                        while (digitp != dp->width_end);
+                      }
+                  }
+
+                has_precision = 0;
+                precision = 0;
+                if (dp->precision_start != dp->precision_end)
+                  {
+                    if (dp->precision_arg_index != ARG_NONE)
+                      {
+                        int arg;
+
+                        if (!(a.arg[dp->precision_arg_index].type == TYPE_INT))
+                          abort ();
+                        arg = a.arg[dp->precision_arg_index].a.a_int;
+                        /* "A negative precision is taken as if the precision
+                            were omitted."  */
+                        if (arg >= 0)
                           {
                             precision = arg;
                             has_precision = 1;
@@ -3170,7 +4056,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                 p = tmp;
                 if (type == TYPE_LONGDOUBLE)
                   {
-# if NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE
+# if NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE || (NEED_WPRINTF_DIRECTIVE_LA && WIDE_CHAR_VERSION)
                     long double arg = a.arg[dp->arg_index].a.a_longdouble;
 
                     if (isnanl (arg))
@@ -3290,7 +4176,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                                 }
                               }
                               *p++ = dp->conversion - 'A' + 'P';
-#  if WIDE_CHAR_VERSION
+#  if WIDE_CHAR_VERSION && DCHAR_IS_TCHAR
                               {
                                 static const wchar_t decimal_format[] =
                                   { '%', '+', 'd', '\0' };
@@ -3441,7 +4327,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                                 }
                               }
                               *p++ = dp->conversion - 'A' + 'P';
-#  if WIDE_CHAR_VERSION
+#  if WIDE_CHAR_VERSION && DCHAR_IS_TCHAR
                               {
                                 static const wchar_t decimal_format[] =
                                   { '%', '+', 'd', '\0' };
@@ -3533,7 +4419,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                 length += count;
               }
 #endif
-#if (NEED_PRINTF_INFINITE_DOUBLE || NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL
+#if NEED_PRINTF_INFINITE_DOUBLE || NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE || NEED_PRINTF_LONG_DOUBLE
             else if ((dp->conversion == 'f' || dp->conversion == 'F'
                       || dp->conversion == 'e' || dp->conversion == 'E'
                       || dp->conversion == 'g' || dp->conversion == 'G'
@@ -3901,7 +4787,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                                   }
 
                                 *p++ = dp->conversion; /* 'e' or 'E' */
-#   if WIDE_CHAR_VERSION
+#   if WIDE_CHAR_VERSION && DCHAR_IS_TCHAR
                                 {
                                   static const wchar_t decimal_format[] =
                                     { '%', '+', '.', '2', 'd', '\0' };
@@ -4082,7 +4968,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                                               }
                                           }
                                         *p++ = dp->conversion - 'G' + 'E'; /* 'e' or 'E' */
-#   if WIDE_CHAR_VERSION
+#   if WIDE_CHAR_VERSION && DCHAR_IS_TCHAR
                                         {
                                           static const wchar_t decimal_format[] =
                                             { '%', '+', '.', '2', 'd', '\0' };
@@ -4359,7 +5245,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                                   }
 
                                 *p++ = dp->conversion; /* 'e' or 'E' */
-#   if WIDE_CHAR_VERSION
+#   if WIDE_CHAR_VERSION && DCHAR_IS_TCHAR
                                 {
                                   static const wchar_t decimal_format[] =
                                     /* Produce the same number of exponent digits
@@ -4552,7 +5438,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                                               }
                                           }
                                         *p++ = dp->conversion - 'G' + 'E'; /* 'e' or 'E' */
-#   if WIDE_CHAR_VERSION
+#   if WIDE_CHAR_VERSION && DCHAR_IS_TCHAR
                                         {
                                           static const wchar_t decimal_format[] =
                                             /* Produce the same number of exponent digits
@@ -4720,13 +5606,13 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
               {
                 arg_type type = a.arg[dp->arg_index].type;
                 int flags = dp->flags;
-#if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
+#if (WIDE_CHAR_VERSION && MUSL_LIBC) || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
                 int has_width;
 #endif
-#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
+#if !USE_SNPRINTF || WIDE_CHAR_VERSION || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
                 size_t width;
 #endif
-#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || NEED_PRINTF_UNBOUNDED_PRECISION
+#if !USE_SNPRINTF || (WIDE_CHAR_VERSION && DCHAR_IS_TCHAR) || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || NEED_PRINTF_UNBOUNDED_PRECISION
                 int has_precision;
                 size_t precision;
 #endif
@@ -4735,7 +5621,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
 #else
 #               define prec_ourselves 0
 #endif
-#if NEED_PRINTF_FLAG_LEFTADJUST
+#if (WIDE_CHAR_VERSION && MUSL_LIBC) || NEED_PRINTF_FLAG_LEFTADJUST
 #               define pad_ourselves 1
 #elif !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
                 int pad_ourselves;
@@ -4752,10 +5638,10 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                 TCHAR_T *tmp;
 #endif
 
-#if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
+#if (WIDE_CHAR_VERSION && MUSL_LIBC) || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
                 has_width = 0;
 #endif
-#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
+#if !USE_SNPRINTF || WIDE_CHAR_VERSION || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
                 width = 0;
                 if (dp->width_start != dp->width_end)
                   {
@@ -4783,13 +5669,13 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                           width = xsum (xtimes (width, 10), *digitp++ - '0');
                         while (digitp != dp->width_end);
                       }
-#if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
+#if (WIDE_CHAR_VERSION && MUSL_LIBC) || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
                     has_width = 1;
 #endif
                   }
 #endif
 
-#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || NEED_PRINTF_UNBOUNDED_PRECISION
+#if !USE_SNPRINTF || (WIDE_CHAR_VERSION && DCHAR_IS_TCHAR) || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || NEED_PRINTF_UNBOUNDED_PRECISION
                 has_precision = 0;
                 precision = 6;
                 if (dp->precision_start != dp->precision_end)
@@ -4826,6 +5712,11 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                 switch (dp->conversion)
                   {
                   case 'd': case 'i': case 'u':
+                  case 'b':
+                  #if SUPPORT_GNU_PRINTF_DIRECTIVES \
+                      || (__GLIBC__ + (__GLIBC_MINOR__ >= 35) > 2)
+                  case 'B':
+                  #endif
                   case 'o':
                   case 'x': case 'X': case 'p':
                     prec_ourselves = has_precision && (precision > 0);
@@ -4837,7 +5728,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
 #endif
 
                 /* Decide whether to perform the padding ourselves.  */
-#if !NEED_PRINTF_FLAG_LEFTADJUST && (!DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION)
+#if !((WIDE_CHAR_VERSION && MUSL_LIBC) || NEED_PRINTF_FLAG_LEFTADJUST) && (!DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION)
                 switch (dp->conversion)
                   {
 # if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO
@@ -4956,6 +5847,54 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                   {
                   case TYPE_LONGLONGINT:
                   case TYPE_ULONGLONGINT:
+                  #if INT8_WIDTH > LONG_WIDTH
+                  case TYPE_INT8_T:
+                  #endif
+                  #if UINT8_WIDTH > LONG_WIDTH
+                  case TYPE_UINT8_T:
+                  #endif
+                  #if INT16_WIDTH > LONG_WIDTH
+                  case TYPE_INT16_T:
+                  #endif
+                  #if UINT16_WIDTH > LONG_WIDTH
+                  case TYPE_UINT16_T:
+                  #endif
+                  #if INT32_WIDTH > LONG_WIDTH
+                  case TYPE_INT32_T:
+                  #endif
+                  #if UINT32_WIDTH > LONG_WIDTH
+                  case TYPE_UINT32_T:
+                  #endif
+                  #if INT64_WIDTH > LONG_WIDTH
+                  case TYPE_INT64_T:
+                  #endif
+                  #if UINT64_WIDTH > LONG_WIDTH
+                  case TYPE_UINT64_T:
+                  #endif
+                  #if INT_FAST8_WIDTH > LONG_WIDTH
+                  case TYPE_INT_FAST8_T:
+                  #endif
+                  #if UINT_FAST8_WIDTH > LONG_WIDTH
+                  case TYPE_UINT_FAST8_T:
+                  #endif
+                  #if INT_FAST16_WIDTH > LONG_WIDTH
+                  case TYPE_INT_FAST16_T:
+                  #endif
+                  #if UINT_FAST16_WIDTH > LONG_WIDTH
+                  case TYPE_UINT_FAST16_T:
+                  #endif
+                  #if INT_FAST32_WIDTH > LONG_WIDTH
+                  case TYPE_INT3_FAST2_T:
+                  #endif
+                  #if UINT_FAST32_WIDTH > LONG_WIDTH
+                  case TYPE_UINT_FAST32_T:
+                  #endif
+                  #if INT_FAST64_WIDTH > LONG_WIDTH
+                  case TYPE_INT_FAST64_T:
+                  #endif
+                  #if UINT_FAST64_WIDTH > LONG_WIDTH
+                  case TYPE_UINT_FAST64_T:
+                  #endif
 #if defined _WIN32 && ! defined __CYGWIN__
                     *fbp++ = 'I';
                     *fbp++ = '6';
@@ -4967,12 +5906,60 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                     FALLTHROUGH;
                   case TYPE_LONGINT:
                   case TYPE_ULONGINT:
-#if HAVE_WINT_T
+                  #if INT8_WIDTH > INT_WIDTH && INT8_WIDTH <= LONG_WIDTH
+                  case TYPE_INT8_T:
+                  #endif
+                  #if UINT8_WIDTH > INT_WIDTH && UINT8_WIDTH <= LONG_WIDTH
+                  case TYPE_UINT8_T:
+                  #endif
+                  #if INT16_WIDTH > INT_WIDTH && INT16_WIDTH <= LONG_WIDTH
+                  case TYPE_INT16_T:
+                  #endif
+                  #if UINT16_WIDTH > INT_WIDTH && UINT16_WIDTH <= LONG_WIDTH
+                  case TYPE_UINT16_T:
+                  #endif
+                  #if INT32_WIDTH > INT_WIDTH && INT32_WIDTH <= LONG_WIDTH
+                  case TYPE_INT32_T:
+                  #endif
+                  #if UINT32_WIDTH > INT_WIDTH && UINT32_WIDTH <= LONG_WIDTH
+                  case TYPE_UINT32_T:
+                  #endif
+                  #if INT64_WIDTH > INT_WIDTH && INT64_WIDTH <= LONG_WIDTH
+                  case TYPE_INT64_T:
+                  #endif
+                  #if UINT64_WIDTH > INT_WIDTH && UINT64_WIDTH <= LONG_WIDTH
+                  case TYPE_UINT64_T:
+                  #endif
+                  #if INT_FAST8_WIDTH > INT_WIDTH && INT_FAST8_WIDTH <= LONG_WIDTH
+                  case TYPE_INT_FAST8_T:
+                  #endif
+                  #if UINT_FAST8_WIDTH > INT_WIDTH && UINT_FAST8_WIDTH <= LONG_WIDTH
+                  case TYPE_UINT_FAST8_T:
+                  #endif
+                  #if INT_FAST16_WIDTH > INT_WIDTH && INT_FAST16_WIDTH <= LONG_WIDTH
+                  case TYPE_INT_FAST16_T:
+                  #endif
+                  #if UINT_FAST16_WIDTH > INT_WIDTH && UINT_FAST16_WIDTH <= LONG_WIDTH
+                  case TYPE_UINT_FAST16_T:
+                  #endif
+                  #if INT_FAST32_WIDTH > INT_WIDTH && INT_FAST32_WIDTH <= LONG_WIDTH
+                  case TYPE_INT_FAST32_T:
+                  #endif
+                  #if UINT_FAST32_WIDTH > INT_WIDTH && UINT_FAST32_WIDTH <= LONG_WIDTH
+                  case TYPE_UINT_FAST32_T:
+                  #endif
+                  #if INT_FAST64_WIDTH > INT_WIDTH && INT_FAST64_WIDTH <= LONG_WIDTH
+                  case TYPE_INT_FAST64_T:
+                  #endif
+                  #if UINT_FAST64_WIDTH > INT_WIDTH && UINT_FAST64_WIDTH <= LONG_WIDTH
+                  case TYPE_UINT_FAST64_T:
+                  #endif
+                  #if HAVE_WINT_T
                   case TYPE_WIDE_CHAR:
-#endif
-#if HAVE_WCHAR_T
+                  #endif
+                  #if HAVE_WCHAR_T
                   case TYPE_WIDE_STRING:
-#endif
+                  #endif
                     *fbp++ = 'l';
                     break;
                   case TYPE_LONGDOUBLE:
@@ -4988,47 +5975,74 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
 #endif
                   *fbp = dp->conversion;
 #if USE_SNPRINTF
-# if ((HAVE_SNPRINTF_RETVAL_C99 && HAVE_SNPRINTF_TRUNCATION_C99)            \
+                /* Decide whether to pass %n in the format string
+                   to SNPRINTF.  */
+# if (((!WIDE_CHAR_VERSION || !DCHAR_IS_TCHAR)                              \
+       && (HAVE_SNPRINTF_RETVAL_C99 && HAVE_SNPRINTF_TRUNCATION_C99))       \
       || ((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3))       \
           && !defined __UCLIBC__)                                           \
       || (defined __APPLE__ && defined __MACH__)                            \
+      || defined __OpenBSD__                                                \
       || defined __ANDROID__                                                \
-      || (defined _WIN32 && ! defined __CYGWIN__))
-                /* On systems where we know that snprintf's return value
-                   conforms to ISO C 99 (HAVE_SNPRINTF_RETVAL_C99) and that
-                   snprintf always produces NUL-terminated strings
-                   (HAVE_SNPRINTF_TRUNCATION_C99), it is possible to avoid
-                   using %n.  And it is desirable to do so, because more and
-                   more platforms no longer support %n, for "security reasons".
-                   In particular, the following platforms:
+      || (defined _WIN32 && ! defined __CYGWIN__))                          \
+      || (WIDE_CHAR_VERSION && MUSL_LIBC)
+                /* We can avoid passing %n and instead rely on SNPRINTF's
+                   return value if
+                     - !WIDE_CHAR_VERSION || !DCHAR_IS_TCHAR, because otherwise,
+                       when WIDE_CHAR_VERSION && DCHAR_IS_TCHAR,
+                       snwprintf()/_snwprintf() (Windows) and swprintf() (Unix)
+                       don't return the needed buffer size,
+                     and
+                     - we're compiling for a system where we know
+                       - that snprintf's return value conforms to ISO C 99
+                         (HAVE_SNPRINTF_RETVAL_C99) and
+                       - that snprintf always produces NUL-terminated strings
+                         (HAVE_SNPRINTF_TRUNCATION_C99).
+                   And it is desirable to do so, because more and more platforms
+                   no longer support %n, for "security reasons".  */
+                /* On specific platforms, listed below, we *must* avoid %n.
+                   In the case
+                     !WIDE_CHAR_VERSION && HAVE_SNPRINTF_RETVAL_C99 && !USE_MSVC__SNPRINTF
+                   we can rely on the return value of snprintf instead.  Whereas
+                   in the opposite case
+                     WIDE_CHAR_VERSION || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF
+                   we need to make room based on an estimation, computed by
+                   MAX_ROOM_NEEDED.  */
+                /* The following platforms forbid %n:
                      - On glibc2 systems from 2004-10-18 or newer, the use of
                        %n in format strings in writable memory may crash the
                        program (if compiled with _FORTIFY_SOURCE=2).
-                     - On Mac OS X 10.13 or newer, the use of %n in format
+                     - On macOS 10.13 or newer, the use of %n in format
                        strings in writable memory by default crashes the
                        program.
+                     - On OpenBSD, since 2021-08-30, the use of %n in format
+                       strings produces an abort (see
+                       <https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libc/stdio/vfprintf.c.diff?r1=1.79&r2=1.80&f=h>,
+                       <https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libc/stdio/vfwprintf.c.diff?r1=1.20&r2=1.21&f=h>).
                      - On Android, starting on 2018-03-07, the use of %n in
                        format strings produces a fatal error (see
                        <https://android.googlesource.com/platform/bionic/+/41398d03b7e8e0dfb951660ae713e682e9fc0336>).
-                   On these platforms, HAVE_SNPRINTF_RETVAL_C99 and
-                   HAVE_SNPRINTF_TRUNCATION_C99 are 1. We have listed them
-                   explicitly in the condition above, in case of cross-
-                   compilation (just to be sure).  */
-                /* On native Windows systems (such as mingw), we can avoid using
-                   %n because:
+                     - On native Windows systems (such as mingw) where the OS is
+                       Windows Vista, the use of %n in format strings by default
+                       crashes the program. See
+                         <https://gcc.gnu.org/ml/gcc/2007-06/msg00122.html> and
+                         <https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/set-printf-count-output>
+                   On the first four of these platforms, if !WIDE_CHAR_VERSION,
+                   it is not a big deal to avoid %n, because on these platforms,
+                   HAVE_SNPRINTF_RETVAL_C99 and HAVE_SNPRINTF_TRUNCATION_C99 are
+                   1.
+                   On native Windows, if !WIDE_CHAR_VERSION, it's not a big deal
+                   either because:
                      - Although the gl_SNPRINTF_TRUNCATION_C99 test fails,
                        snprintf does not write more than the specified number
                        of bytes. (snprintf (buf, 3, "%d %d", 4567, 89) writes
                        '4', '5', '6' into buf, not '4', '5', '\0'.)
                      - Although the gl_SNPRINTF_RETVAL_C99 test fails, snprintf
                        allows us to recognize the case of an insufficient
-                       buffer size: it returns -1 in this case.
-                   On native Windows systems (such as mingw) where the OS is
-                   Windows Vista, the use of %n in format strings by default
-                   crashes the program. See
-                     <https://gcc.gnu.org/ml/gcc/2007-06/msg00122.html> and
-                     <https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/set-printf-count-output>
-                   So we should avoid %n in this situation.  */
+                       buffer size: it returns -1 in this case.  */
+                /* Additionally, in the WIDE_CHAR_VERSION case, we cannot use %n
+                   on musl libc because we would run into an swprintf() bug.
+                   See <https://www.openwall.com/lists/musl/2023/03/19/1>.  */
                 fbp[1] = '\0';
 # else           /* AIX <= 5.1, HP-UX, IRIX, OSF/1, Solaris <= 9, BeOS */
                 fbp[1] = '%';
@@ -5189,6 +6203,102 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                           SNPRINTF_BUF (arg);
                         }
                         break;
+                      case TYPE_INT8_T:
+                        {
+                          int8_t arg = a.arg[dp->arg_index].a.a_int8_t;
+                          SNPRINTF_BUF (arg);
+                        }
+                        break;
+                      case TYPE_UINT8_T:
+                        {
+                          uint8_t arg = a.arg[dp->arg_index].a.a_uint8_t;
+                          SNPRINTF_BUF (arg);
+                        }
+                        break;
+                      case TYPE_INT16_T:
+                        {
+                          int16_t arg = a.arg[dp->arg_index].a.a_int16_t;
+                          SNPRINTF_BUF (arg);
+                        }
+                        break;
+                      case TYPE_UINT16_T:
+                        {
+                          uint16_t arg = a.arg[dp->arg_index].a.a_uint16_t;
+                          SNPRINTF_BUF (arg);
+                        }
+                        break;
+                      case TYPE_INT32_T:
+                        {
+                          int32_t arg = a.arg[dp->arg_index].a.a_int32_t;
+                          SNPRINTF_BUF (arg);
+                        }
+                        break;
+                      case TYPE_UINT32_T:
+                        {
+                          uint32_t arg = a.arg[dp->arg_index].a.a_uint32_t;
+                          SNPRINTF_BUF (arg);
+                        }
+                        break;
+                      case TYPE_INT64_T:
+                        {
+                          int64_t arg = a.arg[dp->arg_index].a.a_int64_t;
+                          SNPRINTF_BUF (arg);
+                        }
+                        break;
+                      case TYPE_UINT64_T:
+                        {
+                          uint64_t arg = a.arg[dp->arg_index].a.a_uint64_t;
+                          SNPRINTF_BUF (arg);
+                        }
+                        break;
+                      case TYPE_INT_FAST8_T:
+                        {
+                          int_fast8_t arg = a.arg[dp->arg_index].a.a_int_fast8_t;
+                          SNPRINTF_BUF (arg);
+                        }
+                        break;
+                      case TYPE_UINT_FAST8_T:
+                        {
+                          uint_fast8_t arg = a.arg[dp->arg_index].a.a_uint_fast8_t;
+                          SNPRINTF_BUF (arg);
+                        }
+                        break;
+                      case TYPE_INT_FAST16_T:
+                        {
+                          int_fast16_t arg = a.arg[dp->arg_index].a.a_int_fast16_t;
+                          SNPRINTF_BUF (arg);
+                        }
+                        break;
+                      case TYPE_UINT_FAST16_T:
+                        {
+                          uint_fast16_t arg = a.arg[dp->arg_index].a.a_uint_fast16_t;
+                          SNPRINTF_BUF (arg);
+                        }
+                        break;
+                      case TYPE_INT_FAST32_T:
+                        {
+                          int_fast32_t arg = a.arg[dp->arg_index].a.a_int_fast32_t;
+                          SNPRINTF_BUF (arg);
+                        }
+                        break;
+                      case TYPE_UINT_FAST32_T:
+                        {
+                          uint_fast32_t arg = a.arg[dp->arg_index].a.a_uint_fast32_t;
+                          SNPRINTF_BUF (arg);
+                        }
+                        break;
+                      case TYPE_INT_FAST64_T:
+                        {
+                          int_fast64_t arg = a.arg[dp->arg_index].a.a_int_fast64_t;
+                          SNPRINTF_BUF (arg);
+                        }
+                        break;
+                      case TYPE_UINT_FAST64_T:
+                        {
+                          uint_fast64_t arg = a.arg[dp->arg_index].a.a_uint_fast64_t;
+                          SNPRINTF_BUF (arg);
+                        }
+                        break;
                       case TYPE_DOUBLE:
                         {
                           double arg = a.arg[dp->arg_index].a.a_double;
@@ -5271,12 +6381,16 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                             /* Look at the snprintf() return value.  */
                             if (retcount < 0)
                               {
-# if !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF
+# if (WIDE_CHAR_VERSION && DCHAR_IS_TCHAR) || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF
                                 /* HP-UX 10.20 snprintf() is doubly deficient:
                                    It doesn't understand the '%n' directive,
                                    *and* it returns -1 (rather than the length
                                    that would have been required) when the
                                    buffer is too small.
+                                   Likewise, in case of
+                                   WIDE_CHAR_VERSION && DCHAR_IS_TCHAR, the
+                                   functions snwprintf()/_snwprintf() (Windows)
+                                   or swprintf() (Unix).
                                    But a failure at this point can also come
                                    from other reasons than a too small buffer,
                                    such as an invalid wide string argument to
@@ -5312,7 +6426,15 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
 # endif
                               }
                             else
-                              count = retcount;
+                              {
+                                count = retcount;
+# if WIDE_CHAR_VERSION && defined __MINGW32__
+                                if (count == 0 && dp->conversion == 'c')
+                                  /* snwprintf returned 0 instead of 1.  But it
+                                     wrote a null wide character.  */
+                                  count = 1;
+# endif
+                              }
                           }
                       }
 #endif
@@ -5442,21 +6564,73 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
 
 #if !DCHAR_IS_TCHAR
                     /* Convert from TCHAR_T[] to DCHAR_T[].  */
-                    if (dp->conversion == 'c' || dp->conversion == 's')
+                    if (dp->conversion == 'c' || dp->conversion == 's'
+# if __GLIBC__ >= 2 && !defined __UCLIBC__
+                        || (flags & FLAG_LOCALIZED)
+# endif
+                       )
                       {
-                        /* type = TYPE_CHAR or TYPE_WIDE_CHAR or TYPE_STRING
-                           TYPE_WIDE_STRING.
-                           The result string is not certainly ASCII.  */
+                        /* The result string is not guaranteed to be ASCII.  */
                         const TCHAR_T *tmpsrc;
                         DCHAR_T *tmpdst;
                         size_t tmpdst_len;
                         /* This code assumes that TCHAR_T is 'char'.  */
-                        verify (sizeof (TCHAR_T) == 1);
+                        static_assert (sizeof (TCHAR_T) == 1);
 # if USE_SNPRINTF
                         tmpsrc = (TCHAR_T *) (result + length);
 # else
                         tmpsrc = tmp;
 # endif
+# if WIDE_CHAR_VERSION
+                        /* Convert tmpsrc[0..count-1] to a freshly allocated
+                           wide character array.  */
+                        mbstate_t state;
+
+                        memset (&state, '\0', sizeof (mbstate_t));
+                        tmpdst_len = 0;
+                        {
+                          const TCHAR_T *src = tmpsrc;
+                          size_t srclen = count;
+
+                          for (; srclen > 0; tmpdst_len++)
+                            {
+                              /* Parse the next multibyte character.  */
+                              size_t ret = mbrtowc (NULL, src, srclen, &state);
+                              if (ret == (size_t)(-2) || ret == (size_t)(-1))
+                                goto fail_with_EILSEQ;
+                              if (ret == 0)
+                                ret = 1;
+                              src += ret;
+                              srclen -= ret;
+                            }
+                        }
+
+                        tmpdst =
+                          (wchar_t *) malloc ((tmpdst_len + 1) * sizeof (wchar_t));
+                        if (tmpdst == NULL)
+                          goto out_of_memory;
+
+                        memset (&state, '\0', sizeof (mbstate_t));
+                        {
+                          DCHAR_T *destptr = tmpdst;
+                          const TCHAR_T *src = tmpsrc;
+                          size_t srclen = count;
+
+                          for (; srclen > 0; destptr++)
+                            {
+                              /* Parse the next multibyte character.  */
+                              size_t ret = mbrtowc (destptr, src, srclen, &state);
+                              if (ret == (size_t)(-2) || ret == (size_t)(-1))
+                                /* Should already have been caught in the first
+                                   loop, above.  */
+                                abort ();
+                              if (ret == 0)
+                                ret = 1;
+                              src += ret;
+                              srclen -= ret;
+                            }
+                        }
+# else
                         tmpdst =
                           DCHAR_CONV_FROM_ENCODING (locale_charset (),
                                                     iconveh_question_mark,
@@ -5465,6 +6639,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                                                     NULL, &tmpdst_len);
                         if (tmpdst == NULL)
                           goto fail_with_errno;
+# endif
                         ENSURE_ALLOCATION_ELSE (xsum (length, tmpdst_len),
                                                 { free (tmpdst); goto out_of_memory; });
                         DCHAR_CPY (result + length, tmpdst, tmpdst_len);
@@ -5531,7 +6706,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                     /* Here count <= allocated - length.  */
 
                     /* Perform padding.  */
-#if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
+#if (WIDE_CHAR_VERSION && MUSL_LIBC) || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
                     if (pad_ourselves && has_width)
                       {
                         size_t w;
@@ -5590,6 +6765,22 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                                   if ((*pad_ptr >= 'A' && *pad_ptr <= 'Z')
                                       || (*pad_ptr >= 'a' && *pad_ptr <= 'z'))
                                     pad_ptr = NULL;
+                                  else
+                                    /* Do the zero-padding after the "0x" or
+                                       "0b" prefix, not before.  */
+                                    if (p - rp >= 2
+                                        && *rp == '0'
+                                        && (((dp->conversion == 'a'
+                                              || dp->conversion == 'x')
+                                             && rp[1] == 'x')
+                                            || ((dp->conversion == 'A'
+                                                 || dp->conversion == 'X')
+                                                && rp[1] == 'X')
+                                            || (dp->conversion == 'b'
+                                                && rp[1] == 'b')
+                                            || (dp->conversion == 'B'
+                                                && rp[1] == 'B')))
+                                      pad_ptr += 2;
                                 }
                               /* The generated string now extends from rp to p,
                                  with the zero padding insertion point being at
@@ -5697,7 +6888,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
     errno = ENOMEM;
     goto fail_with_errno;
 
-#if ENABLE_UNISTDIO || ((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || (NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL) || ENABLE_WCHAR_FALLBACK) && HAVE_WCHAR_T)
+#if ENABLE_UNISTDIO || ((!USE_SNPRINTF || WIDE_CHAR_VERSION || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || NEED_PRINTF_DIRECTIVE_LS || ENABLE_WCHAR_FALLBACK) && HAVE_WCHAR_T) || ((NEED_PRINTF_DIRECTIVE_LC || ENABLE_WCHAR_FALLBACK) && HAVE_WINT_T && !WIDE_CHAR_VERSION) || (NEED_WPRINTF_DIRECTIVE_C && WIDE_CHAR_VERSION)
   fail_with_EILSEQ:
     errno = EILSEQ;
     goto fail_with_errno;
diff --git a/gnulib-tests/vasnprintf.h b/gnulib-tests/vasnprintf.h
index 27cf54c5..2d134070 100644
--- a/gnulib-tests/vasnprintf.h
+++ b/gnulib-tests/vasnprintf.h
@@ -1,5 +1,5 @@
 /* vsprintf with automatic memory allocation.
-   Copyright (C) 2002-2004, 2007-2022 Free Software Foundation, Inc.
+   Copyright (C) 2002-2004, 2007-2023 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
@@ -17,6 +17,11 @@
 #ifndef _VASNPRINTF_H
 #define _VASNPRINTF_H
 
+/* This file uses _GL_ATTRIBUTE_FORMAT.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 /* Get va_list.  */
 #include <stdarg.h>
 
diff --git a/gnulib-tests/w32sock.h b/gnulib-tests/w32sock.h
index 17db3f12..84e46e33 100644
--- a/gnulib-tests/w32sock.h
+++ b/gnulib-tests/w32sock.h
@@ -1,6 +1,6 @@
 /* w32sock.h --- internal auxiliary functions for Windows socket functions
 
-   Copyright (C) 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 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
diff --git a/gnulib-tests/warn-on-use.h b/gnulib-tests/warn-on-use.h
index 94f5b920..30756034 100644
--- a/gnulib-tests/warn-on-use.h
+++ b/gnulib-tests/warn-on-use.h
@@ -1,5 +1,5 @@
 /* A C macro for emitting warnings if a function is used.
-   Copyright (C) 2010-2022 Free Software Foundation, Inc.
+   Copyright (C) 2010-2023 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
diff --git a/gnulib-tests/windows-thread.c b/gnulib-tests/windows-thread.c
index 5ae1e144..87866dd5 100644
--- a/gnulib-tests/windows-thread.c
+++ b/gnulib-tests/windows-thread.c
@@ -1,5 +1,5 @@
 /* Creating and controlling threads (native Windows implementation).
-   Copyright (C) 2005-2022 Free Software Foundation, Inc.
+   Copyright (C) 2005-2023 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
diff --git a/gnulib-tests/windows-thread.h b/gnulib-tests/windows-thread.h
index 76069771..e6511d73 100644
--- a/gnulib-tests/windows-thread.h
+++ b/gnulib-tests/windows-thread.h
@@ -1,5 +1,5 @@
 /* Creating and controlling threads (native Windows implementation).
-   Copyright (C) 2005-2022 Free Software Foundation, Inc.
+   Copyright (C) 2005-2023 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
@@ -20,6 +20,11 @@
 #ifndef _WINDOWS_THREAD_H
 #define _WINDOWS_THREAD_H
 
+/* This file uses _Noreturn.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #define WIN32_LEAN_AND_MEAN  /* avoid including junk */
 #include <windows.h>
 
diff --git a/gnulib-tests/windows-tls.c b/gnulib-tests/windows-tls.c
index b24a7d55..3b6ff80e 100644
--- a/gnulib-tests/windows-tls.c
+++ b/gnulib-tests/windows-tls.c
@@ -1,5 +1,5 @@
 /* Thread-local storage (native Windows implementation).
-   Copyright (C) 2005-2022 Free Software Foundation, Inc.
+   Copyright (C) 2005-2023 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
diff --git a/gnulib-tests/windows-tls.h b/gnulib-tests/windows-tls.h
index 0d2de560..b1e4dbfb 100644
--- a/gnulib-tests/windows-tls.h
+++ b/gnulib-tests/windows-tls.h
@@ -1,5 +1,5 @@
 /* Thread-local storage (native Windows implementation).
-   Copyright (C) 2005-2022 Free Software Foundation, Inc.
+   Copyright (C) 2005-2023 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
diff --git a/gnulib-tests/xsize.c b/gnulib-tests/xsize.c
index 761e3434..279ae824 100644
--- a/gnulib-tests/xsize.c
+++ b/gnulib-tests/xsize.c
@@ -1,6 +1,6 @@
 /* Checked size_t computations.
 
-   Copyright (C) 2012-2022 Free Software Foundation, Inc.
+   Copyright (C) 2012-2023 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
diff --git a/gnulib-tests/xsize.h b/gnulib-tests/xsize.h
index 0bfa4c88..5b08d61f 100644
--- a/gnulib-tests/xsize.h
+++ b/gnulib-tests/xsize.h
@@ -1,6 +1,6 @@
 /* xsize.h -- Checked size_t computations.
 
-   Copyright (C) 2003, 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2008-2023 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
@@ -18,6 +18,11 @@
 #ifndef _XSIZE_H
 #define _XSIZE_H
 
+/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, HAVE_STDINT_H.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 /* Get size_t.  */
 #include <stddef.h>
 
@@ -30,9 +35,6 @@
 /* Get ATTRIBUTE_PURE.  */
 #include "attribute.h"
 
-#ifndef _GL_INLINE_HEADER_BEGIN
- #error "Please include config.h first."
-#endif
 _GL_INLINE_HEADER_BEGIN
 #ifndef XSIZE_INLINE
 # define XSIZE_INLINE _GL_INLINE
diff --git a/gnulib-tests/xstrtol-error.c b/gnulib-tests/xstrtol-error.c
index 4f4d90e3..7749e021 100644
--- a/gnulib-tests/xstrtol-error.c
+++ b/gnulib-tests/xstrtol-error.c
@@ -1,6 +1,6 @@
 /* A more useful interface to strtol.
 
-   Copyright (C) 1995-1996, 1998-1999, 2001-2004, 2006-2022 Free Software
+   Copyright (C) 1995-1996, 1998-1999, 2001-2004, 2006-2023 Free Software
    Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/xstrtol-error.h b/gnulib-tests/xstrtol-error.h
index 53884372..0872f590 100644
--- a/gnulib-tests/xstrtol-error.h
+++ b/gnulib-tests/xstrtol-error.h
@@ -1,6 +1,6 @@
 /* Error reporting interface for xstrto* functions.
 
-   Copyright (C) 1995-1996, 1998-1999, 2001-2004, 2006-2022 Free Software
+   Copyright (C) 1995-1996, 1998-1999, 2001-2004, 2006-2023 Free Software
    Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
@@ -19,6 +19,11 @@
 #ifndef XSTRTOL_ERROR_H_
 # define XSTRTOL_ERROR_H_ 1
 
+/* This file uses _Noreturn.  */
+# if !_GL_CONFIG_H_INCLUDED
+#  error "Please include config.h first."
+# endif
+
 # include "xstrtol.h"
 
 # include <getopt.h>
@@ -28,7 +33,7 @@
    ERR is the error code returned by one of the xstrto* functions.
 
    Use OPT_IDX to decide whether to print the short option string "C"
-   or "-C" or a long option string derived from LONG_OPTION.  OPT_IDX
+   or "-C" or a long option string derived from LONG_OPTIONS.  OPT_IDX
    is -2 if the short option "C" was used, without any leading "-"; it
    is -1 if the short option "-C" was used; otherwise it is an index
    into LONG_OPTIONS, which should have a name preceded by two '-'
@@ -38,8 +43,9 @@
 
    After reporting an error, exit with a failure status.  */
 
-_Noreturn void xstrtol_fatal (enum strtol_error,
-                              int, char, struct option const *,
-                              char const *);
+_Noreturn void xstrtol_fatal (enum strtol_error /* err */,
+                              int /* opt_idx */, char /* c */,
+                              struct option const * /* long_options */,
+                              char const * /* arg */);
 
 #endif /* not XSTRTOL_ERROR_H_ */
diff --git a/gnulib-tests/zerosize-ptr.h b/gnulib-tests/zerosize-ptr.h
index 990b51cf..f2b0903d 100644
--- a/gnulib-tests/zerosize-ptr.h
+++ b/gnulib-tests/zerosize-ptr.h
@@ -1,5 +1,5 @@
 /* Return a pointer to a zero-size object in memory.
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 31efb49b..725f3087 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -1,4 +1,4 @@
-# Copyright 1997-1998, 2005-2022 Free Software Foundation, Inc.
+# Copyright 1997-1998, 2005-2023 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/lib/Makefile.in b/lib/Makefile.in
index f856a96a..c5b05123 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -1,7 +1,7 @@
 # Makefile.in generated by automake 1.16i from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2022 Free Software Foundation, Inc.
+# Copyright (C) 1994-2023 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,7 +14,7 @@
 
 @SET_MAKE@
 
-# Copyright 1997-1998, 2005-2022 Free Software Foundation, Inc.
+# Copyright 1997-1998, 2005-2023 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 #
 
-# Copyright (C) 2002-2022 Free Software Foundation, Inc.
+# Copyright (C) 2002-2023 Free Software Foundation, Inc.
 #
 # This file is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -69,6 +69,7 @@
 #  --avoid=update-copyright-tests \
 #  announce-gen \
 #  argmatch \
+#  assert-h \
 #  c-ctype \
 #  c-stack \
 #  c-strcase \
@@ -121,6 +122,7 @@
 #  safe-read \
 #  same-inode \
 #  ssize_t \
+#  stdckdint \
 #  stddef \
 #  stdlib \
 #  stpcpy \
@@ -143,7 +145,8 @@
 #  windows-stat-inodes \
 #  xalloc \
 #  xbinary-io \
-#  xstrtoimax
+#  xstrtoimax \
+#  year2038
 
 VPATH = @srcdir@
 am__is_gnu_make = { \
@@ -203,9 +206,6 @@ am__make_dryrun = (target_option=n; $(am__make_running_with_option))
 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 am__rm_f = rm -f $(am__rm_f_notfound)
 am__rm_rf = rm -rf $(am__rm_f_notfound)
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
@@ -240,66 +240,67 @@ host_triplet = @host@
 @GL_COND_OBJ_GETDTABLESIZE_TRUE@am__append_18 = getdtablesize.c
 @GL_COND_OBJ_GETOPT_TRUE@am__append_19 = getopt.c getopt1.c
 @GL_COND_OBJ_GETPAGESIZE_TRUE@am__append_20 = getpagesize.c
-@GL_COND_OBJ_ICONV_OPEN_TRUE@am__append_21 = iconv_open.c
-@GL_COND_OBJ_ICONV_TRUE@am__append_22 = iconv.c iconv_close.c
-@GL_COND_OBJ_ISATTY_TRUE@am__append_23 = isatty.c
-@GL_COND_OBJ_ISBLANK_TRUE@am__append_24 = isblank.c
-@GL_COND_OBJ_ISWBLANK_TRUE@am__append_25 = iswblank.c
-@GL_COND_OBJ_ISWDIGIT_TRUE@am__append_26 = iswdigit.c
-@GL_COND_OBJ_ISWXDIGIT_TRUE@am__append_27 = iswxdigit.c
-@GL_COND_OBJ_LOCALECONV_TRUE@am__append_28 = localeconv.c
-@GL_COND_OBJ_LSEEK_TRUE@am__append_29 = lseek.c
-@GL_COND_OBJ_LSTAT_TRUE@am__append_30 = lstat.c
-@GL_COND_OBJ_MBRLEN_TRUE@am__append_31 = mbrlen.c
-@GL_COND_OBJ_MBRTOWC_TRUE@am__append_32 = mbrtowc.c
-@GL_COND_OBJ_MBSINIT_TRUE@am__append_33 = mbsinit.c
-@GL_COND_OBJ_MBSRTOWCS_TRUE@am__append_34 = mbsrtowcs.c
-@GL_COND_OBJ_MBTOWC_TRUE@am__append_35 = mbtowc.c
-@GL_COND_OBJ_MEMCHR_TRUE@am__append_36 = memchr.c
-@GL_COND_OBJ_MEMPCPY_TRUE@am__append_37 = mempcpy.c
-@GL_COND_OBJ_MEMRCHR_TRUE@am__append_38 = memrchr.c
-@GL_COND_OBJ_MSVC_INVAL_TRUE@am__append_39 = msvc-inval.c
-@GL_COND_OBJ_MSVC_NOTHROW_TRUE@am__append_40 = msvc-nothrow.c
-@GL_COND_OBJ_NL_LANGINFO_TRUE@am__append_41 = nl_langinfo.c
-@GL_COND_OBJ_NL_LANGINFO_LOCK_TRUE@am__append_42 = nl_langinfo-lock.c
-@GL_COND_OBJ_OBSTACK_TRUE@am__append_43 = obstack.c
-@GL_COND_OBJ_OPEN_TRUE@am__append_44 = open.c
-@GL_COND_OBJ_OPENAT_TRUE@am__append_45 = openat.c
-@GL_COND_OBJ_OPENDIR_TRUE@am__append_46 = opendir.c
-@GL_COND_OBJ_PIPE_TRUE@am__append_47 = pipe.c
-@GL_COND_OBJ_RAISE_TRUE@am__append_48 = raise.c
-@GL_COND_OBJ_RAWMEMCHR_TRUE@am__append_49 = rawmemchr.c
-@GL_COND_OBJ_READ_TRUE@am__append_50 = read.c
-@GL_COND_OBJ_READDIR_TRUE@am__append_51 = readdir.c
-@GL_COND_OBJ_REALLOCARRAY_TRUE@am__append_52 = reallocarray.c
-@GL_COND_OBJ_REGEX_TRUE@am__append_53 = regex.c
-@GL_COND_OBJ_SETLOCALE_LOCK_TRUE@am__append_54 = setlocale-lock.c
-@GL_GENERATE_SIGSEGV_H_TRUE@am__append_55 = sigsegv.c stackvma.c
-@GL_COND_OBJ_STAT_TRUE@am__append_56 = stat.c
-@GL_COND_OBJ_STDIO_READ_TRUE@am__append_57 = stdio-read.c
-@GL_COND_OBJ_STDIO_WRITE_TRUE@am__append_58 = stdio-write.c
-@GL_COND_OBJ_STPCPY_TRUE@am__append_59 = stpcpy.c
-@GL_COND_OBJ_STRDUP_TRUE@am__append_60 = strdup.c
-@GL_COND_OBJ_STRERROR_TRUE@am__append_61 = strerror.c
-@GL_COND_OBJ_STRERROR_OVERRIDE_TRUE@am__append_62 = strerror-override.c
-@GL_COND_OBJ_STRNLEN_TRUE@am__append_63 = strnlen.c
-@GL_COND_OBJ_STRTOIMAX_TRUE@am__append_64 = strtoimax.c
-@GL_COND_OBJ_STRTOLL_TRUE@am__append_65 = strtoll.c
-@GL_COND_OBJ_STRTOULL_TRUE@am__append_66 = strtoull.c
-@GL_COND_OBJ_STRTOUMAX_TRUE@am__append_67 = strtoumax.c
-@LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE@am__append_68 = unistr/u8-mbtoucr.c
-@LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE@am__append_69 = unistr/u8-uctomb.c unistr/u8-uctomb-aux.c
-@LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE@am__append_70 = uniwidth/width.c
-@GL_COND_OBJ_WCRTOMB_TRUE@am__append_71 = wcrtomb.c
-@GL_COND_OBJ_WCTOB_TRUE@am__append_72 = wctob.c
-@GL_COND_OBJ_WCTOMB_TRUE@am__append_73 = wctomb.c
-@GL_COND_OBJ_WCWIDTH_TRUE@am__append_74 = wcwidth.c
-@GL_COND_OBJ_WINDOWS_MUTEX_TRUE@am__append_75 = windows-mutex.c
-@GL_COND_OBJ_WINDOWS_ONCE_TRUE@am__append_76 = windows-once.c
-@GL_COND_OBJ_WINDOWS_RECMUTEX_TRUE@am__append_77 = windows-recmutex.c
-@GL_COND_OBJ_WINDOWS_RWLOCK_TRUE@am__append_78 = windows-rwlock.c
-@GL_COND_OBJ_WMEMCHR_TRUE@am__append_79 = wmemchr.c
-@GL_COND_OBJ_WMEMPCPY_TRUE@am__append_80 = wmempcpy.c
+@GL_COND_OBJ_GETPROGNAME_TRUE@am__append_21 = getprogname.c
+@GL_COND_OBJ_ICONV_OPEN_TRUE@am__append_22 = iconv_open.c
+@GL_COND_OBJ_ICONV_TRUE@am__append_23 = iconv.c iconv_close.c
+@GL_COND_OBJ_ISATTY_TRUE@am__append_24 = isatty.c
+@GL_COND_OBJ_ISBLANK_TRUE@am__append_25 = isblank.c
+@GL_COND_OBJ_ISWBLANK_TRUE@am__append_26 = iswblank.c
+@GL_COND_OBJ_ISWDIGIT_TRUE@am__append_27 = iswdigit.c
+@GL_COND_OBJ_ISWXDIGIT_TRUE@am__append_28 = iswxdigit.c
+@GL_COND_OBJ_LOCALECONV_TRUE@am__append_29 = localeconv.c
+@GL_COND_OBJ_LSEEK_TRUE@am__append_30 = lseek.c
+@GL_COND_OBJ_LSTAT_TRUE@am__append_31 = lstat.c
+@GL_COND_OBJ_MBRLEN_TRUE@am__append_32 = mbrlen.c
+@GL_COND_OBJ_MBRTOWC_TRUE@am__append_33 = mbrtowc.c
+@GL_COND_OBJ_MBSINIT_TRUE@am__append_34 = mbsinit.c
+@GL_COND_OBJ_MBSRTOWCS_TRUE@am__append_35 = mbsrtowcs.c
+@GL_COND_OBJ_MBTOWC_TRUE@am__append_36 = mbtowc.c
+@GL_COND_OBJ_MEMCHR_TRUE@am__append_37 = memchr.c
+@GL_COND_OBJ_MEMPCPY_TRUE@am__append_38 = mempcpy.c
+@GL_COND_OBJ_MEMRCHR_TRUE@am__append_39 = memrchr.c
+@GL_COND_OBJ_MSVC_INVAL_TRUE@am__append_40 = msvc-inval.c
+@GL_COND_OBJ_MSVC_NOTHROW_TRUE@am__append_41 = msvc-nothrow.c
+@GL_COND_OBJ_NL_LANGINFO_TRUE@am__append_42 = nl_langinfo.c
+@GL_COND_OBJ_NL_LANGINFO_LOCK_TRUE@am__append_43 = nl_langinfo-lock.c
+@GL_COND_OBJ_OBSTACK_TRUE@am__append_44 = obstack.c
+@GL_COND_OBJ_OPEN_TRUE@am__append_45 = open.c
+@GL_COND_OBJ_OPENAT_TRUE@am__append_46 = openat.c
+@GL_COND_OBJ_OPENDIR_TRUE@am__append_47 = opendir.c
+@GL_COND_OBJ_PIPE_TRUE@am__append_48 = pipe.c
+@GL_COND_OBJ_RAISE_TRUE@am__append_49 = raise.c
+@GL_COND_OBJ_RAWMEMCHR_TRUE@am__append_50 = rawmemchr.c
+@GL_COND_OBJ_READ_TRUE@am__append_51 = read.c
+@GL_COND_OBJ_READDIR_TRUE@am__append_52 = readdir.c
+@GL_COND_OBJ_REALLOCARRAY_TRUE@am__append_53 = reallocarray.c
+@GL_COND_OBJ_REGEX_TRUE@am__append_54 = regex.c
+@GL_COND_OBJ_SETLOCALE_LOCK_TRUE@am__append_55 = setlocale-lock.c
+@GL_GENERATE_SIGSEGV_H_TRUE@am__append_56 = sigsegv.c stackvma.c
+@GL_COND_OBJ_STAT_TRUE@am__append_57 = stat.c
+@GL_COND_OBJ_STDIO_READ_TRUE@am__append_58 = stdio-read.c
+@GL_COND_OBJ_STDIO_WRITE_TRUE@am__append_59 = stdio-write.c
+@GL_COND_OBJ_STPCPY_TRUE@am__append_60 = stpcpy.c
+@GL_COND_OBJ_STRDUP_TRUE@am__append_61 = strdup.c
+@GL_COND_OBJ_STRERROR_TRUE@am__append_62 = strerror.c
+@GL_COND_OBJ_STRERROR_OVERRIDE_TRUE@am__append_63 = strerror-override.c
+@GL_COND_OBJ_STRNLEN_TRUE@am__append_64 = strnlen.c
+@GL_COND_OBJ_STRTOIMAX_TRUE@am__append_65 = strtoimax.c
+@GL_COND_OBJ_STRTOLL_TRUE@am__append_66 = strtoll.c
+@GL_COND_OBJ_STRTOULL_TRUE@am__append_67 = strtoull.c
+@GL_COND_OBJ_STRTOUMAX_TRUE@am__append_68 = strtoumax.c
+@LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE@am__append_69 = unistr/u8-mbtoucr.c
+@LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE@am__append_70 = unistr/u8-uctomb.c unistr/u8-uctomb-aux.c
+@LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE@am__append_71 = uniwidth/width.c
+@GL_COND_OBJ_WCRTOMB_TRUE@am__append_72 = wcrtomb.c
+@GL_COND_OBJ_WCTOB_TRUE@am__append_73 = wctob.c
+@GL_COND_OBJ_WCTOMB_TRUE@am__append_74 = wctomb.c
+@GL_COND_OBJ_WCWIDTH_TRUE@am__append_75 = wcwidth.c
+@GL_COND_OBJ_WINDOWS_MUTEX_TRUE@am__append_76 = windows-mutex.c
+@GL_COND_OBJ_WINDOWS_ONCE_TRUE@am__append_77 = windows-once.c
+@GL_COND_OBJ_WINDOWS_RECMUTEX_TRUE@am__append_78 = windows-recmutex.c
+@GL_COND_OBJ_WINDOWS_RWLOCK_TRUE@am__append_79 = windows-rwlock.c
+@GL_COND_OBJ_WMEMCHR_TRUE@am__append_80 = wmemchr.c
+@GL_COND_OBJ_WMEMPCPY_TRUE@am__append_81 = wmempcpy.c
 subdir = lib
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
@@ -307,7 +308,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
 	$(top_srcdir)/m4/absolute-header.m4 $(top_srcdir)/m4/alloca.m4 \
 	$(top_srcdir)/m4/arpa_inet_h.m4 \
 	$(top_srcdir)/m4/asm-underscore.m4 $(top_srcdir)/m4/assert.m4 \
-	$(top_srcdir)/m4/btowc.m4 $(top_srcdir)/m4/builtin-expect.m4 \
+	$(top_srcdir)/m4/assert_h.m4 $(top_srcdir)/m4/btowc.m4 \
+	$(top_srcdir)/m4/build-to-host.m4 \
+	$(top_srcdir)/m4/builtin-expect.m4 $(top_srcdir)/m4/c-bool.m4 \
 	$(top_srcdir)/m4/c-stack.m4 $(top_srcdir)/m4/calloc.m4 \
 	$(top_srcdir)/m4/chdir-long.m4 $(top_srcdir)/m4/close.m4 \
 	$(top_srcdir)/m4/closedir.m4 $(top_srcdir)/m4/codeset.m4 \
@@ -318,12 +321,13 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
 	$(top_srcdir)/m4/double-slash-root.m4 $(top_srcdir)/m4/dup.m4 \
 	$(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \
 	$(top_srcdir)/m4/environ.m4 $(top_srcdir)/m4/errno_h.m4 \
-	$(top_srcdir)/m4/error.m4 $(top_srcdir)/m4/exponentd.m4 \
-	$(top_srcdir)/m4/extensions.m4 \
+	$(top_srcdir)/m4/error.m4 $(top_srcdir)/m4/error_h.m4 \
+	$(top_srcdir)/m4/exponentd.m4 $(top_srcdir)/m4/extensions.m4 \
 	$(top_srcdir)/m4/extern-inline.m4 $(top_srcdir)/m4/fchdir.m4 \
-	$(top_srcdir)/m4/fcntl-o.m4 $(top_srcdir)/m4/fcntl-safer.m4 \
-	$(top_srcdir)/m4/fcntl.m4 $(top_srcdir)/m4/fcntl_h.m4 \
-	$(top_srcdir)/m4/fdopen.m4 $(top_srcdir)/m4/fdopendir.m4 \
+	$(top_srcdir)/m4/fclose.m4 $(top_srcdir)/m4/fcntl-o.m4 \
+	$(top_srcdir)/m4/fcntl-safer.m4 $(top_srcdir)/m4/fcntl.m4 \
+	$(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fdopen.m4 \
+	$(top_srcdir)/m4/fdopendir.m4 $(top_srcdir)/m4/fflush.m4 \
 	$(top_srcdir)/m4/filenamecat.m4 $(top_srcdir)/m4/flexmember.m4 \
 	$(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fnmatch.m4 \
 	$(top_srcdir)/m4/fnmatch_h.m4 $(top_srcdir)/m4/fopen.m4 \
@@ -404,35 +408,34 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
 	$(top_srcdir)/m4/stack-direction.m4 \
 	$(top_srcdir)/m4/stat-time.m4 $(top_srcdir)/m4/stat.m4 \
 	$(top_srcdir)/m4/stdalign.m4 $(top_srcdir)/m4/stdarg.m4 \
-	$(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stddef_h.m4 \
-	$(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/stdint_h.m4 \
-	$(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \
-	$(top_srcdir)/m4/stpcpy.m4 $(top_srcdir)/m4/strdup.m4 \
-	$(top_srcdir)/m4/strerror.m4 $(top_srcdir)/m4/strerror_r.m4 \
-	$(top_srcdir)/m4/string_h.m4 $(top_srcdir)/m4/strnlen.m4 \
-	$(top_srcdir)/m4/strstr.m4 $(top_srcdir)/m4/strtoimax.m4 \
-	$(top_srcdir)/m4/strtoll.m4 $(top_srcdir)/m4/strtoull.m4 \
-	$(top_srcdir)/m4/strtoumax.m4 $(top_srcdir)/m4/symlink.m4 \
-	$(top_srcdir)/m4/sys_ioctl_h.m4 \
+	$(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \
+	$(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/stdio_h.m4 \
+	$(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/stpcpy.m4 \
+	$(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \
+	$(top_srcdir)/m4/strerror_r.m4 $(top_srcdir)/m4/string_h.m4 \
+	$(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/strstr.m4 \
+	$(top_srcdir)/m4/strtoimax.m4 $(top_srcdir)/m4/strtoll.m4 \
+	$(top_srcdir)/m4/strtoull.m4 $(top_srcdir)/m4/strtoumax.m4 \
+	$(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_ioctl_h.m4 \
 	$(top_srcdir)/m4/sys_select_h.m4 \
 	$(top_srcdir)/m4/sys_socket_h.m4 \
 	$(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_time_h.m4 \
 	$(top_srcdir)/m4/sys_types_h.m4 $(top_srcdir)/m4/sys_uio_h.m4 \
 	$(top_srcdir)/m4/thread.m4 $(top_srcdir)/m4/threadlib.m4 \
-	$(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/unistd-safer.m4 \
-	$(top_srcdir)/m4/unistd_h.m4 $(top_srcdir)/m4/unlocked-io.m4 \
-	$(top_srcdir)/m4/vasnprintf.m4 $(top_srcdir)/m4/version-etc.m4 \
-	$(top_srcdir)/m4/visibility.m4 $(top_srcdir)/m4/warn-on-use.m4 \
-	$(top_srcdir)/m4/warnings.m4 $(top_srcdir)/m4/wchar_h.m4 \
-	$(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wcrtomb.m4 \
-	$(top_srcdir)/m4/wctob.m4 $(top_srcdir)/m4/wctomb.m4 \
-	$(top_srcdir)/m4/wctype_h.m4 $(top_srcdir)/m4/wcwidth.m4 \
+	$(top_srcdir)/m4/time.m4 $(top_srcdir)/m4/time_h.m4 \
+	$(top_srcdir)/m4/unistd-safer.m4 $(top_srcdir)/m4/unistd_h.m4 \
+	$(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/vasnprintf.m4 \
+	$(top_srcdir)/m4/version-etc.m4 $(top_srcdir)/m4/visibility.m4 \
+	$(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/warnings.m4 \
+	$(top_srcdir)/m4/wchar_h.m4 $(top_srcdir)/m4/wchar_t.m4 \
+	$(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wctob.m4 \
+	$(top_srcdir)/m4/wctomb.m4 $(top_srcdir)/m4/wctype_h.m4 \
+	$(top_srcdir)/m4/wcwidth.m4 \
 	$(top_srcdir)/m4/windows-stat-inodes.m4 \
 	$(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/wmemchr.m4 \
 	$(top_srcdir)/m4/wmempcpy.m4 $(top_srcdir)/m4/xalloc.m4 \
 	$(top_srcdir)/m4/xsize.m4 $(top_srcdir)/m4/xstrtol.m4 \
-	$(top_srcdir)/m4/year2038.m4 $(top_srcdir)/m4/zzgnulib.m4 \
-	$(top_srcdir)/configure.ac
+	$(top_srcdir)/m4/zzgnulib.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
@@ -456,32 +459,32 @@ am__libgreputils_a_SOURCES_DIST = argmatch.c openat-priv.h \
 	c-stack.c c-strcase.h c-strcasecmp.c c-strncasecmp.c \
 	chdir-long.c cloexec.c close.c close-stream.c closedir.c \
 	closeout.c cycle-check.c dfa.c localeinfo.c dirfd.c \
-	dirname-lgpl.c stripslash.c dup.c dup2.c \
-	malloc/dynarray_at_failure.c malloc/dynarray_emplace_enlarge.c \
-	malloc/dynarray_finalize.c malloc/dynarray_resize.c \
-	malloc/dynarray_resize_clear.c error.c exclude.c exitfail.c \
-	fchdir.c fcntl.c creat-safer.c open-safer.c fd-hook.c \
-	fd-safer-flag.c dup-safer-flag.c fdopendir.c \
+	dirname-lgpl.c stripslash.c dup.c dup2.c error.c exclude.c \
+	exitfail.c fchdir.c fcntl.c creat-safer.c open-safer.c \
+	fd-hook.c fd-safer-flag.c dup-safer-flag.c fdopendir.c \
 	filenamecat-lgpl.c fpending.c free.c fstat.c fstatat.c fts.c \
 	getcwd-lgpl.c getdtablesize.c getopt.c getopt1.c getpagesize.c \
-	getprogname.h getprogname.c gettext.h hard-locale.c hash.c \
-	i-ring.c ialloc.c iconv_open.c iconv.c iconv_close.c idx.h \
-	isatty.c isblank.c iswblank.c iswdigit.c iswxdigit.c \
-	localcharset.c localeconv.c glthread/lock.h glthread/lock.c \
-	lseek.c lstat.c malloca.c mbchar.c mbiter.h mbiter.c mbrlen.c \
-	mbrtowc.c mbscasecmp.c mbsinit.c mbslen.c mbsrtowcs.c mbsstr.c \
-	mbtowc.c mbuiter.h mbuiter.c memchr.c memchr2.h memchr2.c \
-	mempcpy.c memrchr.c minmax.h msvc-inval.c msvc-nothrow.c \
-	nl_langinfo.c nl_langinfo-lock.c obstack.c open.c openat.c \
-	openat-die.c openat-safer.c opendir.c opendirat.c pipe.c \
-	propername.h propername.c quotearg.c raise.c rawmemchr.c \
-	read.c readdir.c reallocarray.c regex.c safe-read.c save-cwd.c \
-	setlocale_null.c setlocale-lock.c sigsegv.c stackvma.c stat.c \
-	stat-time.c stdio-read.c stdio-write.c stpcpy.c strdup.c \
-	strerror.c strerror-override.c striconv.h striconv.c strnlen.c \
-	strnlen1.h strnlen1.c strtoimax.c strtoll.c strtoull.c \
-	strtoumax.c glthread/threadlib.c trim.c unistd.c dup-safer.c \
-	fd-safer.c pipe-safer.c unistr/u8-mbtoucr.c unistr/u8-uctomb.c \
+	getprogname.c gettext.h malloc/dynarray_at_failure.c \
+	malloc/dynarray_emplace_enlarge.c malloc/dynarray_finalize.c \
+	malloc/dynarray_resize.c malloc/dynarray_resize_clear.c \
+	hard-locale.c hash.c i-ring.c ialloc.c iconv_open.c iconv.c \
+	iconv_close.c idx.h isatty.c isblank.c iswblank.c iswdigit.c \
+	iswxdigit.c localcharset.c localeconv.c glthread/lock.h \
+	glthread/lock.c lseek.c lstat.c malloca.c mbchar.c mbiter.h \
+	mbiter.c mbrlen.c mbrtowc.c mbscasecmp.c mbsinit.c mbslen.c \
+	mbsrtowcs.c mbsstr.c mbtowc.c mbuiter.h mbuiter.c memchr.c \
+	memchr2.h memchr2.c mempcpy.c memrchr.c minmax.h msvc-inval.c \
+	msvc-nothrow.c nl_langinfo.c nl_langinfo-lock.c obstack.c \
+	open.c openat.c openat-die.c openat-safer.c opendir.c \
+	opendirat.c pipe.c propername.h propername.c quotearg.c \
+	raise.c rawmemchr.c read.c readdir.c reallocarray.c regex.c \
+	safe-read.c save-cwd.c setlocale_null.c setlocale-lock.c \
+	sigsegv.c stackvma.c stat.c stat-time.c stdio-read.c \
+	stdio-write.c stpcpy.c strdup.c strerror.c strerror-override.c \
+	striconv.h striconv.c strnlen.c strnlen1.h strnlen1.c \
+	strtoimax.c strtoll.c strtoull.c strtoumax.c \
+	glthread/threadlib.c trim.c unistd.c dup-safer.c fd-safer.c \
+	pipe-safer.c unistr/u8-mbtoucr.c unistr/u8-uctomb.c \
 	unistr/u8-uctomb-aux.c uniwidth/width.c version-etc.h \
 	version-etc.c version-etc-fsf.c wcrtomb.c wctob.c wctomb.c \
 	wctype-h.c wcwidth.c windows-mutex.c windows-once.c \
@@ -520,101 +523,102 @@ am__libgreputils_a_SOURCES_DIST = argmatch.c openat-priv.h \
 @GL_COND_OBJ_GETOPT_TRUE@	libgreputils_a-getopt.$(OBJEXT) \
 @GL_COND_OBJ_GETOPT_TRUE@	libgreputils_a-getopt1.$(OBJEXT)
 @GL_COND_OBJ_GETPAGESIZE_TRUE@am__objects_20 = libgreputils_a-getpagesize.$(OBJEXT)
-@GL_COND_OBJ_ICONV_OPEN_TRUE@am__objects_21 = libgreputils_a-iconv_open.$(OBJEXT)
-@GL_COND_OBJ_ICONV_TRUE@am__objects_22 =  \
+@GL_COND_OBJ_GETPROGNAME_TRUE@am__objects_21 = libgreputils_a-getprogname.$(OBJEXT)
+@GL_COND_OBJ_ICONV_OPEN_TRUE@am__objects_22 = libgreputils_a-iconv_open.$(OBJEXT)
+@GL_COND_OBJ_ICONV_TRUE@am__objects_23 =  \
 @GL_COND_OBJ_ICONV_TRUE@	libgreputils_a-iconv.$(OBJEXT) \
 @GL_COND_OBJ_ICONV_TRUE@	libgreputils_a-iconv_close.$(OBJEXT)
-@GL_COND_OBJ_ISATTY_TRUE@am__objects_23 =  \
+@GL_COND_OBJ_ISATTY_TRUE@am__objects_24 =  \
 @GL_COND_OBJ_ISATTY_TRUE@	libgreputils_a-isatty.$(OBJEXT)
-@GL_COND_OBJ_ISBLANK_TRUE@am__objects_24 =  \
+@GL_COND_OBJ_ISBLANK_TRUE@am__objects_25 =  \
 @GL_COND_OBJ_ISBLANK_TRUE@	libgreputils_a-isblank.$(OBJEXT)
-@GL_COND_OBJ_ISWBLANK_TRUE@am__objects_25 =  \
+@GL_COND_OBJ_ISWBLANK_TRUE@am__objects_26 =  \
 @GL_COND_OBJ_ISWBLANK_TRUE@	libgreputils_a-iswblank.$(OBJEXT)
-@GL_COND_OBJ_ISWDIGIT_TRUE@am__objects_26 =  \
+@GL_COND_OBJ_ISWDIGIT_TRUE@am__objects_27 =  \
 @GL_COND_OBJ_ISWDIGIT_TRUE@	libgreputils_a-iswdigit.$(OBJEXT)
-@GL_COND_OBJ_ISWXDIGIT_TRUE@am__objects_27 = libgreputils_a-iswxdigit.$(OBJEXT)
-@GL_COND_OBJ_LOCALECONV_TRUE@am__objects_28 = libgreputils_a-localeconv.$(OBJEXT)
-@GL_COND_OBJ_LSEEK_TRUE@am__objects_29 =  \
+@GL_COND_OBJ_ISWXDIGIT_TRUE@am__objects_28 = libgreputils_a-iswxdigit.$(OBJEXT)
+@GL_COND_OBJ_LOCALECONV_TRUE@am__objects_29 = libgreputils_a-localeconv.$(OBJEXT)
+@GL_COND_OBJ_LSEEK_TRUE@am__objects_30 =  \
 @GL_COND_OBJ_LSEEK_TRUE@	libgreputils_a-lseek.$(OBJEXT)
-@GL_COND_OBJ_LSTAT_TRUE@am__objects_30 =  \
+@GL_COND_OBJ_LSTAT_TRUE@am__objects_31 =  \
 @GL_COND_OBJ_LSTAT_TRUE@	libgreputils_a-lstat.$(OBJEXT)
-@GL_COND_OBJ_MBRLEN_TRUE@am__objects_31 =  \
+@GL_COND_OBJ_MBRLEN_TRUE@am__objects_32 =  \
 @GL_COND_OBJ_MBRLEN_TRUE@	libgreputils_a-mbrlen.$(OBJEXT)
-@GL_COND_OBJ_MBRTOWC_TRUE@am__objects_32 =  \
+@GL_COND_OBJ_MBRTOWC_TRUE@am__objects_33 =  \
 @GL_COND_OBJ_MBRTOWC_TRUE@	libgreputils_a-mbrtowc.$(OBJEXT)
-@GL_COND_OBJ_MBSINIT_TRUE@am__objects_33 =  \
+@GL_COND_OBJ_MBSINIT_TRUE@am__objects_34 =  \
 @GL_COND_OBJ_MBSINIT_TRUE@	libgreputils_a-mbsinit.$(OBJEXT)
-@GL_COND_OBJ_MBSRTOWCS_TRUE@am__objects_34 = libgreputils_a-mbsrtowcs.$(OBJEXT)
-@GL_COND_OBJ_MBTOWC_TRUE@am__objects_35 =  \
+@GL_COND_OBJ_MBSRTOWCS_TRUE@am__objects_35 = libgreputils_a-mbsrtowcs.$(OBJEXT)
+@GL_COND_OBJ_MBTOWC_TRUE@am__objects_36 =  \
 @GL_COND_OBJ_MBTOWC_TRUE@	libgreputils_a-mbtowc.$(OBJEXT)
-@GL_COND_OBJ_MEMCHR_TRUE@am__objects_36 =  \
+@GL_COND_OBJ_MEMCHR_TRUE@am__objects_37 =  \
 @GL_COND_OBJ_MEMCHR_TRUE@	libgreputils_a-memchr.$(OBJEXT)
-@GL_COND_OBJ_MEMPCPY_TRUE@am__objects_37 =  \
+@GL_COND_OBJ_MEMPCPY_TRUE@am__objects_38 =  \
 @GL_COND_OBJ_MEMPCPY_TRUE@	libgreputils_a-mempcpy.$(OBJEXT)
-@GL_COND_OBJ_MEMRCHR_TRUE@am__objects_38 =  \
+@GL_COND_OBJ_MEMRCHR_TRUE@am__objects_39 =  \
 @GL_COND_OBJ_MEMRCHR_TRUE@	libgreputils_a-memrchr.$(OBJEXT)
-@GL_COND_OBJ_MSVC_INVAL_TRUE@am__objects_39 = libgreputils_a-msvc-inval.$(OBJEXT)
-@GL_COND_OBJ_MSVC_NOTHROW_TRUE@am__objects_40 = libgreputils_a-msvc-nothrow.$(OBJEXT)
-@GL_COND_OBJ_NL_LANGINFO_TRUE@am__objects_41 = libgreputils_a-nl_langinfo.$(OBJEXT)
-@GL_COND_OBJ_NL_LANGINFO_LOCK_TRUE@am__objects_42 = libgreputils_a-nl_langinfo-lock.$(OBJEXT)
-@GL_COND_OBJ_OBSTACK_TRUE@am__objects_43 =  \
+@GL_COND_OBJ_MSVC_INVAL_TRUE@am__objects_40 = libgreputils_a-msvc-inval.$(OBJEXT)
+@GL_COND_OBJ_MSVC_NOTHROW_TRUE@am__objects_41 = libgreputils_a-msvc-nothrow.$(OBJEXT)
+@GL_COND_OBJ_NL_LANGINFO_TRUE@am__objects_42 = libgreputils_a-nl_langinfo.$(OBJEXT)
+@GL_COND_OBJ_NL_LANGINFO_LOCK_TRUE@am__objects_43 = libgreputils_a-nl_langinfo-lock.$(OBJEXT)
+@GL_COND_OBJ_OBSTACK_TRUE@am__objects_44 =  \
 @GL_COND_OBJ_OBSTACK_TRUE@	libgreputils_a-obstack.$(OBJEXT)
-@GL_COND_OBJ_OPEN_TRUE@am__objects_44 = libgreputils_a-open.$(OBJEXT)
-@GL_COND_OBJ_OPENAT_TRUE@am__objects_45 =  \
+@GL_COND_OBJ_OPEN_TRUE@am__objects_45 = libgreputils_a-open.$(OBJEXT)
+@GL_COND_OBJ_OPENAT_TRUE@am__objects_46 =  \
 @GL_COND_OBJ_OPENAT_TRUE@	libgreputils_a-openat.$(OBJEXT)
-@GL_COND_OBJ_OPENDIR_TRUE@am__objects_46 =  \
+@GL_COND_OBJ_OPENDIR_TRUE@am__objects_47 =  \
 @GL_COND_OBJ_OPENDIR_TRUE@	libgreputils_a-opendir.$(OBJEXT)
-@GL_COND_OBJ_PIPE_TRUE@am__objects_47 = libgreputils_a-pipe.$(OBJEXT)
-@GL_COND_OBJ_RAISE_TRUE@am__objects_48 =  \
+@GL_COND_OBJ_PIPE_TRUE@am__objects_48 = libgreputils_a-pipe.$(OBJEXT)
+@GL_COND_OBJ_RAISE_TRUE@am__objects_49 =  \
 @GL_COND_OBJ_RAISE_TRUE@	libgreputils_a-raise.$(OBJEXT)
-@GL_COND_OBJ_RAWMEMCHR_TRUE@am__objects_49 = libgreputils_a-rawmemchr.$(OBJEXT)
-@GL_COND_OBJ_READ_TRUE@am__objects_50 = libgreputils_a-read.$(OBJEXT)
-@GL_COND_OBJ_READDIR_TRUE@am__objects_51 =  \
+@GL_COND_OBJ_RAWMEMCHR_TRUE@am__objects_50 = libgreputils_a-rawmemchr.$(OBJEXT)
+@GL_COND_OBJ_READ_TRUE@am__objects_51 = libgreputils_a-read.$(OBJEXT)
+@GL_COND_OBJ_READDIR_TRUE@am__objects_52 =  \
 @GL_COND_OBJ_READDIR_TRUE@	libgreputils_a-readdir.$(OBJEXT)
-@GL_COND_OBJ_REALLOCARRAY_TRUE@am__objects_52 = libgreputils_a-reallocarray.$(OBJEXT)
-@GL_COND_OBJ_REGEX_TRUE@am__objects_53 =  \
+@GL_COND_OBJ_REALLOCARRAY_TRUE@am__objects_53 = libgreputils_a-reallocarray.$(OBJEXT)
+@GL_COND_OBJ_REGEX_TRUE@am__objects_54 =  \
 @GL_COND_OBJ_REGEX_TRUE@	libgreputils_a-regex.$(OBJEXT)
-@GL_COND_OBJ_SETLOCALE_LOCK_TRUE@am__objects_54 = libgreputils_a-setlocale-lock.$(OBJEXT)
-@GL_GENERATE_SIGSEGV_H_TRUE@am__objects_55 =  \
+@GL_COND_OBJ_SETLOCALE_LOCK_TRUE@am__objects_55 = libgreputils_a-setlocale-lock.$(OBJEXT)
+@GL_GENERATE_SIGSEGV_H_TRUE@am__objects_56 =  \
 @GL_GENERATE_SIGSEGV_H_TRUE@	libgreputils_a-sigsegv.$(OBJEXT) \
 @GL_GENERATE_SIGSEGV_H_TRUE@	libgreputils_a-stackvma.$(OBJEXT)
-@GL_COND_OBJ_STAT_TRUE@am__objects_56 = libgreputils_a-stat.$(OBJEXT)
-@GL_COND_OBJ_STDIO_READ_TRUE@am__objects_57 = libgreputils_a-stdio-read.$(OBJEXT)
-@GL_COND_OBJ_STDIO_WRITE_TRUE@am__objects_58 = libgreputils_a-stdio-write.$(OBJEXT)
-@GL_COND_OBJ_STPCPY_TRUE@am__objects_59 =  \
+@GL_COND_OBJ_STAT_TRUE@am__objects_57 = libgreputils_a-stat.$(OBJEXT)
+@GL_COND_OBJ_STDIO_READ_TRUE@am__objects_58 = libgreputils_a-stdio-read.$(OBJEXT)
+@GL_COND_OBJ_STDIO_WRITE_TRUE@am__objects_59 = libgreputils_a-stdio-write.$(OBJEXT)
+@GL_COND_OBJ_STPCPY_TRUE@am__objects_60 =  \
 @GL_COND_OBJ_STPCPY_TRUE@	libgreputils_a-stpcpy.$(OBJEXT)
-@GL_COND_OBJ_STRDUP_TRUE@am__objects_60 =  \
+@GL_COND_OBJ_STRDUP_TRUE@am__objects_61 =  \
 @GL_COND_OBJ_STRDUP_TRUE@	libgreputils_a-strdup.$(OBJEXT)
-@GL_COND_OBJ_STRERROR_TRUE@am__objects_61 =  \
+@GL_COND_OBJ_STRERROR_TRUE@am__objects_62 =  \
 @GL_COND_OBJ_STRERROR_TRUE@	libgreputils_a-strerror.$(OBJEXT)
-@GL_COND_OBJ_STRERROR_OVERRIDE_TRUE@am__objects_62 = libgreputils_a-strerror-override.$(OBJEXT)
-@GL_COND_OBJ_STRNLEN_TRUE@am__objects_63 =  \
+@GL_COND_OBJ_STRERROR_OVERRIDE_TRUE@am__objects_63 = libgreputils_a-strerror-override.$(OBJEXT)
+@GL_COND_OBJ_STRNLEN_TRUE@am__objects_64 =  \
 @GL_COND_OBJ_STRNLEN_TRUE@	libgreputils_a-strnlen.$(OBJEXT)
-@GL_COND_OBJ_STRTOIMAX_TRUE@am__objects_64 = libgreputils_a-strtoimax.$(OBJEXT)
-@GL_COND_OBJ_STRTOLL_TRUE@am__objects_65 =  \
+@GL_COND_OBJ_STRTOIMAX_TRUE@am__objects_65 = libgreputils_a-strtoimax.$(OBJEXT)
+@GL_COND_OBJ_STRTOLL_TRUE@am__objects_66 =  \
 @GL_COND_OBJ_STRTOLL_TRUE@	libgreputils_a-strtoll.$(OBJEXT)
-@GL_COND_OBJ_STRTOULL_TRUE@am__objects_66 =  \
+@GL_COND_OBJ_STRTOULL_TRUE@am__objects_67 =  \
 @GL_COND_OBJ_STRTOULL_TRUE@	libgreputils_a-strtoull.$(OBJEXT)
-@GL_COND_OBJ_STRTOUMAX_TRUE@am__objects_67 = libgreputils_a-strtoumax.$(OBJEXT)
-@LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE@am__objects_68 = unistr/libgreputils_a-u8-mbtoucr.$(OBJEXT)
-@LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE@am__objects_69 = unistr/libgreputils_a-u8-uctomb.$(OBJEXT) \
+@GL_COND_OBJ_STRTOUMAX_TRUE@am__objects_68 = libgreputils_a-strtoumax.$(OBJEXT)
+@LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE@am__objects_69 = unistr/libgreputils_a-u8-mbtoucr.$(OBJEXT)
+@LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE@am__objects_70 = unistr/libgreputils_a-u8-uctomb.$(OBJEXT) \
 @LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE@	unistr/libgreputils_a-u8-uctomb-aux.$(OBJEXT)
-@LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE@am__objects_70 = uniwidth/libgreputils_a-width.$(OBJEXT)
-@GL_COND_OBJ_WCRTOMB_TRUE@am__objects_71 =  \
+@LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE@am__objects_71 = uniwidth/libgreputils_a-width.$(OBJEXT)
+@GL_COND_OBJ_WCRTOMB_TRUE@am__objects_72 =  \
 @GL_COND_OBJ_WCRTOMB_TRUE@	libgreputils_a-wcrtomb.$(OBJEXT)
-@GL_COND_OBJ_WCTOB_TRUE@am__objects_72 =  \
+@GL_COND_OBJ_WCTOB_TRUE@am__objects_73 =  \
 @GL_COND_OBJ_WCTOB_TRUE@	libgreputils_a-wctob.$(OBJEXT)
-@GL_COND_OBJ_WCTOMB_TRUE@am__objects_73 =  \
+@GL_COND_OBJ_WCTOMB_TRUE@am__objects_74 =  \
 @GL_COND_OBJ_WCTOMB_TRUE@	libgreputils_a-wctomb.$(OBJEXT)
-@GL_COND_OBJ_WCWIDTH_TRUE@am__objects_74 =  \
+@GL_COND_OBJ_WCWIDTH_TRUE@am__objects_75 =  \
 @GL_COND_OBJ_WCWIDTH_TRUE@	libgreputils_a-wcwidth.$(OBJEXT)
-@GL_COND_OBJ_WINDOWS_MUTEX_TRUE@am__objects_75 = libgreputils_a-windows-mutex.$(OBJEXT)
-@GL_COND_OBJ_WINDOWS_ONCE_TRUE@am__objects_76 = libgreputils_a-windows-once.$(OBJEXT)
-@GL_COND_OBJ_WINDOWS_RECMUTEX_TRUE@am__objects_77 = libgreputils_a-windows-recmutex.$(OBJEXT)
-@GL_COND_OBJ_WINDOWS_RWLOCK_TRUE@am__objects_78 = libgreputils_a-windows-rwlock.$(OBJEXT)
-@GL_COND_OBJ_WMEMCHR_TRUE@am__objects_79 =  \
+@GL_COND_OBJ_WINDOWS_MUTEX_TRUE@am__objects_76 = libgreputils_a-windows-mutex.$(OBJEXT)
+@GL_COND_OBJ_WINDOWS_ONCE_TRUE@am__objects_77 = libgreputils_a-windows-once.$(OBJEXT)
+@GL_COND_OBJ_WINDOWS_RECMUTEX_TRUE@am__objects_78 = libgreputils_a-windows-recmutex.$(OBJEXT)
+@GL_COND_OBJ_WINDOWS_RWLOCK_TRUE@am__objects_79 = libgreputils_a-windows-rwlock.$(OBJEXT)
+@GL_COND_OBJ_WMEMCHR_TRUE@am__objects_80 =  \
 @GL_COND_OBJ_WMEMCHR_TRUE@	libgreputils_a-wmemchr.$(OBJEXT)
-@GL_COND_OBJ_WMEMPCPY_TRUE@am__objects_80 =  \
+@GL_COND_OBJ_WMEMPCPY_TRUE@am__objects_81 =  \
 @GL_COND_OBJ_WMEMPCPY_TRUE@	libgreputils_a-wmempcpy.$(OBJEXT)
 am_libgreputils_a_OBJECTS = libgreputils_a-argmatch.$(OBJEXT) \
 	libgreputils_a-openat-proc.$(OBJEXT) \
@@ -633,13 +637,8 @@ am_libgreputils_a_OBJECTS = libgreputils_a-argmatch.$(OBJEXT) \
 	libgreputils_a-localeinfo.$(OBJEXT) $(am__objects_5) \
 	libgreputils_a-dirname-lgpl.$(OBJEXT) \
 	libgreputils_a-stripslash.$(OBJEXT) $(am__objects_6) \
-	$(am__objects_7) \
-	malloc/libgreputils_a-dynarray_at_failure.$(OBJEXT) \
-	malloc/libgreputils_a-dynarray_emplace_enlarge.$(OBJEXT) \
-	malloc/libgreputils_a-dynarray_finalize.$(OBJEXT) \
-	malloc/libgreputils_a-dynarray_resize.$(OBJEXT) \
-	malloc/libgreputils_a-dynarray_resize_clear.$(OBJEXT) \
-	$(am__objects_8) libgreputils_a-exclude.$(OBJEXT) \
+	$(am__objects_7) $(am__objects_8) \
+	libgreputils_a-exclude.$(OBJEXT) \
 	libgreputils_a-exitfail.$(OBJEXT) $(am__objects_9) \
 	$(am__objects_10) libgreputils_a-creat-safer.$(OBJEXT) \
 	libgreputils_a-open-safer.$(OBJEXT) \
@@ -649,55 +648,59 @@ am_libgreputils_a_OBJECTS = libgreputils_a-argmatch.$(OBJEXT) \
 	libgreputils_a-filenamecat-lgpl.$(OBJEXT) $(am__objects_12) \
 	$(am__objects_13) $(am__objects_14) $(am__objects_15) \
 	$(am__objects_16) $(am__objects_17) $(am__objects_18) \
-	$(am__objects_19) $(am__objects_20) \
-	libgreputils_a-getprogname.$(OBJEXT) \
+	$(am__objects_19) $(am__objects_20) $(am__objects_21) \
+	malloc/libgreputils_a-dynarray_at_failure.$(OBJEXT) \
+	malloc/libgreputils_a-dynarray_emplace_enlarge.$(OBJEXT) \
+	malloc/libgreputils_a-dynarray_finalize.$(OBJEXT) \
+	malloc/libgreputils_a-dynarray_resize.$(OBJEXT) \
+	malloc/libgreputils_a-dynarray_resize_clear.$(OBJEXT) \
 	libgreputils_a-hard-locale.$(OBJEXT) \
 	libgreputils_a-hash.$(OBJEXT) libgreputils_a-i-ring.$(OBJEXT) \
-	libgreputils_a-ialloc.$(OBJEXT) $(am__objects_21) \
-	$(am__objects_22) $(am__objects_23) $(am__objects_24) \
-	$(am__objects_25) $(am__objects_26) $(am__objects_27) \
-	libgreputils_a-localcharset.$(OBJEXT) $(am__objects_28) \
-	glthread/libgreputils_a-lock.$(OBJEXT) $(am__objects_29) \
-	$(am__objects_30) libgreputils_a-malloca.$(OBJEXT) \
+	libgreputils_a-ialloc.$(OBJEXT) $(am__objects_22) \
+	$(am__objects_23) $(am__objects_24) $(am__objects_25) \
+	$(am__objects_26) $(am__objects_27) $(am__objects_28) \
+	libgreputils_a-localcharset.$(OBJEXT) $(am__objects_29) \
+	glthread/libgreputils_a-lock.$(OBJEXT) $(am__objects_30) \
+	$(am__objects_31) libgreputils_a-malloca.$(OBJEXT) \
 	libgreputils_a-mbchar.$(OBJEXT) \
-	libgreputils_a-mbiter.$(OBJEXT) $(am__objects_31) \
-	$(am__objects_32) libgreputils_a-mbscasecmp.$(OBJEXT) \
-	$(am__objects_33) libgreputils_a-mbslen.$(OBJEXT) \
-	$(am__objects_34) libgreputils_a-mbsstr.$(OBJEXT) \
-	$(am__objects_35) libgreputils_a-mbuiter.$(OBJEXT) \
-	$(am__objects_36) libgreputils_a-memchr2.$(OBJEXT) \
-	$(am__objects_37) $(am__objects_38) $(am__objects_39) \
-	$(am__objects_40) $(am__objects_41) $(am__objects_42) \
-	$(am__objects_43) $(am__objects_44) $(am__objects_45) \
+	libgreputils_a-mbiter.$(OBJEXT) $(am__objects_32) \
+	$(am__objects_33) libgreputils_a-mbscasecmp.$(OBJEXT) \
+	$(am__objects_34) libgreputils_a-mbslen.$(OBJEXT) \
+	$(am__objects_35) libgreputils_a-mbsstr.$(OBJEXT) \
+	$(am__objects_36) libgreputils_a-mbuiter.$(OBJEXT) \
+	$(am__objects_37) libgreputils_a-memchr2.$(OBJEXT) \
+	$(am__objects_38) $(am__objects_39) $(am__objects_40) \
+	$(am__objects_41) $(am__objects_42) $(am__objects_43) \
+	$(am__objects_44) $(am__objects_45) $(am__objects_46) \
 	libgreputils_a-openat-die.$(OBJEXT) \
-	libgreputils_a-openat-safer.$(OBJEXT) $(am__objects_46) \
-	libgreputils_a-opendirat.$(OBJEXT) $(am__objects_47) \
+	libgreputils_a-openat-safer.$(OBJEXT) $(am__objects_47) \
+	libgreputils_a-opendirat.$(OBJEXT) $(am__objects_48) \
 	libgreputils_a-propername.$(OBJEXT) \
-	libgreputils_a-quotearg.$(OBJEXT) $(am__objects_48) \
-	$(am__objects_49) $(am__objects_50) $(am__objects_51) \
-	$(am__objects_52) $(am__objects_53) \
+	libgreputils_a-quotearg.$(OBJEXT) $(am__objects_49) \
+	$(am__objects_50) $(am__objects_51) $(am__objects_52) \
+	$(am__objects_53) $(am__objects_54) \
 	libgreputils_a-safe-read.$(OBJEXT) \
 	libgreputils_a-save-cwd.$(OBJEXT) \
-	libgreputils_a-setlocale_null.$(OBJEXT) $(am__objects_54) \
-	$(am__objects_55) $(am__objects_56) \
-	libgreputils_a-stat-time.$(OBJEXT) $(am__objects_57) \
-	$(am__objects_58) $(am__objects_59) $(am__objects_60) \
-	$(am__objects_61) $(am__objects_62) \
-	libgreputils_a-striconv.$(OBJEXT) $(am__objects_63) \
-	libgreputils_a-strnlen1.$(OBJEXT) $(am__objects_64) \
-	$(am__objects_65) $(am__objects_66) $(am__objects_67) \
+	libgreputils_a-setlocale_null.$(OBJEXT) $(am__objects_55) \
+	$(am__objects_56) $(am__objects_57) \
+	libgreputils_a-stat-time.$(OBJEXT) $(am__objects_58) \
+	$(am__objects_59) $(am__objects_60) $(am__objects_61) \
+	$(am__objects_62) $(am__objects_63) \
+	libgreputils_a-striconv.$(OBJEXT) $(am__objects_64) \
+	libgreputils_a-strnlen1.$(OBJEXT) $(am__objects_65) \
+	$(am__objects_66) $(am__objects_67) $(am__objects_68) \
 	glthread/libgreputils_a-threadlib.$(OBJEXT) \
 	libgreputils_a-trim.$(OBJEXT) libgreputils_a-unistd.$(OBJEXT) \
 	libgreputils_a-dup-safer.$(OBJEXT) \
 	libgreputils_a-fd-safer.$(OBJEXT) \
-	libgreputils_a-pipe-safer.$(OBJEXT) $(am__objects_68) \
-	$(am__objects_69) $(am__objects_70) \
+	libgreputils_a-pipe-safer.$(OBJEXT) $(am__objects_69) \
+	$(am__objects_70) $(am__objects_71) \
 	libgreputils_a-version-etc.$(OBJEXT) \
-	libgreputils_a-version-etc-fsf.$(OBJEXT) $(am__objects_71) \
-	$(am__objects_72) $(am__objects_73) \
-	libgreputils_a-wctype-h.$(OBJEXT) $(am__objects_74) \
-	$(am__objects_75) $(am__objects_76) $(am__objects_77) \
-	$(am__objects_78) $(am__objects_79) $(am__objects_80) \
+	libgreputils_a-version-etc-fsf.$(OBJEXT) $(am__objects_72) \
+	$(am__objects_73) $(am__objects_74) \
+	libgreputils_a-wctype-h.$(OBJEXT) $(am__objects_75) \
+	$(am__objects_76) $(am__objects_77) $(am__objects_78) \
+	$(am__objects_79) $(am__objects_80) $(am__objects_81) \
 	libgreputils_a-xmalloc.$(OBJEXT) \
 	libgreputils_a-xalloc-die.$(OBJEXT) \
 	libgreputils_a-xbinary-io.$(OBJEXT) \
@@ -947,6 +950,9 @@ am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/gnulib.mk \
 	$(top_srcdir)/build-aux/depcomp \
 	$(top_srcdir)/gnulib-tests/alloca.c
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+pkgdatadir = @pkgdatadir@
+pkgincludedir = @pkgincludedir@
+pkglibdir = @pkglibdir@
 pkglibexecdir = @pkglibexecdir@
 ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
@@ -956,6 +962,7 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
 AR = @AR@
 ARFLAGS = @ARFLAGS@
+ASSERT_H = @ASSERT_H@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -978,6 +985,7 @@ CTAGS = @CTAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DIR_HAS_FD_MEMBER = @DIR_HAS_FD_MEMBER@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
@@ -988,6 +996,7 @@ ENOLINK_VALUE = @ENOLINK_VALUE@
 EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
 EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
 ERRNO_H = @ERRNO_H@
+ERROR_H = @ERROR_H@
 ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FLOAT_H = @FLOAT_H@
@@ -1088,6 +1097,7 @@ GL_GNULIB_GETPAGESIZE = @GL_GNULIB_GETPAGESIZE@
 GL_GNULIB_GETPASS = @GL_GNULIB_GETPASS@
 GL_GNULIB_GETPASS_GNU = @GL_GNULIB_GETPASS_GNU@
 GL_GNULIB_GETPEERNAME = @GL_GNULIB_GETPEERNAME@
+GL_GNULIB_GETPROGNAME = @GL_GNULIB_GETPROGNAME@
 GL_GNULIB_GETSOCKNAME = @GL_GNULIB_GETSOCKNAME@
 GL_GNULIB_GETSOCKOPT = @GL_GNULIB_GETSOCKOPT@
 GL_GNULIB_GETSUBOPT = @GL_GNULIB_GETSUBOPT@
@@ -1139,6 +1149,7 @@ GL_GNULIB_MBSSEP = @GL_GNULIB_MBSSEP@
 GL_GNULIB_MBSSPN = @GL_GNULIB_MBSSPN@
 GL_GNULIB_MBSSTR = @GL_GNULIB_MBSSTR@
 GL_GNULIB_MBSTOK_R = @GL_GNULIB_MBSTOK_R@
+GL_GNULIB_MBSTOWCS = @GL_GNULIB_MBSTOWCS@
 GL_GNULIB_MBTOWC = @GL_GNULIB_MBTOWC@
 GL_GNULIB_MDA_ACCESS = @GL_GNULIB_MDA_ACCESS@
 GL_GNULIB_MDA_CHDIR = @GL_GNULIB_MDA_CHDIR@
@@ -1185,6 +1196,7 @@ GL_GNULIB_MEMCHR = @GL_GNULIB_MEMCHR@
 GL_GNULIB_MEMMEM = @GL_GNULIB_MEMMEM@
 GL_GNULIB_MEMPCPY = @GL_GNULIB_MEMPCPY@
 GL_GNULIB_MEMRCHR = @GL_GNULIB_MEMRCHR@
+GL_GNULIB_MEMSET_EXPLICIT = @GL_GNULIB_MEMSET_EXPLICIT@
 GL_GNULIB_MKDIR = @GL_GNULIB_MKDIR@
 GL_GNULIB_MKDIRAT = @GL_GNULIB_MKDIRAT@
 GL_GNULIB_MKDTEMP = @GL_GNULIB_MKDTEMP@
@@ -1309,6 +1321,7 @@ GL_GNULIB_STRVERSCMP = @GL_GNULIB_STRVERSCMP@
 GL_GNULIB_SYMLINK = @GL_GNULIB_SYMLINK@
 GL_GNULIB_SYMLINKAT = @GL_GNULIB_SYMLINKAT@
 GL_GNULIB_SYSTEM_POSIX = @GL_GNULIB_SYSTEM_POSIX@
+GL_GNULIB_TIME = @GL_GNULIB_TIME@
 GL_GNULIB_TIMEGM = @GL_GNULIB_TIMEGM@
 GL_GNULIB_TIMESPEC_GET = @GL_GNULIB_TIMESPEC_GET@
 GL_GNULIB_TIMESPEC_GETRES = @GL_GNULIB_TIMESPEC_GETRES@
@@ -1385,6 +1398,7 @@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
 GNULIB_TEST_WARN_CFLAGS = @GNULIB_TEST_WARN_CFLAGS@
 GNULIB_WARN_CFLAGS = @GNULIB_WARN_CFLAGS@
 GREP = @GREP@
+HARD_LOCALE_LIB = @HARD_LOCALE_LIB@
 HAVE_ACCEPT4 = @HAVE_ACCEPT4@
 HAVE_ALIGNED_ALLOC = @HAVE_ALIGNED_ALLOC@
 HAVE_ALLOCA_H = @HAVE_ALLOCA_H@
@@ -1419,6 +1433,7 @@ HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@
 HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
 HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
 HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
+HAVE_DECL_GETW = @HAVE_DECL_GETW@
 HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@
 HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@
 HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@
@@ -1428,6 +1443,8 @@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@
 HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
 HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
 HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@
+HAVE_DECL_PROGRAM_INVOCATION_NAME = @HAVE_DECL_PROGRAM_INVOCATION_NAME@
+HAVE_DECL_PUTW = @HAVE_DECL_PUTW@
 HAVE_DECL_SETENV = @HAVE_DECL_SETENV@
 HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@
 HAVE_DECL_SETSTATE = @HAVE_DECL_SETSTATE@
@@ -1451,6 +1468,9 @@ HAVE_DIRENT_H = @HAVE_DIRENT_H@
 HAVE_DPRINTF = @HAVE_DPRINTF@
 HAVE_DUP3 = @HAVE_DUP3@
 HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
+HAVE_ERROR = @HAVE_ERROR@
+HAVE_ERROR_AT_LINE = @HAVE_ERROR_AT_LINE@
+HAVE_ERROR_H = @HAVE_ERROR_H@
 HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
 HAVE_EXECVPE = @HAVE_EXECVPE@
 HAVE_EXPLICIT_BZERO = @HAVE_EXPLICIT_BZERO@
@@ -1481,11 +1501,14 @@ HAVE_GETLOGIN = @HAVE_GETLOGIN@
 HAVE_GETOPT_H = @HAVE_GETOPT_H@
 HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
 HAVE_GETPASS = @HAVE_GETPASS@
+HAVE_GETPROGNAME = @HAVE_GETPROGNAME@
 HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
 HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@
 HAVE_GETUMASK = @HAVE_GETUMASK@
 HAVE_GRANTPT = @HAVE_GRANTPT@
 HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
+HAVE_IMAXABS = @HAVE_IMAXABS@
+HAVE_IMAXDIV = @HAVE_IMAXDIV@
 HAVE_IMAXDIV_T = @HAVE_IMAXDIV_T@
 HAVE_INITSTATE = @HAVE_INITSTATE@
 HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
@@ -1513,6 +1536,7 @@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@
 HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@
 HAVE_MBTOWC = @HAVE_MBTOWC@
 HAVE_MEMPCPY = @HAVE_MEMPCPY@
+HAVE_MEMSET_EXPLICIT = @HAVE_MEMSET_EXPLICIT@
 HAVE_MKDIRAT = @HAVE_MKDIRAT@
 HAVE_MKDTEMP = @HAVE_MKDTEMP@
 HAVE_MKFIFO = @HAVE_MKFIFO@
@@ -1675,6 +1699,7 @@ HAVE_TIMESPEC_GETRES = @HAVE_TIMESPEC_GETRES@
 HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@
 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@
 HAVE_UNISTD_H = @HAVE_UNISTD_H@
+HAVE_UNISTRING_WOE32DLL_H = @HAVE_UNISTRING_WOE32DLL_H@
 HAVE_UNLINKAT = @HAVE_UNLINKAT@
 HAVE_UNLOCKPT = @HAVE_UNLOCKPT@
 HAVE_USLEEP = @HAVE_USLEEP@
@@ -1724,7 +1749,6 @@ HAVE_WMEMPCPY = @HAVE_WMEMPCPY@
 HAVE_WMEMSET = @HAVE_WMEMSET@
 HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@
 HAVE_XLOCALE_H = @HAVE_XLOCALE_H@
-HAVE__BOOL = @HAVE__BOOL@
 HAVE__EXIT = @HAVE__EXIT@
 HOST_CPU = @HOST_CPU@
 HOST_CPU_C_ABI = @HOST_CPU_C_ABI@
@@ -1788,16 +1812,21 @@ LTLIBOBJS = @LTLIBOBJS@
 LTLIBSIGSEGV = @LTLIBSIGSEGV@
 LTLIBTHREAD = @LTLIBTHREAD@
 MAKEINFO = @MAKEINFO@
+MBRTOWC_LIB = @MBRTOWC_LIB@
 MKDIR_P = @MKDIR_P@
 MSGFMT = @MSGFMT@
 MSGFMT_015 = @MSGFMT_015@
 MSGMERGE = @MSGMERGE@
+NANOSLEEP_LIB = @NANOSLEEP_LIB@
 NETINET_IN_H = @NETINET_IN_H@
 NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@
+NEXT_ASSERT_H = @NEXT_ASSERT_H@
 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@
+NEXT_AS_FIRST_DIRECTIVE_ASSERT_H = @NEXT_AS_FIRST_DIRECTIVE_ASSERT_H@
 NEXT_AS_FIRST_DIRECTIVE_CTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_CTYPE_H@
 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@
 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
+NEXT_AS_FIRST_DIRECTIVE_ERROR_H = @NEXT_AS_FIRST_DIRECTIVE_ERROR_H@
 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@
 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@
 NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H = @NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H@
@@ -1831,6 +1860,7 @@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@
 NEXT_CTYPE_H = @NEXT_CTYPE_H@
 NEXT_DIRENT_H = @NEXT_DIRENT_H@
 NEXT_ERRNO_H = @NEXT_ERRNO_H@
+NEXT_ERROR_H = @NEXT_ERROR_H@
 NEXT_FCNTL_H = @NEXT_FCNTL_H@
 NEXT_FLOAT_H = @NEXT_FLOAT_H@
 NEXT_FNMATCH_H = @NEXT_FNMATCH_H@
@@ -1881,6 +1911,7 @@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
 PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
 PRIPTR_PREFIX = @PRIPTR_PREFIX@
 PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
+PTHREAD_SIGMASK_LIB = @PTHREAD_SIGMASK_LIB@
 PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
 RANLIB = @RANLIB@
 REPLACE_ACCESS = @REPLACE_ACCESS@
@@ -1900,7 +1931,10 @@ REPLACE_DIRFD = @REPLACE_DIRFD@
 REPLACE_DPRINTF = @REPLACE_DPRINTF@
 REPLACE_DUP = @REPLACE_DUP@
 REPLACE_DUP2 = @REPLACE_DUP2@
+REPLACE_DUP3 = @REPLACE_DUP3@
 REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
+REPLACE_ERROR = @REPLACE_ERROR@
+REPLACE_ERROR_AT_LINE = @REPLACE_ERROR_AT_LINE@
 REPLACE_EXECL = @REPLACE_EXECL@
 REPLACE_EXECLE = @REPLACE_EXECLE@
 REPLACE_EXECLP = @REPLACE_EXECLP@
@@ -1913,6 +1947,7 @@ REPLACE_FCHMODAT = @REPLACE_FCHMODAT@
 REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
 REPLACE_FCLOSE = @REPLACE_FCLOSE@
 REPLACE_FCNTL = @REPLACE_FCNTL@
+REPLACE_FDATASYNC = @REPLACE_FDATASYNC@
 REPLACE_FDOPEN = @REPLACE_FDOPEN@
 REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@
 REPLACE_FFLUSH = @REPLACE_FFLUSH@
@@ -1937,17 +1972,23 @@ REPLACE_GETCWD = @REPLACE_GETCWD@
 REPLACE_GETDELIM = @REPLACE_GETDELIM@
 REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
 REPLACE_GETDTABLESIZE = @REPLACE_GETDTABLESIZE@
+REPLACE_GETENTROPY = @REPLACE_GETENTROPY@
 REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
 REPLACE_GETLINE = @REPLACE_GETLINE@
+REPLACE_GETLOADAVG = @REPLACE_GETLOADAVG@
 REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
 REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
 REPLACE_GETPASS = @REPLACE_GETPASS@
 REPLACE_GETPASS_FOR_GETPASS_GNU = @REPLACE_GETPASS_FOR_GETPASS_GNU@
+REPLACE_GETPROGNAME = @REPLACE_GETPROGNAME@
+REPLACE_GETSUBOPT = @REPLACE_GETSUBOPT@
 REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
 REPLACE_GMTIME = @REPLACE_GMTIME@
 REPLACE_ICONV = @REPLACE_ICONV@
 REPLACE_ICONV_OPEN = @REPLACE_ICONV_OPEN@
 REPLACE_ICONV_UTF = @REPLACE_ICONV_UTF@
+REPLACE_IMAXABS = @REPLACE_IMAXABS@
+REPLACE_IMAXDIV = @REPLACE_IMAXDIV@
 REPLACE_INET_NTOP = @REPLACE_INET_NTOP@
 REPLACE_INET_PTON = @REPLACE_INET_PTON@
 REPLACE_INITSTATE = @REPLACE_INITSTATE@
@@ -1974,14 +2015,19 @@ REPLACE_MBSINIT = @REPLACE_MBSINIT@
 REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
 REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
 REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
+REPLACE_MBSTOWCS = @REPLACE_MBSTOWCS@
 REPLACE_MBTOWC = @REPLACE_MBTOWC@
+REPLACE_MB_CUR_MAX = @REPLACE_MB_CUR_MAX@
 REPLACE_MEMCHR = @REPLACE_MEMCHR@
 REPLACE_MEMMEM = @REPLACE_MEMMEM@
+REPLACE_MEMPCPY = @REPLACE_MEMPCPY@
 REPLACE_MKDIR = @REPLACE_MKDIR@
 REPLACE_MKFIFO = @REPLACE_MKFIFO@
 REPLACE_MKFIFOAT = @REPLACE_MKFIFOAT@
 REPLACE_MKNOD = @REPLACE_MKNOD@
 REPLACE_MKNODAT = @REPLACE_MKNODAT@
+REPLACE_MKOSTEMP = @REPLACE_MKOSTEMP@
+REPLACE_MKOSTEMPS = @REPLACE_MKOSTEMPS@
 REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
 REPLACE_MKTIME = @REPLACE_MKTIME@
 REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
@@ -1993,8 +2039,10 @@ REPLACE_OPEN = @REPLACE_OPEN@
 REPLACE_OPENAT = @REPLACE_OPENAT@
 REPLACE_OPENDIR = @REPLACE_OPENDIR@
 REPLACE_PERROR = @REPLACE_PERROR@
+REPLACE_PIPE2 = @REPLACE_PIPE2@
 REPLACE_POPEN = @REPLACE_POPEN@
 REPLACE_POSIX_MEMALIGN = @REPLACE_POSIX_MEMALIGN@
+REPLACE_POSIX_OPENPT = @REPLACE_POSIX_OPENPT@
 REPLACE_PREAD = @REPLACE_PREAD@
 REPLACE_PRINTF = @REPLACE_PRINTF@
 REPLACE_PSELECT = @REPLACE_PSELECT@
@@ -2059,6 +2107,7 @@ REPLACE_RAISE = @REPLACE_RAISE@
 REPLACE_RANDOM = @REPLACE_RANDOM@
 REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
 REPLACE_READ = @REPLACE_READ@
+REPLACE_READDIR = @REPLACE_READDIR@
 REPLACE_READLINK = @REPLACE_READLINK@
 REPLACE_READLINKAT = @REPLACE_READLINKAT@
 REPLACE_REALLOCARRAY = @REPLACE_REALLOCARRAY@
@@ -2068,10 +2117,12 @@ REPLACE_REALPATH = @REPLACE_REALPATH@
 REPLACE_REMOVE = @REPLACE_REMOVE@
 REPLACE_RENAME = @REPLACE_RENAME@
 REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
+REPLACE_REWINDDIR = @REPLACE_REWINDDIR@
 REPLACE_RMDIR = @REPLACE_RMDIR@
 REPLACE_SCHED_YIELD = @REPLACE_SCHED_YIELD@
 REPLACE_SELECT = @REPLACE_SELECT@
 REPLACE_SETENV = @REPLACE_SETENV@
+REPLACE_SETHOSTNAME = @REPLACE_SETHOSTNAME@
 REPLACE_SETLOCALE = @REPLACE_SETLOCALE@
 REPLACE_SETSTATE = @REPLACE_SETSTATE@
 REPLACE_SLEEP = @REPLACE_SLEEP@
@@ -2080,6 +2131,7 @@ REPLACE_SPRINTF = @REPLACE_SPRINTF@
 REPLACE_STAT = @REPLACE_STAT@
 REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@
 REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
+REPLACE_STPCPY = @REPLACE_STPCPY@
 REPLACE_STPNCPY = @REPLACE_STPNCPY@
 REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
 REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@
@@ -2106,7 +2158,9 @@ REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@
 REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@
 REPLACE_SYMLINK = @REPLACE_SYMLINK@
 REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@
+REPLACE_TIME = @REPLACE_TIME@
 REPLACE_TIMEGM = @REPLACE_TIMEGM@
+REPLACE_TIMESPEC_GET = @REPLACE_TIMESPEC_GET@
 REPLACE_TMPFILE = @REPLACE_TMPFILE@
 REPLACE_TOWLOWER = @REPLACE_TOWLOWER@
 REPLACE_TRUNCATE = @REPLACE_TRUNCATE@
@@ -2124,24 +2178,33 @@ REPLACE_VPRINTF = @REPLACE_VPRINTF@
 REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
 REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
 REPLACE_WCRTOMB = @REPLACE_WCRTOMB@
+REPLACE_WCSCMP = @REPLACE_WCSCMP@
 REPLACE_WCSFTIME = @REPLACE_WCSFTIME@
+REPLACE_WCSNCMP = @REPLACE_WCSNCMP@
 REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@
 REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@
+REPLACE_WCSSTR = @REPLACE_WCSSTR@
 REPLACE_WCSTOK = @REPLACE_WCSTOK@
 REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@
 REPLACE_WCTOB = @REPLACE_WCTOB@
 REPLACE_WCTOMB = @REPLACE_WCTOMB@
 REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
+REPLACE_WMEMCMP = @REPLACE_WMEMCMP@
+REPLACE_WMEMPCPY = @REPLACE_WMEMPCPY@
 REPLACE_WRITE = @REPLACE_WRITE@
+REPLACE__EXIT = @REPLACE__EXIT@
+SCHED_YIELD_LIB = @SCHED_YIELD_LIB@
 SED = @SED@
+SELECT_LIB = @SELECT_LIB@
+SETLOCALE_LIB = @SETLOCALE_LIB@
+SETLOCALE_NULL_LIB = @SETLOCALE_NULL_LIB@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 SIGSEGV_H = @SIGSEGV_H@
 SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
 SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
-STDALIGN_H = @STDALIGN_H@
 STDARG_H = @STDARG_H@
-STDBOOL_H = @STDBOOL_H@
+STDCKDINT_H = @STDCKDINT_H@
 STDDEF_H = @STDDEF_H@
 STDINT_H = @STDINT_H@
 STRIP = @STRIP@
@@ -2184,6 +2247,8 @@ am__tar = @am__tar@
 am__untar = @am__untar@
 am__xargs_n = @am__xargs_n@
 bindir = @bindir@
+bindir_c = @bindir_c@
+bindir_c_make = @bindir_c_make@
 build = @build@
 build_alias = @build_alias@
 build_cpu = @build_cpu@
@@ -2191,10 +2256,20 @@ build_os = @build_os@
 build_vendor = @build_vendor@
 builddir = @builddir@
 datadir = @datadir@
+datadir_c = @datadir_c@
+datadir_c_make = @datadir_c_make@
 datarootdir = @datarootdir@
+datarootdir_c = @datarootdir_c@
+datarootdir_c_make = @datarootdir_c_make@
 docdir = @docdir@
+docdir_c = @docdir_c@
+docdir_c_make = @docdir_c_make@
 dvidir = @dvidir@
+dvidir_c = @dvidir_c@
+dvidir_c_make = @dvidir_c_make@
 exec_prefix = @exec_prefix@
+exec_prefix_c = @exec_prefix_c@
+exec_prefix_c_make = @exec_prefix_c_make@
 gl_LIBOBJDEPS = @gl_LIBOBJDEPS@
 gl_LIBOBJS = @gl_LIBOBJS@
 gl_LTLIBOBJS = @gl_LTLIBOBJS@
@@ -2208,61 +2283,104 @@ host_cpu = @host_cpu@
 host_os = @host_os@
 host_vendor = @host_vendor@
 htmldir = @htmldir@
+htmldir_c = @htmldir_c@
+htmldir_c_make = @htmldir_c_make@
 includedir = @includedir@
+includedir_c = @includedir_c@
+includedir_c_make = @includedir_c_make@
 infodir = @infodir@
+infodir_c = @infodir_c@
+infodir_c_make = @infodir_c_make@
 install_sh = @install_sh@
 libdir = @libdir@
+libdir_c = @libdir_c@
+libdir_c_make = @libdir_c_make@
 libexecdir = @libexecdir@
+libexecdir_c = @libexecdir_c@
+libexecdir_c_make = @libexecdir_c_make@
 lispdir = @lispdir@
+lispdir_c = @lispdir_c@
+lispdir_c_make = @lispdir_c_make@
 localedir = @localedir@
+localedir_c = @localedir_c@
+localedir_c_make = @localedir_c_make@
 localstatedir = @localstatedir@
+localstatedir_c = @localstatedir_c@
+localstatedir_c_make = @localstatedir_c_make@
 mandir = @mandir@
+mandir_c = @mandir_c@
+mandir_c_make = @mandir_c_make@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+oldincludedir_c = @oldincludedir_c@
+oldincludedir_c_make = @oldincludedir_c_make@
 pdfdir = @pdfdir@
+pdfdir_c = @pdfdir_c@
+pdfdir_c_make = @pdfdir_c_make@
+pkgdatadir_c = @pkgdatadir_c@
+pkgdatadir_c_make = @pkgdatadir_c_make@
+pkgincludedir_c = @pkgincludedir_c@
+pkgincludedir_c_make = @pkgincludedir_c_make@
+pkglibdir_c = @pkglibdir_c@
+pkglibdir_c_make = @pkglibdir_c_make@
+pkglibexecdir_c = @pkglibexecdir_c@
+pkglibexecdir_c_make = @pkglibexecdir_c_make@
 prefix = @prefix@
+prefix_c = @prefix_c@
+prefix_c_make = @prefix_c_make@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+psdir_c = @psdir_c@
+psdir_c_make = @psdir_c_make@
 runstatedir = @runstatedir@
+runstatedir_c = @runstatedir_c@
+runstatedir_c_make = @runstatedir_c_make@
 sbindir = @sbindir@
+sbindir_c = @sbindir_c@
+sbindir_c_make = @sbindir_c_make@
 sharedstatedir = @sharedstatedir@
+sharedstatedir_c = @sharedstatedir_c@
+sharedstatedir_c_make = @sharedstatedir_c_make@
 srcdir = @srcdir@
 sysconfdir = @sysconfdir@
+sysconfdir_c = @sysconfdir_c@
+sysconfdir_c_make = @sysconfdir_c_make@
 target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AM_CFLAGS = $(GNULIB_WARN_CFLAGS) $(WERROR_CFLAGS)
 AM_CPPFLAGS = 
-BUILT_SOURCES = $(ALLOCA_H) configmake.h ctype.h dirent.h \
-	malloc/dynarray.gl.h malloc/dynarray-skeleton.gl.h $(ERRNO_H) \
-	fcntl.h $(FNMATCH_H) $(GETOPT_H) $(GETOPT_CDEFS_H) $(ICONV_H) \
-	iconv_open-aix.h iconv_open-hpux.h iconv_open-irix.h \
-	iconv_open-osf.h iconv_open-solaris.h iconv_open-zos.h \
-	inttypes.h langinfo.h $(LIMITS_H) locale.h signal.h \
-	$(SIGSEGV_H) $(STDALIGN_H) $(STDARG_H) $(STDBOOL_H) \
-	$(STDDEF_H) $(STDINT_H) stdio.h stdlib.h string.h sys/stat.h \
-	sys/types.h time.h unistd.h $(LIBUNISTRING_UNISTR_H) \
-	$(LIBUNISTRING_UNITYPES_H) $(LIBUNISTRING_UNIWIDTH_H) wchar.h \
-	wctype.h
+BUILT_SOURCES = $(ALLOCA_H) $(ASSERT_H) configmake.h ctype.h dirent.h \
+	$(ERRNO_H) $(ERROR_H) fcntl.h $(FNMATCH_H) $(GETOPT_H) \
+	$(GETOPT_CDEFS_H) malloc/dynarray.gl.h \
+	malloc/dynarray-skeleton.gl.h $(ICONV_H) iconv_open-aix.h \
+	iconv_open-hpux.h iconv_open-irix.h iconv_open-osf.h \
+	iconv_open-solaris.h iconv_open-zos.h inttypes.h langinfo.h \
+	$(LIMITS_H) locale.h signal.h $(SIGSEGV_H) $(STDARG_H) \
+	$(STDCKDINT_H) $(STDDEF_H) $(STDINT_H) stdio.h stdlib.h \
+	string.h sys/stat.h sys/types.h time.h unistd.h \
+	$(LIBUNISTRING_UNISTR_H) $(LIBUNISTRING_UNITYPES_H) \
+	$(LIBUNISTRING_UNIWIDTH_H) wchar.h wctype.h
 CLEANFILES = configmake.h configmake.h-t colorize.c
 EXTRA_DIST = alignof.h alloca.in.h \
-	$(top_srcdir)/build-aux/announce-gen argmatch.h assure.h \
-	attribute.h basename-lgpl.h c-strcaseeq.h calloc.c calloc.c \
-	chdir-long.h cloexec.h close-stream.h dirent-private.h \
-	closeout.h ctype.in.h cycle-check.h dev-ino.h dfa.h \
-	localeinfo.h dirent.in.h dirname.h \
-	$(top_srcdir)/build-aux/do-release-commit-and-tag dynarray.h \
-	malloc/dynarray-skeleton.c malloc/dynarray.h errno.in.h \
-	error.h exclude.h exitfail.h fcntl.in.h fcntl--.h \
-	fcntl-safer.h fd-hook.h filename.h filenamecat.h flexmember.h \
-	fnmatch.c fnmatch_loop.c fnmatch.in.h fopen.c fopen.c \
-	fpending.h stdio-impl.h stat-w32.c stat-w32.h at-func.c \
-	fts-cycle.c fts_.h $(top_srcdir)/build-aux/gendocs.sh \
-	getopt-cdefs.in.h getopt-core.h getopt-ext.h getopt-pfx-core.h \
-	getopt-pfx-ext.h getopt.in.h getopt_int.h \
+	$(top_srcdir)/build-aux/announce-gen argmatch.h assert.in.h \
+	verify.h assure.h attribute.h basename-lgpl.h c-strcaseeq.h \
+	calloc.c calloc.c chdir-long.h cloexec.h close-stream.h \
+	dirent-private.h closeout.h ctype.in.h cycle-check.h dev-ino.h \
+	dfa.h localeinfo.h dirent.in.h dirent-private.h dirname.h \
+	$(top_srcdir)/build-aux/do-release-commit-and-tag errno.in.h \
+	error.in.h exclude.h exitfail.h fcntl.in.h fcntl--.h \
+	fcntl-safer.h fd-hook.h dirent-private.h filename.h \
+	filenamecat.h flexmember.h fnmatch.c fnmatch_loop.c \
+	fnmatch.in.h fopen.c fopen.c fpending.h stdio-impl.h \
+	stat-w32.c stat-w32.h at-func.c fts-cycle.c fts_.h \
+	$(top_srcdir)/build-aux/gendocs.sh getopt-cdefs.in.h \
+	getopt-core.h getopt-ext.h getopt-pfx-core.h getopt-pfx-ext.h \
+	getopt.in.h getopt_int.h getprogname.h \
 	$(top_srcdir)/build-aux/git-version-gen \
-	$(top_srcdir)/build-aux/gitlog-to-changelog \
+	$(top_srcdir)/build-aux/gitlog-to-changelog dynarray.h \
+	malloc/dynarray-skeleton.c malloc/dynarray.h \
 	$(top_srcdir)/build-aux/gnu-web-doc-update \
 	$(top_srcdir)/GNUmakefile $(top_srcdir)/build-aux/gnupload \
 	hard-locale.h hash.h $(top_srcdir)/build-aux/config.rpath \
@@ -2271,30 +2389,30 @@ EXTRA_DIST = alignof.h alloca.in.h \
 	iconv_open-solaris.h iconv_open-zos.h iconv_open-aix.gperf \
 	iconv_open-hpux.gperf iconv_open-irix.gperf \
 	iconv_open-osf.gperf iconv_open-solaris.gperf \
-	iconv_open-zos.gperf ignore-value.h intprops.h inttypes.in.h \
-	langinfo.in.h cdefs.h libc-config.h limits.in.h localcharset.h \
-	locale.in.h $(top_srcdir)/maint.mk malloc.c malloc.c malloca.h \
-	mbchar.h lc-charset-dispatch.c lc-charset-dispatch.h \
-	mbrtowc-impl-utf8.h mbrtowc-impl.h mbtowc-lock.c mbtowc-lock.h \
-	windows-initguard.h mbsrtowcs-impl.h mbsrtowcs-state.c \
-	str-kmp.h mbtowc-impl.h memchr.valgrind memchr2.valgrind \
-	msvc-inval.h msvc-nothrow.h windows-initguard.h obstack.h \
-	openat.h fcntl--.h fcntl-safer.h dirent-private.h opendirat.h \
-	pathmax.h quote.h quote.h quotearg.h rawmemchr.valgrind \
-	dirent-private.h realloc.c realloc.c regcomp.c regex.h \
-	regex_internal.c regex_internal.h regexec.c safe-read.h \
-	sys-limits.h same-inode.h save-cwd.h setlocale_null.h \
-	windows-initguard.h signal.in.h sigsegv.in.h stackvma.h \
-	_Noreturn.h arg-nonnull.h c++defs.h warn-on-use.h stat-w32.c \
-	stat-w32.h stat-time.h stdalign.in.h stdarg.in.h stdbool.in.h \
-	stddef.in.h stdint.in.h stdio.in.h stdlib.in.h streq.h \
-	strerror-override.h string.in.h strstr.c str-two-way.h \
-	strstr.c strtol.c strtol.c strtoul.c strtoimax.c sys_stat.in.h \
-	sys_types.in.h time.in.h trim.h unistd.in.h unistd--.h \
-	unistd-safer.h unistr.in.h unitypes.in.h localcharset.h \
-	uniwidth.in.h unictype/bitmap.h uniwidth/cjk.h \
-	uniwidth/width0.h uniwidth/width2.h unlocked-io.h \
-	$(top_srcdir)/build-aux/update-copyright \
+	iconv_open-zos.gperf ignore-value.h intprops-internal.h \
+	intprops.h inttypes.in.h langinfo.in.h cdefs.h libc-config.h \
+	limits.in.h localcharset.h locale.in.h $(top_srcdir)/maint.mk \
+	malloc.c malloc.c malloca.h mbchar.h lc-charset-dispatch.c \
+	lc-charset-dispatch.h mbrtowc-impl-utf8.h mbrtowc-impl.h \
+	mbtowc-lock.c mbtowc-lock.h windows-initguard.h \
+	mbsrtowcs-impl.h mbsrtowcs-state.c str-kmp.h mbtowc-impl.h \
+	memchr.valgrind memchr2.valgrind msvc-inval.h msvc-nothrow.h \
+	windows-initguard.h obstack.h openat.h fcntl--.h fcntl-safer.h \
+	dirent-private.h opendirat.h pathmax.h quote.h quote.h \
+	quotearg.h rawmemchr.valgrind dirent-private.h realloc.c \
+	realloc.c regcomp.c regex.h regex_internal.c regex_internal.h \
+	regexec.c safe-read.h sys-limits.h same-inode.h save-cwd.h \
+	setlocale_null.h windows-initguard.h signal.in.h sigsegv.in.h \
+	stackvma.h _Noreturn.h arg-nonnull.h c++defs.h warn-on-use.h \
+	stat-w32.c stat-w32.h stat-time.h stdarg.in.h \
+	intprops-internal.h stdckdint.in.h stddef.in.h stdint.in.h \
+	stdio.in.h stdlib.in.h streq.h strerror-override.h string.in.h \
+	strstr.c str-two-way.h strstr.c strtol.c strtol.c strtoul.c \
+	strtoimax.c sys_stat.in.h sys_types.in.h time.in.h trim.h \
+	unistd.in.h unistd--.h unistd-safer.h unistr.in.h \
+	unitypes.in.h localcharset.h uniwidth.in.h unictype/bitmap.h \
+	uniwidth/cjk.h uniwidth/width0.h uniwidth/width2.h \
+	unlocked-io.h $(top_srcdir)/build-aux/update-copyright \
 	$(top_srcdir)/build-aux/useless-if-before-free \
 	$(top_srcdir)/build-aux/vc-list-files verify.h wchar.in.h \
 	wctomb-impl.h wctype.in.h windows-initguard.h windows-mutex.h \
@@ -2306,23 +2424,23 @@ MAINTAINERCLEANFILES = iconv_open-aix.h iconv_open-hpux.h \
 	iconv_open-irix.h iconv_open-osf.h iconv_open-solaris.h \
 	iconv_open-zos.h
 MOSTLYCLEANDIRS = sys
-MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t ctype.h \
-	ctype.h-t dirent.h dirent.h-t malloc/dynarray.gl.h \
-	malloc/dynarray.gl.h-t malloc/dynarray-skeleton.gl.h \
-	malloc/dynarray-skeleton.gl.h-t errno.h errno.h-t fcntl.h \
-	fcntl.h-t fnmatch.h fnmatch.h-t getopt.h getopt.h-t \
-	getopt-cdefs.h getopt-cdefs.h-t iconv.h iconv.h-t \
-	iconv_open-aix.h-t iconv_open-hpux.h-t iconv_open-irix.h-t \
-	iconv_open-osf.h-t iconv_open-solaris.h-t iconv_open-zos.h-t \
-	inttypes.h inttypes.h-t langinfo.h langinfo.h-t limits.h \
-	limits.h-t locale.h locale.h-t signal.h signal.h-t sigsegv.h \
-	sigsegv.h-t stdalign.h stdalign.h-t stdarg.h stdarg.h-t \
-	stdbool.h stdbool.h-t stddef.h stddef.h-t stdint.h stdint.h-t \
-	stdio.h stdio.h-t stdlib.h stdlib.h-t string.h string.h-t \
-	sys/stat.h sys/stat.h-t sys/types.h sys/types.h-t time.h \
-	time.h-t unistd.h unistd.h-t unistr.h unistr.h-t unitypes.h \
-	unitypes.h-t uniwidth.h uniwidth.h-t wchar.h wchar.h-t \
-	wctype.h wctype.h-t
+MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t assert.h \
+	assert.h-t ctype.h ctype.h-t dirent.h dirent.h-t errno.h \
+	errno.h-t error.h error.h-t fcntl.h fcntl.h-t fnmatch.h \
+	fnmatch.h-t getopt.h getopt.h-t getopt-cdefs.h \
+	getopt-cdefs.h-t malloc/dynarray.gl.h malloc/dynarray.gl.h-t \
+	malloc/dynarray-skeleton.gl.h malloc/dynarray-skeleton.gl.h-t \
+	iconv.h iconv.h-t iconv_open-aix.h-t iconv_open-hpux.h-t \
+	iconv_open-irix.h-t iconv_open-osf.h-t iconv_open-solaris.h-t \
+	iconv_open-zos.h-t inttypes.h inttypes.h-t langinfo.h \
+	langinfo.h-t limits.h limits.h-t locale.h locale.h-t signal.h \
+	signal.h-t sigsegv.h sigsegv.h-t stdarg.h stdarg.h-t \
+	stdckdint.h stdckdint.h-t stddef.h stddef.h-t stdint.h \
+	stdint.h-t stdio.h stdio.h-t stdlib.h stdlib.h-t string.h \
+	string.h-t sys/stat.h sys/stat.h-t sys/types.h sys/types.h-t \
+	time.h time.h-t unistd.h unistd.h-t unistr.h unistr.h-t \
+	unitypes.h unitypes.h-t uniwidth.h uniwidth.h-t wchar.h \
+	wchar.h-t wctype.h wctype.h-t
 SUFFIXES = 
 # No GNU Make output.
 noinst_LIBRARIES = libgreputils.a
@@ -2333,51 +2451,51 @@ libgreputils_a_SOURCES = argmatch.c openat-priv.h openat-proc.c \
 	$(am__append_2) cloexec.c $(am__append_3) close-stream.c \
 	$(am__append_4) closeout.c cycle-check.c dfa.c localeinfo.c \
 	$(am__append_5) dirname-lgpl.c stripslash.c $(am__append_6) \
-	$(am__append_7) malloc/dynarray_at_failure.c \
-	malloc/dynarray_emplace_enlarge.c malloc/dynarray_finalize.c \
-	malloc/dynarray_resize.c malloc/dynarray_resize_clear.c \
-	$(am__append_8) exclude.c exitfail.c $(am__append_9) \
-	$(am__append_10) creat-safer.c open-safer.c fd-hook.c \
-	fd-safer-flag.c dup-safer-flag.c $(am__append_11) \
+	$(am__append_7) $(am__append_8) exclude.c exitfail.c \
+	$(am__append_9) $(am__append_10) creat-safer.c open-safer.c \
+	fd-hook.c fd-safer-flag.c dup-safer-flag.c $(am__append_11) \
 	filenamecat-lgpl.c $(am__append_12) $(am__append_13) \
 	$(am__append_14) $(am__append_15) $(am__append_16) \
 	$(am__append_17) $(am__append_18) $(am__append_19) \
-	$(am__append_20) getprogname.h getprogname.c gettext.h \
-	hard-locale.c hash.c i-ring.c ialloc.c $(am__append_21) \
-	$(am__append_22) idx.h $(am__append_23) $(am__append_24) \
-	$(am__append_25) $(am__append_26) $(am__append_27) \
-	localcharset.c $(am__append_28) glthread/lock.h \
-	glthread/lock.c $(am__append_29) $(am__append_30) malloca.c \
-	mbchar.c mbiter.h mbiter.c $(am__append_31) $(am__append_32) \
-	mbscasecmp.c $(am__append_33) mbslen.c $(am__append_34) \
-	mbsstr.c $(am__append_35) mbuiter.h mbuiter.c $(am__append_36) \
-	memchr2.h memchr2.c $(am__append_37) $(am__append_38) minmax.h \
-	$(am__append_39) $(am__append_40) $(am__append_41) \
-	$(am__append_42) $(am__append_43) $(am__append_44) \
-	$(am__append_45) openat-die.c openat-safer.c $(am__append_46) \
-	opendirat.c $(am__append_47) propername.h propername.c \
-	quotearg.c $(am__append_48) $(am__append_49) $(am__append_50) \
-	$(am__append_51) $(am__append_52) $(am__append_53) safe-read.c \
-	save-cwd.c setlocale_null.c $(am__append_54) $(am__append_55) \
-	$(am__append_56) stat-time.c $(am__append_57) $(am__append_58) \
-	$(am__append_59) $(am__append_60) $(am__append_61) \
-	$(am__append_62) striconv.h striconv.c $(am__append_63) \
-	strnlen1.h strnlen1.c $(am__append_64) $(am__append_65) \
-	$(am__append_66) $(am__append_67) glthread/threadlib.c trim.c \
-	unistd.c dup-safer.c fd-safer.c pipe-safer.c $(am__append_68) \
-	$(am__append_69) $(am__append_70) version-etc.h version-etc.c \
-	version-etc-fsf.c $(am__append_71) $(am__append_72) \
-	$(am__append_73) wctype-h.c $(am__append_74) $(am__append_75) \
-	$(am__append_76) $(am__append_77) $(am__append_78) \
-	$(am__append_79) $(am__append_80) xmalloc.c xalloc-die.c \
+	$(am__append_20) $(am__append_21) gettext.h \
+	malloc/dynarray_at_failure.c malloc/dynarray_emplace_enlarge.c \
+	malloc/dynarray_finalize.c malloc/dynarray_resize.c \
+	malloc/dynarray_resize_clear.c hard-locale.c hash.c i-ring.c \
+	ialloc.c $(am__append_22) $(am__append_23) idx.h \
+	$(am__append_24) $(am__append_25) $(am__append_26) \
+	$(am__append_27) $(am__append_28) localcharset.c \
+	$(am__append_29) glthread/lock.h glthread/lock.c \
+	$(am__append_30) $(am__append_31) malloca.c mbchar.c mbiter.h \
+	mbiter.c $(am__append_32) $(am__append_33) mbscasecmp.c \
+	$(am__append_34) mbslen.c $(am__append_35) mbsstr.c \
+	$(am__append_36) mbuiter.h mbuiter.c $(am__append_37) \
+	memchr2.h memchr2.c $(am__append_38) $(am__append_39) minmax.h \
+	$(am__append_40) $(am__append_41) $(am__append_42) \
+	$(am__append_43) $(am__append_44) $(am__append_45) \
+	$(am__append_46) openat-die.c openat-safer.c $(am__append_47) \
+	opendirat.c $(am__append_48) propername.h propername.c \
+	quotearg.c $(am__append_49) $(am__append_50) $(am__append_51) \
+	$(am__append_52) $(am__append_53) $(am__append_54) safe-read.c \
+	save-cwd.c setlocale_null.c $(am__append_55) $(am__append_56) \
+	$(am__append_57) stat-time.c $(am__append_58) $(am__append_59) \
+	$(am__append_60) $(am__append_61) $(am__append_62) \
+	$(am__append_63) striconv.h striconv.c $(am__append_64) \
+	strnlen1.h strnlen1.c $(am__append_65) $(am__append_66) \
+	$(am__append_67) $(am__append_68) glthread/threadlib.c trim.c \
+	unistd.c dup-safer.c fd-safer.c pipe-safer.c $(am__append_69) \
+	$(am__append_70) $(am__append_71) version-etc.h version-etc.c \
+	version-etc-fsf.c $(am__append_72) $(am__append_73) \
+	$(am__append_74) wctype-h.c $(am__append_75) $(am__append_76) \
+	$(am__append_77) $(am__append_78) $(am__append_79) \
+	$(am__append_80) $(am__append_81) xmalloc.c xalloc-die.c \
 	xbinary-io.h xbinary-io.c xstriconv.h xstriconv.c xstrtoimax.c \
 	xstrtol.c xstrtoul.c colorize.h
 libgreputils_a_CFLAGS = $(AM_CFLAGS) $(GL_CFLAG_GNULIB_WARNINGS)
 libgreputils_a_LIBADD = $(gl_LIBOBJS) $(LIBOBJS) $(ALLOCA)
 libgreputils_a_DEPENDENCIES = $(gl_LIBOBJS) $(LIBOBJS) $(ALLOCA)
-EXTRA_libgreputils_a_SOURCES = calloc.c calloc.c \
-	malloc/dynarray-skeleton.c fnmatch.c fnmatch_loop.c fopen.c \
-	fopen.c stat-w32.c at-func.c fts-cycle.c malloc.c malloc.c \
+EXTRA_libgreputils_a_SOURCES = calloc.c calloc.c fnmatch.c \
+	fnmatch_loop.c fopen.c fopen.c stat-w32.c at-func.c \
+	fts-cycle.c malloc/dynarray-skeleton.c malloc.c malloc.c \
 	lc-charset-dispatch.c mbtowc-lock.c mbsrtowcs-state.c \
 	realloc.c realloc.c regcomp.c regex_internal.c regexec.c \
 	stat-w32.c strstr.c strstr.c strtol.c strtol.c strtoul.c \
@@ -2467,14 +2585,14 @@ clean-noinstLIBRARIES:
 	-$(am__rm_f) $(noinst_LIBRARIES)
 ../gnulib-tests/$(am__dirstamp):
 	@$(MKDIR_P) ../gnulib-tests/
-	@: > ../gnulib-tests/$(am__dirstamp)
+	@: >>../gnulib-tests/$(am__dirstamp)
 ../gnulib-tests/alloca.$(OBJEXT): ../gnulib-tests/$(am__dirstamp)
 malloc/$(am__dirstamp):
 	@$(MKDIR_P) malloc
-	@: > malloc/$(am__dirstamp)
+	@: >>malloc/$(am__dirstamp)
 malloc/$(DEPDIR)/$(am__dirstamp):
 	@$(MKDIR_P) malloc/$(DEPDIR)
-	@: > malloc/$(DEPDIR)/$(am__dirstamp)
+	@: >>malloc/$(DEPDIR)/$(am__dirstamp)
 malloc/libgreputils_a-dynarray_at_failure.$(OBJEXT):  \
 	malloc/$(am__dirstamp) malloc/$(DEPDIR)/$(am__dirstamp)
 malloc/libgreputils_a-dynarray_emplace_enlarge.$(OBJEXT):  \
@@ -2487,20 +2605,20 @@ malloc/libgreputils_a-dynarray_resize_clear.$(OBJEXT):  \
 	malloc/$(am__dirstamp) malloc/$(DEPDIR)/$(am__dirstamp)
 glthread/$(am__dirstamp):
 	@$(MKDIR_P) glthread
-	@: > glthread/$(am__dirstamp)
+	@: >>glthread/$(am__dirstamp)
 glthread/$(DEPDIR)/$(am__dirstamp):
 	@$(MKDIR_P) glthread/$(DEPDIR)
-	@: > glthread/$(DEPDIR)/$(am__dirstamp)
+	@: >>glthread/$(DEPDIR)/$(am__dirstamp)
 glthread/libgreputils_a-lock.$(OBJEXT): glthread/$(am__dirstamp) \
 	glthread/$(DEPDIR)/$(am__dirstamp)
 glthread/libgreputils_a-threadlib.$(OBJEXT): glthread/$(am__dirstamp) \
 	glthread/$(DEPDIR)/$(am__dirstamp)
 unistr/$(am__dirstamp):
 	@$(MKDIR_P) unistr
-	@: > unistr/$(am__dirstamp)
+	@: >>unistr/$(am__dirstamp)
 unistr/$(DEPDIR)/$(am__dirstamp):
 	@$(MKDIR_P) unistr/$(DEPDIR)
-	@: > unistr/$(DEPDIR)/$(am__dirstamp)
+	@: >>unistr/$(DEPDIR)/$(am__dirstamp)
 unistr/libgreputils_a-u8-mbtoucr.$(OBJEXT): unistr/$(am__dirstamp) \
 	unistr/$(DEPDIR)/$(am__dirstamp)
 unistr/libgreputils_a-u8-uctomb.$(OBJEXT): unistr/$(am__dirstamp) \
@@ -2509,10 +2627,10 @@ unistr/libgreputils_a-u8-uctomb-aux.$(OBJEXT): unistr/$(am__dirstamp) \
 	unistr/$(DEPDIR)/$(am__dirstamp)
 uniwidth/$(am__dirstamp):
 	@$(MKDIR_P) uniwidth
-	@: > uniwidth/$(am__dirstamp)
+	@: >>uniwidth/$(am__dirstamp)
 uniwidth/$(DEPDIR)/$(am__dirstamp):
 	@$(MKDIR_P) uniwidth/$(DEPDIR)
-	@: > uniwidth/$(DEPDIR)/$(am__dirstamp)
+	@: >>uniwidth/$(DEPDIR)/$(am__dirstamp)
 uniwidth/libgreputils_a-width.$(OBJEXT): uniwidth/$(am__dirstamp) \
 	uniwidth/$(DEPDIR)/$(am__dirstamp)
 malloc/libgreputils_a-dynarray-skeleton.$(OBJEXT):  \
@@ -3069,76 +3187,6 @@ libgreputils_a-dup2.obj: dup2.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -c -o libgreputils_a-dup2.obj `if test -f 'dup2.c'; then $(CYGPATH_W) 'dup2.c'; else $(CYGPATH_W) '$(srcdir)/dup2.c'; fi`
 
-malloc/libgreputils_a-dynarray_at_failure.o: malloc/dynarray_at_failure.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -MT malloc/libgreputils_a-dynarray_at_failure.o -MD -MP -MF malloc/$(DEPDIR)/libgreputils_a-dynarray_at_failure.Tpo -c -o malloc/libgreputils_a-dynarray_at_failure.o `test -f 'malloc/dynarray_at_failure.c' || echo '$(srcdir)/'`malloc/dynarray_at_failure.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) malloc/$(DEPDIR)/libgreputils_a-dynarray_at_failure.Tpo malloc/$(DEPDIR)/libgreputils_a-dynarray_at_failure.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='malloc/dynarray_at_failure.c' object='malloc/libgreputils_a-dynarray_at_failure.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -c -o malloc/libgreputils_a-dynarray_at_failure.o `test -f 'malloc/dynarray_at_failure.c' || echo '$(srcdir)/'`malloc/dynarray_at_failure.c
-
-malloc/libgreputils_a-dynarray_at_failure.obj: malloc/dynarray_at_failure.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -MT malloc/libgreputils_a-dynarray_at_failure.obj -MD -MP -MF malloc/$(DEPDIR)/libgreputils_a-dynarray_at_failure.Tpo -c -o malloc/libgreputils_a-dynarray_at_failure.obj `if test -f 'malloc/dynarray_at_failure.c'; then $(CYGPATH_W) 'malloc/dynarray_at_failure.c'; else $(CYGPATH_W) '$(srcdir)/malloc/dynarray_at_failure.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) malloc/$(DEPDIR)/libgreputils_a-dynarray_at_failure.Tpo malloc/$(DEPDIR)/libgreputils_a-dynarray_at_failure.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='malloc/dynarray_at_failure.c' object='malloc/libgreputils_a-dynarray_at_failure.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -c -o malloc/libgreputils_a-dynarray_at_failure.obj `if test -f 'malloc/dynarray_at_failure.c'; then $(CYGPATH_W) 'malloc/dynarray_at_failure.c'; else $(CYGPATH_W) '$(srcdir)/malloc/dynarray_at_failure.c'; fi`
-
-malloc/libgreputils_a-dynarray_emplace_enlarge.o: malloc/dynarray_emplace_enlarge.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -MT malloc/libgreputils_a-dynarray_emplace_enlarge.o -MD -MP -MF malloc/$(DEPDIR)/libgreputils_a-dynarray_emplace_enlarge.Tpo -c -o malloc/libgreputils_a-dynarray_emplace_enlarge.o `test -f 'malloc/dynarray_emplace_enlarge.c' || echo '$(srcdir)/'`malloc/dynarray_emplace_enlarge.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) malloc/$(DEPDIR)/libgreputils_a-dynarray_emplace_enlarge.Tpo malloc/$(DEPDIR)/libgreputils_a-dynarray_emplace_enlarge.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='malloc/dynarray_emplace_enlarge.c' object='malloc/libgreputils_a-dynarray_emplace_enlarge.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -c -o malloc/libgreputils_a-dynarray_emplace_enlarge.o `test -f 'malloc/dynarray_emplace_enlarge.c' || echo '$(srcdir)/'`malloc/dynarray_emplace_enlarge.c
-
-malloc/libgreputils_a-dynarray_emplace_enlarge.obj: malloc/dynarray_emplace_enlarge.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -MT malloc/libgreputils_a-dynarray_emplace_enlarge.obj -MD -MP -MF malloc/$(DEPDIR)/libgreputils_a-dynarray_emplace_enlarge.Tpo -c -o malloc/libgreputils_a-dynarray_emplace_enlarge.obj `if test -f 'malloc/dynarray_emplace_enlarge.c'; then $(CYGPATH_W) 'malloc/dynarray_emplace_enlarge.c'; else $(CYGPATH_W) '$(srcdir)/malloc/dynarray_emplace_enlarge.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) malloc/$(DEPDIR)/libgreputils_a-dynarray_emplace_enlarge.Tpo malloc/$(DEPDIR)/libgreputils_a-dynarray_emplace_enlarge.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='malloc/dynarray_emplace_enlarge.c' object='malloc/libgreputils_a-dynarray_emplace_enlarge.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -c -o malloc/libgreputils_a-dynarray_emplace_enlarge.obj `if test -f 'malloc/dynarray_emplace_enlarge.c'; then $(CYGPATH_W) 'malloc/dynarray_emplace_enlarge.c'; else $(CYGPATH_W) '$(srcdir)/malloc/dynarray_emplace_enlarge.c'; fi`
-
-malloc/libgreputils_a-dynarray_finalize.o: malloc/dynarray_finalize.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -MT malloc/libgreputils_a-dynarray_finalize.o -MD -MP -MF malloc/$(DEPDIR)/libgreputils_a-dynarray_finalize.Tpo -c -o malloc/libgreputils_a-dynarray_finalize.o `test -f 'malloc/dynarray_finalize.c' || echo '$(srcdir)/'`malloc/dynarray_finalize.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) malloc/$(DEPDIR)/libgreputils_a-dynarray_finalize.Tpo malloc/$(DEPDIR)/libgreputils_a-dynarray_finalize.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='malloc/dynarray_finalize.c' object='malloc/libgreputils_a-dynarray_finalize.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -c -o malloc/libgreputils_a-dynarray_finalize.o `test -f 'malloc/dynarray_finalize.c' || echo '$(srcdir)/'`malloc/dynarray_finalize.c
-
-malloc/libgreputils_a-dynarray_finalize.obj: malloc/dynarray_finalize.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -MT malloc/libgreputils_a-dynarray_finalize.obj -MD -MP -MF malloc/$(DEPDIR)/libgreputils_a-dynarray_finalize.Tpo -c -o malloc/libgreputils_a-dynarray_finalize.obj `if test -f 'malloc/dynarray_finalize.c'; then $(CYGPATH_W) 'malloc/dynarray_finalize.c'; else $(CYGPATH_W) '$(srcdir)/malloc/dynarray_finalize.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) malloc/$(DEPDIR)/libgreputils_a-dynarray_finalize.Tpo malloc/$(DEPDIR)/libgreputils_a-dynarray_finalize.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='malloc/dynarray_finalize.c' object='malloc/libgreputils_a-dynarray_finalize.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -c -o malloc/libgreputils_a-dynarray_finalize.obj `if test -f 'malloc/dynarray_finalize.c'; then $(CYGPATH_W) 'malloc/dynarray_finalize.c'; else $(CYGPATH_W) '$(srcdir)/malloc/dynarray_finalize.c'; fi`
-
-malloc/libgreputils_a-dynarray_resize.o: malloc/dynarray_resize.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -MT malloc/libgreputils_a-dynarray_resize.o -MD -MP -MF malloc/$(DEPDIR)/libgreputils_a-dynarray_resize.Tpo -c -o malloc/libgreputils_a-dynarray_resize.o `test -f 'malloc/dynarray_resize.c' || echo '$(srcdir)/'`malloc/dynarray_resize.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) malloc/$(DEPDIR)/libgreputils_a-dynarray_resize.Tpo malloc/$(DEPDIR)/libgreputils_a-dynarray_resize.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='malloc/dynarray_resize.c' object='malloc/libgreputils_a-dynarray_resize.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -c -o malloc/libgreputils_a-dynarray_resize.o `test -f 'malloc/dynarray_resize.c' || echo '$(srcdir)/'`malloc/dynarray_resize.c
-
-malloc/libgreputils_a-dynarray_resize.obj: malloc/dynarray_resize.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -MT malloc/libgreputils_a-dynarray_resize.obj -MD -MP -MF malloc/$(DEPDIR)/libgreputils_a-dynarray_resize.Tpo -c -o malloc/libgreputils_a-dynarray_resize.obj `if test -f 'malloc/dynarray_resize.c'; then $(CYGPATH_W) 'malloc/dynarray_resize.c'; else $(CYGPATH_W) '$(srcdir)/malloc/dynarray_resize.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) malloc/$(DEPDIR)/libgreputils_a-dynarray_resize.Tpo malloc/$(DEPDIR)/libgreputils_a-dynarray_resize.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='malloc/dynarray_resize.c' object='malloc/libgreputils_a-dynarray_resize.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -c -o malloc/libgreputils_a-dynarray_resize.obj `if test -f 'malloc/dynarray_resize.c'; then $(CYGPATH_W) 'malloc/dynarray_resize.c'; else $(CYGPATH_W) '$(srcdir)/malloc/dynarray_resize.c'; fi`
-
-malloc/libgreputils_a-dynarray_resize_clear.o: malloc/dynarray_resize_clear.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -MT malloc/libgreputils_a-dynarray_resize_clear.o -MD -MP -MF malloc/$(DEPDIR)/libgreputils_a-dynarray_resize_clear.Tpo -c -o malloc/libgreputils_a-dynarray_resize_clear.o `test -f 'malloc/dynarray_resize_clear.c' || echo '$(srcdir)/'`malloc/dynarray_resize_clear.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) malloc/$(DEPDIR)/libgreputils_a-dynarray_resize_clear.Tpo malloc/$(DEPDIR)/libgreputils_a-dynarray_resize_clear.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='malloc/dynarray_resize_clear.c' object='malloc/libgreputils_a-dynarray_resize_clear.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -c -o malloc/libgreputils_a-dynarray_resize_clear.o `test -f 'malloc/dynarray_resize_clear.c' || echo '$(srcdir)/'`malloc/dynarray_resize_clear.c
-
-malloc/libgreputils_a-dynarray_resize_clear.obj: malloc/dynarray_resize_clear.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -MT malloc/libgreputils_a-dynarray_resize_clear.obj -MD -MP -MF malloc/$(DEPDIR)/libgreputils_a-dynarray_resize_clear.Tpo -c -o malloc/libgreputils_a-dynarray_resize_clear.obj `if test -f 'malloc/dynarray_resize_clear.c'; then $(CYGPATH_W) 'malloc/dynarray_resize_clear.c'; else $(CYGPATH_W) '$(srcdir)/malloc/dynarray_resize_clear.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) malloc/$(DEPDIR)/libgreputils_a-dynarray_resize_clear.Tpo malloc/$(DEPDIR)/libgreputils_a-dynarray_resize_clear.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='malloc/dynarray_resize_clear.c' object='malloc/libgreputils_a-dynarray_resize_clear.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -c -o malloc/libgreputils_a-dynarray_resize_clear.obj `if test -f 'malloc/dynarray_resize_clear.c'; then $(CYGPATH_W) 'malloc/dynarray_resize_clear.c'; else $(CYGPATH_W) '$(srcdir)/malloc/dynarray_resize_clear.c'; fi`
-
 libgreputils_a-error.o: error.c
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -MT libgreputils_a-error.o -MD -MP -MF $(DEPDIR)/libgreputils_a-error.Tpo -c -o libgreputils_a-error.o `test -f 'error.c' || echo '$(srcdir)/'`error.c
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgreputils_a-error.Tpo $(DEPDIR)/libgreputils_a-error.Po
@@ -3461,6 +3509,76 @@ libgreputils_a-getprogname.obj: getprogname.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -c -o libgreputils_a-getprogname.obj `if test -f 'getprogname.c'; then $(CYGPATH_W) 'getprogname.c'; else $(CYGPATH_W) '$(srcdir)/getprogname.c'; fi`
 
+malloc/libgreputils_a-dynarray_at_failure.o: malloc/dynarray_at_failure.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -MT malloc/libgreputils_a-dynarray_at_failure.o -MD -MP -MF malloc/$(DEPDIR)/libgreputils_a-dynarray_at_failure.Tpo -c -o malloc/libgreputils_a-dynarray_at_failure.o `test -f 'malloc/dynarray_at_failure.c' || echo '$(srcdir)/'`malloc/dynarray_at_failure.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) malloc/$(DEPDIR)/libgreputils_a-dynarray_at_failure.Tpo malloc/$(DEPDIR)/libgreputils_a-dynarray_at_failure.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='malloc/dynarray_at_failure.c' object='malloc/libgreputils_a-dynarray_at_failure.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -c -o malloc/libgreputils_a-dynarray_at_failure.o `test -f 'malloc/dynarray_at_failure.c' || echo '$(srcdir)/'`malloc/dynarray_at_failure.c
+
+malloc/libgreputils_a-dynarray_at_failure.obj: malloc/dynarray_at_failure.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -MT malloc/libgreputils_a-dynarray_at_failure.obj -MD -MP -MF malloc/$(DEPDIR)/libgreputils_a-dynarray_at_failure.Tpo -c -o malloc/libgreputils_a-dynarray_at_failure.obj `if test -f 'malloc/dynarray_at_failure.c'; then $(CYGPATH_W) 'malloc/dynarray_at_failure.c'; else $(CYGPATH_W) '$(srcdir)/malloc/dynarray_at_failure.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) malloc/$(DEPDIR)/libgreputils_a-dynarray_at_failure.Tpo malloc/$(DEPDIR)/libgreputils_a-dynarray_at_failure.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='malloc/dynarray_at_failure.c' object='malloc/libgreputils_a-dynarray_at_failure.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -c -o malloc/libgreputils_a-dynarray_at_failure.obj `if test -f 'malloc/dynarray_at_failure.c'; then $(CYGPATH_W) 'malloc/dynarray_at_failure.c'; else $(CYGPATH_W) '$(srcdir)/malloc/dynarray_at_failure.c'; fi`
+
+malloc/libgreputils_a-dynarray_emplace_enlarge.o: malloc/dynarray_emplace_enlarge.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -MT malloc/libgreputils_a-dynarray_emplace_enlarge.o -MD -MP -MF malloc/$(DEPDIR)/libgreputils_a-dynarray_emplace_enlarge.Tpo -c -o malloc/libgreputils_a-dynarray_emplace_enlarge.o `test -f 'malloc/dynarray_emplace_enlarge.c' || echo '$(srcdir)/'`malloc/dynarray_emplace_enlarge.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) malloc/$(DEPDIR)/libgreputils_a-dynarray_emplace_enlarge.Tpo malloc/$(DEPDIR)/libgreputils_a-dynarray_emplace_enlarge.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='malloc/dynarray_emplace_enlarge.c' object='malloc/libgreputils_a-dynarray_emplace_enlarge.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -c -o malloc/libgreputils_a-dynarray_emplace_enlarge.o `test -f 'malloc/dynarray_emplace_enlarge.c' || echo '$(srcdir)/'`malloc/dynarray_emplace_enlarge.c
+
+malloc/libgreputils_a-dynarray_emplace_enlarge.obj: malloc/dynarray_emplace_enlarge.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -MT malloc/libgreputils_a-dynarray_emplace_enlarge.obj -MD -MP -MF malloc/$(DEPDIR)/libgreputils_a-dynarray_emplace_enlarge.Tpo -c -o malloc/libgreputils_a-dynarray_emplace_enlarge.obj `if test -f 'malloc/dynarray_emplace_enlarge.c'; then $(CYGPATH_W) 'malloc/dynarray_emplace_enlarge.c'; else $(CYGPATH_W) '$(srcdir)/malloc/dynarray_emplace_enlarge.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) malloc/$(DEPDIR)/libgreputils_a-dynarray_emplace_enlarge.Tpo malloc/$(DEPDIR)/libgreputils_a-dynarray_emplace_enlarge.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='malloc/dynarray_emplace_enlarge.c' object='malloc/libgreputils_a-dynarray_emplace_enlarge.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -c -o malloc/libgreputils_a-dynarray_emplace_enlarge.obj `if test -f 'malloc/dynarray_emplace_enlarge.c'; then $(CYGPATH_W) 'malloc/dynarray_emplace_enlarge.c'; else $(CYGPATH_W) '$(srcdir)/malloc/dynarray_emplace_enlarge.c'; fi`
+
+malloc/libgreputils_a-dynarray_finalize.o: malloc/dynarray_finalize.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -MT malloc/libgreputils_a-dynarray_finalize.o -MD -MP -MF malloc/$(DEPDIR)/libgreputils_a-dynarray_finalize.Tpo -c -o malloc/libgreputils_a-dynarray_finalize.o `test -f 'malloc/dynarray_finalize.c' || echo '$(srcdir)/'`malloc/dynarray_finalize.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) malloc/$(DEPDIR)/libgreputils_a-dynarray_finalize.Tpo malloc/$(DEPDIR)/libgreputils_a-dynarray_finalize.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='malloc/dynarray_finalize.c' object='malloc/libgreputils_a-dynarray_finalize.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -c -o malloc/libgreputils_a-dynarray_finalize.o `test -f 'malloc/dynarray_finalize.c' || echo '$(srcdir)/'`malloc/dynarray_finalize.c
+
+malloc/libgreputils_a-dynarray_finalize.obj: malloc/dynarray_finalize.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -MT malloc/libgreputils_a-dynarray_finalize.obj -MD -MP -MF malloc/$(DEPDIR)/libgreputils_a-dynarray_finalize.Tpo -c -o malloc/libgreputils_a-dynarray_finalize.obj `if test -f 'malloc/dynarray_finalize.c'; then $(CYGPATH_W) 'malloc/dynarray_finalize.c'; else $(CYGPATH_W) '$(srcdir)/malloc/dynarray_finalize.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) malloc/$(DEPDIR)/libgreputils_a-dynarray_finalize.Tpo malloc/$(DEPDIR)/libgreputils_a-dynarray_finalize.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='malloc/dynarray_finalize.c' object='malloc/libgreputils_a-dynarray_finalize.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -c -o malloc/libgreputils_a-dynarray_finalize.obj `if test -f 'malloc/dynarray_finalize.c'; then $(CYGPATH_W) 'malloc/dynarray_finalize.c'; else $(CYGPATH_W) '$(srcdir)/malloc/dynarray_finalize.c'; fi`
+
+malloc/libgreputils_a-dynarray_resize.o: malloc/dynarray_resize.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -MT malloc/libgreputils_a-dynarray_resize.o -MD -MP -MF malloc/$(DEPDIR)/libgreputils_a-dynarray_resize.Tpo -c -o malloc/libgreputils_a-dynarray_resize.o `test -f 'malloc/dynarray_resize.c' || echo '$(srcdir)/'`malloc/dynarray_resize.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) malloc/$(DEPDIR)/libgreputils_a-dynarray_resize.Tpo malloc/$(DEPDIR)/libgreputils_a-dynarray_resize.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='malloc/dynarray_resize.c' object='malloc/libgreputils_a-dynarray_resize.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -c -o malloc/libgreputils_a-dynarray_resize.o `test -f 'malloc/dynarray_resize.c' || echo '$(srcdir)/'`malloc/dynarray_resize.c
+
+malloc/libgreputils_a-dynarray_resize.obj: malloc/dynarray_resize.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -MT malloc/libgreputils_a-dynarray_resize.obj -MD -MP -MF malloc/$(DEPDIR)/libgreputils_a-dynarray_resize.Tpo -c -o malloc/libgreputils_a-dynarray_resize.obj `if test -f 'malloc/dynarray_resize.c'; then $(CYGPATH_W) 'malloc/dynarray_resize.c'; else $(CYGPATH_W) '$(srcdir)/malloc/dynarray_resize.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) malloc/$(DEPDIR)/libgreputils_a-dynarray_resize.Tpo malloc/$(DEPDIR)/libgreputils_a-dynarray_resize.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='malloc/dynarray_resize.c' object='malloc/libgreputils_a-dynarray_resize.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -c -o malloc/libgreputils_a-dynarray_resize.obj `if test -f 'malloc/dynarray_resize.c'; then $(CYGPATH_W) 'malloc/dynarray_resize.c'; else $(CYGPATH_W) '$(srcdir)/malloc/dynarray_resize.c'; fi`
+
+malloc/libgreputils_a-dynarray_resize_clear.o: malloc/dynarray_resize_clear.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -MT malloc/libgreputils_a-dynarray_resize_clear.o -MD -MP -MF malloc/$(DEPDIR)/libgreputils_a-dynarray_resize_clear.Tpo -c -o malloc/libgreputils_a-dynarray_resize_clear.o `test -f 'malloc/dynarray_resize_clear.c' || echo '$(srcdir)/'`malloc/dynarray_resize_clear.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) malloc/$(DEPDIR)/libgreputils_a-dynarray_resize_clear.Tpo malloc/$(DEPDIR)/libgreputils_a-dynarray_resize_clear.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='malloc/dynarray_resize_clear.c' object='malloc/libgreputils_a-dynarray_resize_clear.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -c -o malloc/libgreputils_a-dynarray_resize_clear.o `test -f 'malloc/dynarray_resize_clear.c' || echo '$(srcdir)/'`malloc/dynarray_resize_clear.c
+
+malloc/libgreputils_a-dynarray_resize_clear.obj: malloc/dynarray_resize_clear.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -MT malloc/libgreputils_a-dynarray_resize_clear.obj -MD -MP -MF malloc/$(DEPDIR)/libgreputils_a-dynarray_resize_clear.Tpo -c -o malloc/libgreputils_a-dynarray_resize_clear.obj `if test -f 'malloc/dynarray_resize_clear.c'; then $(CYGPATH_W) 'malloc/dynarray_resize_clear.c'; else $(CYGPATH_W) '$(srcdir)/malloc/dynarray_resize_clear.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) malloc/$(DEPDIR)/libgreputils_a-dynarray_resize_clear.Tpo malloc/$(DEPDIR)/libgreputils_a-dynarray_resize_clear.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='malloc/dynarray_resize_clear.c' object='malloc/libgreputils_a-dynarray_resize_clear.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -c -o malloc/libgreputils_a-dynarray_resize_clear.obj `if test -f 'malloc/dynarray_resize_clear.c'; then $(CYGPATH_W) 'malloc/dynarray_resize_clear.c'; else $(CYGPATH_W) '$(srcdir)/malloc/dynarray_resize_clear.c'; fi`
+
 libgreputils_a-hard-locale.o: hard-locale.c
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -MT libgreputils_a-hard-locale.o -MD -MP -MF $(DEPDIR)/libgreputils_a-hard-locale.Tpo -c -o libgreputils_a-hard-locale.o `test -f 'hard-locale.c' || echo '$(srcdir)/'`hard-locale.c
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgreputils_a-hard-locale.Tpo $(DEPDIR)/libgreputils_a-hard-locale.Po
@@ -4931,20 +5049,6 @@ libgreputils_a-calloc.obj: calloc.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -c -o libgreputils_a-calloc.obj `if test -f 'calloc.c'; then $(CYGPATH_W) 'calloc.c'; else $(CYGPATH_W) '$(srcdir)/calloc.c'; fi`
 
-malloc/libgreputils_a-dynarray-skeleton.o: malloc/dynarray-skeleton.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -MT malloc/libgreputils_a-dynarray-skeleton.o -MD -MP -MF malloc/$(DEPDIR)/libgreputils_a-dynarray-skeleton.Tpo -c -o malloc/libgreputils_a-dynarray-skeleton.o `test -f 'malloc/dynarray-skeleton.c' || echo '$(srcdir)/'`malloc/dynarray-skeleton.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) malloc/$(DEPDIR)/libgreputils_a-dynarray-skeleton.Tpo malloc/$(DEPDIR)/libgreputils_a-dynarray-skeleton.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='malloc/dynarray-skeleton.c' object='malloc/libgreputils_a-dynarray-skeleton.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -c -o malloc/libgreputils_a-dynarray-skeleton.o `test -f 'malloc/dynarray-skeleton.c' || echo '$(srcdir)/'`malloc/dynarray-skeleton.c
-
-malloc/libgreputils_a-dynarray-skeleton.obj: malloc/dynarray-skeleton.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -MT malloc/libgreputils_a-dynarray-skeleton.obj -MD -MP -MF malloc/$(DEPDIR)/libgreputils_a-dynarray-skeleton.Tpo -c -o malloc/libgreputils_a-dynarray-skeleton.obj `if test -f 'malloc/dynarray-skeleton.c'; then $(CYGPATH_W) 'malloc/dynarray-skeleton.c'; else $(CYGPATH_W) '$(srcdir)/malloc/dynarray-skeleton.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) malloc/$(DEPDIR)/libgreputils_a-dynarray-skeleton.Tpo malloc/$(DEPDIR)/libgreputils_a-dynarray-skeleton.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='malloc/dynarray-skeleton.c' object='malloc/libgreputils_a-dynarray-skeleton.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -c -o malloc/libgreputils_a-dynarray-skeleton.obj `if test -f 'malloc/dynarray-skeleton.c'; then $(CYGPATH_W) 'malloc/dynarray-skeleton.c'; else $(CYGPATH_W) '$(srcdir)/malloc/dynarray-skeleton.c'; fi`
-
 libgreputils_a-fnmatch.o: fnmatch.c
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -MT libgreputils_a-fnmatch.o -MD -MP -MF $(DEPDIR)/libgreputils_a-fnmatch.Tpo -c -o libgreputils_a-fnmatch.o `test -f 'fnmatch.c' || echo '$(srcdir)/'`fnmatch.c
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgreputils_a-fnmatch.Tpo $(DEPDIR)/libgreputils_a-fnmatch.Po
@@ -5029,6 +5133,20 @@ libgreputils_a-fts-cycle.obj: fts-cycle.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -c -o libgreputils_a-fts-cycle.obj `if test -f 'fts-cycle.c'; then $(CYGPATH_W) 'fts-cycle.c'; else $(CYGPATH_W) '$(srcdir)/fts-cycle.c'; fi`
 
+malloc/libgreputils_a-dynarray-skeleton.o: malloc/dynarray-skeleton.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -MT malloc/libgreputils_a-dynarray-skeleton.o -MD -MP -MF malloc/$(DEPDIR)/libgreputils_a-dynarray-skeleton.Tpo -c -o malloc/libgreputils_a-dynarray-skeleton.o `test -f 'malloc/dynarray-skeleton.c' || echo '$(srcdir)/'`malloc/dynarray-skeleton.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) malloc/$(DEPDIR)/libgreputils_a-dynarray-skeleton.Tpo malloc/$(DEPDIR)/libgreputils_a-dynarray-skeleton.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='malloc/dynarray-skeleton.c' object='malloc/libgreputils_a-dynarray-skeleton.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -c -o malloc/libgreputils_a-dynarray-skeleton.o `test -f 'malloc/dynarray-skeleton.c' || echo '$(srcdir)/'`malloc/dynarray-skeleton.c
+
+malloc/libgreputils_a-dynarray-skeleton.obj: malloc/dynarray-skeleton.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -MT malloc/libgreputils_a-dynarray-skeleton.obj -MD -MP -MF malloc/$(DEPDIR)/libgreputils_a-dynarray-skeleton.Tpo -c -o malloc/libgreputils_a-dynarray-skeleton.obj `if test -f 'malloc/dynarray-skeleton.c'; then $(CYGPATH_W) 'malloc/dynarray-skeleton.c'; else $(CYGPATH_W) '$(srcdir)/malloc/dynarray-skeleton.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) malloc/$(DEPDIR)/libgreputils_a-dynarray-skeleton.Tpo malloc/$(DEPDIR)/libgreputils_a-dynarray-skeleton.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='malloc/dynarray-skeleton.c' object='malloc/libgreputils_a-dynarray-skeleton.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -c -o malloc/libgreputils_a-dynarray-skeleton.obj `if test -f 'malloc/dynarray-skeleton.c'; then $(CYGPATH_W) 'malloc/dynarray-skeleton.c'; else $(CYGPATH_W) '$(srcdir)/malloc/dynarray-skeleton.c'; fi`
+
 libgreputils_a-malloc.o: malloc.c
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgreputils_a_CFLAGS) $(CFLAGS) -MT libgreputils_a-malloc.o -MD -MP -MF $(DEPDIR)/libgreputils_a-malloc.Tpo -c -o libgreputils_a-malloc.o `test -f 'malloc.c' || echo '$(srcdir)/'`malloc.c
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgreputils_a-malloc.Tpo $(DEPDIR)/libgreputils_a-malloc.Po
@@ -5308,36 +5426,36 @@ install-strip:
 	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
 	fi
 mostlyclean-generic:
-	-rm -f ../gnulib-tests/alloca.$(OBJEXT)
-	-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
+	-$(am__rm_f) $(MOSTLYCLEANFILES)
+	-$(am__rm_f) ../gnulib-tests/alloca.$(OBJEXT)
 
 clean-generic:
-	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+	-$(am__rm_f) $(CLEANFILES)
 
 distclean-generic:
 	-$(am__rm_f) $(CONFIG_CLEAN_FILES)
 	-test . = "$(srcdir)" || $(am__rm_f) $(CONFIG_CLEAN_VPATH_FILES)
-	-rm -f ../gnulib-tests/$(am__dirstamp)
-	-rm -f glthread/$(DEPDIR)/$(am__dirstamp)
-	-rm -f glthread/$(am__dirstamp)
-	-rm -f malloc/$(DEPDIR)/$(am__dirstamp)
-	-rm -f malloc/$(am__dirstamp)
-	-rm -f unistr/$(DEPDIR)/$(am__dirstamp)
-	-rm -f unistr/$(am__dirstamp)
-	-rm -f uniwidth/$(DEPDIR)/$(am__dirstamp)
-	-rm -f uniwidth/$(am__dirstamp)
+	-$(am__rm_f) ../gnulib-tests/$(am__dirstamp)
+	-$(am__rm_f) glthread/$(DEPDIR)/$(am__dirstamp)
+	-$(am__rm_f) glthread/$(am__dirstamp)
+	-$(am__rm_f) malloc/$(DEPDIR)/$(am__dirstamp)
+	-$(am__rm_f) malloc/$(am__dirstamp)
+	-$(am__rm_f) unistr/$(DEPDIR)/$(am__dirstamp)
+	-$(am__rm_f) unistr/$(am__dirstamp)
+	-$(am__rm_f) uniwidth/$(DEPDIR)/$(am__dirstamp)
+	-$(am__rm_f) uniwidth/$(am__dirstamp)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
 	@echo "it deletes files that may require special tools to rebuild."
-	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
-	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+	-$(am__rm_f) $(BUILT_SOURCES)
+	-$(am__rm_f) $(MAINTAINERCLEANFILES)
 clean: clean-am
 
 clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am
 
 distclean: distclean-am
-		-rm -f ../gnulib-tests/$(DEPDIR)/alloca.Po
+	-rm -f ../gnulib-tests/$(DEPDIR)/alloca.Po
 	-rm -f ./$(DEPDIR)/libgreputils_a-argmatch.Po
 	-rm -f ./$(DEPDIR)/libgreputils_a-at-func.Po
 	-rm -f ./$(DEPDIR)/libgreputils_a-basename-lgpl.Po
@@ -5559,7 +5677,7 @@ install-ps-am:
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
-		-rm -f ../gnulib-tests/$(DEPDIR)/alloca.Po
+	-rm -f ../gnulib-tests/$(DEPDIR)/alloca.Po
 	-rm -f ./$(DEPDIR)/libgreputils_a-argmatch.Po
 	-rm -f ./$(DEPDIR)/libgreputils_a-at-func.Po
 	-rm -f ./$(DEPDIR)/libgreputils_a-basename-lgpl.Po
@@ -5784,6 +5902,25 @@ uninstall-am:
 @GL_GENERATE_ALLOCA_H_FALSE@alloca.h: $(top_builddir)/config.status
 @GL_GENERATE_ALLOCA_H_FALSE@	rm -f $@
 
+# We need the following in order to create <assert.h> when the system
+# doesn't have one that works with the given compiler.
+@GL_GENERATE_ASSERT_H_TRUE@assert.h: assert.in.h verify.h $(top_builddir)/config.status
+@GL_GENERATE_ASSERT_H_TRUE@	$(gl_V_at){ $(SED_HEADER_STDOUT) \
+@GL_GENERATE_ASSERT_H_TRUE@	      -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+@GL_GENERATE_ASSERT_H_TRUE@	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+@GL_GENERATE_ASSERT_H_TRUE@	      -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+@GL_GENERATE_ASSERT_H_TRUE@	      -e 's|@''NEXT_ASSERT_H''@|$(NEXT_ASSERT_H)|g' \
+@GL_GENERATE_ASSERT_H_TRUE@	      < $(srcdir)/assert.in.h && \
+@GL_GENERATE_ASSERT_H_TRUE@	  sed -e '/@assert.h omit start@/,/@assert.h omit end@/d' \
+@GL_GENERATE_ASSERT_H_TRUE@	      -e 's|_gl_verify|_gl_static_assert|g' \
+@GL_GENERATE_ASSERT_H_TRUE@	      -e 's|_GL_VERIFY|_GL_STATIC_ASSERT|g' \
+@GL_GENERATE_ASSERT_H_TRUE@	      -e 's|_GL\(_STATIC_ASSERT_H\)|_GL\1|g' \
+@GL_GENERATE_ASSERT_H_TRUE@	      < $(srcdir)/verify.h; \
+@GL_GENERATE_ASSERT_H_TRUE@	} > $@-t
+@GL_GENERATE_ASSERT_H_TRUE@	$(AM_V_at)mv $@-t $@
+@GL_GENERATE_ASSERT_H_FALSE@assert.h: $(top_builddir)/config.status
+@GL_GENERATE_ASSERT_H_FALSE@	rm -f $@
+
 # Listed in the same order as the GNU makefile conventions, and
 # provided by autoconf 2.59c+ or 2.70.
 # The Automake-defined pkg* macros are appended, in the order
@@ -5793,34 +5930,34 @@ configmake.h: Makefile
 	  echo '#if HAVE_WINSOCK2_H'; \
 	  echo '# include <winsock2.h> /* avoid mingw pollution on DATADIR */'; \
 	  echo '#endif'; \
-	  echo '#define PREFIX "$(prefix)"'; \
-	  echo '#define EXEC_PREFIX "$(exec_prefix)"'; \
-	  echo '#define BINDIR "$(bindir)"'; \
-	  echo '#define SBINDIR "$(sbindir)"'; \
-	  echo '#define LIBEXECDIR "$(libexecdir)"'; \
-	  echo '#define DATAROOTDIR "$(datarootdir)"'; \
-	  echo '#define DATADIR "$(datadir)"'; \
-	  echo '#define SYSCONFDIR "$(sysconfdir)"'; \
-	  echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \
-	  echo '#define LOCALSTATEDIR "$(localstatedir)"'; \
-	  echo '#define RUNSTATEDIR "$(runstatedir)"'; \
-	  echo '#define INCLUDEDIR "$(includedir)"'; \
-	  echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \
-	  echo '#define DOCDIR "$(docdir)"'; \
-	  echo '#define INFODIR "$(infodir)"'; \
-	  echo '#define HTMLDIR "$(htmldir)"'; \
-	  echo '#define DVIDIR "$(dvidir)"'; \
-	  echo '#define PDFDIR "$(pdfdir)"'; \
-	  echo '#define PSDIR "$(psdir)"'; \
-	  echo '#define LIBDIR "$(libdir)"'; \
-	  echo '#define LISPDIR "$(lispdir)"'; \
-	  echo '#define LOCALEDIR "$(localedir)"'; \
-	  echo '#define MANDIR "$(mandir)"'; \
-	  echo '#define MANEXT "$(manext)"'; \
-	  echo '#define PKGDATADIR "$(pkgdatadir)"'; \
-	  echo '#define PKGINCLUDEDIR "$(pkgincludedir)"'; \
-	  echo '#define PKGLIBDIR "$(pkglibdir)"'; \
-	  echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \
+	  printf '#define PREFIX %s\n' $(prefix_c_make); \
+	  printf '#define EXEC_PREFIX %s\n' $(exec_prefix_c_make); \
+	  printf '#define BINDIR %s\n' $(bindir_c_make); \
+	  printf '#define SBINDIR %s\n' $(sbindir_c_make); \
+	  printf '#define LIBEXECDIR %s\n' $(libexecdir_c_make); \
+	  printf '#define DATAROOTDIR %s\n' $(datarootdir_c_make); \
+	  printf '#define DATADIR %s\n' $(datadir_c_make); \
+	  printf '#define SYSCONFDIR %s\n' $(sysconfdir_c_make); \
+	  printf '#define SHAREDSTATEDIR %s\n' $(sharedstatedir_c_make); \
+	  printf '#define LOCALSTATEDIR %s\n' $(localstatedir_c_make); \
+	  printf '#define RUNSTATEDIR %s\n' $(runstatedir_c_make); \
+	  printf '#define INCLUDEDIR %s\n' $(includedir_c_make); \
+	  printf '#define OLDINCLUDEDIR %s\n' $(oldincludedir_c_make); \
+	  printf '#define DOCDIR %s\n' $(docdir_c_make); \
+	  printf '#define INFODIR %s\n' $(infodir_c_make); \
+	  printf '#define HTMLDIR %s\n' $(htmldir_c_make); \
+	  printf '#define DVIDIR %s\n' $(dvidir_c_make); \
+	  printf '#define PDFDIR %s\n' $(pdfdir_c_make); \
+	  printf '#define PSDIR %s\n' $(psdir_c_make); \
+	  printf '#define LIBDIR %s\n' $(libdir_c_make); \
+	  printf '#define LISPDIR %s\n' $(lispdir_c_make); \
+	  printf '#define LOCALEDIR %s\n' $(localedir_c_make); \
+	  printf '#define MANDIR %s\n' $(mandir_c_make); \
+	  printf '#define MANEXT %s\n' \"$(manext)\"; \
+	  printf '#define PKGDATADIR %s\n' $(pkgdatadir_c_make); \
+	  printf '#define PKGINCLUDEDIR %s\n' $(pkgincludedir_c_make); \
+	  printf '#define PKGLIBDIR %s\n' $(pkglibdir_c_make); \
+	  printf '#define PKGLIBEXECDIR %s\n' $(pkglibexecdir_c_make); \
 	} | sed '/""/d' > $@-t
 	$(AM_V_at)mv $@-t $@
 
@@ -5850,6 +5987,7 @@ 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/@''DIR_HAS_FD_MEMBER''@/$(DIR_HAS_FD_MEMBER)/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' \
@@ -5868,6 +6006,8 @@ dirent.h: dirent.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
 	      -e 's|@''HAVE_SCANDIR''@|$(HAVE_SCANDIR)|g' \
 	      -e 's|@''HAVE_ALPHASORT''@|$(HAVE_ALPHASORT)|g' \
 	      -e 's|@''REPLACE_OPENDIR''@|$(REPLACE_OPENDIR)|g' \
+	      -e 's|@''REPLACE_READDIR''@|$(REPLACE_READDIR)|g' \
+	      -e 's|@''REPLACE_REWINDDIR''@|$(REPLACE_REWINDDIR)|g' \
 	      -e 's|@''REPLACE_CLOSEDIR''@|$(REPLACE_CLOSEDIR)|g' \
 	      -e 's|@''REPLACE_DIRFD''@|$(REPLACE_DIRFD)|g' \
 	      -e 's|@''REPLACE_FDOPENDIR''@|$(REPLACE_FDOPENDIR)|g' \
@@ -5877,25 +6017,6 @@ dirent.h: dirent.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
 	      $(srcdir)/dirent.in.h > $@-t
 	$(AM_V_at)mv $@-t $@
 
-malloc/dynarray.gl.h: malloc/dynarray.h
-	$(AM_V_GEN)$(MKDIR_P) 'malloc'
-	$(AM_V_at)$(SED_HEADER_STDOUT) \
-	  -e '/libc_hidden_proto/d' \
-	  $(srcdir)/malloc/dynarray.h > $@-t
-	$(AM_V_at)mv $@-t $@
-
-malloc/dynarray-skeleton.gl.h: malloc/dynarray-skeleton.c
-	$(AM_V_GEN)$(MKDIR_P) 'malloc'
-	$(AM_V_at)$(SED_HEADER_STDOUT) \
-	      -e 's|<malloc/dynarray\.h>|<malloc/dynarray.gl.h>|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
-	$(AM_V_at)mv $@-t $@
-
 # We need the following in order to create <errno.h> when the system
 # doesn't have one that is POSIX compliant.
 @GL_GENERATE_ERRNO_H_TRUE@errno.h: errno.in.h $(top_builddir)/config.status
@@ -5916,6 +6037,25 @@ malloc/dynarray-skeleton.gl.h: malloc/dynarray-skeleton.c
 @GL_GENERATE_ERRNO_H_FALSE@errno.h: $(top_builddir)/config.status
 @GL_GENERATE_ERRNO_H_FALSE@	rm -f $@
 
+# We need the following in order to create <error.h> when the system
+# doesn't have one that works.
+@GL_GENERATE_ERROR_H_TRUE@error.h: error.in.h $(top_builddir)/config.status $(CXXDEFS_H)
+@GL_GENERATE_ERROR_H_TRUE@	$(gl_V_at)$(SED_HEADER_STDOUT) \
+@GL_GENERATE_ERROR_H_TRUE@	      -e 's|@''GUARD_PREFIX''@|GL|g' \
+@GL_GENERATE_ERROR_H_TRUE@	      -e 's|@''HAVE_ERROR_H''@|$(HAVE_ERROR_H)|g' \
+@GL_GENERATE_ERROR_H_TRUE@	      -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+@GL_GENERATE_ERROR_H_TRUE@	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+@GL_GENERATE_ERROR_H_TRUE@	      -e 's|@''NEXT_ERROR_H''@|$(NEXT_ERROR_H)|g' \
+@GL_GENERATE_ERROR_H_TRUE@	      -e 's|@''HAVE_ERROR''@|$(HAVE_ERROR)|g' \
+@GL_GENERATE_ERROR_H_TRUE@	      -e 's|@''HAVE_ERROR_AT_LINE''@|$(HAVE_ERROR_AT_LINE)|g' \
+@GL_GENERATE_ERROR_H_TRUE@	      -e 's|@''REPLACE_ERROR''@|$(REPLACE_ERROR)|g' \
+@GL_GENERATE_ERROR_H_TRUE@	      -e 's|@''REPLACE_ERROR_AT_LINE''@|$(REPLACE_ERROR_AT_LINE)|g' \
+@GL_GENERATE_ERROR_H_TRUE@	      -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+@GL_GENERATE_ERROR_H_TRUE@	      $(srcdir)/error.in.h > $@-t
+@GL_GENERATE_ERROR_H_TRUE@	$(AM_V_at)mv $@-t $@
+@GL_GENERATE_ERROR_H_FALSE@error.h: $(top_builddir)/config.status
+@GL_GENERATE_ERROR_H_FALSE@	rm -f $@
+
 # We need the following in order to create <fcntl.h> when the system
 # doesn't have one that works with the given compiler.
 fcntl.h: fcntl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
@@ -5987,6 +6127,25 @@ fcntl.h: fcntl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
 @GL_GENERATE_GETOPT_CDEFS_H_TRUE@	$(AM_V_at)mv $@-t $@
 @GL_GENERATE_GETOPT_CDEFS_H_FALSE@getopt-cdefs.h: $(top_builddir)/config.status
 @GL_GENERATE_GETOPT_CDEFS_H_FALSE@	rm -f $@
+
+malloc/dynarray.gl.h: malloc/dynarray.h
+	$(AM_V_GEN)$(MKDIR_P) 'malloc'
+	$(AM_V_at)$(SED_HEADER_STDOUT) \
+	  -e '/libc_hidden_proto/d' \
+	  $(srcdir)/malloc/dynarray.h > $@-t
+	$(AM_V_at)mv $@-t $@
+
+malloc/dynarray-skeleton.gl.h: malloc/dynarray-skeleton.c
+	$(AM_V_GEN)$(MKDIR_P) 'malloc'
+	$(AM_V_at)$(SED_HEADER_STDOUT) \
+	      -e 's|<malloc/dynarray\.h>|<malloc/dynarray.gl.h>|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
+	$(AM_V_at)mv $@-t $@
 distclean-local: clean-GNUmakefile
 clean-GNUmakefile:
 	test '$(srcdir)' = . || rm -f $(top_builddir)/GNUmakefile
@@ -6052,6 +6211,8 @@ inttypes.h: inttypes.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_U
 	      -e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \
 	      -e 's/@''HAVE_DECL_STRTOUMAX''@/$(HAVE_DECL_STRTOUMAX)/g' \
 	      -e 's/@''HAVE_IMAXDIV_T''@/$(HAVE_IMAXDIV_T)/g' \
+	      -e 's/@''REPLACE_IMAXABS''@/$(REPLACE_IMAXABS)/g' \
+	      -e 's/@''REPLACE_IMAXDIV''@/$(REPLACE_IMAXDIV)/g' \
 	      -e 's/@''REPLACE_STRTOIMAX''@/$(REPLACE_STRTOIMAX)/g' \
 	      -e 's/@''REPLACE_STRTOUMAX''@/$(REPLACE_STRTOUMAX)/g' \
 	      -e 's/@''INT32_MAX_LT_INTMAX_MAX''@/$(INT32_MAX_LT_INTMAX_MAX)/g' \
@@ -6169,14 +6330,6 @@ signal.h: signal.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
 @GL_GENERATE_SIGSEGV_H_FALSE@sigsegv.h: $(top_builddir)/config.status
 @GL_GENERATE_SIGSEGV_H_FALSE@	rm -f $@
 
-# We need the following in order to create <stdalign.h> when the system
-# doesn't have one that works.
-@GL_GENERATE_STDALIGN_H_TRUE@stdalign.h: stdalign.in.h $(top_builddir)/config.status
-@GL_GENERATE_STDALIGN_H_TRUE@	$(gl_V_at)$(SED_HEADER_TO_AT_t) $(srcdir)/stdalign.in.h
-@GL_GENERATE_STDALIGN_H_TRUE@	$(AM_V_at)mv $@-t $@
-@GL_GENERATE_STDALIGN_H_FALSE@stdalign.h: $(top_builddir)/config.status
-@GL_GENERATE_STDALIGN_H_FALSE@	rm -f $@
-
 # We need the following in order to create <stdarg.h> when the system
 # doesn't have one that works with the given compiler.
 @GL_GENERATE_STDARG_H_TRUE@stdarg.h: stdarg.in.h $(top_builddir)/config.status
@@ -6191,15 +6344,14 @@ signal.h: signal.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
 @GL_GENERATE_STDARG_H_FALSE@stdarg.h: $(top_builddir)/config.status
 @GL_GENERATE_STDARG_H_FALSE@	rm -f $@
 
-# We need the following in order to create <stdbool.h> when the system
-# doesn't have one that works.
-@GL_GENERATE_STDBOOL_H_TRUE@stdbool.h: stdbool.in.h $(top_builddir)/config.status
-@GL_GENERATE_STDBOOL_H_TRUE@	$(gl_V_at)$(SED_HEADER_STDOUT) \
-@GL_GENERATE_STDBOOL_H_TRUE@	  -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' \
-@GL_GENERATE_STDBOOL_H_TRUE@	  $(srcdir)/stdbool.in.h > $@-t
-@GL_GENERATE_STDBOOL_H_TRUE@	$(AM_V_at)mv $@-t $@
-@GL_GENERATE_STDBOOL_H_FALSE@stdbool.h: $(top_builddir)/config.status
-@GL_GENERATE_STDBOOL_H_FALSE@	rm -f $@
+# We need the following in order to create <stdckdint.h> when the system
+# doesn't have one that works with the given compiler.
+@GL_GENERATE_STDCKDINT_H_TRUE@stdckdint.h: stdckdint.in.h $(top_builddir)/config.status
+@GL_GENERATE_STDCKDINT_H_TRUE@	$(gl_V_at)$(SED_HEADER_STDOUT) \
+@GL_GENERATE_STDCKDINT_H_TRUE@	  $(srcdir)/stdckdint.in.h > $@-t
+@GL_GENERATE_STDCKDINT_H_TRUE@	$(AM_V_at)mv $@-t $@
+@GL_GENERATE_STDCKDINT_H_FALSE@stdckdint.h: $(top_builddir)/config.status
+@GL_GENERATE_STDCKDINT_H_FALSE@	rm -f $@
 
 # We need the following in order to create <stddef.h> when the system
 # doesn't have one that works with the given compiler.
@@ -6330,7 +6482,9 @@ stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
 	      -e 's|@''HAVE_DECL_FTELLO''@|$(HAVE_DECL_FTELLO)|g' \
 	      -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \
 	      -e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \
+	      -e 's|@''HAVE_DECL_GETW''@|$(HAVE_DECL_GETW)|g' \
 	      -e 's|@''HAVE_DECL_OBSTACK_PRINTF''@|$(HAVE_DECL_OBSTACK_PRINTF)|g' \
+	      -e 's|@''HAVE_DECL_PUTW''@|$(HAVE_DECL_PUTW)|g' \
 	      -e 's|@''HAVE_DECL_SNPRINTF''@|$(HAVE_DECL_SNPRINTF)|g' \
 	      -e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \
 	      -e 's|@''HAVE_DPRINTF''@|$(HAVE_DPRINTF)|g' \
@@ -6399,10 +6553,12 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
 	      -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_GETPROGNAME''@/$(GL_GNULIB_GETPROGNAME)/g' \
 	      -e 's/@''GNULIB_GETSUBOPT''@/$(GL_GNULIB_GETSUBOPT)/g' \
 	      -e 's/@''GNULIB_GRANTPT''@/$(GL_GNULIB_GRANTPT)/g' \
 	      -e 's/@''GNULIB_MALLOC_GNU''@/$(GL_GNULIB_MALLOC_GNU)/g' \
 	      -e 's/@''GNULIB_MALLOC_POSIX''@/$(GL_GNULIB_MALLOC_POSIX)/g' \
+	      -e 's/@''GNULIB_MBSTOWCS''@/$(GL_GNULIB_MBSTOWCS)/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' \
@@ -6448,6 +6604,8 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
 	      -e 's|@''HAVE_DECL_FCVT''@|$(HAVE_DECL_FCVT)|g' \
 	      -e 's|@''HAVE_DECL_GCVT''@|$(HAVE_DECL_GCVT)|g' \
 	      -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \
+	      -e 's|@''HAVE_DECL_PROGRAM_INVOCATION_NAME''@|$(HAVE_DECL_PROGRAM_INVOCATION_NAME)|g' \
+	      -e 's|@''HAVE_GETPROGNAME''@|$(HAVE_GETPROGNAME)|g' \
 	      -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \
 	      -e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \
 	      -e 's|@''HAVE_INITSTATE''@|$(HAVE_INITSTATE)|g' \
@@ -6483,17 +6641,26 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
 	      -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \
 	      -e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \
 	      -e 's|@''HAVE_DECL_UNSETENV''@|$(HAVE_DECL_UNSETENV)|g' \
+	      -e 's|@''REPLACE__EXIT''@|$(REPLACE__EXIT)|g' \
 	      -e 's|@''REPLACE_ALIGNED_ALLOC''@|$(REPLACE_ALIGNED_ALLOC)|g' \
 	      -e 's|@''REPLACE_CALLOC_FOR_CALLOC_GNU''@|$(REPLACE_CALLOC_FOR_CALLOC_GNU)|g' \
 	      -e 's|@''REPLACE_CALLOC_FOR_CALLOC_POSIX''@|$(REPLACE_CALLOC_FOR_CALLOC_POSIX)|g' \
 	      -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \
 	      -e 's|@''REPLACE_FREE''@|$(REPLACE_FREE)|g' \
+	      -e 's|@''REPLACE_GETLOADAVG''@|$(REPLACE_GETLOADAVG)|g' \
+	      -e 's|@''REPLACE_GETPROGNAME''@|$(REPLACE_GETPROGNAME)|g' \
+	      -e 's|@''REPLACE_GETSUBOPT''@|$(REPLACE_GETSUBOPT)|g' \
 	      -e 's|@''REPLACE_INITSTATE''@|$(REPLACE_INITSTATE)|g' \
 	      -e 's|@''REPLACE_MALLOC_FOR_MALLOC_GNU''@|$(REPLACE_MALLOC_FOR_MALLOC_GNU)|g' \
 	      -e 's|@''REPLACE_MALLOC_FOR_MALLOC_POSIX''@|$(REPLACE_MALLOC_FOR_MALLOC_POSIX)|g' \
+	      -e 's|@''REPLACE_MB_CUR_MAX''@|$(REPLACE_MB_CUR_MAX)|g' \
+	      -e 's|@''REPLACE_MBSTOWCS''@|$(REPLACE_MBSTOWCS)|g' \
 	      -e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \
+	      -e 's|@''REPLACE_MKOSTEMP''@|$(REPLACE_MKOSTEMP)|g' \
+	      -e 's|@''REPLACE_MKOSTEMPS''@|$(REPLACE_MKOSTEMPS)|g' \
 	      -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \
 	      -e 's|@''REPLACE_POSIX_MEMALIGN''@|$(REPLACE_POSIX_MEMALIGN)|g' \
+	      -e 's|@''REPLACE_POSIX_OPENPT''@|$(REPLACE_POSIX_OPENPT)|g' \
 	      -e 's|@''REPLACE_PTSNAME''@|$(REPLACE_PTSNAME)|g' \
 	      -e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \
 	      -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \
@@ -6551,6 +6718,7 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
 	      -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_MEMSET_EXPLICIT''@/$(GL_GNULIB_MEMSET_EXPLICIT)/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' \
@@ -6582,6 +6750,7 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
 	      -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \
 	      -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \
 	      -e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \
+	      -e 's|@''HAVE_MEMSET_EXPLICIT''@|$(HAVE_MEMSET_EXPLICIT)|g' \
 	      -e 's|@''HAVE_RAWMEMCHR''@|$(HAVE_RAWMEMCHR)|g' \
 	      -e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \
 	      -e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \
@@ -6602,7 +6771,9 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
 	      -e 's|@''REPLACE_FFSLL''@|$(REPLACE_FFSLL)|g' \
 	      -e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \
 	      -e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \
+	      -e 's|@''REPLACE_MEMPCPY''@|$(REPLACE_MEMPCPY)|g' \
 	      -e 's|@''REPLACE_FREE''@|$(REPLACE_FREE)|g' \
+	      -e 's|@''REPLACE_STPCPY''@|$(REPLACE_STPCPY)|g' \
 	      -e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \
 	      -e 's|@''REPLACE_STRCHRNUL''@|$(REPLACE_STRCHRNUL)|g' \
 	      -e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \
@@ -6716,6 +6887,7 @@ time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
 	      -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_TIME''@/$(GL_GNULIB_TIME)/g' \
 	      -e 's/@''GNULIB_TIMEGM''@/$(GL_GNULIB_TIMEGM)/g' \
 	      -e 's/@''GNULIB_TIMESPEC_GET''@/$(GL_GNULIB_TIMESPEC_GET)/g' \
 	      -e 's/@''GNULIB_TIMESPEC_GETRES''@/$(GL_GNULIB_TIMESPEC_GETRES)/g' \
@@ -6737,7 +6909,9 @@ time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
 	      -e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \
 	      -e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \
 	      -e 's|@''REPLACE_STRFTIME''@|$(REPLACE_STRFTIME)|g' \
+	      -e 's|@''REPLACE_TIME''@|$(REPLACE_TIME)|g' \
 	      -e 's|@''REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \
+	      -e 's|@''REPLACE_TIMESPEC_GET''@|$(REPLACE_TIMESPEC_GET)|g' \
 	      -e 's|@''REPLACE_TZSET''@|$(REPLACE_TZSET)|g' \
 	      -e 's|@''PTHREAD_H_DEFINES_STRUCT_TIMESPEC''@|$(PTHREAD_H_DEFINES_STRUCT_TIMESPEC)|g' \
 	      -e 's|@''SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
@@ -6900,6 +7074,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
 	      -e 's|@''REPLACE_COPY_FILE_RANGE''@|$(REPLACE_COPY_FILE_RANGE)|g' \
 	      -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \
 	      -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \
+	      -e 's|@''REPLACE_DUP3''@|$(REPLACE_DUP3)|g' \
 	      -e 's|@''REPLACE_EXECL''@|$(REPLACE_EXECL)|g' \
 	      -e 's|@''REPLACE_EXECLE''@|$(REPLACE_EXECLE)|g' \
 	      -e 's|@''REPLACE_EXECLP''@|$(REPLACE_EXECLP)|g' \
@@ -6909,10 +7084,12 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
 	      -e 's|@''REPLACE_EXECVPE''@|$(REPLACE_EXECVPE)|g' \
 	      -e 's|@''REPLACE_FACCESSAT''@|$(REPLACE_FACCESSAT)|g' \
 	      -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \
+	      -e 's|@''REPLACE_FDATASYNC''@|$(REPLACE_FDATASYNC)|g' \
 	      -e 's|@''REPLACE_FTRUNCATE''@|$(REPLACE_FTRUNCATE)|g' \
 	      -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \
 	      -e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \
 	      -e 's|@''REPLACE_GETDTABLESIZE''@|$(REPLACE_GETDTABLESIZE)|g' \
+	      -e 's|@''REPLACE_GETENTROPY''@|$(REPLACE_GETENTROPY)|g' \
 	      -e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \
 	      -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \
 	      -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \
@@ -6923,12 +7100,14 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
 	      -e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \
 	      -e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \
 	      -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \
+	      -e 's|@''REPLACE_PIPE2''@|$(REPLACE_PIPE2)|g' \
 	      -e 's|@''REPLACE_PREAD''@|$(REPLACE_PREAD)|g' \
 	      -e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \
 	      -e 's|@''REPLACE_READ''@|$(REPLACE_READ)|g' \
 	      -e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \
 	      -e 's|@''REPLACE_READLINKAT''@|$(REPLACE_READLINKAT)|g' \
 	      -e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \
+	      -e 's|@''REPLACE_SETHOSTNAME''@|$(REPLACE_SETHOSTNAME)|g' \
 	      -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \
 	      -e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \
 	      -e 's|@''REPLACE_SYMLINKAT''@|$(REPLACE_SYMLINKAT)|g' \
@@ -7075,7 +7254,12 @@ wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
 	      -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \
 	      -e 's|@''REPLACE_WCSWIDTH''@|$(REPLACE_WCSWIDTH)|g' \
 	      -e 's|@''REPLACE_WCSFTIME''@|$(REPLACE_WCSFTIME)|g' \
+	      -e 's|@''REPLACE_WCSCMP''@|$(REPLACE_WCSCMP)|g' \
+	      -e 's|@''REPLACE_WCSNCMP''@|$(REPLACE_WCSNCMP)|g' \
+	      -e 's|@''REPLACE_WCSSTR''@|$(REPLACE_WCSSTR)|g' \
 	      -e 's|@''REPLACE_WCSTOK''@|$(REPLACE_WCSTOK)|g' \
+	      -e 's|@''REPLACE_WMEMCMP''@|$(REPLACE_WMEMCMP)|g' \
+	      -e 's|@''REPLACE_WMEMPCPY''@|$(REPLACE_WMEMPCPY)|g' \
 	      -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
 	      -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
 	      -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
diff --git a/lib/_Noreturn.h b/lib/_Noreturn.h
index e914627a..6ecea98b 100644
--- a/lib/_Noreturn.h
+++ b/lib/_Noreturn.h
@@ -1,5 +1,5 @@
 /* A C macro for declaring that a function does not return.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 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
@@ -26,6 +26,11 @@
        AIX system header files and several gnulib header files use precisely
        this syntax with 'extern'.  */
 #  define _Noreturn [[noreturn]]
+# elif (defined __clang__ && __clang_major__ < 16 \
+        && defined _GL_WORK_AROUND_LLVM_BUG_59792)
+   /* Compile with -D_GL_WORK_AROUND_LLVM_BUG_59792 to work around
+      that rare LLVM bug, though you may get many false-alarm warnings.  */
+#  define _Noreturn
 # elif ((!defined __cplusplus || defined __clang__) \
         && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \
             || (!defined __STRICT_ANSI__ \
diff --git a/lib/alignof.h b/lib/alignof.h
index 3f4a5425..a7909727 100644
--- a/lib/alignof.h
+++ b/lib/alignof.h
@@ -1,5 +1,5 @@
 /* Determine alignment of types.
-   Copyright (C) 2003-2004, 2006, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2003-2004, 2006, 2009-2023 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
@@ -17,20 +17,24 @@
 #ifndef _ALIGNOF_H
 #define _ALIGNOF_H
 
+/* This file uses alignof.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #include <stddef.h>
 
 /* alignof_slot (TYPE)
    Determine the alignment of a structure slot (field) of a given type,
    at compile time.  Note that the result depends on the ABI.
-   This is the same as alignof (TYPE) and _Alignof (TYPE), defined in
-   <stdalign.h> if __alignof_is_defined is 1.
+   This is the same as alignof (TYPE).
    Note: The result cannot be used as a value for an 'enum' constant,
    due to bugs in HP-UX 10.20 cc and AIX 3.2.5 xlc.  */
 #if defined __cplusplus
   template <class type> struct alignof_helper { char __slot1; type __slot2; };
 # define alignof_slot(type) offsetof (alignof_helper<type>, __slot2)
 #else
-# define alignof_slot(type) offsetof (struct { char __slot1; type __slot2; }, __slot2)
+# define alignof_slot(type) alignof (type)
 #endif
 
 /* alignof_type (TYPE)
diff --git a/lib/alloca.in.h b/lib/alloca.in.h
index e2b14613..a1bb3d75 100644
--- a/lib/alloca.in.h
+++ b/lib/alloca.in.h
@@ -1,6 +1,6 @@
 /* Memory allocation on the stack.
 
-   Copyright (C) 1995, 1999, 2001-2004, 2006-2022 Free Software Foundation,
+   Copyright (C) 1995, 1999, 2001-2004, 2006-2023 Free Software Foundation,
    Inc.
 
    This file is free software: you can redistribute it and/or modify
diff --git a/lib/arg-nonnull.h b/lib/arg-nonnull.h
index e4513efe..9498ae1f 100644
--- a/lib/arg-nonnull.h
+++ b/lib/arg-nonnull.h
@@ -1,5 +1,5 @@
 /* A C macro for declaring that specific arguments must not be NULL.
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 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
diff --git a/lib/argmatch.c b/lib/argmatch.c
index 2a28900a..9cddb37d 100644
--- a/lib/argmatch.c
+++ b/lib/argmatch.c
@@ -1,6 +1,6 @@
 /* argmatch.c -- find a match for a string in an array
 
-   Copyright (C) 1990, 1998-1999, 2001-2007, 2009-2022 Free Software
+   Copyright (C) 1990, 1998-1999, 2001-2007, 2009-2023 Free Software
    Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
@@ -24,7 +24,6 @@
 /* Specification.  */
 #include "argmatch.h"
 
-#include <stdbool.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -33,7 +32,6 @@
 
 #include "error.h"
 #include "quotearg.h"
-#include "getprogname.h"
 
 #if USE_UNLOCKED_IO
 # include "unlocked-io.h"
diff --git a/lib/argmatch.h b/lib/argmatch.h
index 52f2bb72..9e8d217d 100644
--- a/lib/argmatch.h
+++ b/lib/argmatch.h
@@ -1,6 +1,6 @@
 /* argmatch.h -- definitions and prototypes for argmatch.c
 
-   Copyright (C) 1990, 1998-1999, 2001-2002, 2004-2005, 2009-2022 Free Software
+   Copyright (C) 1990, 1998-1999, 2001-2002, 2004-2005, 2009-2023 Free Software
    Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
@@ -22,15 +22,18 @@
 #ifndef ARGMATCH_H_
 # define ARGMATCH_H_ 1
 
+/* This file uses _GL_ATTRIBUTE_PURE.  */
+# if !_GL_CONFIG_H_INCLUDED
+#  error "Please include config.h first."
+# endif
+
 # include <limits.h>
-# include <stdbool.h>
 # include <stddef.h>
 # include <stdio.h>
 # include <string.h> /* memcmp */
 
 # include "gettext.h"
 # include "quote.h"
-# include "verify.h"
 
 # ifdef  __cplusplus
 extern "C" {
@@ -42,7 +45,8 @@ extern "C" {
    (argument list ends with a NULL guard).  */
 
 # define ARGMATCH_VERIFY(Arglist, Vallist) \
-    verify (ARRAY_CARDINALITY (Arglist) == ARRAY_CARDINALITY (Vallist) + 1)
+    static_assert (ARRAY_CARDINALITY (Arglist) \
+                   == ARRAY_CARDINALITY (Vallist) + 1)
 
 /* Return the index of the element of ARGLIST (NULL terminated) that
    matches with ARG.  If VALLIST is not NULL, then use it to resolve
diff --git a/lib/assert.in.h b/lib/assert.in.h
new file mode 100644
index 00000000..b0ab99c7
--- /dev/null
+++ b/lib/assert.in.h
@@ -0,0 +1,27 @@
+/* Substitute for and wrapper around <assert.h>
+   Copyright (C) 2011-2023 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 <https://www.gnu.org/licenses/>.  */
+
+/* Do not guard the include, since <assert.h> is supposed to define
+   the assert macro each time it is included.  */
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+#@INCLUDE_NEXT@ @NEXT_ASSERT_H@
+
+/* The definition of static_assert is copied here.  */
diff --git a/lib/assure.h b/lib/assure.h
index 20e806aa..e31076d9 100644
--- a/lib/assure.h
+++ b/lib/assure.h
@@ -1,6 +1,6 @@
 /* Run-time assert-like macros.
 
-   Copyright (C) 2014-2022 Free Software Foundation, Inc.
+   Copyright (C) 2014-2023 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
diff --git a/lib/at-func.c b/lib/at-func.c
index afcc819b..13e3fb32 100644
--- a/lib/at-func.c
+++ b/lib/at-func.c
@@ -1,5 +1,5 @@
 /* Define at-style functions like fstatat, unlinkat, fchownat, etc.
-   Copyright (C) 2006, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/lib/attribute.h b/lib/attribute.h
index 378d4f0a..9464fde0 100644
--- a/lib/attribute.h
+++ b/lib/attribute.h
@@ -1,6 +1,6 @@
 /* ATTRIBUTE_* macros for using attributes in GCC and similar compilers
 
-   Copyright 2020-2022 Free Software Foundation, Inc.
+   Copyright 2020-2023 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
@@ -32,7 +32,7 @@
 
 
 /* This file defines two types of attributes:
-   * C2x standard attributes.  These have macro names that do not begin with
+   * C23 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
@@ -41,6 +41,21 @@
      These names begin with 'ATTRIBUTE_' to avoid name clashes.  */
 
 
+/* This file uses _GL_ATTRIBUTE_ALLOC_SIZE, _GL_ATTRIBUTE_ALWAYS_INLINE,
+   _GL_ATTRIBUTE_ARTIFICIAL, _GL_ATTRIBUTE_COLD, _GL_ATTRIBUTE_CONST,
+   _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_DEPRECATED, _GL_ATTRIBUTE_ERROR,
+   _GL_ATTRIBUTE_WARNING, _GL_ATTRIBUTE_EXTERNALLY_VISIBLE,
+   _GL_ATTRIBUTE_FALLTHROUGH, _GL_ATTRIBUTE_FORMAT, _GL_ATTRIBUTE_LEAF,
+   _GL_ATTRIBUTE_MALLOC, _GL_ATTRIBUTE_MAY_ALIAS, _GL_ATTRIBUTE_MAYBE_UNUSED,
+   _GL_ATTRIBUTE_NODISCARD, _GL_ATTRIBUTE_NOINLINE, _GL_ATTRIBUTE_NONNULL,
+   _GL_ATTRIBUTE_NONSTRING, _GL_ATTRIBUTE_NOTHROW, _GL_ATTRIBUTE_PACKED,
+   _GL_ATTRIBUTE_PURE, _GL_ATTRIBUTE_RETURNS_NONNULL,
+   _GL_ATTRIBUTE_SENTINEL.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
+
 /* =============== Attributes for specific kinds of functions =============== */
 
 /* Attributes for functions that should not be used.  */
diff --git a/lib/basename-lgpl.c b/lib/basename-lgpl.c
index eb07e254..6de60aa6 100644
--- a/lib/basename-lgpl.c
+++ b/lib/basename-lgpl.c
@@ -1,6 +1,6 @@
 /* basename.c -- return the last element in a file name
 
-   Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2022 Free Software
+   Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2023 Free Software
    Foundation, Inc.
 
    This file is free software: you can redistribute it and/or modify
@@ -21,7 +21,6 @@
 /* Specification.  */
 #include "basename-lgpl.h"
 
-#include <stdbool.h>
 #include <string.h>
 
 #include "filename.h"
diff --git a/lib/basename-lgpl.h b/lib/basename-lgpl.h
index 5569f219..c1982fa8 100644
--- a/lib/basename-lgpl.h
+++ b/lib/basename-lgpl.h
@@ -1,6 +1,6 @@
 /* Extract the last component (base name) of a file name.
 
-   Copyright (C) 1998, 2001, 2003-2006, 2009-2022 Free Software Foundation,
+   Copyright (C) 1998, 2001, 2003-2006, 2009-2023 Free Software Foundation,
    Inc.
 
    This file is free software: you can redistribute it and/or modify
@@ -19,6 +19,11 @@
 #ifndef _BASENAME_LGPL_H
 #define _BASENAME_LGPL_H
 
+/* This file uses _GL_ATTRIBUTE_PURE.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #include <stddef.h>
 
 #ifndef DOUBLE_SLASH_IS_DISTINCT_ROOT
diff --git a/lib/binary-io.c b/lib/binary-io.c
index ea407fd7..28a9e6ed 100644
--- a/lib/binary-io.c
+++ b/lib/binary-io.c
@@ -1,5 +1,5 @@
 /* Binary mode I/O.
-   Copyright 2017-2022 Free Software Foundation, Inc.
+   Copyright 2017-2023 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
diff --git a/lib/binary-io.h b/lib/binary-io.h
index 5b7661e2..855d6f81 100644
--- a/lib/binary-io.h
+++ b/lib/binary-io.h
@@ -1,5 +1,5 @@
 /* Binary mode I/O.
-   Copyright (C) 2001, 2003, 2005, 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2003, 2005, 2008-2023 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
@@ -17,6 +17,11 @@
 #ifndef _BINARY_H
 #define _BINARY_H
 
+/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, _GL_UNUSED.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 /* For systems that distinguish between text and binary I/O.
    O_BINARY is guaranteed by the gnulib <fcntl.h>. */
 #include <fcntl.h>
@@ -25,9 +30,6 @@
    so we include it here first.  */
 #include <stdio.h>
 
-#ifndef _GL_INLINE_HEADER_BEGIN
- #error "Please include config.h first."
-#endif
 _GL_INLINE_HEADER_BEGIN
 #ifndef BINARY_IO_INLINE
 # define BINARY_IO_INLINE _GL_INLINE
diff --git a/lib/bitrotate.c b/lib/bitrotate.c
index 101be6df..180ab15d 100644
--- a/lib/bitrotate.c
+++ b/lib/bitrotate.c
@@ -1,6 +1,6 @@
 /* Rotate bits in integers.
 
-   Copyright (C) 2012-2022 Free Software Foundation, Inc.
+   Copyright (C) 2012-2023 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
diff --git a/lib/bitrotate.h b/lib/bitrotate.h
index ee6e61ed..6fb7b495 100644
--- a/lib/bitrotate.h
+++ b/lib/bitrotate.h
@@ -1,5 +1,5 @@
 /* bitrotate.h - Rotate bits in integers
-   Copyright (C) 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 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
@@ -19,13 +19,15 @@
 #ifndef _GL_BITROTATE_H
 #define _GL_BITROTATE_H
 
+/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #include <limits.h>
 #include <stdint.h>
 #include <sys/types.h>
 
-#ifndef _GL_INLINE_HEADER_BEGIN
- #error "Please include config.h first."
-#endif
 _GL_INLINE_HEADER_BEGIN
 #ifndef BITROTATE_INLINE
 # define BITROTATE_INLINE _GL_INLINE
diff --git a/lib/btowc.c b/lib/btowc.c
index 4af58bb0..4defbdda 100644
--- a/lib/btowc.c
+++ b/lib/btowc.c
@@ -1,5 +1,5 @@
 /* Convert unibyte character to wide character.
-   Copyright (C) 2008, 2010-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008, 2010-2023 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2008.
 
    This file is free software: you can redistribute it and/or modify
@@ -22,6 +22,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 
 wint_t
 btowc (int c)
@@ -32,7 +33,14 @@ btowc (int c)
       wchar_t wc;
 
       buf[0] = c;
+#if HAVE_MBRTOWC
+      mbstate_t state;
+      memset (&state, 0, sizeof (mbstate_t));
+      size_t ret = mbrtowc (&wc, buf, 1, &state);
+      if (!(ret == (size_t)(-1) || ret == (size_t)(-2)))
+#else
       if (mbtowc (&wc, buf, 1) >= 0)
+#endif
         return wc;
     }
   return WEOF;
diff --git a/lib/c++defs.h b/lib/c++defs.h
index ad181558..458c014d 100644
--- a/lib/c++defs.h
+++ b/lib/c++defs.h
@@ -1,5 +1,5 @@
 /* C++ compatible function declaration macros.
-   Copyright (C) 2010-2022 Free Software Foundation, Inc.
+   Copyright (C) 2010-2023 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
@@ -99,6 +99,12 @@
    Example:
      _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...)
                                   _GL_ARG_NONNULL ((1)));
+
+   Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front
+   of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode.  (That's
+   because
+     [[...]] extern "C" <declaration>;
+   is invalid syntax in C++.)
  */
 #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \
   _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes)
diff --git a/lib/c-ctype.c b/lib/c-ctype.c
index a247514c..a4343f44 100644
--- a/lib/c-ctype.c
+++ b/lib/c-ctype.c
@@ -1,6 +1,6 @@
 /* Character handling in C locale.
 
-   Copyright (C) 2003-2022 Free Software Foundation, Inc.
+   Copyright (C) 2003-2023 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
diff --git a/lib/c-ctype.h b/lib/c-ctype.h
index 1a4f6038..cb0f4f3b 100644
--- a/lib/c-ctype.h
+++ b/lib/c-ctype.h
@@ -5,7 +5,7 @@
    <ctype.h> functions' behaviour depends on the current locale set via
    setlocale.
 
-   Copyright (C) 2000-2003, 2006, 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2000-2003, 2006, 2008-2023 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
@@ -23,11 +23,11 @@
 #ifndef C_CTYPE_H
 #define C_CTYPE_H
 
-#include <stdbool.h>
-
-#ifndef _GL_INLINE_HEADER_BEGIN
+/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE.  */
+#if !_GL_CONFIG_H_INCLUDED
  #error "Please include config.h first."
 #endif
+
 _GL_INLINE_HEADER_BEGIN
 #ifndef C_CTYPE_INLINE
 # define C_CTYPE_INLINE _GL_INLINE
diff --git a/lib/c-stack.c b/lib/c-stack.c
index 95de6dc0..f0078d51 100644
--- a/lib/c-stack.c
+++ b/lib/c-stack.c
@@ -1,6 +1,6 @@
 /* Stack overflow handling.
 
-   Copyright (C) 2002, 2004, 2006, 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2004, 2006, 2008-2023 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
@@ -52,7 +52,6 @@
 #include <sigsegv.h>
 
 #include "exitfail.h"
-#include "getprogname.h"
 #include "idx.h"
 #include "ignore-value.h"
 
diff --git a/lib/c-stack.h b/lib/c-stack.h
index 431450a0..7958112b 100644
--- a/lib/c-stack.h
+++ b/lib/c-stack.h
@@ -1,6 +1,6 @@
 /* Stack overflow handling.
 
-   Copyright (C) 2002, 2004, 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2004, 2008-2023 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
@@ -15,6 +15,11 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
+/* This file uses _GL_ASYNC_SAFE.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #ifdef __cplusplus
 extern "C"
 {
@@ -52,6 +57,6 @@ extern "C"
 
 extern int c_stack_action (_GL_ASYNC_SAFE void (* /*action*/) (int));
 
-# ifdef __cplusplus
+#ifdef __cplusplus
 }
-# endif
+#endif
diff --git a/lib/c-strcase.h b/lib/c-strcase.h
index 3e874b5e..5dfa96c4 100644
--- a/lib/c-strcase.h
+++ b/lib/c-strcase.h
@@ -1,5 +1,5 @@
 /* Case-insensitive string comparison functions in C locale.
-   Copyright (C) 1995-1996, 2001, 2003, 2005, 2009-2022 Free Software
+   Copyright (C) 1995-1996, 2001, 2003, 2005, 2009-2023 Free Software
    Foundation, Inc.
 
    This file is free software: you can redistribute it and/or modify
@@ -18,6 +18,11 @@
 #ifndef C_STRCASE_H
 #define C_STRCASE_H
 
+/* This file uses _GL_ATTRIBUTE_PURE.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #include <stddef.h>
 
 
diff --git a/lib/c-strcasecmp.c b/lib/c-strcasecmp.c
index 87b993cb..8a958dc4 100644
--- a/lib/c-strcasecmp.c
+++ b/lib/c-strcasecmp.c
@@ -1,5 +1,5 @@
 /* c-strcasecmp.c -- case insensitive string comparator in C locale
-   Copyright (C) 1998-1999, 2005-2006, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 1998-1999, 2005-2006, 2009-2023 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
diff --git a/lib/c-strcaseeq.h b/lib/c-strcaseeq.h
index 1c4607cc..1d0759a5 100644
--- a/lib/c-strcaseeq.h
+++ b/lib/c-strcaseeq.h
@@ -1,5 +1,5 @@
 /* Optimized case-insensitive string comparison in C locale.
-   Copyright (C) 2001-2002, 2007, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002, 2007, 2009-2023 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
diff --git a/lib/c-strncasecmp.c b/lib/c-strncasecmp.c
index 5a5d30b6..4ca8c5f4 100644
--- a/lib/c-strncasecmp.c
+++ b/lib/c-strncasecmp.c
@@ -1,5 +1,5 @@
 /* c-strncasecmp.c -- case insensitive string comparator in C locale
-   Copyright (C) 1998-1999, 2005-2006, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 1998-1999, 2005-2006, 2009-2023 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
diff --git a/lib/calloc.c b/lib/calloc.c
index 0a934b30..08843acd 100644
--- a/lib/calloc.c
+++ b/lib/calloc.c
@@ -1,6 +1,6 @@
 /* calloc() function that is glibc compatible.
    This wrapper function is required at least on Tru64 UNIX 5.1 and mingw.
-   Copyright (C) 2004-2007, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2004-2007, 2009-2023 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
diff --git a/lib/cdefs.h b/lib/cdefs.h
index 7b8ed5b3..412f036c 100644
--- a/lib/cdefs.h
+++ b/lib/cdefs.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2022 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2023 Free Software Foundation, Inc.
    Copyright The GNU Toolchain Authors.
    This file is part of the GNU C Library.
 
@@ -140,32 +140,37 @@
 #endif
 
 
+/* Gnulib avoids these definitions, as they don't work on non-glibc platforms.
+   In particular, __bos and __bos0 are defined differently in the Android libc.
+ */
+#ifndef __GNULIB_CDEFS
+
 /* Fortify support.  */
-#define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1)
-#define __bos0(ptr) __builtin_object_size (ptr, 0)
+# define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1)
+# define __bos0(ptr) __builtin_object_size (ptr, 0)
 
 /* Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available.  */
-#if __USE_FORTIFY_LEVEL == 3 && (__glibc_clang_prereq (9, 0)		      \
-				 || __GNUC_PREREQ (12, 0))
-# define __glibc_objsize0(__o) __builtin_dynamic_object_size (__o, 0)
-# define __glibc_objsize(__o) __builtin_dynamic_object_size (__o, 1)
-#else
-# define __glibc_objsize0(__o) __bos0 (__o)
-# define __glibc_objsize(__o) __bos (__o)
-#endif
+# if __USE_FORTIFY_LEVEL == 3 && (__glibc_clang_prereq (9, 0)		      \
+				  || __GNUC_PREREQ (12, 0))
+#  define __glibc_objsize0(__o) __builtin_dynamic_object_size (__o, 0)
+#  define __glibc_objsize(__o) __builtin_dynamic_object_size (__o, 1)
+# else
+#  define __glibc_objsize0(__o) __bos0 (__o)
+#  define __glibc_objsize(__o) __bos (__o)
+# endif
 
 /* Compile time conditions to choose between the regular, _chk and _chk_warn
    variants.  These conditions should get evaluated to constant and optimized
    away.  */
 
-#define __glibc_safe_len_cond(__l, __s, __osz) ((__l) <= (__osz) / (__s))
-#define __glibc_unsigned_or_positive(__l) \
+# define __glibc_safe_len_cond(__l, __s, __osz) ((__l) <= (__osz) / (__s))
+# define __glibc_unsigned_or_positive(__l) \
   ((__typeof (__l)) 0 < (__typeof (__l)) -1				      \
    || (__builtin_constant_p (__l) && (__l) > 0))
 
 /* Length is known to be safe at compile time if the __L * __S <= __OBJSZ
    condition can be folded to a constant and if it is true, or unknown (-1) */
-#define __glibc_safe_or_unknown_len(__l, __s, __osz) \
+# define __glibc_safe_or_unknown_len(__l, __s, __osz) \
   ((__osz) == (__SIZE_TYPE__) -1					      \
    || (__glibc_unsigned_or_positive (__l)				      \
        && __builtin_constant_p (__glibc_safe_len_cond ((__SIZE_TYPE__) (__l), \
@@ -175,7 +180,7 @@
 /* Conversely, we know at compile time that the length is unsafe if the
    __L * __S <= __OBJSZ condition can be folded to a constant and if it is
    false.  */
-#define __glibc_unsafe_len(__l, __s, __osz) \
+# define __glibc_unsafe_len(__l, __s, __osz) \
   (__glibc_unsigned_or_positive (__l)					      \
    && __builtin_constant_p (__glibc_safe_len_cond ((__SIZE_TYPE__) (__l),     \
 						   __s, __osz))		      \
@@ -184,7 +189,7 @@
 /* Fortify function f.  __f_alias, __f_chk and __f_chk_warn must be
    declared.  */
 
-#define __glibc_fortify(f, __l, __s, __osz, ...) \
+# define __glibc_fortify(f, __l, __s, __osz, ...) \
   (__glibc_safe_or_unknown_len (__l, __s, __osz)			      \
    ? __ ## f ## _alias (__VA_ARGS__)					      \
    : (__glibc_unsafe_len (__l, __s, __osz)				      \
@@ -194,13 +199,16 @@
 /* Fortify function f, where object size argument passed to f is the number of
    elements and not total size.  */
 
-#define __glibc_fortify_n(f, __l, __s, __osz, ...) \
+# define __glibc_fortify_n(f, __l, __s, __osz, ...) \
   (__glibc_safe_or_unknown_len (__l, __s, __osz)			      \
    ? __ ## f ## _alias (__VA_ARGS__)					      \
    : (__glibc_unsafe_len (__l, __s, __osz)				      \
       ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s))		      \
       : __ ## f ## _chk (__VA_ARGS__, (__osz) / (__s))))		      \
 
+#endif
+
+
 #if __GNUC_PREREQ (4,3)
 # define __warnattr(msg) __attribute__((__warning__ (msg)))
 # define __errordecl(name, msg) \
diff --git a/lib/chdir-long.c b/lib/chdir-long.c
index f4efb209..8a25538b 100644
--- a/lib/chdir-long.c
+++ b/lib/chdir-long.c
@@ -1,5 +1,5 @@
 /* provide a chdir function that tries not to fail due to ENAMETOOLONG
-   Copyright (C) 2004-2022 Free Software Foundation, Inc.
+   Copyright (C) 2004-2023 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
@@ -23,7 +23,6 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <stdlib.h>
-#include <stdbool.h>
 #include <string.h>
 #include <stdio.h>
 
diff --git a/lib/chdir-long.h b/lib/chdir-long.h
index 84a72989..6f81fadf 100644
--- a/lib/chdir-long.h
+++ b/lib/chdir-long.h
@@ -1,5 +1,5 @@
 /* provide a chdir function that tries not to fail due to ENAMETOOLONG
-   Copyright (C) 2004-2005, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2004-2005, 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/lib/cloexec.c b/lib/cloexec.c
index 812be01a..e4cecbd2 100644
--- a/lib/cloexec.c
+++ b/lib/cloexec.c
@@ -1,6 +1,6 @@
 /* cloexec.c - set or clear the close-on-exec descriptor flag
 
-   Copyright (C) 1991, 2004-2006, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 1991, 2004-2006, 2009-2023 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
diff --git a/lib/cloexec.h b/lib/cloexec.h
index 7a22d775..057fd668 100644
--- a/lib/cloexec.h
+++ b/lib/cloexec.h
@@ -1,6 +1,6 @@
 /* cloexec.c - set or clear the close-on-exec descriptor flag
 
-   Copyright (C) 2004, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2009-2023 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
@@ -15,8 +15,6 @@
    You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
-#include <stdbool.h>
-
 /* Set the 'FD_CLOEXEC' flag of DESC if VALUE is true,
    or clear the flag if VALUE is false.
    Return 0 on success, or -1 on error with 'errno' set.
diff --git a/lib/close-stream.c b/lib/close-stream.c
index 9b0e97b2..ab686bac 100644
--- a/lib/close-stream.c
+++ b/lib/close-stream.c
@@ -1,6 +1,6 @@
 /* Close a stream, with nicer error checking than fclose's.
 
-   Copyright (C) 1998-2002, 2004, 2006-2022 Free Software Foundation, Inc.
+   Copyright (C) 1998-2002, 2004, 2006-2023 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
@@ -20,7 +20,6 @@
 #include "close-stream.h"
 
 #include <errno.h>
-#include <stdbool.h>
 
 #include "fpending.h"
 
diff --git a/lib/close-stream.h b/lib/close-stream.h
index 2b4c8ed8..3b52cc66 100644
--- a/lib/close-stream.h
+++ b/lib/close-stream.h
@@ -1,6 +1,6 @@
 /* Close a stream, with nicer error checking than fclose's.
 
-   Copyright (C) 2006-2022 Free Software Foundation, Inc.
+   Copyright (C) 2006-2023 Free Software Foundation, Inc.
 
    This file is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published
diff --git a/lib/close.c b/lib/close.c
index 44990ba7..3c1b09ea 100644
--- a/lib/close.c
+++ b/lib/close.c
@@ -1,5 +1,5 @@
 /* close replacement.
-   Copyright (C) 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 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
diff --git a/lib/closedir.c b/lib/closedir.c
index a2731220..3777e9f7 100644
--- a/lib/closedir.c
+++ b/lib/closedir.c
@@ -1,5 +1,5 @@
 /* Stop reading the entries of a directory.
-   Copyright (C) 2006-2022 Free Software Foundation, Inc.
+   Copyright (C) 2006-2023 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
@@ -23,31 +23,37 @@
 # include <unistd.h>
 #endif
 
+#include <stdlib.h>
+
 #if HAVE_CLOSEDIR
 
 /* Override closedir(), to keep track of the open file descriptors.
    Needed because there is a function dirfd().  */
 
-#else
-
-# include <stdlib.h>
+#endif
 
+#if GNULIB_defined_DIR
 # include "dirent-private.h"
-
 #endif
 
 int
 closedir (DIR *dirp)
+#undef closedir
 {
-# if REPLACE_FCHDIR || REPLACE_DIRFD
+#if GNULIB_defined_DIR || REPLACE_FCHDIR || defined __KLIBC__
   int fd = dirfd (dirp);
-# endif
+#endif
   int retval;
 
-#if HAVE_CLOSEDIR
-# undef closedir
+#if HAVE_DIRENT_H                       /* equivalent to HAVE_CLOSEDIR */
 
+# if GNULIB_defined_DIR
+  retval = closedir (dirp->real_dirp);
+  if (retval >= 0)
+    free (dirp);
+# else
   retval = closedir (dirp);
+# endif
 
 # ifdef __KLIBC__
   if (!retval)
@@ -63,9 +69,13 @@ closedir (DIR *dirp)
 
 #endif
 
-#if REPLACE_FCHDIR
+#if GNULIB_defined_DIR
+  if (retval >= 0)
+    close (fd);
+#elif REPLACE_FCHDIR
   if (retval >= 0)
     _gl_unregister_fd (fd);
 #endif
+
   return retval;
 }
diff --git a/lib/closeout.c b/lib/closeout.c
index 688cd730..d9e82113 100644
--- a/lib/closeout.c
+++ b/lib/closeout.c
@@ -1,6 +1,6 @@
 /* Close standard output and standard error, exiting with a diagnostic on error.
 
-   Copyright (C) 1998-2002, 2004, 2006, 2008-2022 Free Software Foundation,
+   Copyright (C) 1998-2002, 2004, 2006, 2008-2023 Free Software Foundation,
    Inc.
 
    This program is free software: you can redistribute it and/or modify
@@ -21,7 +21,6 @@
 #include "closeout.h"
 
 #include <errno.h>
-#include <stdbool.h>
 #include <stdio.h>
 #include <unistd.h>
 
diff --git a/lib/closeout.h b/lib/closeout.h
index fe24c4e1..d975725c 100644
--- a/lib/closeout.h
+++ b/lib/closeout.h
@@ -1,6 +1,6 @@
 /* Close standard output and standard error.
 
-   Copyright (C) 1998, 2000, 2003-2004, 2006, 2008-2022 Free Software
+   Copyright (C) 1998, 2000, 2003-2004, 2006, 2008-2023 Free Software
    Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
@@ -19,8 +19,6 @@
 #ifndef CLOSEOUT_H
 # define CLOSEOUT_H 1
 
-# include <stdbool.h>
-
 # ifdef __cplusplus
 extern "C" {
 # endif
diff --git a/lib/colorize-posix.c b/lib/colorize-posix.c
index 800d2b47..d14db77a 100644
--- a/lib/colorize-posix.c
+++ b/lib/colorize-posix.c
@@ -1,5 +1,5 @@
 /* Output colorization.
-   Copyright 2011-2022 Free Software Foundation, Inc.
+   Copyright 2011-2023 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/lib/colorize-w32.c b/lib/colorize-w32.c
index 7ce6c5eb..f2df8cc5 100644
--- a/lib/colorize-w32.c
+++ b/lib/colorize-w32.c
@@ -1,5 +1,5 @@
 /* Output colorization on MS-Windows.
-   Copyright 2011-2022 Free Software Foundation, Inc.
+   Copyright 2011-2023 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/lib/colorize.h b/lib/colorize.h
index ff8e54f1..c2b2d6e3 100644
--- a/lib/colorize.h
+++ b/lib/colorize.h
@@ -1,6 +1,6 @@
 /* Output colorization.
 
-   Copyright 2011-2022 Free Software Foundation, Inc.
+   Copyright 2011-2023 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)
diff --git a/lib/creat-safer.c b/lib/creat-safer.c
index 35e5ed2a..cd9b4cba 100644
--- a/lib/creat-safer.c
+++ b/lib/creat-safer.c
@@ -1,6 +1,6 @@
 /* Invoke creat, but avoid some glitches.
 
-   Copyright (C) 2005-2006, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2005-2006, 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/lib/ctype.in.h b/lib/ctype.in.h
index dc81170d..ec43126d 100644
--- a/lib/ctype.in.h
+++ b/lib/ctype.in.h
@@ -1,6 +1,6 @@
 /* A substitute for ISO C99 <ctype.h>, for platforms on which it is incomplete.
 
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 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
@@ -36,6 +36,11 @@
 #ifndef _@GUARD_PREFIX@_CTYPE_H
 #define _@GUARD_PREFIX@_CTYPE_H
 
+/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
 
 /* The definition of _GL_WARN_ON_USE is copied here.  */
diff --git a/lib/cycle-check.c b/lib/cycle-check.c
index 20e0e1e3..9ccbdc50 100644
--- a/lib/cycle-check.c
+++ b/lib/cycle-check.c
@@ -1,6 +1,6 @@
 /* help detect directory cycles efficiently
 
-   Copyright (C) 2003-2006, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2003-2006, 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -25,7 +25,6 @@
 #include <sys/stat.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <stdbool.h>
 
 #include "assure.h"
 
diff --git a/lib/cycle-check.h b/lib/cycle-check.h
index a297330f..15109d39 100644
--- a/lib/cycle-check.h
+++ b/lib/cycle-check.h
@@ -1,6 +1,6 @@
 /* help detect directory cycles efficiently
 
-   Copyright (C) 2003-2004, 2006, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2003-2004, 2006, 2009-2023 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
@@ -21,7 +21,6 @@
 # define CYCLE_CHECK_H 1
 
 # include <stdint.h>
-# include <stdbool.h>
 # include "dev-ino.h"
 # include "same-inode.h"
 
diff --git a/lib/dev-ino.h b/lib/dev-ino.h
index dac02409..2767d0a6 100644
--- a/lib/dev-ino.h
+++ b/lib/dev-ino.h
@@ -1,5 +1,5 @@
 /* A simple (device, inode) struct.
-   Copyright (C) 2003-2022 Free Software Foundation, Inc.
+   Copyright (C) 2003-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/lib/dfa.c b/lib/dfa.c
index 4f8367af..d54aab40 100644
--- a/lib/dfa.c
+++ b/lib/dfa.c
@@ -1,5 +1,5 @@
 /* dfa.c - deterministic extended regexp routines for GNU
-   Copyright (C) 1988, 1998, 2000, 2002, 2004-2005, 2007-2022 Free Software
+   Copyright (C) 1988, 1998, 2000, 2002, 2004-2005, 2007-2023 Free Software
    Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
@@ -67,7 +67,10 @@ c_isdigit (char c)
 #ifndef FALLTHROUGH
 # if 201710L < __STDC_VERSION__
 #  define FALLTHROUGH [[__fallthrough__]]
-# elif (__GNUC__ >= 7) || (__clang_major__ >= 10)
+# elif ((__GNUC__ >= 7) \
+        || (defined __apple_build_version__ \
+            ? __apple_build_version__ >= 12000000 \
+            : __clang_major__ >= 10))
 #  define FALLTHROUGH __attribute__ ((__fallthrough__))
 # else
 #  define FALLTHROUGH ((void) 0)
@@ -1138,9 +1141,14 @@ parse_bracket_exp (struct dfa *dfa)
   while ((wc = wc1, (c = c1) != ']'));
 
   if (colon_warning_state == 7)
-    ((dfa->syntax.dfaopts & DFA_CONFUSING_BRACKETS_ERROR
-      ? dfaerror : dfawarn)
-     (_("character class syntax is [[:space:]], not [:space:]")));
+    {
+      char const *msg
+        = _("character class syntax is [[:space:]], not [:space:]");
+      if (dfa->syntax.dfaopts & DFA_CONFUSING_BRACKETS_ERROR)
+        dfaerror (msg);
+      else
+        dfawarn (msg);
+    }
 
   if (! known_bracket_exp)
     return BACKREF;
@@ -1194,8 +1202,13 @@ lex (struct dfa *dfa)
      On the plus side, this avoids having a duplicate of the
      main switch inside the backslash case.  On the minus side,
      it means that just about every case tests the backslash flag.  */
-  for (int i = 0; i < 2; ++i)
+  for (int i = 0; ; i++)
     {
+      /* This loop should consume at most a backslash and some other
+         character.  */
+      if (2 <= i)
+        abort ();
+
       if (! dfa->lex.left)
         return dfa->lex.lasttok = END;
       int c = fetch_wc (dfa);
@@ -1583,11 +1596,6 @@ lex (struct dfa *dfa)
           return dfa->lex.lasttok = c;
         }
     }
-
-  /* The above loop should consume at most a backslash
-     and some other character.  */
-  abort ();
-  return END;                   /* keeps pedantic compilers happy.  */
 }
 
 static void
diff --git a/lib/dfa.h b/lib/dfa.h
index 043f0e97..11733269 100644
--- a/lib/dfa.h
+++ b/lib/dfa.h
@@ -1,5 +1,5 @@
 /* dfa.h - declarations for GNU deterministic regexp compiler
-   Copyright (C) 1988, 1998, 2007, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 1988, 1998, 2007, 2009-2023 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
@@ -21,9 +21,14 @@
 #ifndef DFA_H_
 #define DFA_H_
 
+/* This file uses _Noreturn, _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_MALLOC,
+   _GL_ATTRIBUTE_PURE, _GL_ATTRIBUTE_RETURNS_NONNULL.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #include "idx.h"
 #include <regex.h>
-#include <stdbool.h>
 #include <stddef.h>
 #include <stdlib.h>
 
diff --git a/lib/dirent-private.h b/lib/dirent-private.h
index 30cf5d90..012b6837 100644
--- a/lib/dirent-private.h
+++ b/lib/dirent-private.h
@@ -1,5 +1,5 @@
 /* Private details of the DIR type.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 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
@@ -17,15 +17,36 @@
 #ifndef _DIRENT_PRIVATE_H
 #define _DIRENT_PRIVATE_H 1
 
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
+#if HAVE_DIRENT_H                       /* mingw */
+
+# undef DIR
+
+struct gl_directory
+{
+  /* File descriptor to close during closedir().
+     Needed for implementing fdopendir().  */
+  int fd_to_close;
+  /* Pointer to the real DIR.  */
+  DIR *real_dirp;
+};
+
+/* Restore definition from dirent.h.  */
+# define DIR struct gl_directory
+
+#else                                   /* MSVC */
+
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
 
 /* Don't assume that UNICODE is not defined.  */
-#undef WIN32_FIND_DATA
-#define WIN32_FIND_DATA WIN32_FIND_DATAA
+# undef WIN32_FIND_DATA
+# define WIN32_FIND_DATA WIN32_FIND_DATAA
 
 struct gl_directory
 {
+  /* File descriptor to close during closedir().
+     Needed for implementing fdopendir().  */
+  int fd_to_close;
   /* Status, or error code to produce in next readdir() call.
      -2 means the end of the directory is already reached,
      -1 means the entry was already filled by FindFirstFile,
@@ -41,4 +62,6 @@ struct gl_directory
   char dir_name_mask[1];
 };
 
+#endif
+
 #endif /* _DIRENT_PRIVATE_H */
diff --git a/lib/dirent.in.h b/lib/dirent.in.h
index f28288d1..d409a031 100644
--- a/lib/dirent.in.h
+++ b/lib/dirent.in.h
@@ -1,5 +1,5 @@
 /* A GNU-like <dirent.h>.
-   Copyright (C) 2006-2022 Free Software Foundation, Inc.
+   Copyright (C) 2006-2023 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
@@ -29,6 +29,12 @@
 #ifndef _@GUARD_PREFIX@_DIRENT_H
 #define _@GUARD_PREFIX@_DIRENT_H
 
+/* This file uses _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_MALLOC,
+   _GL_ATTRIBUTE_PURE, GNULIB_POSIXCHECK, HAVE_RAW_DECL_*.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 /* Get ino_t.  Needed on some systems, including glibc 2.8.  */
 #include <sys/types.h>
 
@@ -50,11 +56,24 @@ struct dirent
 #  define DT_LNK    10          /* symbolic link */
 #  define DT_SOCK   12          /* socket */
 #  define DT_WHT    14          /* whiteout */
-typedef struct gl_directory DIR;
 #  define GNULIB_defined_struct_dirent 1
 # endif
 #endif
 
+#if !@DIR_HAS_FD_MEMBER@
+# if !GNULIB_defined_DIR
+/* struct gl_directory is a type with a field 'int fd_to_close'.
+   It is needed for implementing fdopendir().  */
+struct gl_directory;
+#  if @HAVE_DIRENT_H@
+#   define DIR struct gl_directory
+#  else
+typedef struct gl_directory DIR;
+#  endif
+#  define GNULIB_defined_DIR 1
+# endif
+#endif
+
 /* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers
    that can be freed by passing them as the Ith argument to the
    function F.  */
@@ -143,7 +162,7 @@ _GL_CXXALIAS_SYS (opendir, DIR *, (const char *dir_name));
 # endif
 _GL_CXXALIASWARN (opendir);
 #else
-# if @GNULIB_CLOSEDIR@ && __GNUC__ >= 11 && !defined opendir
+# if @GNULIB_CLOSEDIR@ && !GNULIB_defined_DIR && __GNUC__ >= 11 && !defined opendir
 /* For -Wmismatched-dealloc: Associate opendir with closedir or
    rpl_closedir.  */
 _GL_FUNCDECL_SYS (opendir, DIR *,
@@ -161,10 +180,19 @@ _GL_WARN_ON_USE (opendir, "opendir is not portable - "
 #endif
 
 #if @GNULIB_READDIR@
-# if !@HAVE_READDIR@
+# if @REPLACE_READDIR@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef readdir
+#   define readdir rpl_readdir
+#  endif
+_GL_FUNCDECL_RPL (readdir, struct dirent *, (DIR *dirp) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (readdir, struct dirent *, (DIR *dirp));
+# else
+#  if !@HAVE_READDIR@
 _GL_FUNCDECL_SYS (readdir, struct dirent *, (DIR *dirp) _GL_ARG_NONNULL ((1)));
-# endif
+#  endif
 _GL_CXXALIAS_SYS (readdir, struct dirent *, (DIR *dirp));
+# endif
 _GL_CXXALIASWARN (readdir);
 #elif defined GNULIB_POSIXCHECK
 # undef readdir
@@ -175,10 +203,19 @@ _GL_WARN_ON_USE (readdir, "readdir is not portable - "
 #endif
 
 #if @GNULIB_REWINDDIR@
-# if !@HAVE_REWINDDIR@
+# if @REPLACE_REWINDDIR@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef rewinddir
+#   define rewinddir rpl_rewinddir
+#  endif
+_GL_FUNCDECL_RPL (rewinddir, void, (DIR *dirp) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (rewinddir, void, (DIR *dirp));
+# else
+#  if !@HAVE_REWINDDIR@
 _GL_FUNCDECL_SYS (rewinddir, void, (DIR *dirp) _GL_ARG_NONNULL ((1)));
-# endif
+#  endif
 _GL_CXXALIAS_SYS (rewinddir, void, (DIR *dirp));
+# endif
 _GL_CXXALIASWARN (rewinddir);
 #elif defined GNULIB_POSIXCHECK
 # undef rewinddir
diff --git a/lib/dirfd.c b/lib/dirfd.c
index 4104683f..75b2163c 100644
--- a/lib/dirfd.c
+++ b/lib/dirfd.c
@@ -1,6 +1,6 @@
 /* dirfd.c -- return the file descriptor associated with an open DIR*
 
-   Copyright (C) 2001, 2006, 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2006, 2008-2023 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
@@ -22,6 +22,10 @@
 #include <dirent.h>
 #include <errno.h>
 
+#if GNULIB_defined_DIR
+# include "dirent-private.h"
+#endif
+
 #ifdef __KLIBC__
 # include <stdlib.h>
 # include <io.h>
@@ -78,11 +82,17 @@ _gl_unregister_dirp_fd (int fd)
 int
 dirfd (DIR *dir_p)
 {
+#if GNULIB_defined_DIR
+  int fd = dir_p->fd_to_close;
+  if (fd == -1)
+    errno = EINVAL;
+  return fd;
+#else
   int fd = DIR_TO_FD (dir_p);
   if (fd == -1)
-#ifndef __KLIBC__
+# ifndef __KLIBC__
     errno = ENOTSUP;
-#else
+# else
     {
       struct dirp_fd_list *dirp_fd;
 
@@ -92,7 +102,8 @@ dirfd (DIR *dir_p)
 
       errno = EINVAL;
     }
-#endif
+# endif
 
   return fd;
+#endif
 }
diff --git a/lib/dirname-lgpl.c b/lib/dirname-lgpl.c
index d54f6a91..e9454af3 100644
--- a/lib/dirname-lgpl.c
+++ b/lib/dirname-lgpl.c
@@ -1,6 +1,6 @@
 /* dirname.c -- return all but the last element in a file name
 
-   Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2022 Free Software
+   Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2023 Free Software
    Foundation, Inc.
 
    This file is free software: you can redistribute it and/or modify
diff --git a/lib/dirname.h b/lib/dirname.h
index e18a97ea..0344f1c4 100644
--- a/lib/dirname.h
+++ b/lib/dirname.h
@@ -1,6 +1,6 @@
 /* Take file names apart into directory and base names.
 
-   Copyright (C) 1998, 2001, 2003-2006, 2009-2022 Free Software Foundation,
+   Copyright (C) 1998, 2001, 2003-2006, 2009-2023 Free Software Foundation,
    Inc.
 
    This file is free software: you can redistribute it and/or modify
@@ -19,7 +19,12 @@
 #ifndef DIRNAME_H_
 # define DIRNAME_H_ 1
 
-# include <stdbool.h>
+/* This file uses _GL_ATTRIBUTE_MALLOC, _GL_ATTRIBUTE_PURE,
+   _GL_ATTRIBUTE_RETURNS_NONNULL.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 # include <stdlib.h>
 # include "filename.h"
 # include "basename-lgpl.h"
diff --git a/lib/dup-safer-flag.c b/lib/dup-safer-flag.c
index f87792a3..be1762b2 100644
--- a/lib/dup-safer-flag.c
+++ b/lib/dup-safer-flag.c
@@ -1,7 +1,7 @@
 /* Duplicate a file descriptor result, avoiding clobbering
    STD{IN,OUT,ERR}_FILENO, with specific flags.
 
-   Copyright (C) 2001, 2004-2006, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2004-2006, 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/lib/dup-safer.c b/lib/dup-safer.c
index 38ff74cc..bb86a2e4 100644
--- a/lib/dup-safer.c
+++ b/lib/dup-safer.c
@@ -1,6 +1,6 @@
 /* Invoke dup, but avoid some glitches.
 
-   Copyright (C) 2001, 2004-2006, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2004-2006, 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/lib/dup.c b/lib/dup.c
index 17a9c582..21e9f1f0 100644
--- a/lib/dup.c
+++ b/lib/dup.c
@@ -1,6 +1,6 @@
 /* Duplicate an open file descriptor.
 
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 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
diff --git a/lib/dup2.c b/lib/dup2.c
index 1c766ab3..7d197ca3 100644
--- a/lib/dup2.c
+++ b/lib/dup2.c
@@ -1,6 +1,6 @@
 /* Duplicate an open file descriptor to a specified file descriptor.
 
-   Copyright (C) 1999, 2004-2007, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2004-2007, 2009-2023 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
diff --git a/lib/dynarray.h b/lib/dynarray.h
index ca6439d3..91559109 100644
--- a/lib/dynarray.h
+++ b/lib/dynarray.h
@@ -1,5 +1,5 @@
 /* Type-safe arrays which grow dynamically.
-   Copyright 2021-2022 Free Software Foundation, Inc.
+   Copyright 2021-2023 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
diff --git a/lib/errno.in.h b/lib/errno.in.h
index 3ec18456..3dda9c26 100644
--- a/lib/errno.in.h
+++ b/lib/errno.in.h
@@ -1,6 +1,6 @@
 /* A POSIX-like <errno.h>.
 
-   Copyright (C) 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 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
diff --git a/lib/error.c b/lib/error.c
index 272d45e4..ef437287 100644
--- a/lib/error.c
+++ b/lib/error.c
@@ -1,5 +1,5 @@
 /* Error handler for noninteractive utilities
-   Copyright (C) 1990-1998, 2000-2007, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 1990-1998, 2000-2007, 2009-2023 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    This file is free software: you can redistribute it and/or modify
@@ -42,8 +42,6 @@
 # define USE_UNLOCKED_IO 0
 # define _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD(a, b)
 # define _GL_ARG_NONNULL(a)
-#else
-# include "getprogname.h"
 #endif
 
 #if USE_UNLOCKED_IO
diff --git a/lib/error.h b/lib/error.h
deleted file mode 100644
index 45ec2a5e..00000000
--- a/lib/error.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* Declaration for error-reporting function
-   Copyright (C) 1995-1997, 2003, 2006, 2008-2022 Free Software Foundation,
-   Inc.
-   This file is part of the GNU C Library.
-
-   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 <https://www.gnu.org/licenses/>.  */
-
-#ifndef _ERROR_H
-#define _ERROR_H 1
-
-/* Get _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, _GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM.  */
-#include <stdio.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Print a message with 'fprintf (stderr, FORMAT, ...)';
-   if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM).
-   If STATUS is nonzero, terminate the program with 'exit (STATUS)'.  */
-
-extern void error (int __status, int __errnum, const char *__format, ...)
-#if GNULIB_VFPRINTF_POSIX
-     _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, 3, 4))
-#else
-     _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM, 3, 4))
-#endif
-     ;
-
-extern void error_at_line (int __status, int __errnum, const char *__fname,
-                           unsigned int __lineno, const char *__format, ...)
-#if GNULIB_VFPRINTF_POSIX
-     _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, 5, 6))
-#else
-     _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM, 5, 6))
-#endif
-     ;
-
-/* If NULL, error will flush stdout, then print on stderr the program
-   name, a colon and a space.  Otherwise, error will call this
-   function without parameters instead.  */
-extern void (*error_print_progname) (void);
-
-/* This variable is incremented each time 'error' is called.  */
-extern unsigned int error_message_count;
-
-/* Sometimes we want to have at most one error per line.  This
-   variable controls whether this mode is selected or not.  */
-extern int error_one_per_line;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* error.h */
diff --git a/lib/error.in.h b/lib/error.in.h
new file mode 100644
index 00000000..9a520f1e
--- /dev/null
+++ b/lib/error.in.h
@@ -0,0 +1,123 @@
+/* Declarations for error-reporting functions.
+   Copyright (C) 1995-1997, 2003, 2006, 2008-2023 Free Software Foundation,
+   Inc.
+   This file is part of the GNU C Library.
+
+   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 <https://www.gnu.org/licenses/>.  */
+
+#ifndef _@GUARD_PREFIX@_ERROR_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+
+/* The include_next requires a split double-inclusion guard.  */
+#if @HAVE_ERROR_H@
+# @INCLUDE_NEXT@ @NEXT_ERROR_H@
+#endif
+
+#ifndef _@GUARD_PREFIX@_ERROR_H
+#define _@GUARD_PREFIX@_ERROR_H
+
+/* This file uses _GL_ATTRIBUTE_FORMAT.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
+/* Get _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, _GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM.  */
+#include <stdio.h>
+
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
+
+#if GNULIB_VFPRINTF_POSIX
+# define _GL_ATTRIBUTE_SPEC_PRINTF_ERROR _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD
+#else
+# define _GL_ATTRIBUTE_SPEC_PRINTF_ERROR _GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Print a message with 'fprintf (stderr, FORMAT, ...)';
+   if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM).
+   If STATUS is nonzero, terminate the program with 'exit (STATUS)'.  */
+#if @REPLACE_ERROR@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#  undef error
+#  define error rpl_error
+# endif
+_GL_FUNCDECL_RPL (error, void,
+                  (int __status, int __errnum, const char *__format, ...)
+                  _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_ERROR, 3, 4)));
+_GL_CXXALIAS_RPL (error, void,
+                  (int __status, int __errnum, const char *__format, ...));
+#else
+# if ! @HAVE_ERROR@
+_GL_FUNCDECL_SYS (error, void,
+                  (int __status, int __errnum, const char *__format, ...)
+                  _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_ERROR, 3, 4)));
+# endif
+_GL_CXXALIAS_SYS (error, void,
+                  (int __status, int __errnum, const char *__format, ...));
+#endif
+#if __GLIBC__ >= 2
+_GL_CXXALIASWARN (error);
+#endif
+
+/* Likewise.  If FILENAME is non-NULL, include FILENAME:LINENO: in the
+   message.  */
+#if @REPLACE_ERROR_AT_LINE@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#  undef error_at_line
+#  define error_at_line rpl_error_at_line
+# endif
+_GL_FUNCDECL_RPL (error_at_line, void,
+                  (int __status, int __errnum, const char *__filename,
+                   unsigned int __lineno, const char *__format, ...)
+                  _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_ERROR, 5, 6)));
+_GL_CXXALIAS_RPL (error_at_line, void,
+                  (int __status, int __errnum, const char *__filename,
+                   unsigned int __lineno, const char *__format, ...));
+#else
+# if ! @HAVE_ERROR_AT_LINE@
+_GL_FUNCDECL_SYS (error_at_line, void,
+                  (int __status, int __errnum, const char *__filename,
+                   unsigned int __lineno, const char *__format, ...)
+                  _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_ERROR, 5, 6)));
+# endif
+_GL_CXXALIAS_SYS (error_at_line, void,
+                  (int __status, int __errnum, const char *__filename,
+                   unsigned int __lineno, const char *__format, ...));
+#endif
+_GL_CXXALIASWARN (error_at_line);
+
+/* If NULL, error will flush stdout, then print on stderr the program
+   name, a colon and a space.  Otherwise, error will call this
+   function without parameters instead.  */
+extern void (*error_print_progname) (void);
+
+/* This variable is incremented each time 'error' is called.  */
+extern unsigned int error_message_count;
+
+/* Sometimes we want to have at most one error per line.  This
+   variable controls whether this mode is selected or not.  */
+extern int error_one_per_line;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _@GUARD_PREFIX@_ERROR_H */
+#endif /* _@GUARD_PREFIX@_ERROR_H */
diff --git a/lib/exclude.c b/lib/exclude.c
index 3770c482..7bd0ec8c 100644
--- a/lib/exclude.c
+++ b/lib/exclude.c
@@ -1,6 +1,6 @@
 /* exclude.c -- exclude file names
 
-   Copyright (C) 1992-1994, 1997, 1999-2007, 2009-2022 Free Software
+   Copyright (C) 1992-1994, 1997, 1999-2007, 2009-2023 Free Software
    Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
@@ -23,8 +23,6 @@
 
 #include <config.h>
 
-#include <stdbool.h>
-
 #include <ctype.h>
 #include <errno.h>
 #include <stddef.h>
@@ -39,7 +37,6 @@
 #include "mbuiter.h"
 #include "fnmatch.h"
 #include "xalloc.h"
-#include "verify.h"
 #include "filename.h"
 
 #if GNULIB_EXCLUDE_SINGLE_THREAD
@@ -57,10 +54,10 @@
 # define FNM_LEADING_DIR 0
 #endif
 
-verify (((EXCLUDE_ANCHORED | EXCLUDE_INCLUDE | EXCLUDE_WILDCARDS)
-         & (FNM_PATHNAME | FNM_NOESCAPE | FNM_PERIOD | FNM_LEADING_DIR
-            | FNM_CASEFOLD | FNM_EXTMATCH))
-        == 0);
+static_assert (((EXCLUDE_ANCHORED | EXCLUDE_INCLUDE | EXCLUDE_WILDCARDS)
+                & (FNM_PATHNAME | FNM_NOESCAPE | FNM_PERIOD | FNM_LEADING_DIR
+                   | FNM_CASEFOLD | FNM_EXTMATCH))
+               == 0);
 
 
 /* Exclusion patterns are grouped into a singly-linked list of
diff --git a/lib/exclude.h b/lib/exclude.h
index 020b3c36..c91e0431 100644
--- a/lib/exclude.h
+++ b/lib/exclude.h
@@ -1,6 +1,6 @@
 /* exclude.h -- declarations for excluding file names
 
-   Copyright (C) 1992-1994, 1997, 1999, 2001-2003, 2005-2006, 2009-2022 Free
+   Copyright (C) 1992-1994, 1997, 1999, 2001-2003, 2005-2006, 2009-2023 Free
    Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
@@ -19,7 +19,12 @@
 #ifndef _GL_EXCLUDE_H
 #define _GL_EXCLUDE_H 1
 
-#include <stdbool.h>
+/* This file uses _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_MALLOC,
+   _GL_ATTRIBUTE_NONNULL, _GL_ATTRIBUTE_PURE, _GL_ATTRIBUTE_RETURNS_NONNULL.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #include <stdio.h>
 
 /* Written by Paul Eggert <eggert@twinsun.com>
diff --git a/lib/exitfail.c b/lib/exitfail.c
index 84fb0eff..d67a130c 100644
--- a/lib/exitfail.c
+++ b/lib/exitfail.c
@@ -1,6 +1,6 @@
 /* Failure exit status
 
-   Copyright (C) 2002-2003, 2005-2007, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2002-2003, 2005-2007, 2009-2023 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
diff --git a/lib/exitfail.h b/lib/exitfail.h
index 865f096a..85a6af64 100644
--- a/lib/exitfail.h
+++ b/lib/exitfail.h
@@ -1,6 +1,6 @@
 /* Failure exit status
 
-   Copyright (C) 2002, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2009-2023 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
diff --git a/lib/fchdir.c b/lib/fchdir.c
index 99e4aa85..880b137e 100644
--- a/lib/fchdir.c
+++ b/lib/fchdir.c
@@ -1,5 +1,5 @@
 /* fchdir replacement.
-   Copyright (C) 2006-2022 Free Software Foundation, Inc.
+   Copyright (C) 2006-2023 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
@@ -22,7 +22,6 @@
 #include <dirent.h>
 #include <errno.h>
 #include <fcntl.h>
-#include <stdbool.h>
 #include <stdlib.h>
 #include <string.h>
 #include <sys/types.h>
@@ -49,7 +48,6 @@
 typedef struct
 {
   char *name;       /* Absolute name of the directory, or NULL.  */
-  /* FIXME - add a DIR* member to make dirfd possible on mingw?  */
 } dir_info_t;
 static dir_info_t *dirs;
 static size_t dirs_allocated;
diff --git a/lib/fcntl--.h b/lib/fcntl--.h
index e14739bc..d7611e19 100644
--- a/lib/fcntl--.h
+++ b/lib/fcntl--.h
@@ -1,6 +1,6 @@
 /* Like fcntl.h, but redefine some names to avoid glitches.
 
-   Copyright (C) 2005, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/lib/fcntl-safer.h b/lib/fcntl-safer.h
index c3f3e6fa..576fc7b8 100644
--- a/lib/fcntl-safer.h
+++ b/lib/fcntl-safer.h
@@ -1,6 +1,6 @@
 /* Invoke fcntl-like functions, but avoid some glitches.
 
-   Copyright (C) 2005, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/lib/fcntl.c b/lib/fcntl.c
index f9753c40..e2208008 100644
--- a/lib/fcntl.c
+++ b/lib/fcntl.c
@@ -1,6 +1,6 @@
 /* Provide file descriptor control.
 
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 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
diff --git a/lib/fcntl.in.h b/lib/fcntl.in.h
index 9270ced8..d0bb85f3 100644
--- a/lib/fcntl.in.h
+++ b/lib/fcntl.in.h
@@ -1,6 +1,6 @@
 /* Like <fcntl.h>, but with non-working flags defined to 0.
 
-   Copyright (C) 2006-2022 Free Software Foundation, Inc.
+   Copyright (C) 2006-2023 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
@@ -74,6 +74,11 @@
 #ifndef _@GUARD_PREFIX@_FCNTL_H
 #define _@GUARD_PREFIX@_FCNTL_H
 
+/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #ifndef __GLIBC__ /* Avoid namespace pollution on glibc systems.  */
 # include <unistd.h>
 #endif
diff --git a/lib/fd-hook.c b/lib/fd-hook.c
index 64a7a80c..36261150 100644
--- a/lib/fd-hook.c
+++ b/lib/fd-hook.c
@@ -1,5 +1,5 @@
 /* Hook for making file descriptor functions close(), ioctl() extensible.
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2009.
 
    This file is free software: you can redistribute it and/or modify
diff --git a/lib/fd-hook.h b/lib/fd-hook.h
index d6c4964d..6bf3c24d 100644
--- a/lib/fd-hook.h
+++ b/lib/fd-hook.h
@@ -1,5 +1,5 @@
 /* Hook for making file descriptor functions close(), ioctl() extensible.
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 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
diff --git a/lib/fd-safer-flag.c b/lib/fd-safer-flag.c
index 2e07cb9b..9aef2710 100644
--- a/lib/fd-safer-flag.c
+++ b/lib/fd-safer-flag.c
@@ -1,7 +1,7 @@
 /* Adjust a file descriptor result so that it avoids clobbering
    STD{IN,OUT,ERR}_FILENO, with specific flags.
 
-   Copyright (C) 2005-2006, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2005-2006, 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/lib/fd-safer.c b/lib/fd-safer.c
index e37b7b3a..9c40a5ae 100644
--- a/lib/fd-safer.c
+++ b/lib/fd-safer.c
@@ -1,6 +1,6 @@
 /* Return a safer copy of a file descriptor.
 
-   Copyright (C) 2005-2006, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2005-2006, 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/lib/fdopendir.c b/lib/fdopendir.c
index c2b0e1ed..0f43d6ff 100644
--- a/lib/fdopendir.c
+++ b/lib/fdopendir.c
@@ -1,5 +1,5 @@
 /* provide a replacement fdopendir function
-   Copyright (C) 2004-2022 Free Software Foundation, Inc.
+   Copyright (C) 2004-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -25,44 +25,27 @@
 
 #if !HAVE_FDOPENDIR
 
-# include "openat.h"
-# include "openat-priv.h"
-# include "save-cwd.h"
+# if GNULIB_defined_DIR
+/* We are in control of the file descriptor of a DIR.  */
 
-# if GNULIB_DIRENT_SAFER
-#  include "dirent--.h"
-# endif
-
-# ifndef REPLACE_FCHDIR
-#  define REPLACE_FCHDIR 0
-# endif
-
-static DIR *fdopendir_with_dup (int, int, struct saved_cwd const *);
-static DIR *fd_clone_opendir (int, struct saved_cwd const *);
-
-/* Replacement for POSIX fdopendir.
+#  include "dirent-private.h"
 
-   First, try to simulate it via opendir ("/proc/self/fd/...").  Failing
-   that, simulate it by using fchdir metadata, or by doing
-   save_cwd/fchdir/opendir(".")/restore_cwd.
-   If either the save_cwd or the restore_cwd fails (relatively unlikely),
-   then give a diagnostic and exit nonzero.
-
-   If successful, the resulting stream is based on FD in
-   implementations where streams are based on file descriptors and in
-   applications where no other thread or signal handler allocates or
-   frees file descriptors.  In other cases, consult dirfd on the result
-   to find out whether FD is still being used.
+#  if !REPLACE_FCHDIR
+#   error "unexpected configuration: GNULIB_defined_DIR but fchdir not replaced"
+#  endif
 
-   Otherwise, this function works just like POSIX fdopendir.
+DIR *
+fdopendir (int fd)
+{
+  char const *name = _gl_directory_name (fd);
+  DIR *dirp = name ? opendir (name) : NULL;
+  if (dirp != NULL)
+    dirp->fd_to_close = fd;
+  return dirp;
+}
 
-   W A R N I N G:
+# elif defined __KLIBC__
 
-   Unlike other fd-related functions, this one places constraints on FD.
-   If this function returns successfully, FD is under control of the
-   dirent.h system, and the caller should not close or modify the state of
-   FD other than by the dirent.h functions.  */
-# ifdef __KLIBC__
 #  include <InnoTekLIBC/backend.h>
 
 DIR *
@@ -96,7 +79,48 @@ fdopendir (int fd)
 
   return dirp;
 }
+
 # else
+/* We are not in control of the file descriptor of a DIR, and therefore have to
+   play tricks with file descriptors before and after a call to opendir().  */
+
+#  include "openat.h"
+#  include "openat-priv.h"
+#  include "save-cwd.h"
+
+#  if GNULIB_DIRENT_SAFER
+#   include "dirent--.h"
+#  endif
+
+#  ifndef REPLACE_FCHDIR
+#   define REPLACE_FCHDIR 0
+#  endif
+
+static DIR *fdopendir_with_dup (int, int, struct saved_cwd const *);
+static DIR *fd_clone_opendir (int, struct saved_cwd const *);
+
+/* Replacement for POSIX fdopendir.
+
+   First, try to simulate it via opendir ("/proc/self/fd/...").  Failing
+   that, simulate it by using fchdir metadata, or by doing
+   save_cwd/fchdir/opendir(".")/restore_cwd.
+   If either the save_cwd or the restore_cwd fails (relatively unlikely),
+   then give a diagnostic and exit nonzero.
+
+   If successful, the resulting stream is based on FD in
+   implementations where streams are based on file descriptors and in
+   applications where no other thread or signal handler allocates or
+   frees file descriptors.  In other cases, consult dirfd on the result
+   to find out whether FD is still being used.
+
+   Otherwise, this function works just like POSIX fdopendir.
+
+   W A R N I N G:
+
+   Unlike other fd-related functions, this one places constraints on FD.
+   If this function returns successfully, FD is under control of the
+   dirent.h system, and the caller should not close or modify the state of
+   FD other than by the dirent.h functions.  */
 DIR *
 fdopendir (int fd)
 {
@@ -119,7 +143,6 @@ fdopendir (int fd)
 
   return dir;
 }
-# endif
 
 /* Like fdopendir, except that if OLDER_DUPFD is not -1, it is known
    to be a dup of FD which is less than FD - 1 and which will be
@@ -188,7 +211,7 @@ fd_clone_opendir (int fd, struct saved_cwd const *cwd)
           if (proc_file != buf)
             free (proc_file);
         }
-# if REPLACE_FCHDIR
+#  if REPLACE_FCHDIR
       if (! dir && EXPECTED_ERRNO (saved_errno))
         {
           char const *name = _gl_directory_name (fd);
@@ -203,7 +226,7 @@ fd_clone_opendir (int fd, struct saved_cwd const *cwd)
 
           return dp;
         }
-# endif
+#  endif
       errno = saved_errno;
       return dir;
     }
@@ -223,6 +246,8 @@ fd_clone_opendir (int fd, struct saved_cwd const *cwd)
     }
 }
 
+# endif
+
 #else /* HAVE_FDOPENDIR */
 
 # include <errno.h>
diff --git a/lib/filename.h b/lib/filename.h
index ab77ca2d..a2400a9d 100644
--- a/lib/filename.h
+++ b/lib/filename.h
@@ -1,5 +1,5 @@
 /* Basic filename support macros.
-   Copyright (C) 2001-2022 Free Software Foundation, Inc.
+   Copyright (C) 2001-2023 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
diff --git a/lib/filenamecat-lgpl.c b/lib/filenamecat-lgpl.c
index 56981aac..6d7ed848 100644
--- a/lib/filenamecat-lgpl.c
+++ b/lib/filenamecat-lgpl.c
@@ -1,6 +1,6 @@
 /* Concatenate two arbitrary file names.
 
-   Copyright (C) 1996-2007, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 1996-2007, 2009-2023 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
diff --git a/lib/filenamecat.h b/lib/filenamecat.h
index f11bd289..29a4daaf 100644
--- a/lib/filenamecat.h
+++ b/lib/filenamecat.h
@@ -1,6 +1,6 @@
 /* Concatenate two arbitrary file names.
 
-   Copyright (C) 1996-1997, 2003, 2005, 2007, 2009-2022 Free Software
+   Copyright (C) 1996-1997, 2003, 2005, 2007, 2009-2023 Free Software
    Foundation, Inc.
 
    This file is free software: you can redistribute it and/or modify
@@ -18,6 +18,11 @@
 
 /* Written by Jim Meyering.  */
 
+/* This file uses _GL_ATTRIBUTE_MALLOC, _GL_ATTRIBUTE_RETURNS_NONNULL.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #include <stdlib.h>
 
 #if GNULIB_FILENAMECAT
diff --git a/lib/flexmember.h b/lib/flexmember.h
index 1545639f..8c5915ec 100644
--- a/lib/flexmember.h
+++ b/lib/flexmember.h
@@ -1,6 +1,6 @@
 /* Sizes of structs with flexible array members.
 
-   Copyright 2016-2022 Free Software Foundation, Inc.
+   Copyright 2016-2023 Free Software Foundation, Inc.
 
    This file is part of the GNU C Library.
 
@@ -20,6 +20,11 @@
 
    Written by Paul Eggert.  */
 
+/* This file uses _Alignof.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #include <stddef.h>
 
 /* Nonzero multiple of alignment of TYPE, suitable for FLEXSIZEOF below.
diff --git a/lib/fnmatch.c b/lib/fnmatch.c
index b33a127d..32cfb48d 100644
--- a/lib/fnmatch.c
+++ b/lib/fnmatch.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2022 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2023 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
@@ -30,6 +30,7 @@
 #include <errno.h>
 #include <ctype.h>
 #include <string.h>
+#include <stdckdint.h>
 #include <stdlib.h>
 #if defined _LIBC || HAVE_ALLOCA
 # include <alloca.h>
@@ -37,7 +38,6 @@
 #include <wchar.h>
 #include <wctype.h>
 #include <stddef.h>
-#include <stdbool.h>
 
 /* We need some of the locale data (the collation sequence information)
    but there is no interface to get this information in general.  Therefore
@@ -64,7 +64,7 @@ extern int fnmatch (const char *pattern, const char *string, int flags);
 #endif
 
 #ifdef _LIBC
-# if __GNUC__ >= 7
+# if __glibc_has_attribute (__fallthrough__)
 #  define FALLTHROUGH __attribute__ ((__fallthrough__))
 # else
 #  define FALLTHROUGH ((void) 0)
@@ -73,7 +73,6 @@ extern int fnmatch (const char *pattern, const char *string, int flags);
 # include "attribute.h"
 #endif
 
-#include <intprops.h>
 #include <flexmember.h>
 
 #ifdef _LIBC
diff --git a/lib/fnmatch.in.h b/lib/fnmatch.in.h
index a282c09f..144143b7 100644
--- a/lib/fnmatch.in.h
+++ b/lib/fnmatch.in.h
@@ -1,5 +1,5 @@
 /* Substitute for and wrapper around <fnmatch.h>.
-   Copyright (C) 1991-1993, 1996-1999, 2001-2003, 2005, 2007, 2009-2022 Free
+   Copyright (C) 1991-1993, 1996-1999, 2001-2003, 2005, 2007, 2009-2023 Free
    Software Foundation, Inc.
 
    This file is part of the GNU C Library.
@@ -32,6 +32,11 @@
 #ifndef _@GUARD_PREFIX@_FNMATCH_H
 #define _@GUARD_PREFIX@_FNMATCH_H
 
+/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
 
 /* The definition of _GL_ARG_NONNULL is copied here.  */
diff --git a/lib/fnmatch_loop.c b/lib/fnmatch_loop.c
index e6359537..68a3b7a5 100644
--- a/lib/fnmatch_loop.c
+++ b/lib/fnmatch_loop.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2022 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2023 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
@@ -1039,8 +1039,8 @@ EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end,
             idx_t slen = FLEXSIZEOF (struct patternlist, str, 0);             \
             idx_t new_used = alloca_used + slen;                              \
             idx_t plensize;                                                   \
-            if (INT_MULTIPLY_WRAPV (plen, sizeof (CHAR), &plensize)           \
-                || INT_ADD_WRAPV (new_used, plensize, &new_used))             \
+            if (ckd_mul (&plensize, plen, sizeof (CHAR))                      \
+                || ckd_add (&new_used, new_used, plensize))                   \
               {                                                               \
                 retval = -2;                                                  \
                 goto out;                                                     \
diff --git a/lib/fopen.c b/lib/fopen.c
index a5b3ae38..f8469a0b 100644
--- a/lib/fopen.c
+++ b/lib/fopen.c
@@ -1,5 +1,5 @@
 /* Open a stream to a file.
-   Copyright (C) 2007-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007-2023 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
@@ -39,7 +39,6 @@ orig_fopen (const char *filename, const char *mode)
 
 #include <errno.h>
 #include <fcntl.h>
-#include <stdbool.h>
 #include <string.h>
 #include <unistd.h>
 #include <sys/types.h>
diff --git a/lib/fpending.c b/lib/fpending.c
index 6408cff4..e57155e5 100644
--- a/lib/fpending.c
+++ b/lib/fpending.c
@@ -1,5 +1,5 @@
 /* fpending.c -- return the number of pending output bytes on a stream
-   Copyright (C) 2000, 2004, 2006-2007, 2009-2022 Free Software Foundation,
+   Copyright (C) 2000, 2004, 2006-2007, 2009-2023 Free Software Foundation,
    Inc.
 
    This program is free software: you can redistribute it and/or modify
@@ -41,7 +41,7 @@ __fpending (FILE *fp)
   return fp->_IO_write_ptr - fp->_IO_write_base;
 #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
   /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin < 1.7.34, Minix 3, Android */
-  return fp->_p - fp->_bf._base;
+  return fp_->_p - fp_->_bf._base;
 #elif defined __EMX__                /* emx+gcc */
   return fp->_ptr - fp->_buffer;
 #elif defined __minix                /* Minix */
diff --git a/lib/fpending.h b/lib/fpending.h
index 43542c5b..1604ca0b 100644
--- a/lib/fpending.h
+++ b/lib/fpending.h
@@ -1,6 +1,6 @@
 /* Declare __fpending.
 
-   Copyright (C) 2000, 2003, 2005-2006, 2009-2022 Free Software Foundation,
+   Copyright (C) 2000, 2003, 2005-2006, 2009-2023 Free Software Foundation,
    Inc.
 
    This program is free software: you can redistribute it and/or modify
@@ -18,6 +18,12 @@
 
    Written by Jim Meyering.  */
 
+/* This file uses _GL_ATTRIBUTE_PURE, HAVE_STDIO_EXT_H,
+   HAVE_DECL___FPENDING.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #include <stddef.h>
 #include <stdio.h>
 #if HAVE_STDIO_EXT_H
diff --git a/lib/free.c b/lib/free.c
index 86ebe6c6..372a6b0f 100644
--- a/lib/free.c
+++ b/lib/free.c
@@ -1,6 +1,6 @@
 /* Make free() preserve errno.
 
-   Copyright (C) 2003, 2006, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2006, 2009-2023 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
diff --git a/lib/fstat.c b/lib/fstat.c
index 3928c860..6a235002 100644
--- a/lib/fstat.c
+++ b/lib/fstat.c
@@ -1,5 +1,5 @@
 /* fstat() replacement.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 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
diff --git a/lib/fstatat.c b/lib/fstatat.c
index 6e834496..372965ef 100644
--- a/lib/fstatat.c
+++ b/lib/fstatat.c
@@ -1,6 +1,6 @@
 /* Work around an fstatat bug on Solaris 9.
 
-   Copyright (C) 2006, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/lib/fts-cycle.c b/lib/fts-cycle.c
index e21be786..f2b93493 100644
--- a/lib/fts-cycle.c
+++ b/lib/fts-cycle.c
@@ -1,6 +1,6 @@
 /* Detect cycles in file tree walks.
 
-   Copyright (C) 2003-2006, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2003-2006, 2009-2023 Free Software Foundation, Inc.
 
    Written by Jim Meyering.
 
diff --git a/lib/fts.c b/lib/fts.c
index 494a63af..3fffb45d 100644
--- a/lib/fts.c
+++ b/lib/fts.c
@@ -1,6 +1,6 @@
 /* Traverse a file hierarchy.
 
-   Copyright (C) 2004-2022 Free Software Foundation, Inc.
+   Copyright (C) 2004-2023 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
@@ -62,9 +62,8 @@ static char sccsid[] = "@(#)fts.c       8.6 (Berkeley) 8/14/94";
 #endif
 #include <fcntl.h>
 #include <errno.h>
-#include <stdalign.h>
-#include <stdbool.h>
 #include <stddef.h>
+#include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
@@ -115,6 +114,9 @@ static char sccsid[] = "@(#)fts.c       8.6 (Berkeley) 8/14/94";
 # define DT_SOCK 7
 #endif
 
+#ifndef S_IFBLK
+# define S_IFBLK 0
+#endif
 #ifndef S_IFLNK
 # define S_IFLNK 0
 #endif
@@ -201,7 +203,7 @@ enum Fts_stat
 #endif
 
 #ifdef _LIBC
-# if __GNUC__ >= 7
+# if __glibc_has_attribute (__fallthrough__)
 #  define FALLTHROUGH __attribute__ ((__fallthrough__))
 # else
 #  define FALLTHROUGH ((void) 0)
@@ -234,7 +236,7 @@ static int      fts_safe_changedir (FTS *, FTSENT *, int, const char *)
 #define STREQ(a, b)     (strcmp (a, b) == 0)
 
 #define CLR(opt)        (sp->fts_options &= ~(opt))
-#define ISSET(opt)      (sp->fts_options & (opt))
+#define ISSET(opt)      ((sp->fts_options & (opt)) != 0)
 #define SET(opt)        (sp->fts_options |= (opt))
 
 /* FIXME: FTS_NOCHDIR is now misnamed.
@@ -251,13 +253,13 @@ static int      fts_safe_changedir (FTS *, FTSENT *, int, const char *)
 #define BNAMES          2               /* fts_children, names only */
 #define BREAD           3               /* fts_read */
 
-#if FTS_DEBUG
+#if GNULIB_FTS_DEBUG
 # include <inttypes.h>
-# include <stdint.h>
 # include <stdio.h>
-# include "getcwdat.h"
 bool fts_debug = false;
 # define Dprintf(x) do { if (fts_debug) printf x; } while (false)
+static void fd_ring_check (FTS const *);
+static void fd_ring_print (FTS const *, FILE *, char const *);
 #else
 # define Dprintf(x)
 # define fd_ring_check(x)
@@ -977,7 +979,11 @@ next:   tmp = p;
                         }
                         free_dir(sp);
                         fts_load(sp, p);
-                        setup_dir(sp);
+                        if (! setup_dir(sp)) {
+                                free_dir(sp);
+                                __set_errno (ENOMEM);
+                                return (NULL);
+                        }
                         goto check_for_dir;
                 }
 
@@ -1267,7 +1273,6 @@ fts_build (register FTS *sp, int type)
         register FTSENT *p, *head;
         register size_t nitems;
         FTSENT *tail;
-        void *oldaddr;
         int saved_errno;
         bool descend;
         bool doadjust;
@@ -1289,11 +1294,12 @@ fts_build (register FTS *sp, int type)
             dir_fd = dirfd (dp);
             if (dir_fd < 0)
               {
+                int dirfd_errno = errno;
                 closedir_and_clear (cur->fts_dirp);
                 if (type == BREAD)
                   {
                     cur->fts_info = FTS_DNR;
-                    cur->fts_errno = errno;
+                    cur->fts_errno = dirfd_errno;
                   }
                 return NULL;
               }
@@ -1314,19 +1320,35 @@ fts_build (register FTS *sp, int type)
             /* Rather than calling fts_stat for each and every entry encountered
                in the readdir loop (below), stat each directory only right after
                opening it.  */
-            if (cur->fts_info == FTS_NSOK)
-              cur->fts_info = fts_stat(sp, cur, false);
-            else if (sp->fts_options & FTS_TIGHT_CYCLE_CHECK)
-              {
-                /* Now read the stat info again after opening a directory to
+            bool stat_optimization = cur->fts_info == FTS_NSOK;
+
+            if (stat_optimization
+                /* Also read the stat info again after opening a directory to
                    reveal eventual changes caused by a submount triggered by
                    the traversal.  But do it only for utilities which use
                    FTS_TIGHT_CYCLE_CHECK.  Therefore, only find and du
                    benefit/suffer from this feature for now.  */
-                LEAVE_DIR (sp, cur, "4");
-                fts_stat (sp, cur, false);
-                if (! enter_dir (sp, cur))
+                || ISSET (FTS_TIGHT_CYCLE_CHECK))
+              {
+                if (!stat_optimization)
+                  LEAVE_DIR (sp, cur, "4");
+                if (fstat (dir_fd, cur->fts_statp) != 0)
+                  {
+                    int fstat_errno = errno;
+                    closedir_and_clear (cur->fts_dirp);
+                    if (type == BREAD)
+                      {
+                        cur->fts_errno = fstat_errno;
+                        cur->fts_info = FTS_NS;
+                      }
+                    __set_errno (fstat_errno);
+                    return NULL;
+                  }
+                if (stat_optimization)
+                  cur->fts_info = FTS_D;
+                else if (! enter_dir (sp, cur))
                   {
+                    closedir_and_clear (cur->fts_dirp);
                     __set_errno (ENOMEM);
                     return NULL;
                   }
@@ -1431,6 +1453,7 @@ fts_build (register FTS *sp, int type)
                                 cur->fts_info = (continue_readdir || nitems)
                                                 ? FTS_ERR : FTS_DNR;
                         }
+                        closedir_and_clear(cur->fts_dirp);
                         break;
                 }
                 if (!ISSET(FTS_SEEDOT) && ISDOT(dp->d_name))
@@ -1442,7 +1465,7 @@ fts_build (register FTS *sp, int type)
                         goto mem1;
                 if (d_namelen >= maxlen) {
                         /* include space for NUL */
-                        oldaddr = sp->fts_path;
+                        uintptr_t oldaddr = (uintptr_t) sp->fts_path;
                         if (! fts_palloc(sp, d_namelen + len + 1)) {
                                 /*
                                  * No more memory.  Save
@@ -1459,7 +1482,7 @@ mem1:                           saved_errno = errno;
                                 return (NULL);
                         }
                         /* Did realloc() change the pointer? */
-                        if (oldaddr != sp->fts_path) {
+                        if (oldaddr != (uintptr_t) sp->fts_path) {
                                 doadjust = true;
                                 if (ISSET(FTS_NOCHDIR))
                                         cp = sp->fts_path + len;
@@ -1551,15 +1574,10 @@ mem1:                           saved_errno = errno;
                         /* When there are too many dir entries, leave
                            fts_dirp open, so that a subsequent fts_read
                            can take up where we leave off.  */
-                        goto break_without_closedir;
+                        break;
                 }
         }
 
-        if (cur->fts_dirp)
-                closedir_and_clear(cur->fts_dirp);
-
- break_without_closedir:
-
         /*
          * If realloc() changed the address of the file name, adjust the
          * addresses for the rest of the tree and the dir list.
@@ -1615,7 +1633,23 @@ mem1:                           saved_errno = errno;
         return (head);
 }
 
-#if FTS_DEBUG
+#if GNULIB_FTS_DEBUG
+
+struct devino {
+  intmax_t dev, ino;
+};
+#define PRINT_DEVINO "(%jd,%jd)"
+
+static struct devino
+getdevino (int fd)
+{
+  struct stat st;
+  return (fd == AT_FDCWD
+          ? (struct devino) { -1, 0 }
+          : fstat (fd, &st) == 0
+          ? (struct devino) { st.st_dev, st.st_ino }
+          : (struct devino) { -1, errno });
+}
 
 /* Walk ->fts_parent links starting at E_CURR, until the root of the
    current hierarchy.  There should be a directory with dev/inode
@@ -1689,26 +1723,26 @@ same_fd (int fd1, int fd2)
 static void
 fd_ring_print (FTS const *sp, FILE *stream, char const *msg)
 {
+  if (!fts_debug)
+    return;
   I_ring const *fd_ring = &sp->fts_fd_ring;
-  unsigned int i = fd_ring->fts_front;
-  char *cwd = getcwdat (sp->fts_cwd_fd, NULL, 0);
-  fprintf (stream, "=== %s ========== %s\n", msg, cwd);
-  free (cwd);
+  unsigned int i = fd_ring->ir_front;
+  struct devino cwd = getdevino (sp->fts_cwd_fd);
+  fprintf (stream, "=== %s ========== "PRINT_DEVINO"\n", msg, cwd.dev, cwd.ino);
   if (i_ring_empty (fd_ring))
     return;
 
   while (true)
     {
-      int fd = fd_ring->fts_fd_ring[i];
+      int fd = fd_ring->ir_data[i];
       if (fd < 0)
         fprintf (stream, "%d: %d:\n", i, fd);
       else
         {
-          char *wd = getcwdat (fd, NULL, 0);
-          fprintf (stream, "%d: %d: %s\n", i, fd, wd);
-          free (wd);
+          struct devino wd = getdevino (fd);
+          fprintf (stream, "%d: %d: "PRINT_DEVINO"\n", i, fd, wd.dev, wd.ino);
         }
-      if (i == fd_ring->fts_back)
+      if (i == fd_ring->ir_back)
         break;
       i = (i + I_RING_SIZE - 1) % I_RING_SIZE;
     }
@@ -1727,9 +1761,9 @@ fd_ring_check (FTS const *sp)
 
   int cwd_fd = sp->fts_cwd_fd;
   cwd_fd = fcntl (cwd_fd, F_DUPFD_CLOEXEC, STDERR_FILENO + 1);
-  char *dot = getcwdat (cwd_fd, NULL, 0);
-  error (0, 0, "===== check ===== cwd: %s", dot);
-  free (dot);
+  struct devino dot = getdevino (cwd_fd);
+  fprintf (stderr, "===== check ===== cwd: "PRINT_DEVINO"\n",
+           dot.dev, dot.ino);
   while ( ! i_ring_empty (&fd_w))
     {
       int fd = i_ring_pop (&fd_w);
@@ -1744,12 +1778,10 @@ fd_ring_check (FTS const *sp)
             }
           if (!same_fd (fd, parent_fd))
             {
-              char *cwd = getcwdat (fd, NULL, 0);
-              error (0, errno, "ring  : %s", cwd);
-              char *c2 = getcwdat (parent_fd, NULL, 0);
-              error (0, errno, "parent: %s", c2);
-              free (cwd);
-              free (c2);
+              struct devino cwd = getdevino (fd);
+              fprintf (stderr, "ring  : "PRINT_DEVINO"\n", cwd.dev, cwd.ino);
+              struct devino c2 = getdevino (parent_fd);
+              fprintf (stderr, "parent: "PRINT_DEVINO"\n", c2.dev, c2.ino);
               fts_assert (0);
             }
           close (cwd_fd);
@@ -1960,10 +1992,15 @@ fts_padjust (FTS *sp, FTSENT *head)
         FTSENT *p;
         char *addr = sp->fts_path;
 
+        /* This code looks at bit-patterns of freed pointers to
+           relocate them, so it relies on undefined behavior.  If this
+           trick does not work on your platform, please report a bug.  */
+
 #define ADJUST(p) do {                                                  \
-        if ((p)->fts_accpath != (p)->fts_name) {                        \
+        uintptr_t old_accpath = (uintptr_t) (p)->fts_accpath;           \
+        if (old_accpath != (uintptr_t) (p)->fts_name) {                 \
                 (p)->fts_accpath =                                      \
-                    (char *)addr + ((p)->fts_accpath - (p)->fts_path);  \
+                  addr + (old_accpath - (uintptr_t) (p)->fts_path);     \
         }                                                               \
         (p)->fts_path = addr;                                           \
 } while (0)
diff --git a/lib/fts_.h b/lib/fts_.h
index 0131a77c..fa3d4146 100644
--- a/lib/fts_.h
+++ b/lib/fts_.h
@@ -1,6 +1,6 @@
 /* Traverse a file hierarchy.
 
-   Copyright (C) 2004-2022 Free Software Foundation, Inc.
+   Copyright (C) 2004-2023 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
@@ -49,6 +49,11 @@
 #ifndef _FTS_H
 # define _FTS_H 1
 
+/* This file uses _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_NODISCARD.  */
+# if !_LIBC && !_GL_CONFIG_H_INCLUDED
+#  error "Please include config.h first."
+# endif
+
 # ifdef _LIBC
 #  include <features.h>
 #  if __STDC_VERSION__ < 199901L
diff --git a/lib/getcwd-lgpl.c b/lib/getcwd-lgpl.c
index f449ac85..8a5bde99 100644
--- a/lib/getcwd-lgpl.c
+++ b/lib/getcwd-lgpl.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2011-2022 Free Software Foundation, Inc.
+/* Copyright (C) 2011-2023 Free Software Foundation, Inc.
    This file is part of gnulib.
 
    This file is free software: you can redistribute it and/or modify
diff --git a/lib/getdtablesize.c b/lib/getdtablesize.c
index 793e0f88..ac2d1753 100644
--- a/lib/getdtablesize.c
+++ b/lib/getdtablesize.c
@@ -1,5 +1,5 @@
 /* getdtablesize() function: Return maximum possible file descriptor value + 1.
-   Copyright (C) 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2008.
 
    This file is free software: you can redistribute it and/or modify
diff --git a/lib/getopt-cdefs.in.h b/lib/getopt-cdefs.in.h
index b6dd913c..e76c78cb 100644
--- a/lib/getopt-cdefs.in.h
+++ b/lib/getopt-cdefs.in.h
@@ -1,5 +1,5 @@
 /* getopt-on-non-glibc compatibility macros.
-   Copyright (C) 1989-2022 Free Software Foundation, Inc.
+   Copyright (C) 1989-2023 Free Software Foundation, Inc.
    This file is part of gnulib.
    Unlike most of the getopt implementation, it is NOT shared
    with the GNU C Library.
diff --git a/lib/getopt-core.h b/lib/getopt-core.h
index 1c40ecc8..c5dd4936 100644
--- a/lib/getopt-core.h
+++ b/lib/getopt-core.h
@@ -1,5 +1,5 @@
 /* Declarations for getopt (basic, portable features only).
-   Copyright (C) 1989-2022 Free Software Foundation, Inc.
+   Copyright (C) 1989-2023 Free Software Foundation, Inc.
    This file is part of the GNU C Library and is also part of gnulib.
    Patches to this file should be submitted to both projects.
 
diff --git a/lib/getopt-ext.h b/lib/getopt-ext.h
index d661fcc5..d37c2932 100644
--- a/lib/getopt-ext.h
+++ b/lib/getopt-ext.h
@@ -1,5 +1,5 @@
 /* Declarations for getopt (GNU extensions).
-   Copyright (C) 1989-2022 Free Software Foundation, Inc.
+   Copyright (C) 1989-2023 Free Software Foundation, Inc.
    This file is part of the GNU C Library and is also part of gnulib.
    Patches to this file should be submitted to both projects.
 
diff --git a/lib/getopt-pfx-core.h b/lib/getopt-pfx-core.h
index 3eead0e0..095e3930 100644
--- a/lib/getopt-pfx-core.h
+++ b/lib/getopt-pfx-core.h
@@ -1,5 +1,5 @@
 /* getopt (basic, portable features) gnulib wrapper header.
-   Copyright (C) 1989-2022 Free Software Foundation, Inc.
+   Copyright (C) 1989-2023 Free Software Foundation, Inc.
    This file is part of gnulib.
    Unlike most of the getopt implementation, it is NOT shared
    with the GNU C Library.
@@ -47,7 +47,7 @@
 # define optind __GETOPT_ID (optind)
 # define optopt __GETOPT_ID (optopt)
 
-/* Work around a a problem on macOS, which declares getopt with a
+/* Work around a problem on macOS, which declares getopt with a
    trailing __DARWIN_ALIAS(getopt) that would expand to something like
    __asm("_" "rpl_getopt" "$UNIX2003") were it not for the following
    hack to suppress the macOS declaration <https://bugs.gnu.org/40205>.  */
diff --git a/lib/getopt-pfx-ext.h b/lib/getopt-pfx-ext.h
index 85a6cb5d..8578d725 100644
--- a/lib/getopt-pfx-ext.h
+++ b/lib/getopt-pfx-ext.h
@@ -1,5 +1,5 @@
 /* getopt (GNU extensions) gnulib wrapper header.
-   Copyright (C) 1989-2022 Free Software Foundation, Inc.
+   Copyright (C) 1989-2023 Free Software Foundation, Inc.
    This file is part of gnulib.
    Unlike most of the getopt implementation, it is NOT shared
    with the GNU C Library.
diff --git a/lib/getopt.c b/lib/getopt.c
index 128dc7fc..1e2441c4 100644
--- a/lib/getopt.c
+++ b/lib/getopt.c
@@ -1,5 +1,5 @@
 /* Getopt for GNU.
-   Copyright (C) 1987-2022 Free Software Foundation, Inc.
+   Copyright (C) 1987-2023 Free Software Foundation, Inc.
    This file is part of the GNU C Library and is also part of gnulib.
    Patches to this file should be submitted to both projects.
 
diff --git a/lib/getopt.in.h b/lib/getopt.in.h
index 9bc50ee2..0867d365 100644
--- a/lib/getopt.in.h
+++ b/lib/getopt.in.h
@@ -1,5 +1,5 @@
 /* Declarations for getopt.
-   Copyright (C) 1989-2022 Free Software Foundation, Inc.
+   Copyright (C) 1989-2023 Free Software Foundation, Inc.
    This file is part of gnulib.
    Unlike most of the getopt implementation, it is NOT shared
    with the GNU C Library, which supplies a different version of
diff --git a/lib/getopt1.c b/lib/getopt1.c
index 990eee1b..49323aa8 100644
--- a/lib/getopt1.c
+++ b/lib/getopt1.c
@@ -1,5 +1,5 @@
 /* getopt_long and getopt_long_only entry points for GNU getopt.
-   Copyright (C) 1987-2022 Free Software Foundation, Inc.
+   Copyright (C) 1987-2023 Free Software Foundation, Inc.
    This file is part of the GNU C Library and is also part of gnulib.
    Patches to this file should be submitted to both projects.
 
diff --git a/lib/getopt_int.h b/lib/getopt_int.h
index ccdbb973..4d9e24be 100644
--- a/lib/getopt_int.h
+++ b/lib/getopt_int.h
@@ -1,5 +1,5 @@
 /* Internal declarations for getopt.
-   Copyright (C) 1989-2022 Free Software Foundation, Inc.
+   Copyright (C) 1989-2023 Free Software Foundation, Inc.
    This file is part of the GNU C Library and is also part of gnulib.
    Patches to this file should be submitted to both projects.
 
diff --git a/lib/getpagesize.c b/lib/getpagesize.c
index a19669f6..08bb33f7 100644
--- a/lib/getpagesize.c
+++ b/lib/getpagesize.c
@@ -1,6 +1,6 @@
 /* getpagesize emulation for systems where it cannot be done in a C macro.
 
-   Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009-2023 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
diff --git a/lib/getprogname.c b/lib/getprogname.c
index 62a48004..279d79f0 100644
--- a/lib/getprogname.c
+++ b/lib/getprogname.c
@@ -1,5 +1,5 @@
 /* Program name management.
-   Copyright (C) 2016-2022 Free Software Foundation, Inc.
+   Copyright (C) 2016-2023 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
@@ -16,11 +16,10 @@
 
 #include <config.h>
 
-/* Specification.  */
-#include "getprogname.h"
+/* Specification.  Also get __argv declaration.  */
+#include <stdlib.h>
 
 #include <errno.h> /* get program_invocation_name declaration */
-#include <stdlib.h> /* get __argv declaration */
 
 #ifdef _AIX
 # include <unistd.h>
@@ -53,13 +52,12 @@
 
 #if defined __SCO_VERSION__ || defined __sysv5__
 # include <fcntl.h>
-# include <stdlib.h>
 # include <string.h>
 #endif
 
 #include "basename-lgpl.h"
 
-#ifndef HAVE_GETPROGNAME             /* not Mac OS X, FreeBSD, NetBSD, OpenBSD >= 5.4, Cygwin */
+#ifndef HAVE_GETPROGNAME  /* not Mac OS X, FreeBSD, NetBSD, OpenBSD >= 5.4, Solaris >= 11, Cygwin, Android API level >= 21 */
 char const *
 getprogname (void)
 {
diff --git a/lib/getprogname.h b/lib/getprogname.h
index 9a35e584..13314f21 100644
--- a/lib/getprogname.h
+++ b/lib/getprogname.h
@@ -1,5 +1,5 @@
 /* Program name management.
-   Copyright (C) 2016-2022 Free Software Foundation, Inc.
+   Copyright (C) 2016-2023 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
@@ -19,22 +19,8 @@
 
 #include <stdlib.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Return the base name of the executing program.
-   On native Windows this will usually end in ".exe" or ".EXE". */
-#ifndef HAVE_GETPROGNAME
-extern char const *getprogname (void)
-# ifdef HAVE_DECL_PROGRAM_INVOCATION_NAME
-  _GL_ATTRIBUTE_PURE
-# endif
-  ;
-#endif
-
-#ifdef __cplusplus
-}
+#if __GNUC__ || (__clang_major__ >= 4)
+# warning "The include file getprogname.h is deprecated. Use <stdlib.h> instead."
 #endif
 
 #endif
diff --git a/lib/gettext.h b/lib/gettext.h
index b3577a04..d0462c47 100644
--- a/lib/gettext.h
+++ b/lib/gettext.h
@@ -1,5 +1,5 @@
 /* Convenience header for conditional use of GNU <libintl.h>.
-   Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2022 Free Software
+   Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2023 Free Software
    Foundation, Inc.
 
    This file is free software: you can redistribute it and/or modify
diff --git a/lib/glthread/lock.c b/lib/glthread/lock.c
index b650c219..82fb7553 100644
--- a/lib/glthread/lock.c
+++ b/lib/glthread/lock.c
@@ -1,5 +1,5 @@
 /* Locking in multithreaded situations.
-   Copyright (C) 2005-2022 Free Software Foundation, Inc.
+   Copyright (C) 2005-2023 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
diff --git a/lib/glthread/lock.h b/lib/glthread/lock.h
index 47eed8fe..805cd1cf 100644
--- a/lib/glthread/lock.h
+++ b/lib/glthread/lock.h
@@ -1,5 +1,5 @@
 /* Locking in multithreaded situations.
-   Copyright (C) 2005-2022 Free Software Foundation, Inc.
+   Copyright (C) 2005-2023 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
@@ -77,6 +77,14 @@
 #ifndef _LOCK_H
 #define _LOCK_H
 
+/* This file uses HAVE_THREADS_H, HAVE_PTHREAD_RWLOCK,
+   HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER,
+   PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
+   HAVE_PTHREAD_MUTEX_RECURSIVE.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #include <errno.h>
 #include <stdlib.h>
 
diff --git a/lib/glthread/threadlib.c b/lib/glthread/threadlib.c
index 88a76bad..5ecf827f 100644
--- a/lib/glthread/threadlib.c
+++ b/lib/glthread/threadlib.c
@@ -1,5 +1,5 @@
 /* Multithreading primitives.
-   Copyright (C) 2005-2022 Free Software Foundation, Inc.
+   Copyright (C) 2005-2023 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
diff --git a/lib/gnulib.mk b/lib/gnulib.mk
index cca516e4..9ce860b9 100644
--- a/lib/gnulib.mk
+++ b/lib/gnulib.mk
@@ -1,6 +1,6 @@
 ## DO NOT EDIT! GENERATED AUTOMATICALLY!
 ## Process this file with automake to produce Makefile.in.
-# Copyright (C) 2002-2022 Free Software Foundation, Inc.
+# Copyright (C) 2002-2023 Free Software Foundation, Inc.
 #
 # This file is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -39,6 +39,7 @@
 #  --avoid=update-copyright-tests \
 #  announce-gen \
 #  argmatch \
+#  assert-h \
 #  c-ctype \
 #  c-stack \
 #  c-strcase \
@@ -91,6 +92,7 @@
 #  safe-read \
 #  same-inode \
 #  ssize_t \
+#  stdckdint \
 #  stddef \
 #  stdlib \
 #  stpcpy \
@@ -113,7 +115,8 @@
 #  windows-stat-inodes \
 #  xalloc \
 #  xbinary-io \
-#  xstrtoimax
+#  xstrtoimax \
+#  year2038
 
 
 MOSTLYCLEANFILES += core *.stackdump
@@ -180,6 +183,37 @@ EXTRA_DIST += argmatch.h
 
 ## end   gnulib module argmatch
 
+## begin gnulib module assert-h
+
+BUILT_SOURCES += $(ASSERT_H)
+
+# We need the following in order to create <assert.h> when the system
+# doesn't have one that works with the given compiler.
+if GL_GENERATE_ASSERT_H
+assert.h: assert.in.h verify.h $(top_builddir)/config.status
+	$(gl_V_at){ $(SED_HEADER_STDOUT) \
+	      -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+	      -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+	      -e 's|@''NEXT_ASSERT_H''@|$(NEXT_ASSERT_H)|g' \
+	      < $(srcdir)/assert.in.h && \
+	  sed -e '/@assert.h omit start@/,/@assert.h omit end@/d' \
+	      -e 's|_gl_verify|_gl_static_assert|g' \
+	      -e 's|_GL_VERIFY|_GL_STATIC_ASSERT|g' \
+	      -e 's|_GL\(_STATIC_ASSERT_H\)|_GL\1|g' \
+	      < $(srcdir)/verify.h; \
+	} > $@-t
+	$(AM_V_at)mv $@-t $@
+else
+assert.h: $(top_builddir)/config.status
+	rm -f $@
+endif
+MOSTLYCLEANFILES += assert.h assert.h-t
+
+EXTRA_DIST += assert.in.h verify.h
+
+## end   gnulib module assert-h
+
 ## begin gnulib module assure
 
 
@@ -334,34 +368,34 @@ configmake.h: Makefile
 	  echo '#if HAVE_WINSOCK2_H'; \
 	  echo '# include <winsock2.h> /* avoid mingw pollution on DATADIR */'; \
 	  echo '#endif'; \
-	  echo '#define PREFIX "$(prefix)"'; \
-	  echo '#define EXEC_PREFIX "$(exec_prefix)"'; \
-	  echo '#define BINDIR "$(bindir)"'; \
-	  echo '#define SBINDIR "$(sbindir)"'; \
-	  echo '#define LIBEXECDIR "$(libexecdir)"'; \
-	  echo '#define DATAROOTDIR "$(datarootdir)"'; \
-	  echo '#define DATADIR "$(datadir)"'; \
-	  echo '#define SYSCONFDIR "$(sysconfdir)"'; \
-	  echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \
-	  echo '#define LOCALSTATEDIR "$(localstatedir)"'; \
-	  echo '#define RUNSTATEDIR "$(runstatedir)"'; \
-	  echo '#define INCLUDEDIR "$(includedir)"'; \
-	  echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \
-	  echo '#define DOCDIR "$(docdir)"'; \
-	  echo '#define INFODIR "$(infodir)"'; \
-	  echo '#define HTMLDIR "$(htmldir)"'; \
-	  echo '#define DVIDIR "$(dvidir)"'; \
-	  echo '#define PDFDIR "$(pdfdir)"'; \
-	  echo '#define PSDIR "$(psdir)"'; \
-	  echo '#define LIBDIR "$(libdir)"'; \
-	  echo '#define LISPDIR "$(lispdir)"'; \
-	  echo '#define LOCALEDIR "$(localedir)"'; \
-	  echo '#define MANDIR "$(mandir)"'; \
-	  echo '#define MANEXT "$(manext)"'; \
-	  echo '#define PKGDATADIR "$(pkgdatadir)"'; \
-	  echo '#define PKGINCLUDEDIR "$(pkgincludedir)"'; \
-	  echo '#define PKGLIBDIR "$(pkglibdir)"'; \
-	  echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \
+	  printf '#define PREFIX %s\n' $(prefix_c_make); \
+	  printf '#define EXEC_PREFIX %s\n' $(exec_prefix_c_make); \
+	  printf '#define BINDIR %s\n' $(bindir_c_make); \
+	  printf '#define SBINDIR %s\n' $(sbindir_c_make); \
+	  printf '#define LIBEXECDIR %s\n' $(libexecdir_c_make); \
+	  printf '#define DATAROOTDIR %s\n' $(datarootdir_c_make); \
+	  printf '#define DATADIR %s\n' $(datadir_c_make); \
+	  printf '#define SYSCONFDIR %s\n' $(sysconfdir_c_make); \
+	  printf '#define SHAREDSTATEDIR %s\n' $(sharedstatedir_c_make); \
+	  printf '#define LOCALSTATEDIR %s\n' $(localstatedir_c_make); \
+	  printf '#define RUNSTATEDIR %s\n' $(runstatedir_c_make); \
+	  printf '#define INCLUDEDIR %s\n' $(includedir_c_make); \
+	  printf '#define OLDINCLUDEDIR %s\n' $(oldincludedir_c_make); \
+	  printf '#define DOCDIR %s\n' $(docdir_c_make); \
+	  printf '#define INFODIR %s\n' $(infodir_c_make); \
+	  printf '#define HTMLDIR %s\n' $(htmldir_c_make); \
+	  printf '#define DVIDIR %s\n' $(dvidir_c_make); \
+	  printf '#define PDFDIR %s\n' $(pdfdir_c_make); \
+	  printf '#define PSDIR %s\n' $(psdir_c_make); \
+	  printf '#define LIBDIR %s\n' $(libdir_c_make); \
+	  printf '#define LISPDIR %s\n' $(lispdir_c_make); \
+	  printf '#define LOCALEDIR %s\n' $(localedir_c_make); \
+	  printf '#define MANDIR %s\n' $(mandir_c_make); \
+	  printf '#define MANEXT %s\n' \"$(manext)\"; \
+	  printf '#define PKGDATADIR %s\n' $(pkgdatadir_c_make); \
+	  printf '#define PKGINCLUDEDIR %s\n' $(pkgincludedir_c_make); \
+	  printf '#define PKGLIBDIR %s\n' $(pkglibdir_c_make); \
+	  printf '#define PKGLIBEXECDIR %s\n' $(pkglibexecdir_c_make); \
 	} | sed '/""/d' > $@-t
 	$(AM_V_at)mv $@-t $@
 
@@ -432,6 +466,7 @@ 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/@''DIR_HAS_FD_MEMBER''@/$(DIR_HAS_FD_MEMBER)/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' \
@@ -450,6 +485,8 @@ dirent.h: dirent.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
 	      -e 's|@''HAVE_SCANDIR''@|$(HAVE_SCANDIR)|g' \
 	      -e 's|@''HAVE_ALPHASORT''@|$(HAVE_ALPHASORT)|g' \
 	      -e 's|@''REPLACE_OPENDIR''@|$(REPLACE_OPENDIR)|g' \
+	      -e 's|@''REPLACE_READDIR''@|$(REPLACE_READDIR)|g' \
+	      -e 's|@''REPLACE_REWINDDIR''@|$(REPLACE_REWINDDIR)|g' \
 	      -e 's|@''REPLACE_CLOSEDIR''@|$(REPLACE_CLOSEDIR)|g' \
 	      -e 's|@''REPLACE_DIRFD''@|$(REPLACE_DIRFD)|g' \
 	      -e 's|@''REPLACE_FDOPENDIR''@|$(REPLACE_FDOPENDIR)|g' \
@@ -470,6 +507,8 @@ if GL_COND_OBJ_DIRFD
 libgreputils_a_SOURCES += dirfd.c
 endif
 
+EXTRA_DIST += dirent-private.h
+
 ## end   gnulib module dirfd
 
 ## begin gnulib module dirname-lgpl
@@ -503,39 +542,6 @@ endif
 
 ## end   gnulib module dup2
 
-## begin gnulib module dynarray
-
-BUILT_SOURCES += malloc/dynarray.gl.h malloc/dynarray-skeleton.gl.h
-
-malloc/dynarray.gl.h: malloc/dynarray.h
-	$(AM_V_GEN)$(MKDIR_P) '%reldir%/malloc'
-	$(AM_V_at)$(SED_HEADER_STDOUT) \
-	  -e '/libc_hidden_proto/d' \
-	  $(srcdir)/malloc/dynarray.h > $@-t
-	$(AM_V_at)mv $@-t $@
-MOSTLYCLEANFILES += malloc/dynarray.gl.h malloc/dynarray.gl.h-t
-
-malloc/dynarray-skeleton.gl.h: malloc/dynarray-skeleton.c
-	$(AM_V_GEN)$(MKDIR_P) '%reldir%/malloc'
-	$(AM_V_at)$(SED_HEADER_STDOUT) \
-	      -e 's|<malloc/dynarray\.h>|<malloc/dynarray.gl.h>|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
-	$(AM_V_at)mv $@-t $@
-MOSTLYCLEANFILES += malloc/dynarray-skeleton.gl.h malloc/dynarray-skeleton.gl.h-t
-
-libgreputils_a_SOURCES += malloc/dynarray_at_failure.c                 malloc/dynarray_emplace_enlarge.c                 malloc/dynarray_finalize.c                 malloc/dynarray_resize.c                 malloc/dynarray_resize_clear.c
-
-EXTRA_DIST += dynarray.h malloc/dynarray-skeleton.c malloc/dynarray.h
-
-EXTRA_libgreputils_a_SOURCES += malloc/dynarray-skeleton.c
-
-## end   gnulib module dynarray
-
 ## begin gnulib module errno
 
 BUILT_SOURCES += $(ERRNO_H)
@@ -574,10 +580,39 @@ if GL_COND_OBJ_ERROR
 libgreputils_a_SOURCES += error.c
 endif
 
-EXTRA_DIST += error.h
-
 ## end   gnulib module error
 
+## begin gnulib module error-h
+
+BUILT_SOURCES += $(ERROR_H)
+
+# We need the following in order to create <error.h> when the system
+# doesn't have one that works.
+if GL_GENERATE_ERROR_H
+error.h: error.in.h $(top_builddir)/config.status $(CXXDEFS_H)
+	$(gl_V_at)$(SED_HEADER_STDOUT) \
+	      -e 's|@''GUARD_PREFIX''@|GL|g' \
+	      -e 's|@''HAVE_ERROR_H''@|$(HAVE_ERROR_H)|g' \
+	      -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+	      -e 's|@''NEXT_ERROR_H''@|$(NEXT_ERROR_H)|g' \
+	      -e 's|@''HAVE_ERROR''@|$(HAVE_ERROR)|g' \
+	      -e 's|@''HAVE_ERROR_AT_LINE''@|$(HAVE_ERROR_AT_LINE)|g' \
+	      -e 's|@''REPLACE_ERROR''@|$(REPLACE_ERROR)|g' \
+	      -e 's|@''REPLACE_ERROR_AT_LINE''@|$(REPLACE_ERROR_AT_LINE)|g' \
+	      -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+	      $(srcdir)/error.in.h > $@-t
+	$(AM_V_at)mv $@-t $@
+else
+error.h: $(top_builddir)/config.status
+	rm -f $@
+endif
+MOSTLYCLEANFILES += error.h error.h-t
+
+EXTRA_DIST += error.in.h
+
+## end   gnulib module error-h
+
 ## begin gnulib module exclude
 
 libgreputils_a_SOURCES += exclude.c
@@ -675,6 +710,8 @@ if GL_COND_OBJ_FDOPENDIR
 libgreputils_a_SOURCES += fdopendir.c
 endif
 
+EXTRA_DIST += dirent-private.h
+
 ## end   gnulib module fdopendir
 
 ## begin gnulib module filename
@@ -908,7 +945,11 @@ endif
 
 ## begin gnulib module getprogname
 
-libgreputils_a_SOURCES += getprogname.h getprogname.c
+if GL_COND_OBJ_GETPROGNAME
+libgreputils_a_SOURCES += getprogname.c
+endif
+
+EXTRA_DIST += getprogname.h
 
 ## end   gnulib module getprogname
 
@@ -932,6 +973,39 @@ EXTRA_DIST += $(top_srcdir)/build-aux/gitlog-to-changelog
 
 ## end   gnulib module gitlog-to-changelog
 
+## begin gnulib module glibc-internal/dynarray
+
+BUILT_SOURCES += malloc/dynarray.gl.h malloc/dynarray-skeleton.gl.h
+
+malloc/dynarray.gl.h: malloc/dynarray.h
+	$(AM_V_GEN)$(MKDIR_P) '%reldir%/malloc'
+	$(AM_V_at)$(SED_HEADER_STDOUT) \
+	  -e '/libc_hidden_proto/d' \
+	  $(srcdir)/malloc/dynarray.h > $@-t
+	$(AM_V_at)mv $@-t $@
+MOSTLYCLEANFILES += malloc/dynarray.gl.h malloc/dynarray.gl.h-t
+
+malloc/dynarray-skeleton.gl.h: malloc/dynarray-skeleton.c
+	$(AM_V_GEN)$(MKDIR_P) '%reldir%/malloc'
+	$(AM_V_at)$(SED_HEADER_STDOUT) \
+	      -e 's|<malloc/dynarray\.h>|<malloc/dynarray.gl.h>|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
+	$(AM_V_at)mv $@-t $@
+MOSTLYCLEANFILES += malloc/dynarray-skeleton.gl.h malloc/dynarray-skeleton.gl.h-t
+
+libgreputils_a_SOURCES += malloc/dynarray_at_failure.c                 malloc/dynarray_emplace_enlarge.c                 malloc/dynarray_finalize.c                 malloc/dynarray_resize.c                 malloc/dynarray_resize_clear.c
+
+EXTRA_DIST += dynarray.h malloc/dynarray-skeleton.c malloc/dynarray.h
+
+EXTRA_libgreputils_a_SOURCES += malloc/dynarray-skeleton.c
+
+## end   gnulib module glibc-internal/dynarray
+
 ## begin gnulib module gnu-web-doc-update
 
 
@@ -1089,7 +1163,7 @@ EXTRA_DIST += ignore-value.h
 ## begin gnulib module intprops
 
 
-EXTRA_DIST += intprops.h
+EXTRA_DIST += intprops-internal.h intprops.h
 
 ## end   gnulib module intprops
 
@@ -1117,6 +1191,8 @@ inttypes.h: inttypes.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_U
 	      -e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \
 	      -e 's/@''HAVE_DECL_STRTOUMAX''@/$(HAVE_DECL_STRTOUMAX)/g' \
 	      -e 's/@''HAVE_IMAXDIV_T''@/$(HAVE_IMAXDIV_T)/g' \
+	      -e 's/@''REPLACE_IMAXABS''@/$(REPLACE_IMAXABS)/g' \
+	      -e 's/@''REPLACE_IMAXDIV''@/$(REPLACE_IMAXDIV)/g' \
 	      -e 's/@''REPLACE_STRTOIMAX''@/$(REPLACE_STRTOIMAX)/g' \
 	      -e 's/@''REPLACE_STRTOUMAX''@/$(REPLACE_STRTOUMAX)/g' \
 	      -e 's/@''INT32_MAX_LT_INTMAX_MAX''@/$(INT32_MAX_LT_INTMAX_MAX)/g' \
@@ -1851,26 +1927,6 @@ EXTRA_DIST += stat-time.h
 
 ## end   gnulib module stat-time
 
-## begin gnulib module stdalign
-
-BUILT_SOURCES += $(STDALIGN_H)
-
-# We need the following in order to create <stdalign.h> when the system
-# doesn't have one that works.
-if GL_GENERATE_STDALIGN_H
-stdalign.h: stdalign.in.h $(top_builddir)/config.status
-	$(gl_V_at)$(SED_HEADER_TO_AT_t) $(srcdir)/stdalign.in.h
-	$(AM_V_at)mv $@-t $@
-else
-stdalign.h: $(top_builddir)/config.status
-	rm -f $@
-endif
-MOSTLYCLEANFILES += stdalign.h stdalign.h-t
-
-EXTRA_DIST += stdalign.in.h
-
-## end   gnulib module stdalign
-
 ## begin gnulib module stdarg
 
 BUILT_SOURCES += $(STDARG_H)
@@ -1897,27 +1953,26 @@ EXTRA_DIST += stdarg.in.h
 
 ## end   gnulib module stdarg
 
-## begin gnulib module stdbool
+## begin gnulib module stdckdint
 
-BUILT_SOURCES += $(STDBOOL_H)
+BUILT_SOURCES += $(STDCKDINT_H)
 
-# We need the following in order to create <stdbool.h> when the system
-# doesn't have one that works.
-if GL_GENERATE_STDBOOL_H
-stdbool.h: stdbool.in.h $(top_builddir)/config.status
+# We need the following in order to create <stdckdint.h> when the system
+# doesn't have one that works with the given compiler.
+if GL_GENERATE_STDCKDINT_H
+stdckdint.h: stdckdint.in.h $(top_builddir)/config.status
 	$(gl_V_at)$(SED_HEADER_STDOUT) \
-	  -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' \
-	  $(srcdir)/stdbool.in.h > $@-t
+	  $(srcdir)/stdckdint.in.h > $@-t
 	$(AM_V_at)mv $@-t $@
 else
-stdbool.h: $(top_builddir)/config.status
+stdckdint.h: $(top_builddir)/config.status
 	rm -f $@
 endif
-MOSTLYCLEANFILES += stdbool.h stdbool.h-t
+MOSTLYCLEANFILES += stdckdint.h stdckdint.h-t
 
-EXTRA_DIST += stdbool.in.h
+EXTRA_DIST += intprops-internal.h stdckdint.in.h
 
-## end   gnulib module stdbool
+## end   gnulib module stdckdint
 
 ## begin gnulib module stddef
 
@@ -2076,7 +2131,9 @@ stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
 	      -e 's|@''HAVE_DECL_FTELLO''@|$(HAVE_DECL_FTELLO)|g' \
 	      -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \
 	      -e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \
+	      -e 's|@''HAVE_DECL_GETW''@|$(HAVE_DECL_GETW)|g' \
 	      -e 's|@''HAVE_DECL_OBSTACK_PRINTF''@|$(HAVE_DECL_OBSTACK_PRINTF)|g' \
+	      -e 's|@''HAVE_DECL_PUTW''@|$(HAVE_DECL_PUTW)|g' \
 	      -e 's|@''HAVE_DECL_SNPRINTF''@|$(HAVE_DECL_SNPRINTF)|g' \
 	      -e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \
 	      -e 's|@''HAVE_DPRINTF''@|$(HAVE_DPRINTF)|g' \
@@ -2161,10 +2218,12 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
 	      -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_GETPROGNAME''@/$(GL_GNULIB_GETPROGNAME)/g' \
 	      -e 's/@''GNULIB_GETSUBOPT''@/$(GL_GNULIB_GETSUBOPT)/g' \
 	      -e 's/@''GNULIB_GRANTPT''@/$(GL_GNULIB_GRANTPT)/g' \
 	      -e 's/@''GNULIB_MALLOC_GNU''@/$(GL_GNULIB_MALLOC_GNU)/g' \
 	      -e 's/@''GNULIB_MALLOC_POSIX''@/$(GL_GNULIB_MALLOC_POSIX)/g' \
+	      -e 's/@''GNULIB_MBSTOWCS''@/$(GL_GNULIB_MBSTOWCS)/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' \
@@ -2210,6 +2269,8 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
 	      -e 's|@''HAVE_DECL_FCVT''@|$(HAVE_DECL_FCVT)|g' \
 	      -e 's|@''HAVE_DECL_GCVT''@|$(HAVE_DECL_GCVT)|g' \
 	      -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \
+	      -e 's|@''HAVE_DECL_PROGRAM_INVOCATION_NAME''@|$(HAVE_DECL_PROGRAM_INVOCATION_NAME)|g' \
+	      -e 's|@''HAVE_GETPROGNAME''@|$(HAVE_GETPROGNAME)|g' \
 	      -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \
 	      -e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \
 	      -e 's|@''HAVE_INITSTATE''@|$(HAVE_INITSTATE)|g' \
@@ -2245,17 +2306,26 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
 	      -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \
 	      -e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \
 	      -e 's|@''HAVE_DECL_UNSETENV''@|$(HAVE_DECL_UNSETENV)|g' \
+	      -e 's|@''REPLACE__EXIT''@|$(REPLACE__EXIT)|g' \
 	      -e 's|@''REPLACE_ALIGNED_ALLOC''@|$(REPLACE_ALIGNED_ALLOC)|g' \
 	      -e 's|@''REPLACE_CALLOC_FOR_CALLOC_GNU''@|$(REPLACE_CALLOC_FOR_CALLOC_GNU)|g' \
 	      -e 's|@''REPLACE_CALLOC_FOR_CALLOC_POSIX''@|$(REPLACE_CALLOC_FOR_CALLOC_POSIX)|g' \
 	      -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \
 	      -e 's|@''REPLACE_FREE''@|$(REPLACE_FREE)|g' \
+	      -e 's|@''REPLACE_GETLOADAVG''@|$(REPLACE_GETLOADAVG)|g' \
+	      -e 's|@''REPLACE_GETPROGNAME''@|$(REPLACE_GETPROGNAME)|g' \
+	      -e 's|@''REPLACE_GETSUBOPT''@|$(REPLACE_GETSUBOPT)|g' \
 	      -e 's|@''REPLACE_INITSTATE''@|$(REPLACE_INITSTATE)|g' \
 	      -e 's|@''REPLACE_MALLOC_FOR_MALLOC_GNU''@|$(REPLACE_MALLOC_FOR_MALLOC_GNU)|g' \
 	      -e 's|@''REPLACE_MALLOC_FOR_MALLOC_POSIX''@|$(REPLACE_MALLOC_FOR_MALLOC_POSIX)|g' \
+	      -e 's|@''REPLACE_MB_CUR_MAX''@|$(REPLACE_MB_CUR_MAX)|g' \
+	      -e 's|@''REPLACE_MBSTOWCS''@|$(REPLACE_MBSTOWCS)|g' \
 	      -e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \
+	      -e 's|@''REPLACE_MKOSTEMP''@|$(REPLACE_MKOSTEMP)|g' \
+	      -e 's|@''REPLACE_MKOSTEMPS''@|$(REPLACE_MKOSTEMPS)|g' \
 	      -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \
 	      -e 's|@''REPLACE_POSIX_MEMALIGN''@|$(REPLACE_POSIX_MEMALIGN)|g' \
+	      -e 's|@''REPLACE_POSIX_OPENPT''@|$(REPLACE_POSIX_OPENPT)|g' \
 	      -e 's|@''REPLACE_PTSNAME''@|$(REPLACE_PTSNAME)|g' \
 	      -e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \
 	      -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \
@@ -2371,6 +2441,7 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
 	      -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_MEMSET_EXPLICIT''@/$(GL_GNULIB_MEMSET_EXPLICIT)/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' \
@@ -2402,6 +2473,7 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
 	      -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \
 	      -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \
 	      -e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \
+	      -e 's|@''HAVE_MEMSET_EXPLICIT''@|$(HAVE_MEMSET_EXPLICIT)|g' \
 	      -e 's|@''HAVE_RAWMEMCHR''@|$(HAVE_RAWMEMCHR)|g' \
 	      -e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \
 	      -e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \
@@ -2422,7 +2494,9 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
 	      -e 's|@''REPLACE_FFSLL''@|$(REPLACE_FFSLL)|g' \
 	      -e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \
 	      -e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \
+	      -e 's|@''REPLACE_MEMPCPY''@|$(REPLACE_MEMPCPY)|g' \
 	      -e 's|@''REPLACE_FREE''@|$(REPLACE_FREE)|g' \
+	      -e 's|@''REPLACE_STPCPY''@|$(REPLACE_STPCPY)|g' \
 	      -e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \
 	      -e 's|@''REPLACE_STRCHRNUL''@|$(REPLACE_STRCHRNUL)|g' \
 	      -e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \
@@ -2627,7 +2701,7 @@ libgreputils_a_SOURCES += glthread/threadlib.c
 
 ## end   gnulib module threadlib
 
-## begin gnulib module time
+## begin gnulib module time-h
 
 BUILT_SOURCES += time.h
 
@@ -2646,6 +2720,7 @@ time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
 	      -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_TIME''@/$(GL_GNULIB_TIME)/g' \
 	      -e 's/@''GNULIB_TIMEGM''@/$(GL_GNULIB_TIMEGM)/g' \
 	      -e 's/@''GNULIB_TIMESPEC_GET''@/$(GL_GNULIB_TIMESPEC_GET)/g' \
 	      -e 's/@''GNULIB_TIMESPEC_GETRES''@/$(GL_GNULIB_TIMESPEC_GETRES)/g' \
@@ -2667,7 +2742,9 @@ time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
 	      -e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \
 	      -e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \
 	      -e 's|@''REPLACE_STRFTIME''@|$(REPLACE_STRFTIME)|g' \
+	      -e 's|@''REPLACE_TIME''@|$(REPLACE_TIME)|g' \
 	      -e 's|@''REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \
+	      -e 's|@''REPLACE_TIMESPEC_GET''@|$(REPLACE_TIMESPEC_GET)|g' \
 	      -e 's|@''REPLACE_TZSET''@|$(REPLACE_TZSET)|g' \
 	      -e 's|@''PTHREAD_H_DEFINES_STRUCT_TIMESPEC''@|$(PTHREAD_H_DEFINES_STRUCT_TIMESPEC)|g' \
 	      -e 's|@''SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
@@ -2683,7 +2760,7 @@ MOSTLYCLEANFILES += time.h time.h-t
 
 EXTRA_DIST += time.in.h
 
-## end   gnulib module time
+## end   gnulib module time-h
 
 ## begin gnulib module trim
 
@@ -2848,6 +2925,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
 	      -e 's|@''REPLACE_COPY_FILE_RANGE''@|$(REPLACE_COPY_FILE_RANGE)|g' \
 	      -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \
 	      -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \
+	      -e 's|@''REPLACE_DUP3''@|$(REPLACE_DUP3)|g' \
 	      -e 's|@''REPLACE_EXECL''@|$(REPLACE_EXECL)|g' \
 	      -e 's|@''REPLACE_EXECLE''@|$(REPLACE_EXECLE)|g' \
 	      -e 's|@''REPLACE_EXECLP''@|$(REPLACE_EXECLP)|g' \
@@ -2857,10 +2935,12 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
 	      -e 's|@''REPLACE_EXECVPE''@|$(REPLACE_EXECVPE)|g' \
 	      -e 's|@''REPLACE_FACCESSAT''@|$(REPLACE_FACCESSAT)|g' \
 	      -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \
+	      -e 's|@''REPLACE_FDATASYNC''@|$(REPLACE_FDATASYNC)|g' \
 	      -e 's|@''REPLACE_FTRUNCATE''@|$(REPLACE_FTRUNCATE)|g' \
 	      -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \
 	      -e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \
 	      -e 's|@''REPLACE_GETDTABLESIZE''@|$(REPLACE_GETDTABLESIZE)|g' \
+	      -e 's|@''REPLACE_GETENTROPY''@|$(REPLACE_GETENTROPY)|g' \
 	      -e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \
 	      -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \
 	      -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \
@@ -2871,12 +2951,14 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
 	      -e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \
 	      -e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \
 	      -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \
+	      -e 's|@''REPLACE_PIPE2''@|$(REPLACE_PIPE2)|g' \
 	      -e 's|@''REPLACE_PREAD''@|$(REPLACE_PREAD)|g' \
 	      -e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \
 	      -e 's|@''REPLACE_READ''@|$(REPLACE_READ)|g' \
 	      -e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \
 	      -e 's|@''REPLACE_READLINKAT''@|$(REPLACE_READLINKAT)|g' \
 	      -e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \
+	      -e 's|@''REPLACE_SETHOSTNAME''@|$(REPLACE_SETHOSTNAME)|g' \
 	      -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \
 	      -e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \
 	      -e 's|@''REPLACE_SYMLINKAT''@|$(REPLACE_SYMLINKAT)|g' \
@@ -3140,7 +3222,12 @@ wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
 	      -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \
 	      -e 's|@''REPLACE_WCSWIDTH''@|$(REPLACE_WCSWIDTH)|g' \
 	      -e 's|@''REPLACE_WCSFTIME''@|$(REPLACE_WCSFTIME)|g' \
+	      -e 's|@''REPLACE_WCSCMP''@|$(REPLACE_WCSCMP)|g' \
+	      -e 's|@''REPLACE_WCSNCMP''@|$(REPLACE_WCSNCMP)|g' \
+	      -e 's|@''REPLACE_WCSSTR''@|$(REPLACE_WCSSTR)|g' \
 	      -e 's|@''REPLACE_WCSTOK''@|$(REPLACE_WCSTOK)|g' \
+	      -e 's|@''REPLACE_WMEMCMP''@|$(REPLACE_WMEMCMP)|g' \
+	      -e 's|@''REPLACE_WMEMPCPY''@|$(REPLACE_WMEMPCPY)|g' \
 	      -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
 	      -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
 	      -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
diff --git a/lib/hard-locale.c b/lib/hard-locale.c
index f7fbc470..c01fce53 100644
--- a/lib/hard-locale.c
+++ b/lib/hard-locale.c
@@ -1,6 +1,6 @@
 /* hard-locale.c -- Determine whether a locale is hard.
 
-   Copyright (C) 1997-1999, 2002-2004, 2006-2007, 2009-2022 Free Software
+   Copyright (C) 1997-1999, 2002-2004, 2006-2007, 2009-2023 Free Software
    Foundation, Inc.
 
    This file is free software: you can redistribute it and/or modify
@@ -21,6 +21,7 @@
 #include "hard-locale.h"
 
 #include <locale.h>
+#include <stdlib.h>
 #include <string.h>
 
 bool
@@ -31,5 +32,16 @@ hard_locale (int category)
   if (setlocale_null_r (category, locale, sizeof (locale)))
     return false;
 
-  return !(strcmp (locale, "C") == 0 || strcmp (locale, "POSIX") == 0);
+  if (!(strcmp (locale, "C") == 0 || strcmp (locale, "POSIX") == 0))
+    return true;
+
+#if defined __ANDROID__
+  /* On Android 5.0 or newer, it is possible to set a locale that has the same
+     name as the "C" locale but in fact uses UTF-8 encoding.  Cf. test case 2 in
+     <https://lists.gnu.org/archive/html/bug-gnulib/2023-01/msg00141.html>.  */
+  if (MB_CUR_MAX > 1)
+    return true;
+#endif
+
+  return false;
 }
diff --git a/lib/hard-locale.h b/lib/hard-locale.h
index 6066f4ed..5123d71d 100644
--- a/lib/hard-locale.h
+++ b/lib/hard-locale.h
@@ -1,6 +1,6 @@
 /* Determine whether a locale is hard.
 
-   Copyright (C) 1999, 2003-2004, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2003-2004, 2009-2023 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
@@ -18,11 +18,11 @@
 #ifndef HARD_LOCALE_H_
 # define HARD_LOCALE_H_ 1
 
-# include <stdbool.h>
-
 /* Return true if the specified CATEGORY of the current locale is hard, i.e.
    different from the C or POSIX locale that has a fixed behavior.
-   CATEGORY must be one of the LC_* values, but not LC_ALL.  */
+   CATEGORY must be one of the LC_* values, but not LC_ALL.
+   Note: This function uses the current global locale; it ignores the
+   per-thread locale.  */
 extern bool hard_locale (int category);
 
 #endif /* HARD_LOCALE_H_ */
diff --git a/lib/hash.c b/lib/hash.c
index eb723416..918aa0d1 100644
--- a/lib/hash.c
+++ b/lib/hash.c
@@ -1,6 +1,6 @@
 /* hash - hashing table processing.
 
-   Copyright (C) 1998-2004, 2006-2007, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 1998-2004, 2006-2007, 2009-2023 Free Software Foundation, Inc.
 
    Written by Jim Meyering, 1992.
 
diff --git a/lib/hash.h b/lib/hash.h
index ebfc7407..be42e5af 100644
--- a/lib/hash.h
+++ b/lib/hash.h
@@ -1,5 +1,5 @@
 /* hash - hashing table processing.
-   Copyright (C) 1998-1999, 2001, 2003, 2009-2022 Free Software Foundation,
+   Copyright (C) 1998-1999, 2001, 2003, 2009-2023 Free Software Foundation,
    Inc.
    Written by Jim Meyering <meyering@ascend.com>, 1998.
 
@@ -24,8 +24,14 @@
 #ifndef HASH_H_
 # define HASH_H_
 
+/* This file uses _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_DEPRECATED,
+   _GL_ATTRIBUTE_MALLOC, _GL_ATTRIBUTE_NODISCARD, _GL_ATTRIBUTE_PURE,
+   _GL_ATTRIBUTE_RETURNS_NONNULL.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 # include <stdio.h>
-# include <stdbool.h>
 
 # ifdef __cplusplus
 extern "C" {
diff --git a/lib/i-ring.c b/lib/i-ring.c
index 659c61c0..7eb2939d 100644
--- a/lib/i-ring.c
+++ b/lib/i-ring.c
@@ -1,5 +1,5 @@
 /* a simple ring buffer
-   Copyright (C) 2006, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2009-2023 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
diff --git a/lib/i-ring.h b/lib/i-ring.h
index 58ba72f4..e10b5d98 100644
--- a/lib/i-ring.h
+++ b/lib/i-ring.h
@@ -1,5 +1,5 @@
 /* definitions for a simple ring buffer
-   Copyright (C) 2006, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2009-2023 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
@@ -14,11 +14,14 @@
    You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
-#include <stdbool.h>
-#include "verify.h"
+
+/* This file uses _GL_ATTRIBUTE_PURE.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
 
 enum { I_RING_SIZE = 4 };
-verify (1 <= I_RING_SIZE);
+static_assert (1 <= I_RING_SIZE);
 
 /* When ir_empty is true, the ring is empty.
    Otherwise, ir_data[B..F] are defined, where B..F is the contiguous
diff --git a/lib/ialloc.c b/lib/ialloc.c
index 43c10433..cd44d8ca 100644
--- a/lib/ialloc.c
+++ b/lib/ialloc.c
@@ -1,6 +1,6 @@
 /* malloc with idx_t rather than size_t
 
-   Copyright 2021-2022 Free Software Foundation, Inc.
+   Copyright 2021-2023 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
diff --git a/lib/ialloc.h b/lib/ialloc.h
index 37cf4bfb..22f57a47 100644
--- a/lib/ialloc.h
+++ b/lib/ialloc.h
@@ -1,6 +1,6 @@
 /* ialloc.h -- malloc with idx_t rather than size_t
 
-   Copyright 2021-2022 Free Software Foundation, Inc.
+   Copyright 2021-2023 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
@@ -18,15 +18,18 @@
 #ifndef IALLOC_H_
 #define IALLOC_H_
 
+/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, _GL_ATTRIBUTE_COLD,
+   _GL_ATTRIBUTE_MALLOC.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #include "idx.h"
 
 #include <errno.h>
 #include <stdint.h>
 #include <stdlib.h>
 
-#ifndef _GL_INLINE_HEADER_BEGIN
- #error "Please include config.h first."
-#endif
 _GL_INLINE_HEADER_BEGIN
 #ifndef IALLOC_INLINE
 # define IALLOC_INLINE _GL_INLINE
@@ -43,6 +46,9 @@ _gl_alloc_nomem (void)
   return NULL;
 }
 
+/* imalloc (size) is like malloc (size).
+   It returns a non-NULL pointer to size bytes of memory.
+   Upon failure, it returns NULL with errno set.  */
 IALLOC_INLINE
 _GL_ATTRIBUTE_MALLOC /*_GL_ATTRIBUTE_DEALLOC_FREE*/
 void *
@@ -51,6 +57,9 @@ imalloc (idx_t s)
   return s <= SIZE_MAX ? malloc (s) : _gl_alloc_nomem ();
 }
 
+/* irealloc (ptr, size) is like realloc (ptr, size).
+   It returns a non-NULL pointer to size bytes of memory.
+   Upon failure, it returns NULL with errno set.  */
 IALLOC_INLINE
 /*_GL_ATTRIBUTE_DEALLOC_FREE*/
 void *
@@ -61,6 +70,9 @@ irealloc (void *p, idx_t s)
   return s <= SIZE_MAX ? realloc (p, s | !s) : _gl_alloc_nomem ();
 }
 
+/* icalloc (num, size) is like calloc (num, size).
+   It returns a non-NULL pointer to num * size bytes of memory.
+   Upon failure, it returns NULL with errno set.  */
 IALLOC_INLINE
 _GL_ATTRIBUTE_MALLOC /*_GL_ATTRIBUTE_DEALLOC_FREE*/
 void *
@@ -81,6 +93,9 @@ icalloc (idx_t n, idx_t s)
   return calloc (n, s);
 }
 
+/* ireallocarray (ptr, num, size) is like reallocarray (ptr, num, size).
+   It returns a non-NULL pointer to num * size bytes of memory.
+   Upon failure, it returns NULL with errno set.  */
 IALLOC_INLINE void *
 ireallocarray (void *p, idx_t n, idx_t s)
 {
@@ -97,4 +112,6 @@ ireallocarray (void *p, idx_t n, idx_t s)
 }
 #endif
 
+_GL_INLINE_HEADER_END
+
 #endif
diff --git a/lib/iconv.c b/lib/iconv.c
index efab53d8..9f6f7a90 100644
--- a/lib/iconv.c
+++ b/lib/iconv.c
@@ -1,5 +1,5 @@
 /* Character set conversion.
-   Copyright (C) 1999-2001, 2007, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 1999-2001, 2007, 2009-2023 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
diff --git a/lib/iconv.in.h b/lib/iconv.in.h
index 4c5a31c3..56de44ca 100644
--- a/lib/iconv.in.h
+++ b/lib/iconv.in.h
@@ -1,6 +1,6 @@
 /* A GNU-like <iconv.h>.
 
-   Copyright (C) 2007-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007-2023 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
@@ -28,6 +28,11 @@
 #ifndef _@GUARD_PREFIX@_ICONV_H
 #define _@GUARD_PREFIX@_ICONV_H
 
+/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
 
 /* The definition of _GL_ARG_NONNULL is copied here.  */
diff --git a/lib/iconv_close.c b/lib/iconv_close.c
index 2d7fb17e..41ea96e7 100644
--- a/lib/iconv_close.c
+++ b/lib/iconv_close.c
@@ -1,5 +1,5 @@
 /* Character set conversion.
-   Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009-2023 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
diff --git a/lib/iconv_open-aix.gperf b/lib/iconv_open-aix.gperf
index 024da215..c1625d1d 100644
--- a/lib/iconv_open-aix.gperf
+++ b/lib/iconv_open-aix.gperf
@@ -1,5 +1,5 @@
 /* Character set conversion.
-   Copyright (C) 2007, 2020-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2020-2023 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
diff --git a/lib/iconv_open-hpux.gperf b/lib/iconv_open-hpux.gperf
index 12057505..691995c8 100644
--- a/lib/iconv_open-hpux.gperf
+++ b/lib/iconv_open-hpux.gperf
@@ -1,5 +1,5 @@
 /* Character set conversion.
-   Copyright (C) 2007, 2020-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2020-2023 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
diff --git a/lib/iconv_open-irix.gperf b/lib/iconv_open-irix.gperf
index 92a2689d..a6b84f91 100644
--- a/lib/iconv_open-irix.gperf
+++ b/lib/iconv_open-irix.gperf
@@ -1,5 +1,5 @@
 /* Character set conversion.
-   Copyright (C) 2007, 2020-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2020-2023 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
diff --git a/lib/iconv_open-osf.gperf b/lib/iconv_open-osf.gperf
index 746f5630..9cffd480 100644
--- a/lib/iconv_open-osf.gperf
+++ b/lib/iconv_open-osf.gperf
@@ -1,5 +1,5 @@
 /* Character set conversion.
-   Copyright (C) 2007, 2020-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2020-2023 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
diff --git a/lib/iconv_open-solaris.gperf b/lib/iconv_open-solaris.gperf
index fbd6f9d7..c5226833 100644
--- a/lib/iconv_open-solaris.gperf
+++ b/lib/iconv_open-solaris.gperf
@@ -1,5 +1,5 @@
 /* Character set conversion.
-   Copyright (C) 2007, 2009, 2020-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009, 2020-2023 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
diff --git a/lib/iconv_open-zos.gperf b/lib/iconv_open-zos.gperf
index 6912485e..f188e139 100644
--- a/lib/iconv_open-zos.gperf
+++ b/lib/iconv_open-zos.gperf
@@ -1,5 +1,5 @@
 /* Character set conversion.
-   Copyright (C) 2019-2022 Free Software Foundation, Inc.
+   Copyright (C) 2019-2023 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
diff --git a/lib/iconv_open.c b/lib/iconv_open.c
index 02c240ee..be70de2b 100644
--- a/lib/iconv_open.c
+++ b/lib/iconv_open.c
@@ -1,5 +1,5 @@
 /* Character set conversion.
-   Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009-2023 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
diff --git a/lib/idx.h b/lib/idx.h
index c3669dda..23020b7e 100644
--- a/lib/idx.h
+++ b/lib/idx.h
@@ -1,5 +1,5 @@
 /* A type for indices and sizes.
-   Copyright (C) 2020-2022 Free Software Foundation, Inc.
+   Copyright (C) 2020-2023 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
diff --git a/lib/ignore-value.h b/lib/ignore-value.h
index 173b63f5..f0b569af 100644
--- a/lib/ignore-value.h
+++ b/lib/ignore-value.h
@@ -1,6 +1,6 @@
 /* ignore a function return without a compiler warning.  -*- coding: utf-8 -*-
 
-   Copyright (C) 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 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
diff --git a/lib/intprops-internal.h b/lib/intprops-internal.h
new file mode 100644
index 00000000..0467a9ca
--- /dev/null
+++ b/lib/intprops-internal.h
@@ -0,0 +1,392 @@
+/* intprops-internal.h -- properties of integer types not visible to users
+
+   Copyright (C) 2001-2023 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.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.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+#ifndef _GL_INTPROPS_INTERNAL_H
+#define _GL_INTPROPS_INTERNAL_H
+
+#include <limits.h>
+
+/* Return a value with the common real type of E and V and the value of V.
+   Do not evaluate E.  */
+#define _GL_INT_CONVERT(e, v) ((1 ? 0 : (e)) + (v))
+
+/* Act like _GL_INT_CONVERT (E, -V) but work around a bug in IRIX 6.5 cc; see
+   <https://lists.gnu.org/r/bug-gnulib/2011-05/msg00406.html>.  */
+#define _GL_INT_NEGATE_CONVERT(e, v) ((1 ? 0 : (e)) - (v))
+
+/* The extra casts in the following macros work around compiler bugs,
+   e.g., in Cray C 5.0.3.0.  */
+
+/* True if the real type T is signed.  */
+#define _GL_TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
+
+/* Return 1 if the real expression E, after promotion, has a
+   signed or floating type.  Do not evaluate E.  */
+#define _GL_EXPR_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0)
+
+
+/* Minimum and maximum values for integer types and expressions.  */
+
+/* The width in bits of the integer type or expression T.
+   Do not evaluate T.  T must not be a bit-field expression.
+   Padding bits are not supported; this is checked at compile-time below.  */
+#define _GL_TYPE_WIDTH(t) (sizeof (t) * CHAR_BIT)
+
+/* The maximum and minimum values for the type of the expression E,
+   after integer promotion.  E is not evaluated.  */
+#define _GL_INT_MINIMUM(e)                                              \
+  (_GL_EXPR_SIGNED (e)                                                  \
+   ? ~ _GL_SIGNED_INT_MAXIMUM (e)                                       \
+   : _GL_INT_CONVERT (e, 0))
+#define _GL_INT_MAXIMUM(e)                                              \
+  (_GL_EXPR_SIGNED (e)                                                  \
+   ? _GL_SIGNED_INT_MAXIMUM (e)                                         \
+   : _GL_INT_NEGATE_CONVERT (e, 1))
+#define _GL_SIGNED_INT_MAXIMUM(e)                                       \
+  (((_GL_INT_CONVERT (e, 1) << (_GL_TYPE_WIDTH (+ (e)) - 2)) - 1) * 2 + 1)
+
+/* Work around OpenVMS incompatibility with C99.  */
+#if !defined LLONG_MAX && defined __INT64_MAX
+# define LLONG_MAX __INT64_MAX
+# define LLONG_MIN __INT64_MIN
+#endif
+
+/* This include file assumes that signed types are two's complement without
+   padding bits; the above macros have undefined behavior otherwise.
+   If this is a problem for you, please let us know how to fix it for your host.
+   This assumption is tested by the intprops-tests module.  */
+
+/* Does the __typeof__ keyword work?  This could be done by
+   'configure', but for now it's easier to do it by hand.  */
+#if (2 <= __GNUC__ \
+     || (4 <= __clang_major__) \
+     || (1210 <= __IBMC__ && defined __IBM__TYPEOF__) \
+     || (0x5110 <= __SUNPRO_C && !__STDC__))
+# define _GL_HAVE___TYPEOF__ 1
+#else
+# define _GL_HAVE___TYPEOF__ 0
+#endif
+
+/* Return 1 if the integer type or expression T might be signed.  Return 0
+   if it is definitely unsigned.  T must not be a bit-field expression.
+   This macro does not evaluate its argument, and expands to an
+   integer constant expression.  */
+#if _GL_HAVE___TYPEOF__
+# define _GL_SIGNED_TYPE_OR_EXPR(t) _GL_TYPE_SIGNED (__typeof__ (t))
+#else
+# define _GL_SIGNED_TYPE_OR_EXPR(t) 1
+#endif
+
+/* Return 1 if - A would overflow in [MIN,MAX] arithmetic.
+   A should not have side effects, and A's type should be an
+   integer with minimum value MIN and maximum MAX.  */
+#define _GL_INT_NEGATE_RANGE_OVERFLOW(a, min, max) \
+  ((min) < 0 ? (a) < - (max) : 0 < (a))
+
+/* True if __builtin_add_overflow (A, B, P) and __builtin_sub_overflow
+   (A, B, P) work when P is non-null.  */
+#ifdef __EDG__
+/* EDG-based compilers like nvc 22.1 cannot add 64-bit signed to unsigned
+   <https://bugs.gnu.org/53256>.  */
+# define _GL_HAS_BUILTIN_ADD_OVERFLOW 0
+#elif defined __has_builtin
+# define _GL_HAS_BUILTIN_ADD_OVERFLOW __has_builtin (__builtin_add_overflow)
+/* __builtin_{add,sub}_overflow exists but is not reliable in GCC 5.x and 6.x,
+   see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98269>.  */
+#elif 7 <= __GNUC__
+# define _GL_HAS_BUILTIN_ADD_OVERFLOW 1
+#else
+# define _GL_HAS_BUILTIN_ADD_OVERFLOW 0
+#endif
+
+/* True if __builtin_mul_overflow (A, B, P) works when P is non-null.  */
+#if defined __clang_major__ && __clang_major__ < 14
+/* Work around Clang bug <https://bugs.llvm.org/show_bug.cgi?id=16404>.  */
+# define _GL_HAS_BUILTIN_MUL_OVERFLOW 0
+#else
+# define _GL_HAS_BUILTIN_MUL_OVERFLOW _GL_HAS_BUILTIN_ADD_OVERFLOW
+#endif
+
+/* True if __builtin_add_overflow_p (A, B, C) works, and similarly for
+   __builtin_sub_overflow_p and __builtin_mul_overflow_p.  */
+#ifdef __EDG__
+/* In EDG-based compilers like ICC 2021.3 and earlier,
+   __builtin_add_overflow_p etc. are not treated as integral constant
+   expressions even when all arguments are.  */
+# define _GL_HAS_BUILTIN_OVERFLOW_P 0
+#elif defined __has_builtin
+# define _GL_HAS_BUILTIN_OVERFLOW_P __has_builtin (__builtin_mul_overflow_p)
+#else
+# define _GL_HAS_BUILTIN_OVERFLOW_P (7 <= __GNUC__)
+#endif
+
+#if (!defined _GL_STDCKDINT_H && 202311 <= __STDC_VERSION__ \
+     && ! (_GL_HAS_BUILTIN_ADD_OVERFLOW && _GL_HAS_BUILTIN_MUL_OVERFLOW))
+# include <stdckdint.h>
+#endif
+
+/* Store the low-order bits of A + B, A - B, A * B, respectively, into *R.
+   Return 1 if the result overflows.  Arguments should not have side
+   effects and A, B and *R can be of any integer type other than char,
+   bool, a bit-precise integer type, or an enumeration type.  */
+#if _GL_HAS_BUILTIN_ADD_OVERFLOW
+# define _GL_INT_ADD_WRAPV(a, b, r) __builtin_add_overflow (a, b, r)
+# define _GL_INT_SUBTRACT_WRAPV(a, b, r) __builtin_sub_overflow (a, b, r)
+#elif defined ckd_add && defined ckd_sub && !defined _GL_STDCKDINT_H
+# define _GL_INT_ADD_WRAPV(a, b, r) ckd_add (r, + (a), + (b))
+# define _GL_INT_SUBTRACT_WRAPV(a, b, r) ckd_sub (r, + (a), + (b))
+#else
+# define _GL_INT_ADD_WRAPV(a, b, r) \
+   _GL_INT_OP_WRAPV (a, b, r, +, _GL_INT_ADD_RANGE_OVERFLOW)
+# define _GL_INT_SUBTRACT_WRAPV(a, b, r) \
+   _GL_INT_OP_WRAPV (a, b, r, -, _GL_INT_SUBTRACT_RANGE_OVERFLOW)
+#endif
+#if _GL_HAS_BUILTIN_MUL_OVERFLOW
+# if ((9 < __GNUC__ + (3 <= __GNUC_MINOR__) \
+       || (__GNUC__ == 8 && 4 <= __GNUC_MINOR__)) \
+      && !defined __EDG__)
+#  define _GL_INT_MULTIPLY_WRAPV(a, b, r) __builtin_mul_overflow (a, b, r)
+# else
+   /* Work around GCC bug 91450.  */
+#  define _GL_INT_MULTIPLY_WRAPV(a, b, r) \
+    ((!_GL_SIGNED_TYPE_OR_EXPR (*(r)) && _GL_EXPR_SIGNED (a) && _GL_EXPR_SIGNED (b) \
+      && _GL_INT_MULTIPLY_RANGE_OVERFLOW (a, b, 0, (__typeof__ (*(r))) -1)) \
+     ? ((void) __builtin_mul_overflow (a, b, r), 1) \
+     : __builtin_mul_overflow (a, b, r))
+# endif
+#elif defined ckd_mul && !defined _GL_STDCKDINT_H
+# define _GL_INT_MULTIPLY_WRAPV(a, b, r) ckd_mul (r, + (a), + (b))
+#else
+# define _GL_INT_MULTIPLY_WRAPV(a, b, r) \
+   _GL_INT_OP_WRAPV (a, b, r, *, _GL_INT_MULTIPLY_RANGE_OVERFLOW)
+#endif
+
+/* Nonzero if this compiler has GCC bug 68193 or Clang bug 25390.  See:
+   https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68193
+   https://llvm.org/bugs/show_bug.cgi?id=25390
+   For now, assume all versions of GCC-like compilers generate bogus
+   warnings for _Generic.  This matters only for compilers that
+   lack relevant builtins.  */
+#if __GNUC__ || defined __clang__
+# define _GL__GENERIC_BOGUS 1
+#else
+# define _GL__GENERIC_BOGUS 0
+#endif
+
+/* Store the low-order bits of A <op> B into *R, where OP specifies
+   the operation and OVERFLOW the overflow predicate.  Return 1 if the
+   result overflows.  Arguments should not have side effects,
+   and A, B and *R can be of any integer type other than char, bool, a
+   bit-precise integer type, or an enumeration type.  */
+#if 201112 <= __STDC_VERSION__ && !_GL__GENERIC_BOGUS
+# define _GL_INT_OP_WRAPV(a, b, r, op, overflow) \
+   (_Generic \
+    (*(r), \
+     signed char: \
+       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+                        signed char, SCHAR_MIN, SCHAR_MAX), \
+     unsigned char: \
+       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+                        unsigned char, 0, UCHAR_MAX), \
+     short int: \
+       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+                        short int, SHRT_MIN, SHRT_MAX), \
+     unsigned short int: \
+       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+                        unsigned short int, 0, USHRT_MAX), \
+     int: \
+       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+                        int, INT_MIN, INT_MAX), \
+     unsigned int: \
+       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+                        unsigned int, 0, UINT_MAX), \
+     long int: \
+       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
+                        long int, LONG_MIN, LONG_MAX), \
+     unsigned long int: \
+       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
+                        unsigned long int, 0, ULONG_MAX), \
+     long long int: \
+       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \
+                        long long int, LLONG_MIN, LLONG_MAX), \
+     unsigned long long int: \
+       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \
+                        unsigned long long int, 0, ULLONG_MAX)))
+#else
+/* Store the low-order bits of A <op> B into *R, where OP specifies
+   the operation and OVERFLOW the overflow predicate.  If *R is
+   signed, its type is ST with bounds SMIN..SMAX; otherwise its type
+   is UT with bounds U..UMAX.  ST and UT are narrower than int.
+   Return 1 if the result overflows.  Arguments should not have side
+   effects, and A, B and *R can be of any integer type other than
+   char, bool, a bit-precise integer type, or an enumeration type.  */
+# if _GL_HAVE___TYPEOF__
+#  define _GL_INT_OP_WRAPV_SMALLISH(a,b,r,op,overflow,st,smin,smax,ut,umax) \
+    (_GL_TYPE_SIGNED (__typeof__ (*(r))) \
+     ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, st, smin, smax) \
+     : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, ut, 0, umax))
+# else
+#  define _GL_INT_OP_WRAPV_SMALLISH(a,b,r,op,overflow,st,smin,smax,ut,umax) \
+    (overflow (a, b, smin, smax) \
+     ? (overflow (a, b, 0, umax) \
+        ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a,b,op,unsigned,st), 1) \
+        : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a,b,op,unsigned,st)) < 0) \
+     : (overflow (a, b, 0, umax) \
+        ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a,b,op,unsigned,st)) >= 0 \
+        : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a,b,op,unsigned,st), 0)))
+# endif
+
+# define _GL_INT_OP_WRAPV(a, b, r, op, overflow) \
+   (sizeof *(r) == sizeof (signed char) \
+    ? _GL_INT_OP_WRAPV_SMALLISH (a, b, r, op, overflow, \
+                                 signed char, SCHAR_MIN, SCHAR_MAX, \
+                                 unsigned char, UCHAR_MAX) \
+    : sizeof *(r) == sizeof (short int) \
+    ? _GL_INT_OP_WRAPV_SMALLISH (a, b, r, op, overflow, \
+                                 short int, SHRT_MIN, SHRT_MAX, \
+                                 unsigned short int, USHRT_MAX) \
+    : sizeof *(r) == sizeof (int) \
+    ? (_GL_EXPR_SIGNED (*(r)) \
+       ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+                          int, INT_MIN, INT_MAX) \
+       : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+                          unsigned int, 0, UINT_MAX)) \
+    : _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow))
+# ifdef LLONG_MAX
+#  define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \
+    (sizeof *(r) == sizeof (long int) \
+     ? (_GL_EXPR_SIGNED (*(r)) \
+        ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
+                           long int, LONG_MIN, LONG_MAX) \
+        : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
+                           unsigned long int, 0, ULONG_MAX)) \
+     : (_GL_EXPR_SIGNED (*(r)) \
+        ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \
+                           long long int, LLONG_MIN, LLONG_MAX) \
+        : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \
+                           unsigned long long int, 0, ULLONG_MAX)))
+# else
+#  define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \
+    (_GL_EXPR_SIGNED (*(r)) \
+     ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
+                        long int, LONG_MIN, LONG_MAX) \
+     : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
+                        unsigned long int, 0, ULONG_MAX))
+# endif
+#endif
+
+/* Store the low-order bits of A <op> B into *R, where the operation
+   is given by OP.  Use the unsigned type UT for calculation to avoid
+   overflow problems.  *R's type is T, with extrema TMIN and TMAX.
+   T can be any signed integer type other than char, bool, a
+   bit-precise integer type, or an enumeration type.
+   Return 1 if the result overflows.  */
+#define _GL_INT_OP_CALC(a, b, r, op, overflow, ut, t, tmin, tmax) \
+  (overflow (a, b, tmin, tmax) \
+   ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t), 1) \
+   : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t), 0))
+
+/* Return 1 if the integer expressions A - B and -A would overflow,
+   respectively.  Arguments should not have side effects,
+   and can be any signed integer type other than char, bool, a
+   bit-precise integer type, or an enumeration type.
+   These macros are tuned for their last input argument being a constant.  */
+
+#if _GL_HAS_BUILTIN_OVERFLOW_P
+# define _GL_INT_NEGATE_OVERFLOW(a) \
+   __builtin_sub_overflow_p (0, a, (__typeof__ (- (a))) 0)
+#else
+# define _GL_INT_NEGATE_OVERFLOW(a) \
+   _GL_INT_NEGATE_RANGE_OVERFLOW (a, _GL_INT_MINIMUM (a), _GL_INT_MAXIMUM (a))
+#endif
+
+/* Return the low-order bits of A <op> B, where the operation is given
+   by OP.  Use the unsigned type UT for calculation to avoid undefined
+   behavior on signed integer overflow, and convert the result to type T.
+   UT is at least as wide as T and is no narrower than unsigned int,
+   T is two's complement, and there is no padding or trap representations.
+   Assume that converting UT to T yields the low-order bits, as is
+   done in all known two's-complement C compilers.  E.g., see:
+   https://gcc.gnu.org/onlinedocs/gcc/Integers-implementation.html
+
+   According to the C standard, converting UT to T yields an
+   implementation-defined result or signal for values outside T's
+   range.  However, code that works around this theoretical problem
+   runs afoul of a compiler bug in Oracle Studio 12.3 x86.  See:
+   https://lists.gnu.org/r/bug-gnulib/2017-04/msg00049.html
+   As the compiler bug is real, don't try to work around the
+   theoretical problem.  */
+
+#define _GL_INT_OP_WRAPV_VIA_UNSIGNED(a, b, op, ut, t) \
+  ((t) ((ut) (a) op (ut) (b)))
+
+/* Return true if the numeric values A + B, A - B, A * B fall outside
+   the range TMIN..TMAX.  Arguments should not have side effects
+   and can be any integer type other than char, bool,
+   a bit-precise integer type, or an enumeration type.
+   TMIN should be signed and nonpositive.
+   TMAX should be positive, and should be signed unless TMIN is zero.  */
+#define _GL_INT_ADD_RANGE_OVERFLOW(a, b, tmin, tmax) \
+  ((b) < 0 \
+   ? (((tmin) \
+       ? ((_GL_EXPR_SIGNED (_GL_INT_CONVERT (a, (tmin) - (b))) || (b) < (tmin)) \
+          && (a) < (tmin) - (b)) \
+       : (a) <= -1 - (b)) \
+      || ((_GL_EXPR_SIGNED (a) ? 0 <= (a) : (tmax) < (a)) && (tmax) < (a) + (b))) \
+   : (a) < 0 \
+   ? (((tmin) \
+       ? ((_GL_EXPR_SIGNED (_GL_INT_CONVERT (b, (tmin) - (a))) || (a) < (tmin)) \
+          && (b) < (tmin) - (a)) \
+       : (b) <= -1 - (a)) \
+      || ((_GL_EXPR_SIGNED (_GL_INT_CONVERT (a, b)) || (tmax) < (b)) \
+          && (tmax) < (a) + (b))) \
+   : (tmax) < (b) || (tmax) - (b) < (a))
+#define _GL_INT_SUBTRACT_RANGE_OVERFLOW(a, b, tmin, tmax) \
+  (((a) < 0) == ((b) < 0) \
+   ? ((a) < (b) \
+      ? !(tmin) || -1 - (tmin) < (b) - (a) - 1 \
+      : (tmax) < (a) - (b)) \
+   : (a) < 0 \
+   ? ((!_GL_EXPR_SIGNED (_GL_INT_CONVERT ((a) - (tmin), b)) && (a) - (tmin) < 0) \
+      || (a) - (tmin) < (b)) \
+   : ((! (_GL_EXPR_SIGNED (_GL_INT_CONVERT (tmax, b)) \
+          && _GL_EXPR_SIGNED (_GL_INT_CONVERT ((tmax) + (b), a))) \
+       && (tmax) <= -1 - (b)) \
+      || (tmax) + (b) < (a)))
+#define _GL_INT_MULTIPLY_RANGE_OVERFLOW(a, b, tmin, tmax) \
+  ((b) < 0 \
+   ? ((a) < 0 \
+      ? (_GL_EXPR_SIGNED (_GL_INT_CONVERT (tmax, b)) \
+         ? (a) < (tmax) / (b) \
+         : ((_GL_INT_NEGATE_OVERFLOW (b) \
+             ? _GL_INT_CONVERT (b, tmax) >> (_GL_TYPE_WIDTH (+ (b)) - 1) \
+             : (tmax) / -(b)) \
+            <= -1 - (a))) \
+      : _GL_INT_NEGATE_OVERFLOW (_GL_INT_CONVERT (b, tmin)) && (b) == -1 \
+      ? (_GL_EXPR_SIGNED (a) \
+         ? 0 < (a) + (tmin) \
+         : 0 < (a) && -1 - (tmin) < (a) - 1) \
+      : (tmin) / (b) < (a)) \
+   : (b) == 0 \
+   ? 0 \
+   : ((a) < 0 \
+      ? (_GL_INT_NEGATE_OVERFLOW (_GL_INT_CONVERT (a, tmin)) && (a) == -1 \
+         ? (_GL_EXPR_SIGNED (b) ? 0 < (b) + (tmin) : -1 - (tmin) < (b) - 1) \
+         : (tmin) / (a) < (b)) \
+      : (tmax) / (b) < (a)))
+
+#endif /* _GL_INTPROPS_INTERNAL_H */
diff --git a/lib/intprops.h b/lib/intprops.h
index d4a917f7..44b5e60f 100644
--- a/lib/intprops.h
+++ b/lib/intprops.h
@@ -1,6 +1,6 @@
 /* intprops.h -- properties of integer types
 
-   Copyright (C) 2001-2022 Free Software Foundation, Inc.
+   Copyright (C) 2001-2023 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
@@ -15,19 +15,10 @@
    You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
-
 #ifndef _GL_INTPROPS_H
 #define _GL_INTPROPS_H
 
-#include <limits.h>
-
-/* Return a value with the common real type of E and V and the value of V.
-   Do not evaluate E.  */
-#define _GL_INT_CONVERT(e, v) ((1 ? 0 : (e)) + (v))
-
-/* Act like _GL_INT_CONVERT (E, -V) but work around a bug in IRIX 6.5 cc; see
-   <https://lists.gnu.org/r/bug-gnulib/2011-05/msg00406.html>.  */
-#define _GL_INT_NEGATE_CONVERT(e, v) ((1 ? 0 : (e)) - (v))
+#include "intprops-internal.h"
 
 /* The extra casts in the following macros work around compiler bugs,
    e.g., in Cray C 5.0.3.0.  */
@@ -37,11 +28,11 @@
 #define TYPE_IS_INTEGER(t) ((t) 1.5 == 1)
 
 /* True if the real type T is signed.  */
-#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
+#define TYPE_SIGNED(t) _GL_TYPE_SIGNED (t)
 
 /* Return 1 if the real expression E, after promotion, has a
    signed or floating type.  Do not evaluate E.  */
-#define EXPR_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0)
+#define EXPR_SIGNED(e) _GL_EXPR_SIGNED (e)
 
 
 /* Minimum and maximum values for integer types and expressions.  */
@@ -49,7 +40,7 @@
 /* The width in bits of the integer type or expression T.
    Do not evaluate T.  T must not be a bit-field expression.
    Padding bits are not supported; this is checked at compile-time below.  */
-#define TYPE_WIDTH(t) (sizeof (t) * CHAR_BIT)
+#define TYPE_WIDTH(t) _GL_TYPE_WIDTH (t)
 
 /* The maximum and minimum values for the integer type T.  */
 #define TYPE_MINIMUM(t) ((t) ~ TYPE_MAXIMUM (t))
@@ -58,51 +49,6 @@
         ? (t) -1                                                        \
         : ((((t) 1 << (TYPE_WIDTH (t) - 2)) - 1) * 2 + 1)))
 
-/* The maximum and minimum values for the type of the expression E,
-   after integer promotion.  E is not evaluated.  */
-#define _GL_INT_MINIMUM(e)                                              \
-  (EXPR_SIGNED (e)                                                      \
-   ? ~ _GL_SIGNED_INT_MAXIMUM (e)                                       \
-   : _GL_INT_CONVERT (e, 0))
-#define _GL_INT_MAXIMUM(e)                                              \
-  (EXPR_SIGNED (e)                                                      \
-   ? _GL_SIGNED_INT_MAXIMUM (e)                                         \
-   : _GL_INT_NEGATE_CONVERT (e, 1))
-#define _GL_SIGNED_INT_MAXIMUM(e)                                       \
-  (((_GL_INT_CONVERT (e, 1) << (TYPE_WIDTH (+ (e)) - 2)) - 1) * 2 + 1)
-
-/* Work around OpenVMS incompatibility with C99.  */
-#if !defined LLONG_MAX && defined __INT64_MAX
-# define LLONG_MAX __INT64_MAX
-# define LLONG_MIN __INT64_MIN
-#endif
-
-/* This include file assumes that signed types are two's complement without
-   padding bits; the above macros have undefined behavior otherwise.
-   If this is a problem for you, please let us know how to fix it for your host.
-   This assumption is tested by the intprops-tests module.  */
-
-/* Does the __typeof__ keyword work?  This could be done by
-   'configure', but for now it's easier to do it by hand.  */
-#if (2 <= __GNUC__ \
-     || (4 <= __clang_major__) \
-     || (1210 <= __IBMC__ && defined __IBM__TYPEOF__) \
-     || (0x5110 <= __SUNPRO_C && !__STDC__))
-# define _GL_HAVE___TYPEOF__ 1
-#else
-# define _GL_HAVE___TYPEOF__ 0
-#endif
-
-/* Return 1 if the integer type or expression T might be signed.  Return 0
-   if it is definitely unsigned.  T must not be a bit-field expression.
-   This macro does not evaluate its argument, and expands to an
-   integer constant expression.  */
-#if _GL_HAVE___TYPEOF__
-# define _GL_SIGNED_TYPE_OR_EXPR(t) TYPE_SIGNED (__typeof__ (t))
-#else
-# define _GL_SIGNED_TYPE_OR_EXPR(t) 1
-#endif
-
 /* Bound on length of the string representing an unsigned integer
    value representable in B bits.  log10 (2.0) < 146/485.  The
    smallest value of B where this bound is not tight is 2621.  */
@@ -129,12 +75,11 @@
 /* Range overflow checks.
 
    The INT_<op>_RANGE_OVERFLOW macros return 1 if the corresponding C
-   operators might not yield numerically correct answers due to
-   arithmetic overflow.  They do not rely on undefined or
-   implementation-defined behavior.  Their implementations are simple
-   and straightforward, but they are harder to use and may be less
-   efficient than the INT_<op>_WRAPV, INT_<op>_OK, and
-   INT_<op>_OVERFLOW macros described below.
+   operators overflow arithmetically when given the same arguments.
+   These macros do not rely on undefined or implementation-defined behavior.
+   Although their implementations are simple and straightforward,
+   they are harder to use and may be less efficient than the
+   INT_<op>_WRAPV, INT_<op>_OK, and INT_<op>_OVERFLOW macros described below.
 
    Example usage:
 
@@ -181,9 +126,7 @@
 /* Return 1 if - A would overflow in [MIN,MAX] arithmetic.
    See above for restrictions.  */
 #define INT_NEGATE_RANGE_OVERFLOW(a, min, max)          \
-  ((min) < 0                                            \
-   ? (a) < - (max)                                      \
-   : 0 < (a))
+  _GL_INT_NEGATE_RANGE_OVERFLOW (a, min, max)
 
 /* Return 1 if A * B would overflow in [MIN,MAX] arithmetic.
    See above for restrictions.  Avoid && and || as they tickle
@@ -227,43 +170,6 @@
    ? (a) < (min) >> (b)                                 \
    : (max) >> (b) < (a))
 
-/* True if __builtin_add_overflow (A, B, P) and __builtin_sub_overflow
-   (A, B, P) work when P is non-null.  */
-#ifdef __EDG__
-/* EDG-based compilers like nvc 22.1 cannot add 64-bit signed to unsigned
-   <https://bugs.gnu.org/53256>.  */
-# define _GL_HAS_BUILTIN_ADD_OVERFLOW 0
-#elif defined __has_builtin
-# define _GL_HAS_BUILTIN_ADD_OVERFLOW __has_builtin (__builtin_add_overflow)
-/* __builtin_{add,sub}_overflow exists but is not reliable in GCC 5.x and 6.x,
-   see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98269>.  */
-#elif 7 <= __GNUC__
-# define _GL_HAS_BUILTIN_ADD_OVERFLOW 1
-#else
-# define _GL_HAS_BUILTIN_ADD_OVERFLOW 0
-#endif
-
-/* True if __builtin_mul_overflow (A, B, P) works when P is non-null.  */
-#if defined __clang_major__ && __clang_major__ < 14
-/* Work around Clang bug <https://bugs.llvm.org/show_bug.cgi?id=16404>.  */
-# define _GL_HAS_BUILTIN_MUL_OVERFLOW 0
-#else
-# define _GL_HAS_BUILTIN_MUL_OVERFLOW _GL_HAS_BUILTIN_ADD_OVERFLOW
-#endif
-
-/* True if __builtin_add_overflow_p (A, B, C) works, and similarly for
-   __builtin_sub_overflow_p and __builtin_mul_overflow_p.  */
-#ifdef __EDG__
-/* In EDG-based compilers like ICC 2021.3 and earlier,
-   __builtin_add_overflow_p etc. are not treated as integral constant
-   expressions even when all arguments are.  */
-# define _GL_HAS_BUILTIN_OVERFLOW_P 0
-#elif defined __has_builtin
-# define _GL_HAS_BUILTIN_OVERFLOW_P __has_builtin (__builtin_mul_overflow_p)
-#else
-# define _GL_HAS_BUILTIN_OVERFLOW_P (7 <= __GNUC__)
-#endif
-
 /* The _GL*_OVERFLOW macros have the same restrictions as the
    *_RANGE_OVERFLOW macros, except that they do not assume that operands
    (e.g., A and B) have the same type as MIN and MAX.  Instead, they assume
@@ -350,13 +256,18 @@
    Because the WRAPV macros convert the result, they report overflow
    in different circumstances than the OVERFLOW macros do.  For
    example, in the typical case with 16-bit 'short' and 32-bit 'int',
-   if A, B and R are all of type 'short' then INT_ADD_OVERFLOW (A, B)
+   if A, B and *R are all of type 'short' then INT_ADD_OVERFLOW (A, B)
    returns false because the addition cannot overflow after A and B
-   are converted to 'int', whereas INT_ADD_WRAPV (A, B, &R) returns
+   are converted to 'int', whereas INT_ADD_WRAPV (A, B, R) returns
    true or false depending on whether the sum fits into 'short'.
 
    These macros are tuned for their last input argument being a constant.
 
+   A, B, and *R should be integers; they need not be the same type,
+   and they need not be all signed or all unsigned.
+   However, none of the integer types should be bit-precise,
+   and *R's type should not be char, bool, or an enumeration type.
+
    Return 1 if the integer expressions A * B, A - B, -A, A * B, A / B,
    A % B, and A << B would overflow, respectively.  */
 
@@ -364,12 +275,7 @@
   _GL_BINARY_OP_OVERFLOW (a, b, _GL_ADD_OVERFLOW)
 #define INT_SUBTRACT_OVERFLOW(a, b) \
   _GL_BINARY_OP_OVERFLOW (a, b, _GL_SUBTRACT_OVERFLOW)
-#if _GL_HAS_BUILTIN_OVERFLOW_P
-# define INT_NEGATE_OVERFLOW(a) INT_SUBTRACT_OVERFLOW (0, a)
-#else
-# define INT_NEGATE_OVERFLOW(a) \
-   INT_NEGATE_RANGE_OVERFLOW (a, _GL_INT_MINIMUM (a), _GL_INT_MAXIMUM (a))
-#endif
+#define INT_NEGATE_OVERFLOW(a) _GL_INT_NEGATE_OVERFLOW (a)
 #define INT_MULTIPLY_OVERFLOW(a, b) \
   _GL_BINARY_OP_OVERFLOW (a, b, _GL_MULTIPLY_OVERFLOW)
 #define INT_DIVIDE_OVERFLOW(a, b) \
@@ -391,224 +297,9 @@
 
 /* Store the low-order bits of A + B, A - B, A * B, respectively, into *R.
    Return 1 if the result overflows.  See above for restrictions.  */
-#if _GL_HAS_BUILTIN_ADD_OVERFLOW
-# define INT_ADD_WRAPV(a, b, r) __builtin_add_overflow (a, b, r)
-# define INT_SUBTRACT_WRAPV(a, b, r) __builtin_sub_overflow (a, b, r)
-#else
-# define INT_ADD_WRAPV(a, b, r) \
-   _GL_INT_OP_WRAPV (a, b, r, +, _GL_INT_ADD_RANGE_OVERFLOW)
-# define INT_SUBTRACT_WRAPV(a, b, r) \
-   _GL_INT_OP_WRAPV (a, b, r, -, _GL_INT_SUBTRACT_RANGE_OVERFLOW)
-#endif
-#if _GL_HAS_BUILTIN_MUL_OVERFLOW
-# if ((9 < __GNUC__ + (3 <= __GNUC_MINOR__) \
-       || (__GNUC__ == 8 && 4 <= __GNUC_MINOR__)) \
-      && !defined __EDG__)
-#  define INT_MULTIPLY_WRAPV(a, b, r) __builtin_mul_overflow (a, b, r)
-# else
-   /* Work around GCC bug 91450.  */
-#  define INT_MULTIPLY_WRAPV(a, b, r) \
-    ((!_GL_SIGNED_TYPE_OR_EXPR (*(r)) && EXPR_SIGNED (a) && EXPR_SIGNED (b) \
-      && _GL_INT_MULTIPLY_RANGE_OVERFLOW (a, b, 0, (__typeof__ (*(r))) -1)) \
-     ? ((void) __builtin_mul_overflow (a, b, r), 1) \
-     : __builtin_mul_overflow (a, b, r))
-# endif
-#else
-# define INT_MULTIPLY_WRAPV(a, b, r) \
-   _GL_INT_OP_WRAPV (a, b, r, *, _GL_INT_MULTIPLY_RANGE_OVERFLOW)
-#endif
-
-/* Nonzero if this compiler has GCC bug 68193 or Clang bug 25390.  See:
-   https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68193
-   https://llvm.org/bugs/show_bug.cgi?id=25390
-   For now, assume all versions of GCC-like compilers generate bogus
-   warnings for _Generic.  This matters only for compilers that
-   lack relevant builtins.  */
-#if __GNUC__ || defined __clang__
-# define _GL__GENERIC_BOGUS 1
-#else
-# define _GL__GENERIC_BOGUS 0
-#endif
-
-/* Store the low-order bits of A <op> B into *R, where OP specifies
-   the operation and OVERFLOW the overflow predicate.  Return 1 if the
-   result overflows.  See above for restrictions.  */
-#if 201112 <= __STDC_VERSION__ && !_GL__GENERIC_BOGUS
-# define _GL_INT_OP_WRAPV(a, b, r, op, overflow) \
-   (_Generic \
-    (*(r), \
-     signed char: \
-       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
-                        signed char, SCHAR_MIN, SCHAR_MAX), \
-     unsigned char: \
-       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
-                        unsigned char, 0, UCHAR_MAX), \
-     short int: \
-       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
-                        short int, SHRT_MIN, SHRT_MAX), \
-     unsigned short int: \
-       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
-                        unsigned short int, 0, USHRT_MAX), \
-     int: \
-       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
-                        int, INT_MIN, INT_MAX), \
-     unsigned int: \
-       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
-                        unsigned int, 0, UINT_MAX), \
-     long int: \
-       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
-                        long int, LONG_MIN, LONG_MAX), \
-     unsigned long int: \
-       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
-                        unsigned long int, 0, ULONG_MAX), \
-     long long int: \
-       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \
-                        long long int, LLONG_MIN, LLONG_MAX), \
-     unsigned long long int: \
-       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \
-                        unsigned long long int, 0, ULLONG_MAX)))
-#else
-/* Store the low-order bits of A <op> B into *R, where OP specifies
-   the operation and OVERFLOW the overflow predicate.  If *R is
-   signed, its type is ST with bounds SMIN..SMAX; otherwise its type
-   is UT with bounds U..UMAX.  ST and UT are narrower than int.
-   Return 1 if the result overflows.  See above for restrictions.  */
-# if _GL_HAVE___TYPEOF__
-#  define _GL_INT_OP_WRAPV_SMALLISH(a,b,r,op,overflow,st,smin,smax,ut,umax) \
-    (TYPE_SIGNED (__typeof__ (*(r))) \
-     ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, st, smin, smax) \
-     : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, ut, 0, umax))
-# else
-#  define _GL_INT_OP_WRAPV_SMALLISH(a,b,r,op,overflow,st,smin,smax,ut,umax) \
-    (overflow (a, b, smin, smax) \
-     ? (overflow (a, b, 0, umax) \
-        ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a,b,op,unsigned,st), 1) \
-        : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a,b,op,unsigned,st)) < 0) \
-     : (overflow (a, b, 0, umax) \
-        ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a,b,op,unsigned,st)) >= 0 \
-        : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a,b,op,unsigned,st), 0)))
-# endif
-
-# define _GL_INT_OP_WRAPV(a, b, r, op, overflow) \
-   (sizeof *(r) == sizeof (signed char) \
-    ? _GL_INT_OP_WRAPV_SMALLISH (a, b, r, op, overflow, \
-                                 signed char, SCHAR_MIN, SCHAR_MAX, \
-                                 unsigned char, UCHAR_MAX) \
-    : sizeof *(r) == sizeof (short int) \
-    ? _GL_INT_OP_WRAPV_SMALLISH (a, b, r, op, overflow, \
-                                 short int, SHRT_MIN, SHRT_MAX, \
-                                 unsigned short int, USHRT_MAX) \
-    : sizeof *(r) == sizeof (int) \
-    ? (EXPR_SIGNED (*(r)) \
-       ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
-                          int, INT_MIN, INT_MAX) \
-       : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
-                          unsigned int, 0, UINT_MAX)) \
-    : _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow))
-# ifdef LLONG_MAX
-#  define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \
-    (sizeof *(r) == sizeof (long int) \
-     ? (EXPR_SIGNED (*(r)) \
-        ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
-                           long int, LONG_MIN, LONG_MAX) \
-        : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
-                           unsigned long int, 0, ULONG_MAX)) \
-     : (EXPR_SIGNED (*(r)) \
-        ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \
-                           long long int, LLONG_MIN, LLONG_MAX) \
-        : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \
-                           unsigned long long int, 0, ULLONG_MAX)))
-# else
-#  define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \
-    (EXPR_SIGNED (*(r)) \
-     ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
-                        long int, LONG_MIN, LONG_MAX) \
-     : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
-                        unsigned long int, 0, ULONG_MAX))
-# endif
-#endif
-
-/* Store the low-order bits of A <op> B into *R, where the operation
-   is given by OP.  Use the unsigned type UT for calculation to avoid
-   overflow problems.  *R's type is T, with extrema TMIN and TMAX.
-   T must be a signed integer type.  Return 1 if the result overflows.  */
-#define _GL_INT_OP_CALC(a, b, r, op, overflow, ut, t, tmin, tmax) \
-  (overflow (a, b, tmin, tmax) \
-   ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t), 1) \
-   : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t), 0))
-
-/* Return the low-order bits of A <op> B, where the operation is given
-   by OP.  Use the unsigned type UT for calculation to avoid undefined
-   behavior on signed integer overflow, and convert the result to type T.
-   UT is at least as wide as T and is no narrower than unsigned int,
-   T is two's complement, and there is no padding or trap representations.
-   Assume that converting UT to T yields the low-order bits, as is
-   done in all known two's-complement C compilers.  E.g., see:
-   https://gcc.gnu.org/onlinedocs/gcc/Integers-implementation.html
-
-   According to the C standard, converting UT to T yields an
-   implementation-defined result or signal for values outside T's
-   range.  However, code that works around this theoretical problem
-   runs afoul of a compiler bug in Oracle Studio 12.3 x86.  See:
-   https://lists.gnu.org/r/bug-gnulib/2017-04/msg00049.html
-   As the compiler bug is real, don't try to work around the
-   theoretical problem.  */
-
-#define _GL_INT_OP_WRAPV_VIA_UNSIGNED(a, b, op, ut, t) \
-  ((t) ((ut) (a) op (ut) (b)))
-
-/* Return true if the numeric values A + B, A - B, A * B fall outside
-   the range TMIN..TMAX.  Arguments should be integer expressions
-   without side effects.  TMIN should be signed and nonpositive.
-   TMAX should be positive, and should be signed unless TMIN is zero.  */
-#define _GL_INT_ADD_RANGE_OVERFLOW(a, b, tmin, tmax) \
-  ((b) < 0 \
-   ? (((tmin) \
-       ? ((EXPR_SIGNED (_GL_INT_CONVERT (a, (tmin) - (b))) || (b) < (tmin)) \
-          && (a) < (tmin) - (b)) \
-       : (a) <= -1 - (b)) \
-      || ((EXPR_SIGNED (a) ? 0 <= (a) : (tmax) < (a)) && (tmax) < (a) + (b))) \
-   : (a) < 0 \
-   ? (((tmin) \
-       ? ((EXPR_SIGNED (_GL_INT_CONVERT (b, (tmin) - (a))) || (a) < (tmin)) \
-          && (b) < (tmin) - (a)) \
-       : (b) <= -1 - (a)) \
-      || ((EXPR_SIGNED (_GL_INT_CONVERT (a, b)) || (tmax) < (b)) \
-          && (tmax) < (a) + (b))) \
-   : (tmax) < (b) || (tmax) - (b) < (a))
-#define _GL_INT_SUBTRACT_RANGE_OVERFLOW(a, b, tmin, tmax) \
-  (((a) < 0) == ((b) < 0) \
-   ? ((a) < (b) \
-      ? !(tmin) || -1 - (tmin) < (b) - (a) - 1 \
-      : (tmax) < (a) - (b)) \
-   : (a) < 0 \
-   ? ((!EXPR_SIGNED (_GL_INT_CONVERT ((a) - (tmin), b)) && (a) - (tmin) < 0) \
-      || (a) - (tmin) < (b)) \
-   : ((! (EXPR_SIGNED (_GL_INT_CONVERT (tmax, b)) \
-          && EXPR_SIGNED (_GL_INT_CONVERT ((tmax) + (b), a))) \
-       && (tmax) <= -1 - (b)) \
-      || (tmax) + (b) < (a)))
-#define _GL_INT_MULTIPLY_RANGE_OVERFLOW(a, b, tmin, tmax) \
-  ((b) < 0 \
-   ? ((a) < 0 \
-      ? (EXPR_SIGNED (_GL_INT_CONVERT (tmax, b)) \
-         ? (a) < (tmax) / (b) \
-         : ((INT_NEGATE_OVERFLOW (b) \
-             ? _GL_INT_CONVERT (b, tmax) >> (TYPE_WIDTH (+ (b)) - 1) \
-             : (tmax) / -(b)) \
-            <= -1 - (a))) \
-      : INT_NEGATE_OVERFLOW (_GL_INT_CONVERT (b, tmin)) && (b) == -1 \
-      ? (EXPR_SIGNED (a) \
-         ? 0 < (a) + (tmin) \
-         : 0 < (a) && -1 - (tmin) < (a) - 1) \
-      : (tmin) / (b) < (a)) \
-   : (b) == 0 \
-   ? 0 \
-   : ((a) < 0 \
-      ? (INT_NEGATE_OVERFLOW (_GL_INT_CONVERT (a, tmin)) && (a) == -1 \
-         ? (EXPR_SIGNED (b) ? 0 < (b) + (tmin) : -1 - (tmin) < (b) - 1) \
-         : (tmin) / (a) < (b)) \
-      : (tmax) / (b) < (a)))
+#define INT_ADD_WRAPV(a, b, r) _GL_INT_ADD_WRAPV (a, b, r)
+#define INT_SUBTRACT_WRAPV(a, b, r) _GL_INT_SUBTRACT_WRAPV (a, b, r)
+#define INT_MULTIPLY_WRAPV(a, b, r) _GL_INT_MULTIPLY_WRAPV (a, b, r)
 
 /* The following macros compute A + B, A - B, and A * B, respectively.
    If no overflow occurs, they set *R to the result and return 1;
@@ -624,6 +315,8 @@
 
    A, B, and *R should be integers; they need not be the same type,
    and they need not be all signed or all unsigned.
+   However, none of the integer types should be bit-precise,
+   and *R's type should not be char, bool, or an enumeration type.
 
    These macros work correctly on all known practical hosts, and do not rely
    on undefined behavior due to signed arithmetic overflow.
@@ -635,8 +328,8 @@
 
    These macros are tuned for B being a constant.  */
 
-#define INT_ADD_OK(a, b, r) ! INT_ADD_WRAPV (a, b, r)
-#define INT_SUBTRACT_OK(a, b, r) ! INT_SUBTRACT_WRAPV (a, b, r)
-#define INT_MULTIPLY_OK(a, b, r) ! INT_MULTIPLY_WRAPV (a, b, r)
+#define INT_ADD_OK(a, b, r) (! INT_ADD_WRAPV (a, b, r))
+#define INT_SUBTRACT_OK(a, b, r) (! INT_SUBTRACT_WRAPV (a, b, r))
+#define INT_MULTIPLY_OK(a, b, r) (! INT_MULTIPLY_WRAPV (a, b, r))
 
 #endif /* _GL_INTPROPS_H */
diff --git a/lib/inttypes.in.h b/lib/inttypes.in.h
index 853eca08..22643876 100644
--- a/lib/inttypes.in.h
+++ b/lib/inttypes.in.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006-2022 Free Software Foundation, Inc.
+/* Copyright (C) 2006-2023 Free Software Foundation, Inc.
    Written by Paul Eggert, Bruno Haible, Derek Price.
    This file is part of gnulib.
 
@@ -46,6 +46,11 @@
 #if ! defined INTTYPES_H && ! defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
 #define INTTYPES_H
 
+/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 /* Include <stdint.h> or the gnulib replacement.
    But avoid namespace pollution on glibc systems.  */
 #ifndef __GLIBC__
@@ -903,8 +908,21 @@ extern "C" {
 #endif
 
 #if @GNULIB_IMAXABS@
-# if !@HAVE_DECL_IMAXABS@
-extern intmax_t imaxabs (intmax_t);
+# if @REPLACE_IMAXABS@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef imaxabs
+#   define imaxabs rpl_imaxabs
+#  endif
+_GL_FUNCDECL_RPL (imaxabs, intmax_t, (intmax_t x));
+_GL_CXXALIAS_RPL (imaxabs, intmax_t, (intmax_t x));
+# else
+#  if !@HAVE_DECL_IMAXABS@
+_GL_FUNCDECL_SYS (imaxabs, intmax_t, (intmax_t x));
+#  endif
+_GL_CXXALIAS_SYS (imaxabs, intmax_t, (intmax_t x));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (imaxabs);
 # endif
 #elif defined GNULIB_POSIXCHECK
 # undef imaxabs
@@ -921,8 +939,21 @@ typedef struct { intmax_t quot; intmax_t rem; } imaxdiv_t;
 #   define GNULIB_defined_imaxdiv_t 1
 #  endif
 # endif
-# if !@HAVE_DECL_IMAXDIV@
-extern imaxdiv_t imaxdiv (intmax_t, intmax_t);
+# if @REPLACE_IMAXDIV@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef imaxdiv
+#   define imaxdiv rpl_imaxdiv
+#  endif
+_GL_FUNCDECL_RPL (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom));
+_GL_CXXALIAS_RPL (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom));
+# else
+#  if !@HAVE_DECL_IMAXDIV@
+_GL_FUNCDECL_SYS (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom));
+#  endif
+_GL_CXXALIAS_SYS (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (imaxdiv);
 # endif
 #elif defined GNULIB_POSIXCHECK
 # undef imaxdiv
diff --git a/lib/isatty.c b/lib/isatty.c
index ba40d91f..cb2cdab2 100644
--- a/lib/isatty.c
+++ b/lib/isatty.c
@@ -1,5 +1,5 @@
 /* isatty() replacement.
-   Copyright (C) 2012-2022 Free Software Foundation, Inc.
+   Copyright (C) 2012-2023 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
diff --git a/lib/isblank.c b/lib/isblank.c
index e3545593..8aad6aff 100644
--- a/lib/isblank.c
+++ b/lib/isblank.c
@@ -1,6 +1,6 @@
 /* Test whether a character is a blank.
 
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 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
diff --git a/lib/iswblank.c b/lib/iswblank.c
index 2e601f8e..5540f1fe 100644
--- a/lib/iswblank.c
+++ b/lib/iswblank.c
@@ -1,5 +1,5 @@
 /* Test wide character for being blank.
-   Copyright (C) 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 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
diff --git a/lib/iswdigit.c b/lib/iswdigit.c
index 780263f0..94db2740 100644
--- a/lib/iswdigit.c
+++ b/lib/iswdigit.c
@@ -1,5 +1,5 @@
 /* Test wide character for being a digit.
-   Copyright (C) 2020-2022 Free Software Foundation, Inc.
+   Copyright (C) 2020-2023 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
diff --git a/lib/iswxdigit.c b/lib/iswxdigit.c
index f20b9b36..7ec4566d 100644
--- a/lib/iswxdigit.c
+++ b/lib/iswxdigit.c
@@ -1,5 +1,5 @@
 /* Test wide character for being a hexadecimal digit.
-   Copyright (C) 2020-2022 Free Software Foundation, Inc.
+   Copyright (C) 2020-2023 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
diff --git a/lib/langinfo.in.h b/lib/langinfo.in.h
index 98aea6a8..4cf712eb 100644
--- a/lib/langinfo.in.h
+++ b/lib/langinfo.in.h
@@ -1,5 +1,5 @@
 /* Substitute for and wrapper around <langinfo.h>.
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 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
@@ -34,6 +34,11 @@
 #ifndef _@GUARD_PREFIX@_LANGINFO_H
 #define _@GUARD_PREFIX@_LANGINFO_H
 
+/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 
 #if !@HAVE_LANGINFO_H@
 
@@ -208,7 +213,9 @@ _GL_FUNCDECL_SYS (nl_langinfo, char *, (nl_item item));
 #  endif
 _GL_CXXALIAS_SYS (nl_langinfo, char *, (nl_item item));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (nl_langinfo);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef nl_langinfo
 # if HAVE_RAW_DECL_NL_LANGINFO
diff --git a/lib/lc-charset-dispatch.c b/lib/lc-charset-dispatch.c
index 66d78fd3..cd74466b 100644
--- a/lib/lc-charset-dispatch.c
+++ b/lib/lc-charset-dispatch.c
@@ -1,5 +1,5 @@
 /* Dispatching based on the current locale's character encoding.
-   Copyright (C) 2018-2022 Free Software Foundation, Inc.
+   Copyright (C) 2018-2023 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
diff --git a/lib/lc-charset-dispatch.h b/lib/lc-charset-dispatch.h
index 3867c323..c82b6a60 100644
--- a/lib/lc-charset-dispatch.h
+++ b/lib/lc-charset-dispatch.h
@@ -1,5 +1,5 @@
 /* Dispatching based on the current locale's character encoding.
-   Copyright (C) 2018-2022 Free Software Foundation, Inc.
+   Copyright (C) 2018-2023 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
diff --git a/lib/libc-config.h b/lib/libc-config.h
index a56665b1..5f5ad010 100644
--- a/lib/libc-config.h
+++ b/lib/libc-config.h
@@ -1,6 +1,6 @@
 /* System definitions for code taken from the GNU C Library
 
-   Copyright 2017-2022 Free Software Foundation, Inc.
+   Copyright 2017-2023 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
@@ -137,8 +137,6 @@
 # undef __attribute_returns_twice__
 # undef __attribute_used__
 # undef __attribute_warn_unused_result__
-# undef __bos
-# undef __bos0
 # undef __errordecl
 # undef __extension__
 # undef __extern_always_inline
@@ -147,21 +145,13 @@
 # undef __fortified_attr_access
 # undef __fortify_function
 # undef __glibc_c99_flexarr_available
-# undef __glibc_fortify
-# undef __glibc_fortify_n
 # undef __glibc_has_attribute
 # undef __glibc_has_builtin
 # undef __glibc_has_extension
 # undef __glibc_likely
 # undef __glibc_macro_warning
 # undef __glibc_macro_warning1
-# undef __glibc_objsize
-# undef __glibc_objsize0
-# undef __glibc_safe_len_cond
-# undef __glibc_safe_or_unknown_len
 # undef __glibc_unlikely
-# undef __glibc_unsafe_len
-# undef __glibc_unsigned_or_positive
 # undef __inline
 # undef __ptr_t
 # undef __restrict
@@ -170,6 +160,18 @@
 # undef __va_arg_pack_len
 # undef __warnattr
 # undef __wur
+# ifndef __GNULIB_CDEFS
+#  undef __bos
+#  undef __bos0
+#  undef __glibc_fortify
+#  undef __glibc_fortify_n
+#  undef __glibc_objsize
+#  undef __glibc_objsize0
+#  undef __glibc_safe_len_cond
+#  undef __glibc_safe_or_unknown_len
+#  undef __glibc_unsafe_len
+#  undef __glibc_unsigned_or_positive
+# endif
 
 /* Include our copy of glibc <sys/cdefs.h>.  */
 # include <cdefs.h>
diff --git a/lib/limits.in.h b/lib/limits.in.h
index b77bf75c..a01b4c6a 100644
--- a/lib/limits.in.h
+++ b/lib/limits.in.h
@@ -1,6 +1,6 @@
 /* A GNU-like <limits.h>.
 
-   Copyright 2016-2022 Free Software Foundation, Inc.
+   Copyright 2016-2023 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
@@ -99,7 +99,7 @@
 # endif
 #endif
 
-/* Macros specified by C2x and by ISO/IEC TS 18661-1:2014.  */
+/* Macros specified by C23 and by ISO/IEC TS 18661-1:2014.  */
 
 #if (! defined ULLONG_WIDTH                                             \
      && (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__ \
@@ -117,13 +117,16 @@
 # define ULLONG_WIDTH _GL_INTEGER_WIDTH (0, ULLONG_MAX)
 #endif
 
-/* Macros specified by C2x.  */
+/* Macros specified by C23.  */
 
-#if (! defined BOOL_WIDTH \
-     && (defined _GNU_SOURCE \
-         || (defined __STDC_VERSION__ && 201710 < __STDC_VERSION__)))
-# define BOOL_MAX 1
-# define BOOL_WIDTH 1
+#if (defined _GNU_SOURCE \
+     || (defined __STDC_VERSION__ && 201710 < __STDC_VERSION__))
+# if ! defined BOOL_WIDTH
+#  define BOOL_WIDTH 1
+#  define BOOL_MAX 1
+# elif ! defined BOOL_MAX
+#  define BOOL_MAX ((((1U << (BOOL_WIDTH - 1)) - 1) << 1) + 1)
+# endif
 #endif
 
 #endif /* _@GUARD_PREFIX@_LIMITS_H */
diff --git a/lib/localcharset.c b/lib/localcharset.c
index 17a4a1ef..7ed9c957 100644
--- a/lib/localcharset.c
+++ b/lib/localcharset.c
@@ -1,6 +1,6 @@
 /* Determine a canonical name for the current locale's character encoding.
 
-   Copyright (C) 2000-2006, 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2000-2006, 2008-2023 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
diff --git a/lib/localcharset.h b/lib/localcharset.h
index 62efbf32..29ee8dc0 100644
--- a/lib/localcharset.h
+++ b/lib/localcharset.h
@@ -1,5 +1,5 @@
 /* Determine a canonical name for the current locale's character encoding.
-   Copyright (C) 2000-2003, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2000-2003, 2009-2023 Free Software Foundation, Inc.
    This file is part of the GNU CHARSET Library.
 
    This file is free software: you can redistribute it and/or modify
diff --git a/lib/locale.in.h b/lib/locale.in.h
index 4aef74d4..41a93c1d 100644
--- a/lib/locale.in.h
+++ b/lib/locale.in.h
@@ -1,5 +1,5 @@
 /* A POSIX <locale.h>.
-   Copyright (C) 2007-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007-2023 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
@@ -44,6 +44,11 @@
 #ifndef _@GUARD_PREFIX@_LOCALE_H
 #define _@GUARD_PREFIX@_LOCALE_H
 
+/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 /* NetBSD 5.0 mis-defines NULL.  */
 #include <stddef.h>
 
@@ -229,7 +234,7 @@ _GL_CXXALIAS_SYS (newlocale, locale_t,
                   (int category_mask, const char *name, locale_t base));
 #  endif
 # endif
-# if @HAVE_NEWLOCALE@
+# if __GLIBC__ >= 2 && @HAVE_NEWLOCALE@
 _GL_CXXALIASWARN (newlocale);
 # endif
 # if @HAVE_NEWLOCALE@ || @REPLACE_NEWLOCALE@
@@ -245,23 +250,23 @@ _GL_WARN_ON_USE (newlocale, "newlocale is not portable");
 #endif
 
 #if @GNULIB_DUPLOCALE@ || (@GNULIB_LOCALENAME@ && @LOCALENAME_ENHANCE_LOCALE_FUNCS@ && @HAVE_DUPLOCALE@)
-# if @REPLACE_DUPLOCALE@
-#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-#   undef duplocale
-#   define duplocale rpl_duplocale
-#   define GNULIB_defined_duplocale 1
-#  endif
+# if @HAVE_DUPLOCALE@ /* locale_t may be undefined if !@HAVE_DUPLOCALE@.  */
+#  if @REPLACE_DUPLOCALE@
+#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#    undef duplocale
+#    define duplocale rpl_duplocale
+#    define GNULIB_defined_duplocale 1
+#   endif
 _GL_FUNCDECL_RPL (duplocale, locale_t, (locale_t locale) _GL_ARG_NONNULL ((1)));
 _GL_CXXALIAS_RPL (duplocale, locale_t, (locale_t locale));
-# else
-#  if @HAVE_DUPLOCALE@
+#  else
 _GL_CXXALIAS_SYS (duplocale, locale_t, (locale_t locale));
 #  endif
 # endif
-# if @HAVE_DUPLOCALE@
+# if __GLIBC__ >= 2 && @HAVE_DUPLOCALE@
 _GL_CXXALIASWARN (duplocale);
 # endif
-# if @HAVE_DUPLOCALE@ || @REPLACE_DUPLOCALE@
+# if @HAVE_DUPLOCALE@
 #  ifndef HAVE_WORKING_DUPLOCALE
 #   define HAVE_WORKING_DUPLOCALE 1
 #  endif
@@ -290,7 +295,7 @@ _GL_CXXALIAS_RPL (freelocale, void, (locale_t locale));
 _GL_CXXALIAS_SYS_CAST (freelocale, void, (locale_t locale));
 #  endif
 # endif
-# if @HAVE_FREELOCALE@
+# if __GLIBC__ >= 2 && @HAVE_FREELOCALE@
 _GL_CXXALIASWARN (freelocale);
 # endif
 #elif defined GNULIB_POSIXCHECK
diff --git a/lib/localeconv.c b/lib/localeconv.c
index ef261205..c1a34baa 100644
--- a/lib/localeconv.c
+++ b/lib/localeconv.c
@@ -1,5 +1,5 @@
 /* Query locale dependent information for formatting numbers.
-   Copyright (C) 2012-2022 Free Software Foundation, Inc.
+   Copyright (C) 2012-2023 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
@@ -19,10 +19,14 @@
 /* Specification.  */
 #include <locale.h>
 
+#include <limits.h>
+
 #if HAVE_STRUCT_LCONV_DECIMAL_POINT
 
+# define FIX_CHAR_VALUE(x) ((x) >= 0 ? (x) : CHAR_MAX)
+
 /* Override for platforms where 'struct lconv' lacks the int_p_*, int_n_*
-   members.  */
+   members or where fields of type 'char' are set to -1 instead of CHAR_MAX.  */
 
 struct lconv *
 localeconv (void)
@@ -41,21 +45,30 @@ localeconv (void)
   result.positive_sign = sys_result->positive_sign;
   result.negative_sign = sys_result->negative_sign;
   result.currency_symbol = sys_result->currency_symbol;
-  result.frac_digits = sys_result->frac_digits;
-  result.p_cs_precedes = sys_result->p_cs_precedes;
-  result.p_sign_posn = sys_result->p_sign_posn;
-  result.p_sep_by_space = sys_result->p_sep_by_space;
-  result.n_cs_precedes = sys_result->n_cs_precedes;
-  result.n_sign_posn = sys_result->n_sign_posn;
-  result.n_sep_by_space = sys_result->n_sep_by_space;
+  result.frac_digits = FIX_CHAR_VALUE (sys_result->frac_digits);
+  result.p_cs_precedes = FIX_CHAR_VALUE (sys_result->p_cs_precedes);
+  result.p_sign_posn = FIX_CHAR_VALUE (sys_result->p_sign_posn);
+  result.p_sep_by_space = FIX_CHAR_VALUE (sys_result->p_sep_by_space);
+  result.n_cs_precedes = FIX_CHAR_VALUE (sys_result->n_cs_precedes);
+  result.n_sign_posn = FIX_CHAR_VALUE (sys_result->n_sign_posn);
+  result.n_sep_by_space = FIX_CHAR_VALUE (sys_result->n_sep_by_space);
   result.int_curr_symbol = sys_result->int_curr_symbol;
-  result.int_frac_digits = sys_result->int_frac_digits;
-  result.int_p_cs_precedes = sys_result->p_cs_precedes;
-  result.int_p_sign_posn = sys_result->p_sign_posn;
-  result.int_p_sep_by_space = sys_result->p_sep_by_space;
-  result.int_n_cs_precedes = sys_result->n_cs_precedes;
-  result.int_n_sign_posn = sys_result->n_sign_posn;
-  result.int_n_sep_by_space = sys_result->n_sep_by_space;
+  result.int_frac_digits = FIX_CHAR_VALUE (sys_result->int_frac_digits);
+# if HAVE_STRUCT_LCONV_INT_P_CS_PRECEDES
+  result.int_p_cs_precedes = FIX_CHAR_VALUE (sys_result->int_p_cs_precedes);
+  result.int_p_sign_posn = FIX_CHAR_VALUE (sys_result->int_p_sign_posn);
+  result.int_p_sep_by_space = FIX_CHAR_VALUE (sys_result->int_p_sep_by_space);
+  result.int_n_cs_precedes = FIX_CHAR_VALUE (sys_result->int_n_cs_precedes);
+  result.int_n_sign_posn = FIX_CHAR_VALUE (sys_result->int_n_sign_posn);
+  result.int_n_sep_by_space = FIX_CHAR_VALUE (sys_result->int_n_sep_by_space);
+# else
+  result.int_p_cs_precedes = FIX_CHAR_VALUE (sys_result->p_cs_precedes);
+  result.int_p_sign_posn = FIX_CHAR_VALUE (sys_result->p_sign_posn);
+  result.int_p_sep_by_space = FIX_CHAR_VALUE (sys_result->p_sep_by_space);
+  result.int_n_cs_precedes = FIX_CHAR_VALUE (sys_result->n_cs_precedes);
+  result.int_n_sign_posn = FIX_CHAR_VALUE (sys_result->n_sign_posn);
+  result.int_n_sep_by_space = FIX_CHAR_VALUE (sys_result->n_sep_by_space);
+# endif
 
   return &result;
 }
@@ -64,8 +77,6 @@ localeconv (void)
 
 /* Override for platforms where 'struct lconv' is a dummy.  */
 
-# include <limits.h>
-
 struct lconv *
 localeconv (void)
 {
diff --git a/lib/localeinfo.c b/lib/localeinfo.c
index 0e74f422..d0e63af6 100644
--- a/lib/localeinfo.c
+++ b/lib/localeinfo.c
@@ -1,6 +1,6 @@
 /* locale information
 
-   Copyright 2016-2022 Free Software Foundation, Inc.
+   Copyright 2016-2023 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
@@ -23,8 +23,6 @@
 
 #include <localeinfo.h>
 
-#include <verify.h>
-
 #include <limits.h>
 #include <locale.h>
 #include <stdlib.h>
@@ -32,7 +30,7 @@
 #include <wctype.h>
 
 /* The sbclen implementation relies on this.  */
-verify (MB_LEN_MAX <= SCHAR_MAX);
+static_assert (MB_LEN_MAX <= SCHAR_MAX);
 
 /* Return true if the locale uses UTF-8.  */
 
@@ -123,8 +121,8 @@ static short const lonesome_lower[] =
 
 /* Verify that the worst case fits.  This is 1 for towupper, 1 for
    towlower, and 1 for each entry in LONESOME_LOWER.  */
-verify (1 + 1 + sizeof lonesome_lower / sizeof *lonesome_lower
-        <= CASE_FOLDED_BUFSIZE);
+static_assert (1 + 1 + sizeof lonesome_lower / sizeof *lonesome_lower
+               <= CASE_FOLDED_BUFSIZE);
 
 /* Find the characters equal to C after case-folding, other than C
    itself, and store them into FOLDED.  Return the number of characters
diff --git a/lib/localeinfo.h b/lib/localeinfo.h
index ac235fcc..bd443ef4 100644
--- a/lib/localeinfo.h
+++ b/lib/localeinfo.h
@@ -1,6 +1,6 @@
 /* locale information
 
-   Copyright 2016-2022 Free Software Foundation, Inc.
+   Copyright 2016-2023 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
@@ -20,7 +20,6 @@
 /* Written by Paul Eggert.  */
 
 #include <limits.h>
-#include <stdbool.h>
 #include <wchar.h>
 
 struct localeinfo
diff --git a/lib/lseek.c b/lib/lseek.c
index 1a9c49bd..7919b03c 100644
--- a/lib/lseek.c
+++ b/lib/lseek.c
@@ -1,5 +1,5 @@
 /* An lseek() function that detects pipes.
-   Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009-2023 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
diff --git a/lib/lstat.c b/lib/lstat.c
index 472bfbce..00a4ce2a 100644
--- a/lib/lstat.c
+++ b/lib/lstat.c
@@ -1,6 +1,6 @@
 /* Work around a bug of lstat on some systems
 
-   Copyright (C) 1997-2006, 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 1997-2006, 2008-2023 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
diff --git a/lib/malloc.c b/lib/malloc.c
index f334dd6e..3ade35cb 100644
--- a/lib/malloc.c
+++ b/lib/malloc.c
@@ -1,6 +1,6 @@
 /* malloc() function that is glibc compatible.
 
-   Copyright (C) 1997-1998, 2006-2007, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 1997-1998, 2006-2007, 2009-2023 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
diff --git a/lib/malloc/dynarray-skeleton.c b/lib/malloc/dynarray-skeleton.c
index bad548a4..580c278b 100644
--- a/lib/malloc/dynarray-skeleton.c
+++ b/lib/malloc/dynarray-skeleton.c
@@ -1,5 +1,5 @@
 /* Type-safe arrays which grow dynamically.
-   Copyright (C) 2017-2022 Free Software Foundation, Inc.
+   Copyright (C) 2017-2023 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
diff --git a/lib/malloc/dynarray.h b/lib/malloc/dynarray.h
index f16fd950..a9a3b085 100644
--- a/lib/malloc/dynarray.h
+++ b/lib/malloc/dynarray.h
@@ -1,5 +1,5 @@
 /* Type-safe arrays which grow dynamically.  Shared definitions.
-   Copyright (C) 2017-2022 Free Software Foundation, Inc.
+   Copyright (C) 2017-2023 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
@@ -94,7 +94,6 @@
 #ifndef _DYNARRAY_H
 #define _DYNARRAY_H
 
-#include <stdbool.h>
 #include <stddef.h>
 #include <string.h>
 
diff --git a/lib/malloc/dynarray_at_failure.c b/lib/malloc/dynarray_at_failure.c
index 062ab706..ebc93109 100644
--- a/lib/malloc/dynarray_at_failure.c
+++ b/lib/malloc/dynarray_at_failure.c
@@ -1,5 +1,5 @@
 /* Report an dynamic array index out of bounds condition.
-   Copyright (C) 2017-2022 Free Software Foundation, Inc.
+   Copyright (C) 2017-2023 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
diff --git a/lib/malloc/dynarray_emplace_enlarge.c b/lib/malloc/dynarray_emplace_enlarge.c
index 0cff2e70..7da53931 100644
--- a/lib/malloc/dynarray_emplace_enlarge.c
+++ b/lib/malloc/dynarray_emplace_enlarge.c
@@ -1,5 +1,5 @@
 /* Increase the size of a dynamic array in preparation of an emplace operation.
-   Copyright (C) 2017-2022 Free Software Foundation, Inc.
+   Copyright (C) 2017-2023 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
diff --git a/lib/malloc/dynarray_finalize.c b/lib/malloc/dynarray_finalize.c
index 3f360c3a..673595a5 100644
--- a/lib/malloc/dynarray_finalize.c
+++ b/lib/malloc/dynarray_finalize.c
@@ -1,5 +1,5 @@
 /* Copy the dynamically-allocated area to an explicitly-sized heap allocation.
-   Copyright (C) 2017-2022 Free Software Foundation, Inc.
+   Copyright (C) 2017-2023 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
diff --git a/lib/malloc/dynarray_resize.c b/lib/malloc/dynarray_resize.c
index 8d1922e5..7ecd4de6 100644
--- a/lib/malloc/dynarray_resize.c
+++ b/lib/malloc/dynarray_resize.c
@@ -1,5 +1,5 @@
 /* Increase the size of a dynamic array.
-   Copyright (C) 2017-2022 Free Software Foundation, Inc.
+   Copyright (C) 2017-2023 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
diff --git a/lib/malloc/dynarray_resize_clear.c b/lib/malloc/dynarray_resize_clear.c
index 8cf1b0d0..bb23c522 100644
--- a/lib/malloc/dynarray_resize_clear.c
+++ b/lib/malloc/dynarray_resize_clear.c
@@ -1,5 +1,5 @@
 /* Increase the size of a dynamic array and clear the new part.
-   Copyright (C) 2017-2022 Free Software Foundation, Inc.
+   Copyright (C) 2017-2023 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
diff --git a/lib/malloca.c b/lib/malloca.c
index e7beaaf0..f055b1e5 100644
--- a/lib/malloca.c
+++ b/lib/malloca.c
@@ -1,5 +1,5 @@
 /* Safe automatic memory allocation.
-   Copyright (C) 2003, 2006-2007, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2006-2007, 2009-2023 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2003, 2018.
 
    This file is free software: you can redistribute it and/or modify
@@ -21,9 +21,9 @@
 /* Specification.  */
 #include "malloca.h"
 
+#include <stdckdint.h>
+
 #include "idx.h"
-#include "intprops.h"
-#include "verify.h"
 
 /* The speed critical point in this file is freea() applied to an alloca()
    result: it must be fast, to match the speed of alloca().  The speed of
@@ -39,7 +39,7 @@
 /* Type for holding very small pointer differences.  */
 typedef unsigned char small_t;
 /* Verify that it is wide enough.  */
-verify (2 * sa_alignment_max - 1 <= (small_t) -1);
+static_assert (2 * sa_alignment_max - 1 <= (small_t) -1);
 
 void *
 mmalloca (size_t n)
@@ -50,17 +50,16 @@ mmalloca (size_t 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))
+  if (!ckd_add (&nplus, n, plus) && !xalloc_oversized (nplus, 1))
     {
       char *mem = (char *) malloc (nplus);
 
       if (mem != NULL)
         {
           uintptr_t umem = (uintptr_t)mem, umemplus;
-          /* The INT_ADD_WRAPV avoids signed integer overflow on
+          /* The ckd_add avoids signed integer overflow on
              theoretical platforms where UINTPTR_MAX <= INT_MAX.  */
-          INT_ADD_WRAPV (umem, sizeof (small_t) + sa_alignment_max - 1,
-                         &umemplus);
+          ckd_add (&umemplus, umem, sizeof (small_t) + sa_alignment_max - 1);
           idx_t offset = ((umemplus & ~alignment2_mask)
                           + sa_alignment_max - umem);
           void *vp = mem + offset;
diff --git a/lib/malloca.h b/lib/malloca.h
index 7ec235f3..f68ddfe0 100644
--- a/lib/malloca.h
+++ b/lib/malloca.h
@@ -1,5 +1,5 @@
 /* Safe automatic memory allocation.
-   Copyright (C) 2003-2007, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2003-2007, 2009-2023 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2003.
 
    This file is free software: you can redistribute it and/or modify
@@ -18,6 +18,12 @@
 #ifndef _MALLOCA_H
 #define _MALLOCA_H
 
+/* This file uses _GL_ATTRIBUTE_ALLOC_SIZE, _GL_ATTRIBUTE_DEALLOC,
+   _GL_ATTRIBUTE_MALLOC, HAVE_ALLOCA.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #include <alloca.h>
 #include <stddef.h>
 #include <stdlib.h>
diff --git a/lib/mbchar.c b/lib/mbchar.c
index 3d05f43b..7d5f72c9 100644
--- a/lib/mbchar.c
+++ b/lib/mbchar.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001, 2006, 2009-2022 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2006, 2009-2023 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
diff --git a/lib/mbchar.h b/lib/mbchar.h
index 9aeb0441..a2ff1d8b 100644
--- a/lib/mbchar.h
+++ b/lib/mbchar.h
@@ -1,5 +1,5 @@
 /* Multibyte character data type.
-   Copyright (C) 2001, 2005-2007, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2005-2007, 2009-2023 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
@@ -144,14 +144,15 @@
 #ifndef _MBCHAR_H
 #define _MBCHAR_H 1
 
-#include <stdbool.h>
+/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #include <string.h>
 #include <wchar.h>
 #include <wctype.h>
 
-#ifndef _GL_INLINE_HEADER_BEGIN
- #error "Please include config.h first."
-#endif
 _GL_INLINE_HEADER_BEGIN
 #ifndef MBCHAR_INLINE
 # define MBCHAR_INLINE _GL_INLINE
diff --git a/lib/mbiter.c b/lib/mbiter.c
index af7e91b9..530181aa 100644
--- a/lib/mbiter.c
+++ b/lib/mbiter.c
@@ -1,6 +1,6 @@
 /* Iterating through multibyte strings: macros for multi-byte encodings.
 
-   Copyright (C) 2012-2022 Free Software Foundation, Inc.
+   Copyright (C) 2012-2023 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
diff --git a/lib/mbiter.h b/lib/mbiter.h
index 031fa92f..7b41870b 100644
--- a/lib/mbiter.h
+++ b/lib/mbiter.h
@@ -1,5 +1,5 @@
 /* Iterating through multibyte strings: macros for multi-byte encodings.
-   Copyright (C) 2001, 2005, 2007, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2005, 2007, 2009-2023 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
@@ -82,17 +82,18 @@
 #ifndef _MBITER_H
 #define _MBITER_H 1
 
+/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #include <assert.h>
-#include <stdbool.h>
 #include <stddef.h>
 #include <string.h>
 #include <wchar.h>
 
 #include "mbchar.h"
 
-#ifndef _GL_INLINE_HEADER_BEGIN
- #error "Please include config.h first."
-#endif
 _GL_INLINE_HEADER_BEGIN
 #ifndef MBITER_INLINE
 # define MBITER_INLINE _GL_INLINE
diff --git a/lib/mbrlen.c b/lib/mbrlen.c
index 2214f9af..46c7161a 100644
--- a/lib/mbrlen.c
+++ b/lib/mbrlen.c
@@ -1,5 +1,5 @@
 /* Recognize multibyte character.
-   Copyright (C) 1999-2000, 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 1999-2000, 2008-2023 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2008.
 
    This file is free software: you can redistribute it and/or modify
diff --git a/lib/mbrtowc-impl-utf8.h b/lib/mbrtowc-impl-utf8.h
index 8e5ac14e..4fdd65d8 100644
--- a/lib/mbrtowc-impl-utf8.h
+++ b/lib/mbrtowc-impl-utf8.h
@@ -1,5 +1,5 @@
 /* Convert multibyte character to wide character.
-   Copyright (C) 1999-2002, 2005-2022 Free Software Foundation, Inc.
+   Copyright (C) 1999-2002, 2005-2023 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
diff --git a/lib/mbrtowc-impl.h b/lib/mbrtowc-impl.h
index 65538e74..e9c04ed7 100644
--- a/lib/mbrtowc-impl.h
+++ b/lib/mbrtowc-impl.h
@@ -1,5 +1,5 @@
 /* Convert multibyte character to wide character.
-   Copyright (C) 1999-2002, 2005-2022 Free Software Foundation, Inc.
+   Copyright (C) 1999-2002, 2005-2023 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
diff --git a/lib/mbrtowc.c b/lib/mbrtowc.c
index 4b164edd..c1a689a2 100644
--- a/lib/mbrtowc.c
+++ b/lib/mbrtowc.c
@@ -1,5 +1,5 @@
 /* Convert multibyte character to wide character.
-   Copyright (C) 1999-2002, 2005-2022 Free Software Foundation, Inc.
+   Copyright (C) 1999-2002, 2005-2023 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2008.
 
    This file is free software: you can redistribute it and/or modify
@@ -51,11 +51,10 @@
 # endif
 
 # include "attribute.h"
-# include "verify.h"
 # include "lc-charset-dispatch.h"
 # include "mbtowc-lock.h"
 
-verify (sizeof (mbstate_t) >= 4);
+static_assert (sizeof (mbstate_t) >= 4);
 static char internal_state[4];
 
 size_t
diff --git a/lib/mbscasecmp.c b/lib/mbscasecmp.c
index 4fe564c1..03292a5c 100644
--- a/lib/mbscasecmp.c
+++ b/lib/mbscasecmp.c
@@ -1,5 +1,5 @@
 /* Case-insensitive string comparison function.
-   Copyright (C) 1998-1999, 2005-2022 Free Software Foundation, Inc.
+   Copyright (C) 1998-1999, 2005-2023 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2005,
    based on earlier glibc code.
 
diff --git a/lib/mbsinit.c b/lib/mbsinit.c
index 9621defc..6e600798 100644
--- a/lib/mbsinit.c
+++ b/lib/mbsinit.c
@@ -1,5 +1,5 @@
 /* Test for initial conversion state.
-   Copyright (C) 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2008.
 
    This file is free software: you can redistribute it and/or modify
@@ -20,7 +20,6 @@
 /* Specification.  */
 #include <wchar.h>
 
-#include "verify.h"
 
 #if GNULIB_defined_mbstate_t
 
@@ -39,7 +38,7 @@
      - In wc -> mb direction, mbstate_t contains no information. In other
        words, it is always in the initial state.  */
 
-verify (sizeof (mbstate_t) >= 4);
+static_assert (sizeof (mbstate_t) >= 4);
 
 int
 mbsinit (const mbstate_t *ps)
diff --git a/lib/mbslen.c b/lib/mbslen.c
index f4270170..54c20be0 100644
--- a/lib/mbslen.c
+++ b/lib/mbslen.c
@@ -1,5 +1,5 @@
 /* Counting the multibyte characters in a string.
-   Copyright (C) 2007-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007-2023 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2007.
 
    This file is free software: you can redistribute it and/or modify
diff --git a/lib/mbsrtowcs-impl.h b/lib/mbsrtowcs-impl.h
index 55dafe38..bcf729dc 100644
--- a/lib/mbsrtowcs-impl.h
+++ b/lib/mbsrtowcs-impl.h
@@ -1,5 +1,5 @@
 /* Convert string to wide string.
-   Copyright (C) 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2008.
 
    This file is free software: you can redistribute it and/or modify
diff --git a/lib/mbsrtowcs-state.c b/lib/mbsrtowcs-state.c
index 55160a20..0949a370 100644
--- a/lib/mbsrtowcs-state.c
+++ b/lib/mbsrtowcs-state.c
@@ -1,5 +1,5 @@
 /* Convert string to wide string.
-   Copyright (C) 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2008.
 
    This file is free software: you can redistribute it and/or modify
diff --git a/lib/mbsrtowcs.c b/lib/mbsrtowcs.c
index 66019b04..c20fc416 100644
--- a/lib/mbsrtowcs.c
+++ b/lib/mbsrtowcs.c
@@ -1,5 +1,5 @@
 /* Convert string to wide string.
-   Copyright (C) 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2008.
 
    This file is free software: you can redistribute it and/or modify
diff --git a/lib/mbsstr.c b/lib/mbsstr.c
index f9ce4eec..03fb7045 100644
--- a/lib/mbsstr.c
+++ b/lib/mbsstr.c
@@ -1,5 +1,5 @@
 /* Searching in a string.  -*- coding: utf-8 -*-
-   Copyright (C) 2005-2022 Free Software Foundation, Inc.
+   Copyright (C) 2005-2023 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2005.
 
    This file is free software: you can redistribute it and/or modify
@@ -20,7 +20,6 @@
 /* Specification.  */
 #include <string.h>
 
-#include <stdbool.h>
 #include <stddef.h>  /* for NULL, in case a nonstandard string.h lacks it */
 #include <stdlib.h>
 
diff --git a/lib/mbtowc-impl.h b/lib/mbtowc-impl.h
index 2b27bafd..39b977be 100644
--- a/lib/mbtowc-impl.h
+++ b/lib/mbtowc-impl.h
@@ -1,5 +1,5 @@
 /* Convert multibyte character to wide character.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2011.
 
    This file is free software: you can redistribute it and/or modify
diff --git a/lib/mbtowc-lock.c b/lib/mbtowc-lock.c
index 06d32246..6ca6e10f 100644
--- a/lib/mbtowc-lock.c
+++ b/lib/mbtowc-lock.c
@@ -1,5 +1,5 @@
 /* Return the internal lock used by mbrtowc and mbrtoc32.
-   Copyright (C) 2019-2022 Free Software Foundation, Inc.
+   Copyright (C) 2019-2023 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
diff --git a/lib/mbtowc-lock.h b/lib/mbtowc-lock.h
index ecfd44e8..2dc22ace 100644
--- a/lib/mbtowc-lock.h
+++ b/lib/mbtowc-lock.h
@@ -1,5 +1,5 @@
 /* Use the internal lock used by mbrtowc and mbrtoc32.
-   Copyright (C) 2019-2022 Free Software Foundation, Inc.
+   Copyright (C) 2019-2023 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
diff --git a/lib/mbtowc.c b/lib/mbtowc.c
index a9a79951..8d9b06d2 100644
--- a/lib/mbtowc.c
+++ b/lib/mbtowc.c
@@ -1,5 +1,5 @@
 /* Convert multibyte character to wide character.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2011.
 
    This file is free software: you can redistribute it and/or modify
diff --git a/lib/mbuiter.c b/lib/mbuiter.c
index 1f3288bd..58dea24b 100644
--- a/lib/mbuiter.c
+++ b/lib/mbuiter.c
@@ -1,5 +1,5 @@
 /* Iterating through multibyte strings: macros for multi-byte encodings.
-   Copyright (C) 2012-2022 Free Software Foundation, Inc.
+   Copyright (C) 2012-2023 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
diff --git a/lib/mbuiter.h b/lib/mbuiter.h
index f197bd1c..7a619f19 100644
--- a/lib/mbuiter.h
+++ b/lib/mbuiter.h
@@ -1,5 +1,5 @@
 /* Iterating through multibyte strings: macros for multi-byte encodings.
-   Copyright (C) 2001, 2005, 2007, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2005, 2007, 2009-2023 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
@@ -89,8 +89,12 @@
 #ifndef _MBUITER_H
 #define _MBUITER_H 1
 
+/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #include <assert.h>
-#include <stdbool.h>
 #include <stddef.h>
 #include <stdlib.h>
 #include <string.h>
@@ -99,9 +103,6 @@
 #include "mbchar.h"
 #include "strnlen1.h"
 
-#ifndef _GL_INLINE_HEADER_BEGIN
- #error "Please include config.h first."
-#endif
 _GL_INLINE_HEADER_BEGIN
 #ifndef MBUITER_INLINE
 # define MBUITER_INLINE _GL_INLINE
diff --git a/lib/memchr.c b/lib/memchr.c
index 0ca7b30a..8e955793 100644
--- a/lib/memchr.c
+++ b/lib/memchr.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2022
+/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2023
    Free Software Foundation, Inc.
 
    Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
diff --git a/lib/memchr.valgrind b/lib/memchr.valgrind
index cb0f351c..97690f2c 100644
--- a/lib/memchr.valgrind
+++ b/lib/memchr.valgrind
@@ -1,6 +1,6 @@
 # Suppress a valgrind message about use of uninitialized memory in memchr().
 
-# Copyright (C) 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2009-2023 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
diff --git a/lib/memchr2.c b/lib/memchr2.c
index ef833df8..1ec53dbe 100644
--- a/lib/memchr2.c
+++ b/lib/memchr2.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2022
+/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2023
    Free Software Foundation, Inc.
 
    Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
diff --git a/lib/memchr2.h b/lib/memchr2.h
index 2fb80479..6554a676 100644
--- a/lib/memchr2.h
+++ b/lib/memchr2.h
@@ -1,5 +1,5 @@
 /* Scan memory for the first of two bytes.
-   Copyright (C) 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 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
@@ -14,6 +14,11 @@
    You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
+/* This file uses _GL_ATTRIBUTE_PURE.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #include <stddef.h>
 
 #ifdef __cplusplus
diff --git a/lib/memchr2.valgrind b/lib/memchr2.valgrind
index e0776d12..3f249798 100644
--- a/lib/memchr2.valgrind
+++ b/lib/memchr2.valgrind
@@ -1,6 +1,6 @@
 # Suppress a valgrind message about use of uninitialized memory in memchr2().
 
-# Copyright (C) 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2009-2023 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
diff --git a/lib/mempcpy.c b/lib/mempcpy.c
index 9aae418e..24a31359 100644
--- a/lib/mempcpy.c
+++ b/lib/mempcpy.c
@@ -1,5 +1,5 @@
 /* Copy memory area and return pointer after last written byte.
-   Copyright (C) 2003, 2007, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2007, 2009-2023 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
diff --git a/lib/memrchr.c b/lib/memrchr.c
index 90fdb86f..c5b1fe8b 100644
--- a/lib/memrchr.c
+++ b/lib/memrchr.c
@@ -1,6 +1,6 @@
 /* memrchr -- find the last occurrence of a byte in a memory block
 
-   Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2022 Free Software
+   Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2023 Free Software
    Foundation, Inc.
 
    Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
diff --git a/lib/minmax.h b/lib/minmax.h
index b4b1345b..0ac40198 100644
--- a/lib/minmax.h
+++ b/lib/minmax.h
@@ -1,5 +1,5 @@
 /* MIN, MAX macros.
-   Copyright (C) 1995, 1998, 2001, 2003, 2005, 2009-2022 Free Software
+   Copyright (C) 1995, 1998, 2001, 2003, 2005, 2009-2023 Free Software
    Foundation, Inc.
 
    This file is free software: you can redistribute it and/or modify
@@ -23,6 +23,11 @@
    MIN, MAX macro redefinitions on some systems; the workaround is to
    #include this file as the last one among the #include list.  */
 
+/* This file uses HAVE_MINMAX_IN_LIMITS_H, HAVE_MINMAX_IN_SYS_PARAM_H.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 /* Before we define the following symbols we get the <limits.h> file
    since otherwise we get redefinitions on some systems if <limits.h> is
    included after this file.  Likewise for <sys/param.h>.
diff --git a/lib/msvc-inval.c b/lib/msvc-inval.c
index d6651caa..c5149a8f 100644
--- a/lib/msvc-inval.c
+++ b/lib/msvc-inval.c
@@ -1,5 +1,5 @@
 /* Invalid parameter handler for MSVC runtime libraries.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 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
diff --git a/lib/msvc-inval.h b/lib/msvc-inval.h
index 1230b899..c16d8801 100644
--- a/lib/msvc-inval.h
+++ b/lib/msvc-inval.h
@@ -1,5 +1,5 @@
 /* Invalid parameter handler for MSVC runtime libraries.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 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
@@ -52,6 +52,11 @@
        AC_DEFINE([MSVC_INVALID_PARAMETER_HANDLING], [SANE_LIBRARY_HANDLING])
  */
 
+/* This file uses HAVE_MSVC_INVALID_PARAMETER_HANDLER.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #define DEFAULT_HANDLING       0
 #define HAIRY_LIBRARY_HANDLING 1
 #define SANE_LIBRARY_HANDLING  2
diff --git a/lib/msvc-nothrow.c b/lib/msvc-nothrow.c
index aa069643..f729fe66 100644
--- a/lib/msvc-nothrow.c
+++ b/lib/msvc-nothrow.c
@@ -1,6 +1,6 @@
 /* Wrappers that don't throw invalid parameter notifications
    with MSVC runtime libraries.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 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
diff --git a/lib/msvc-nothrow.h b/lib/msvc-nothrow.h
index 53451557..0dd229fd 100644
--- a/lib/msvc-nothrow.h
+++ b/lib/msvc-nothrow.h
@@ -1,6 +1,6 @@
 /* Wrappers that don't throw invalid parameter notifications
    with MSVC runtime libraries.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 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
@@ -25,6 +25,11 @@
    This file defines wrappers that turn such an invalid parameter notification
    into an error code.  */
 
+/* This file uses HAVE_MSVC_INVALID_PARAMETER_HANDLER.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #if defined _WIN32 && ! defined __CYGWIN__
 
 /* Get original declaration of _get_osfhandle.  */
diff --git a/lib/nl_langinfo-lock.c b/lib/nl_langinfo-lock.c
index c36882d5..e5cdcd3e 100644
--- a/lib/nl_langinfo-lock.c
+++ b/lib/nl_langinfo-lock.c
@@ -1,5 +1,5 @@
 /* Return the internal lock used by nl_langinfo.
-   Copyright (C) 2019-2022 Free Software Foundation, Inc.
+   Copyright (C) 2019-2023 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
diff --git a/lib/nl_langinfo.c b/lib/nl_langinfo.c
index 3fa47822..f872c6d5 100644
--- a/lib/nl_langinfo.c
+++ b/lib/nl_langinfo.c
@@ -1,6 +1,6 @@
 /* nl_langinfo() replacement: query locale dependent information.
 
-   Copyright (C) 2007-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007-2023 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
@@ -70,6 +70,8 @@
 static char *
 ctype_codeset (void)
 {
+  /* This function is only used on platforms which don't have uselocale().
+     Therefore we don't need to look at the per-thread locale first, here.  */
   static char result[2 + 10 + 1];
   char buf[2 + 10 + 1];
   char locale[SETLOCALE_NULL_MAX];
diff --git a/lib/obstack.c b/lib/obstack.c
index 2cf60454..ca2e61c8 100644
--- a/lib/obstack.c
+++ b/lib/obstack.c
@@ -1,5 +1,5 @@
 /* obstack.c - subroutines used implicitly by object stack macros
-   Copyright (C) 1988-2022 Free Software Foundation, Inc.
+   Copyright (C) 1988-2023 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    This file is free software: you can redistribute it and/or modify
diff --git a/lib/obstack.h b/lib/obstack.h
index de16ac92..cb080c33 100644
--- a/lib/obstack.h
+++ b/lib/obstack.h
@@ -1,5 +1,5 @@
 /* obstack.h - object stack macros
-   Copyright (C) 1988-2022 Free Software Foundation, Inc.
+   Copyright (C) 1988-2023 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    This file is free software: you can redistribute it and/or modify
@@ -103,6 +103,11 @@
 #ifndef _OBSTACK_H
 #define _OBSTACK_H 1
 
+/* This file uses _Noreturn, _GL_ATTRIBUTE_PURE.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #ifndef _OBSTACK_INTERFACE_VERSION
 # define _OBSTACK_INTERFACE_VERSION 2
 #endif
diff --git a/lib/open-safer.c b/lib/open-safer.c
index 006de5e0..381d16ff 100644
--- a/lib/open-safer.c
+++ b/lib/open-safer.c
@@ -1,6 +1,6 @@
 /* Invoke open, but avoid some glitches.
 
-   Copyright (C) 2005-2006, 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2005-2006, 2008-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/lib/open.c b/lib/open.c
index 170bff10..7ec8fdc3 100644
--- a/lib/open.c
+++ b/lib/open.c
@@ -1,5 +1,5 @@
 /* Open a descriptor to a file.
-   Copyright (C) 2007-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007-2023 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
diff --git a/lib/openat-die.c b/lib/openat-die.c
index 486d06c2..df3dbc9b 100644
--- a/lib/openat-die.c
+++ b/lib/openat-die.c
@@ -1,6 +1,6 @@
 /* Report a save- or restore-cwd failure in our openat replacement and then exit.
 
-   Copyright (C) 2005-2006, 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2005-2006, 2008-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/lib/openat-priv.h b/lib/openat-priv.h
index 5d608107..1d31c4e8 100644
--- a/lib/openat-priv.h
+++ b/lib/openat-priv.h
@@ -1,6 +1,6 @@
 /* Internals for openat-like functions.
 
-   Copyright (C) 2005-2006, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2005-2006, 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/lib/openat-proc.c b/lib/openat-proc.c
index 3bacf7db..88f70be4 100644
--- a/lib/openat-proc.c
+++ b/lib/openat-proc.c
@@ -1,6 +1,6 @@
 /* Create /proc/self/fd-related names for subfiles of open directories.
 
-   Copyright (C) 2006, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -30,9 +30,12 @@
 #include <string.h>
 #include <unistd.h>
 
-#ifdef __KLIBC__
+#ifdef __KLIBC__ /* OS/2 */
 # include <InnoTekLIBC/backend.h>
 #endif
+#ifdef __MVS__ /* z/OS */
+# include <termios.h>
+#endif
 
 #include "intprops.h"
 
@@ -53,7 +56,8 @@ openat_proc_name (char buf[OPENAT_BUFFER_SIZE], int fd, char const *file)
       return buf;
     }
 
-#ifndef __KLIBC__
+#if !(defined __KLIBC__ || defined __MVS__)
+  /* Generic code for Linux, Solaris, and similar platforms.  */
 # define PROC_SELF_FD_FORMAT "/proc/self/fd/%d/"
   {
     enum {
@@ -107,14 +111,29 @@ openat_proc_name (char buf[OPENAT_BUFFER_SIZE], int fd, char const *file)
         dirlen = sprintf (result, PROC_SELF_FD_FORMAT, fd);
       }
   }
-#else
+#else /* (defined __KLIBC__ || defined __MVS__), i.e. OS/2 or z/OS */
   /* OS/2 kLIBC provides a function to retrieve a path from a fd.  */
   {
-    char dir[_MAX_PATH];
     size_t bufsize;
 
+# ifdef __KLIBC__
+    char dir[_MAX_PATH];
     if (__libc_Back_ioFHToPath (fd, dir, sizeof dir))
       return NULL;
+# endif
+# ifdef __MVS__
+    char dir[_XOPEN_PATH_MAX];
+    /* Documentation:
+       https://www.ibm.com/docs/en/zos/2.2.0?topic=functions-w-ioctl-w-pioctl-control-devices */
+    if (w_ioctl (fd, _IOCC_GPN, sizeof dir, dir) < 0)
+      return NULL;
+    /* Documentation:
+       https://www.ibm.com/docs/en/zos/2.2.0?topic=functions-e2a-l-convert-characters-from-ebcdic-ascii */
+    dirlen = __e2a_l (dir, strlen (dir));
+    if (dirlen < 0 || dirlen >= sizeof dir)
+      return NULL;
+    dir[dirlen] = '\0';
+# endif
 
     dirlen = strlen (dir);
     bufsize = dirlen + 1 + strlen (file) + 1; /* 1 for '/', 1 for null */
diff --git a/lib/openat-safer.c b/lib/openat-safer.c
index 7b9a873a..6d8fa449 100644
--- a/lib/openat-safer.c
+++ b/lib/openat-safer.c
@@ -1,6 +1,6 @@
 /* Invoke openat, but avoid some glitches.
 
-   Copyright (C) 2005-2006, 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2005-2006, 2008-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/lib/openat.c b/lib/openat.c
index 52aab19d..f28b10e1 100644
--- a/lib/openat.c
+++ b/lib/openat.c
@@ -1,5 +1,5 @@
 /* provide a replacement openat function
-   Copyright (C) 2004-2022 Free Software Foundation, Inc.
+   Copyright (C) 2004-2023 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
@@ -44,7 +44,6 @@ orig_openat (int fd, char const *filename, int flags, mode_t mode)
 #include "cloexec.h"
 
 #include <stdarg.h>
-#include <stdbool.h>
 #include <stddef.h>
 #include <stdlib.h>
 #include <string.h>
diff --git a/lib/openat.h b/lib/openat.h
index 56919ef8..97f066d1 100644
--- a/lib/openat.h
+++ b/lib/openat.h
@@ -1,5 +1,5 @@
 /* provide a replacement openat function
-   Copyright (C) 2004-2006, 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2004-2006, 2008-2023 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
@@ -19,16 +19,18 @@
 #ifndef _GL_HEADER_OPENAT
 #define _GL_HEADER_OPENAT
 
+/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, _Noreturn,
+   _GL_ATTRIBUTE_DEPRECATED, HAVE_OPENAT.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #include <fcntl.h>
 
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <unistd.h>
-#include <stdbool.h>
 
-#ifndef _GL_INLINE_HEADER_BEGIN
- #error "Please include config.h first."
-#endif
 _GL_INLINE_HEADER_BEGIN
 
 #if !HAVE_OPENAT
diff --git a/lib/opendir.c b/lib/opendir.c
index fc6b455a..ceb0e282 100644
--- a/lib/opendir.c
+++ b/lib/opendir.c
@@ -1,5 +1,5 @@
 /* Start reading the entries of a directory.
-   Copyright (C) 2006-2022 Free Software Foundation, Inc.
+   Copyright (C) 2006-2023 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
@@ -29,13 +29,17 @@
 
 #else
 
-# include <stdlib.h>
-
-# include "dirent-private.h"
 # include "filename.h"
 
 #endif
 
+#include <stdlib.h>
+#include <string.h>
+
+#if GNULIB_defined_DIR
+# include "dirent-private.h"
+#endif
+
 #if REPLACE_FCHDIR
 # include <unistd.h>
 #endif
@@ -57,14 +61,37 @@
 
 DIR *
 opendir (const char *dir_name)
+#undef opendir
 {
-#if HAVE_OPENDIR
-# undef opendir
+#if HAVE_DIRENT_H                       /* equivalent to HAVE_OPENDIR */
   DIR *dirp;
 
+# if GNULIB_defined_DIR
+#  undef DIR
+
+  dirp = (struct gl_directory *) malloc (sizeof (struct gl_directory));
+  if (dirp == NULL)
+    {
+      errno = ENOMEM;
+      return NULL;
+    }
+
+  DIR *real_dirp = opendir (dir_name);
+  if (real_dirp == NULL)
+    {
+      int saved_errno = errno;
+      free (dirp);
+      errno = saved_errno;
+      return NULL;
+    }
+
+  dirp->fd_to_close = -1;
+  dirp->real_dirp = real_dirp;
+# else
   dirp = opendir (dir_name);
   if (dirp == NULL)
     return NULL;
+# endif
 
 # ifdef __KLIBC__
   {
@@ -82,6 +109,7 @@ opendir (const char *dir_name)
       }
   }
 # endif
+
 #else
 
   char dir_name_mask[MAX_PATH + 1 + 1 + 1];
@@ -154,6 +182,7 @@ opendir (const char *dir_name)
       errno = ENOMEM;
       return NULL;
     }
+  dirp->fd_to_close = -1;
   dirp->status = status;
   dirp->current = current;
   if (status == -1)
diff --git a/lib/opendirat.c b/lib/opendirat.c
index 1068ae0c..83571538 100644
--- a/lib/opendirat.c
+++ b/lib/opendirat.c
@@ -1,6 +1,6 @@
 /* Open a directory relative to another directory.
 
-   Copyright 2006-2022 Free Software Foundation, Inc.
+   Copyright 2006-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/lib/opendirat.h b/lib/opendirat.h
index 5568790e..5934e89b 100644
--- a/lib/opendirat.h
+++ b/lib/opendirat.h
@@ -1,6 +1,6 @@
 /* Open a directory relative to another directory.
 
-   Copyright (C) 2018-2022 Free Software Foundation, Inc.
+   Copyright (C) 2018-2023 Free Software Foundation, Inc.
 
    This file is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published
@@ -15,6 +15,11 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
+/* This file uses _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_MALLOC.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #include <dirent.h>
 
 DIR *opendirat (int, char const *, int, int *)
diff --git a/lib/pathmax.h b/lib/pathmax.h
index 19b93d7e..6930283b 100644
--- a/lib/pathmax.h
+++ b/lib/pathmax.h
@@ -1,5 +1,5 @@
 /* Define PATH_MAX somehow.  Requires sys/types.h.
-   Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2022 Free Software
+   Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2023 Free Software
    Foundation, Inc.
 
    This file is free software: you can redistribute it and/or modify
@@ -39,6 +39,11 @@
          #endif
  */
 
+/* This file uses HAVE_SYS_PARAM_H.  */
+# if !_GL_CONFIG_H_INCLUDED
+#  error "Please include config.h first."
+# endif
+
 # include <unistd.h>
 
 # include <limits.h>
diff --git a/lib/pipe-safer.c b/lib/pipe-safer.c
index 22f8695e..750d0970 100644
--- a/lib/pipe-safer.c
+++ b/lib/pipe-safer.c
@@ -1,5 +1,5 @@
 /* Invoke pipe, but avoid some glitches.
-   Copyright (C) 2005-2006, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2005-2006, 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/lib/pipe.c b/lib/pipe.c
index ce909b9f..e8573ed9 100644
--- a/lib/pipe.c
+++ b/lib/pipe.c
@@ -1,5 +1,5 @@
 /* Create a pipe.
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 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
diff --git a/lib/propername.c b/lib/propername.c
index eaef4f27..f9eae490 100644
--- a/lib/propername.c
+++ b/lib/propername.c
@@ -1,5 +1,5 @@
 /* Localization of proper names.
-   Copyright (C) 2006-2022 Free Software Foundation, Inc.
+   Copyright (C) 2006-2023 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2006.
 
    This program is free software: you can redistribute it and/or modify
@@ -27,7 +27,6 @@
 #include "propername.h"
 
 #include <ctype.h>
-#include <stdbool.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
diff --git a/lib/propername.h b/lib/propername.h
index 92d1ec5a..359c8b57 100644
--- a/lib/propername.h
+++ b/lib/propername.h
@@ -1,5 +1,5 @@
 /* Localization of proper names.  -*- coding: utf-8 -*-
-   Copyright (C) 2006, 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2008-2023 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2006.
 
    This program is free software: you can redistribute it and/or modify
diff --git a/lib/quote.h b/lib/quote.h
index 0910ffda..9ec57473 100644
--- a/lib/quote.h
+++ b/lib/quote.h
@@ -1,6 +1,6 @@
 /* quote.h - prototypes for quote.c
 
-   Copyright (C) 1998-2001, 2003, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 1998-2001, 2003, 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/lib/quotearg.c b/lib/quotearg.c
index 9180d9ab..975bd61d 100644
--- a/lib/quotearg.c
+++ b/lib/quotearg.c
@@ -1,6 +1,6 @@
 /* quotearg.c - quote arguments for output
 
-   Copyright (C) 1998-2002, 2004-2022 Free Software Foundation, Inc.
+   Copyright (C) 1998-2002, 2004-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -38,7 +38,6 @@
 #include <ctype.h>
 #include <errno.h>
 #include <limits.h>
-#include <stdbool.h>
 #include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
diff --git a/lib/quotearg.h b/lib/quotearg.h
index 2009fac7..baab5866 100644
--- a/lib/quotearg.h
+++ b/lib/quotearg.h
@@ -1,6 +1,6 @@
 /* quotearg.h - quote arguments for output
 
-   Copyright (C) 1998-2002, 2004, 2006, 2008-2022 Free Software Foundation,
+   Copyright (C) 1998-2002, 2004, 2006, 2008-2023 Free Software Foundation,
    Inc.
 
    This program is free software: you can redistribute it and/or modify
@@ -21,6 +21,11 @@
 #ifndef QUOTEARG_H_
 # define QUOTEARG_H_ 1
 
+/* This file uses _GL_ATTRIBUTE_MALLOC, _GL_ATTRIBUTE_RETURNS_NONNULL.  */
+# if !_GL_CONFIG_H_INCLUDED
+#  error "Please include config.h first."
+# endif
+
 # include <stdlib.h>
 
 /* Basic quoting styles.  For each style, an example is given on the
diff --git a/lib/raise.c b/lib/raise.c
index 385ddd38..506e20b4 100644
--- a/lib/raise.c
+++ b/lib/raise.c
@@ -1,6 +1,6 @@
 /* Provide a non-threads replacement for the POSIX raise function.
 
-   Copyright (C) 2002-2003, 2005-2006, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2002-2003, 2005-2006, 2009-2023 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
diff --git a/lib/rawmemchr.c b/lib/rawmemchr.c
index ea68c1bf..45c6cd35 100644
--- a/lib/rawmemchr.c
+++ b/lib/rawmemchr.c
@@ -1,5 +1,5 @@
 /* Searching in a string.
-   Copyright (C) 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 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
@@ -23,10 +23,8 @@
 #if !HAVE_RAWMEMCHR
 
 # include <limits.h>
-# include <stdalign.h>
 # include <stdint.h>
 
-# include "verify.h"
 
 /* Find the first occurrence of C in S.  */
 void *
@@ -36,7 +34,7 @@ rawmemchr (const void *s, int c_in)
   typedef uintptr_t longword;
   /* If you change the "uintptr_t", you should change UINTPTR_WIDTH to match.
      This verifies that the type does not have padding bits.  */
-  verify (UINTPTR_WIDTH == UCHAR_WIDTH * sizeof (longword));
+  static_assert (UINTPTR_WIDTH == UCHAR_WIDTH * sizeof (longword));
 
   const unsigned char *char_ptr;
   unsigned char c = c_in;
diff --git a/lib/rawmemchr.valgrind b/lib/rawmemchr.valgrind
index 64cf86c8..f3e4cb0f 100644
--- a/lib/rawmemchr.valgrind
+++ b/lib/rawmemchr.valgrind
@@ -1,6 +1,6 @@
 # Suppress a valgrind message about use of uninitialized memory in rawmemchr().
 
-# Copyright (C) 2008-2022 Free Software Foundation, Inc.
+# Copyright (C) 2008-2023 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
diff --git a/lib/read.c b/lib/read.c
index 1bb7d90c..a0bdf06f 100644
--- a/lib/read.c
+++ b/lib/read.c
@@ -1,5 +1,5 @@
 /* POSIX compatible read() function.
-   Copyright (C) 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2011.
 
    This file is free software: you can redistribute it and/or modify
diff --git a/lib/readdir.c b/lib/readdir.c
index 8e841df8..04dbba21 100644
--- a/lib/readdir.c
+++ b/lib/readdir.c
@@ -1,5 +1,5 @@
 /* Read the next entry of a directory.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 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
@@ -22,7 +22,9 @@
 #include <errno.h>
 #include <stddef.h>
 
-#include "dirent-private.h"
+#if GNULIB_defined_DIR
+# include "dirent-private.h"
+#endif
 
 /* Don't assume that UNICODE is not defined.  */
 #undef FindNextFile
@@ -30,7 +32,11 @@
 
 struct dirent *
 readdir (DIR *dirp)
+#undef readdir
 {
+#if HAVE_DIRENT_H                       /* equivalent to HAVE_READDIR */
+  return readdir (dirp->real_dirp);
+#else
   char type;
   struct dirent *result;
 
@@ -99,4 +105,5 @@ readdir (DIR *dirp)
   result->d_type = type;
 
   return result;
+#endif
 }
diff --git a/lib/realloc.c b/lib/realloc.c
index c8783815..1063eb09 100644
--- a/lib/realloc.c
+++ b/lib/realloc.c
@@ -1,6 +1,6 @@
 /* realloc() function that is glibc compatible.
 
-   Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2022 Free Software
+   Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2023 Free Software
    Foundation, Inc.
 
    This file is free software: you can redistribute it and/or modify
diff --git a/lib/reallocarray.c b/lib/reallocarray.c
index bc4cba4b..8c99250f 100644
--- a/lib/reallocarray.c
+++ b/lib/reallocarray.c
@@ -1,6 +1,6 @@
 /* reallocarray function that is glibc compatible.
 
-   Copyright (C) 2017-2022 Free Software Foundation, Inc.
+   Copyright (C) 2017-2023 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
@@ -19,16 +19,15 @@
 
 #include <config.h>
 
+#include <stdckdint.h>
 #include <stdlib.h>
 #include <errno.h>
 
-#include "intprops.h"
-
 void *
 reallocarray (void *ptr, size_t nmemb, size_t size)
 {
   size_t nbytes;
-  if (INT_MULTIPLY_WRAPV (nmemb, size, &nbytes))
+  if (ckd_mul (&nbytes, nmemb, size))
     {
       errno = ENOMEM;
       return NULL;
diff --git a/lib/regcomp.c b/lib/regcomp.c
index 122c3de5..89478396 100644
--- a/lib/regcomp.c
+++ b/lib/regcomp.c
@@ -1,5 +1,5 @@
 /* Extended regular expression matching and search library.
-   Copyright (C) 2002-2022 Free Software Foundation, Inc.
+   Copyright (C) 2002-2023 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
 
diff --git a/lib/regex.c b/lib/regex.c
index ff117678..3beb0deb 100644
--- a/lib/regex.c
+++ b/lib/regex.c
@@ -1,5 +1,5 @@
 /* Extended regular expression matching and search library.
-   Copyright (C) 2002-2022 Free Software Foundation, Inc.
+   Copyright (C) 2002-2023 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
 
diff --git a/lib/regex.h b/lib/regex.h
index a7e0bd02..9ef0252f 100644
--- a/lib/regex.h
+++ b/lib/regex.h
@@ -1,6 +1,6 @@
 /* Definitions for data structures and routines for the regular
    expression library.
-   Copyright (C) 1985, 1989-2022 Free Software Foundation, Inc.
+   Copyright (C) 1985, 1989-2023 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
diff --git a/lib/regex_internal.c b/lib/regex_internal.c
index 0e6919f3..998a19b7 100644
--- a/lib/regex_internal.c
+++ b/lib/regex_internal.c
@@ -1,5 +1,5 @@
 /* Extended regular expression matching and search library.
-   Copyright (C) 2002-2022 Free Software Foundation, Inc.
+   Copyright (C) 2002-2023 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
 
diff --git a/lib/regex_internal.h b/lib/regex_internal.h
index 57a455b1..ae9257ea 100644
--- a/lib/regex_internal.h
+++ b/lib/regex_internal.h
@@ -1,5 +1,5 @@
 /* Extended regular expression matching and search library.
-   Copyright (C) 2002-2022 Free Software Foundation, Inc.
+   Copyright (C) 2002-2023 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
 
@@ -29,7 +29,6 @@
 #include <locale.h>
 #include <wchar.h>
 #include <wctype.h>
-#include <stdbool.h>
 #include <stdint.h>
 
 #ifndef _LIBC
@@ -823,7 +822,7 @@ re_string_elem_size_at (const re_string_t *pstr, Idx idx)
 }
 
 #ifdef _LIBC
-# if __GNUC__ >= 7
+# if __glibc_has_attribute (__fallthrough__)
 #  define FALLTHROUGH __attribute__ ((__fallthrough__))
 # else
 #  define FALLTHROUGH ((void) 0)
diff --git a/lib/regexec.c b/lib/regexec.c
index 521cb028..13e0349e 100644
--- a/lib/regexec.c
+++ b/lib/regexec.c
@@ -1,5 +1,5 @@
 /* Extended regular expression matching and search library.
-   Copyright (C) 2002-2022 Free Software Foundation, Inc.
+   Copyright (C) 2002-2023 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
 
diff --git a/lib/safe-read.c b/lib/safe-read.c
index 04ffa7b8..7f6dc095 100644
--- a/lib/safe-read.c
+++ b/lib/safe-read.c
@@ -1,6 +1,6 @@
 /* An interface to read and write that retries after interrupts.
 
-   Copyright (C) 1993-1994, 1998, 2002-2006, 2009-2022 Free Software
+   Copyright (C) 1993-1994, 1998, 2002-2006, 2009-2023 Free Software
    Foundation, Inc.
 
    This file is free software: you can redistribute it and/or modify
diff --git a/lib/safe-read.h b/lib/safe-read.h
index a39bb984..d0874477 100644
--- a/lib/safe-read.h
+++ b/lib/safe-read.h
@@ -1,5 +1,5 @@
 /* An interface to read() that retries after interrupts.
-   Copyright (C) 2002, 2006, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2006, 2009-2023 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
diff --git a/lib/same-inode.h b/lib/same-inode.h
index f65f3d03..10964f00 100644
--- a/lib/same-inode.h
+++ b/lib/same-inode.h
@@ -1,6 +1,6 @@
 /* Determine whether two stat buffers are known to refer to the same file.
 
-   Copyright (C) 2006, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2009-2023 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
diff --git a/lib/save-cwd.c b/lib/save-cwd.c
index ea487a40..3806084b 100644
--- a/lib/save-cwd.c
+++ b/lib/save-cwd.c
@@ -1,6 +1,6 @@
 /* save-cwd.c -- Save and restore current working directory.
 
-   Copyright (C) 1995, 1997-1998, 2003-2006, 2009-2022 Free Software
+   Copyright (C) 1995, 1997-1998, 2003-2006, 2009-2023 Free Software
    Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
@@ -24,7 +24,6 @@
 
 #include <errno.h>
 #include <fcntl.h>
-#include <stdbool.h>
 #include <stdio.h>
 #include <stdlib.h>
 
diff --git a/lib/save-cwd.h b/lib/save-cwd.h
index 90e8a074..d089b0e2 100644
--- a/lib/save-cwd.h
+++ b/lib/save-cwd.h
@@ -1,6 +1,6 @@
 /* Save and restore current working directory.
 
-   Copyright (C) 1995, 1997-1998, 2003, 2009-2022 Free Software Foundation,
+   Copyright (C) 1995, 1997-1998, 2003, 2009-2023 Free Software Foundation,
    Inc.
 
    This program is free software: you can redistribute it and/or modify
diff --git a/lib/setlocale-lock.c b/lib/setlocale-lock.c
index 4e7540e1..b70ba09b 100644
--- a/lib/setlocale-lock.c
+++ b/lib/setlocale-lock.c
@@ -1,5 +1,5 @@
 /* Return the internal lock used by setlocale_null_r.
-   Copyright (C) 2019-2022 Free Software Foundation, Inc.
+   Copyright (C) 2019-2023 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
diff --git a/lib/setlocale_null.c b/lib/setlocale_null.c
index 778429b9..89c8a065 100644
--- a/lib/setlocale_null.c
+++ b/lib/setlocale_null.c
@@ -1,5 +1,5 @@
 /* Query the name of the current global locale.
-   Copyright (C) 2019-2022 Free Software Foundation, Inc.
+   Copyright (C) 2019-2023 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
@@ -173,7 +173,7 @@ setlocale_null_unlocked (int category, char *buf, size_t bufsize)
 #endif
 }
 
-#if !(SETLOCALE_NULL_ALL_MTSAFE && SETLOCALE_NULL_ONE_MTSAFE) /* musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin */
+#if !(SETLOCALE_NULL_ALL_MTSAFE && SETLOCALE_NULL_ONE_MTSAFE) /* musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin < 3.4.6 */
 
 /* Use a lock, so that no two threads can invoke setlocale_null_unlocked
    at the same time.  */
@@ -198,7 +198,7 @@ setlocale_null_with_lock (int category, char *buf, size_t bufsize)
   return ret;
 }
 
-# elif HAVE_PTHREAD_API /* musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin */
+# elif HAVE_PTHREAD_API /* musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin < 3.4.6 */
 
 extern
 #  if defined _WIN32 || defined __CYGWIN__
diff --git a/lib/setlocale_null.h b/lib/setlocale_null.h
index d1921b09..c740fa0f 100644
--- a/lib/setlocale_null.h
+++ b/lib/setlocale_null.h
@@ -1,5 +1,5 @@
 /* Query the name of the current global locale.
-   Copyright (C) 2019-2022 Free Software Foundation, Inc.
+   Copyright (C) 2019-2023 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
diff --git a/lib/signal.in.h b/lib/signal.in.h
index 640b5022..418d59c5 100644
--- a/lib/signal.in.h
+++ b/lib/signal.in.h
@@ -1,6 +1,6 @@
 /* A GNU-like <signal.h>.
 
-   Copyright (C) 2006-2022 Free Software Foundation, Inc.
+   Copyright (C) 2006-2023 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
@@ -55,13 +55,26 @@
 #ifndef _@GUARD_PREFIX@_SIGNAL_H
 #define _@GUARD_PREFIX@_SIGNAL_H
 
-/* Mac OS X 10.3, FreeBSD 6.4, OpenBSD 3.8, OSF/1 4.0, Solaris 2.6, Android,
+/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
+/* For testing the OpenBSD version.  */
+#if (@GNULIB_PTHREAD_SIGMASK@ || defined GNULIB_POSIXCHECK) \
+    && defined __OpenBSD__
+# include <sys/param.h>
+#endif
+
+/* Mac OS X 10.3, FreeBSD < 8.0, OpenBSD < 5.1, OSF/1 4.0, Solaris 2.6, Android,
    OS/2 kLIBC declare pthread_sigmask in <pthread.h>, not in <signal.h>.
    But avoid namespace pollution on glibc systems.*/
 #if (@GNULIB_PTHREAD_SIGMASK@ || defined GNULIB_POSIXCHECK) \
     && ((defined __APPLE__ && defined __MACH__) \
-        || defined __FreeBSD__ || defined __OpenBSD__ || defined __osf__ \
-        || defined __sun || defined __ANDROID__ || defined __KLIBC__) \
+        || (defined __FreeBSD__ && __FreeBSD__ < 8) \
+        || (defined __OpenBSD__ && OpenBSD < 201205) \
+        || defined __osf__ || defined __sun || defined __ANDROID__ \
+        || defined __KLIBC__) \
     && ! defined __GLIBC__
 # include <pthread.h>
 #endif
diff --git a/lib/sigsegv.c b/lib/sigsegv.c
index da64d7d0..5e943e4d 100644
--- a/lib/sigsegv.c
+++ b/lib/sigsegv.c
@@ -1,5 +1,5 @@
 /* Page fault handling library.
-   Copyright (C) 1993-2022 Free Software Foundation, Inc.
+   Copyright (C) 1993-2023 Free Software Foundation, Inc.
    Copyright (C) 2018  Nylon Chen <nylon7@andestech.com>
 
    This program is free software: you can redistribute it and/or modify
@@ -61,7 +61,7 @@ int libsigsegv_version = LIBSIGSEGV_VERSION;
           occurred.
  */
 
-#if defined __linux__ || defined __ANDROID__ /* Linux */
+#if defined __linux__ && !defined __ANDROID__ /* Linux */
 
 # define SIGSEGV_FAULT_HANDLER_ARGLIST  int sig, siginfo_t *sip, void *ucp
 # define SIGSEGV_FAULT_ADDRESS  sip->si_addr
@@ -348,6 +348,17 @@ int libsigsegv_version = LIBSIGSEGV_VERSION;
 
 #endif
 
+#if defined __ANDROID__ /* Android */
+/* A platform that supports the POSIX:2008 (XPG 7) way, without
+   'struct sigcontext' nor 'ucontext_t'.  */
+
+# define SIGSEGV_FAULT_HANDLER_ARGLIST  int sig, siginfo_t *sip, void *context
+# define SIGSEGV_FAULT_ADDRESS  sip->si_addr
+# define SIGSEGV_FAULT_CONTEXT  context
+# define SIGSEGV_FAULT_ADDRESS_FROM_SIGINFO
+
+#endif
+
 #if defined __GNU__ /* Hurd */
 
 # define SIGSEGV_FAULT_HANDLER_ARGLIST  int sig, int code, struct sigcontext *scp
@@ -1200,7 +1211,7 @@ install_for (int sig)
   struct sigaction action;
 
 # ifdef SIGSEGV_FAULT_ADDRESS_FROM_SIGINFO
-  action.sa_sigaction = &sigsegv_handler;
+  action.sa_sigaction = (void (*) (int, siginfo_t *, void *)) &sigsegv_handler;
 # else
   action.sa_handler = (void (*) (int)) &sigsegv_handler;
 # endif
diff --git a/lib/sigsegv.in.h b/lib/sigsegv.in.h
index ba30c34a..40b453e6 100644
--- a/lib/sigsegv.in.h
+++ b/lib/sigsegv.in.h
@@ -1,5 +1,5 @@
 /* Page fault handling library.
-   Copyright (C) 1998-2022 Free Software Foundation, Inc.
+   Copyright (C) 1998-2023 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
@@ -23,7 +23,7 @@
 #include <stddef.h>
 
 /* Define the fault context structure.  */
-#if defined __linux__ || defined __ANDROID__ \
+#if (defined __linux__ && !defined __ANDROID__) \
     || (defined __FreeBSD__ && (defined __arm__ || defined __armhf__ || defined __arm64__)) \
     || defined __NetBSD__ \
     || defined _AIX || defined __sun \
@@ -180,7 +180,7 @@ extern int sigsegv_leave_handler (void (*continuation) (void*, void*, void*), vo
  * on some platforms it is a 'struct sigcontext *', on others merely an
  * opaque 'void *'.
  */
-# if defined __linux__ || defined __ANDROID__ \
+# if (defined __linux__ && !defined __ANDROID__) \
      || (defined __FreeBSD__ && (defined __arm__ || defined __armhf__ || defined __arm64__)) \
      || defined __NetBSD__ \
      || (defined __APPLE__ && defined __MACH__) \
diff --git a/lib/stackvma.c b/lib/stackvma.c
index aab3575c..1224b7b0 100644
--- a/lib/stackvma.c
+++ b/lib/stackvma.c
@@ -1,5 +1,5 @@
 /* Determine the virtual memory area of a given address.
-   Copyright (C) 2002-2022 Free Software Foundation, Inc.
+   Copyright (C) 2002-2023 Free Software Foundation, Inc.
    Copyright (C) 2003-2006  Paolo Bonzini <bonzini@gnu.org>
 
    This program is free software: you can redistribute it and/or modify
@@ -22,6 +22,7 @@
 /* On Solaris in 32-bit mode, when gnulib module 'largefile' is in use,
    prevent a compilation error
      "Cannot use procfs in the large file compilation environment"
+   while also preventing <sys/types.h> from not defining off_t.
    On Android, when targeting Android 4.4 or older with a GCC toolchain,
    prevent a compilation error
      "error: call to 'mmap' declared with attribute error: mmap is not
@@ -30,7 +31,11 @@
       switch to Clang."
    The files that we access in this compilation unit are less than 2 GB
    large.  */
-#if defined __sun || defined __ANDROID__
+#if defined __sun && !defined _LP64 && _FILE_OFFSET_BITS == 64
+# undef _FILE_OFFSET_BITS
+# define _FILE_OFFSET_BITS 32
+#endif
+#ifdef __ANDROID__
 # undef _FILE_OFFSET_BITS
 #endif
 
diff --git a/lib/stackvma.h b/lib/stackvma.h
index b3a92d1d..2ddca87b 100644
--- a/lib/stackvma.h
+++ b/lib/stackvma.h
@@ -1,5 +1,5 @@
 /* Determine the virtual memory area of a given address.
-   Copyright (C) 2002-2022 Free Software Foundation, Inc.
+   Copyright (C) 2002-2023 Free Software Foundation, Inc.
    Copyright (C) 2003-2006  Paolo Bonzini <bonzini@gnu.org>
 
    This program is free software: you can redistribute it and/or modify
diff --git a/lib/stat-time.c b/lib/stat-time.c
index 3d48a2b5..bc282232 100644
--- a/lib/stat-time.c
+++ b/lib/stat-time.c
@@ -1,6 +1,6 @@
 /* stat-related time functions.
 
-   Copyright (C) 2012-2022 Free Software Foundation, Inc.
+   Copyright (C) 2012-2023 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
diff --git a/lib/stat-time.h b/lib/stat-time.h
index 6b0088e3..5b270235 100644
--- a/lib/stat-time.h
+++ b/lib/stat-time.h
@@ -1,6 +1,6 @@
 /* stat-related time functions.
 
-   Copyright (C) 2005, 2007, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2007, 2009-2023 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
@@ -20,16 +20,18 @@
 #ifndef STAT_TIME_H
 #define STAT_TIME_H 1
 
-#include "intprops.h"
+/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, _GL_UNUSED,
+   _GL_ATTRIBUTE_PURE, HAVE_STRUCT_STAT_*.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
 
 #include <errno.h>
+#include <stdckdint.h>
 #include <stddef.h>
 #include <sys/stat.h>
 #include <time.h>
 
-#ifndef _GL_INLINE_HEADER_BEGIN
- #error "Please include config.h first."
-#endif
 _GL_INLINE_HEADER_BEGIN
 #ifndef _GL_STAT_TIME_INLINE
 # define _GL_STAT_TIME_INLINE _GL_INLINE
@@ -232,7 +234,7 @@ stat_time_normalize (int result, _GL_UNUSED struct stat *st)
           /* Overflow is possible, as Solaris 11 stat can yield
              tv_sec == TYPE_MINIMUM (time_t) && tv_nsec == -1000000000.
              INT_ADD_WRAPV is OK, since time_t is signed on Solaris.  */
-          if (INT_ADD_WRAPV (q, ts->tv_sec, &ts->tv_sec))
+          if (ckd_add (&ts->tv_sec, q, ts->tv_sec))
             {
               errno = EOVERFLOW;
               return -1;
diff --git a/lib/stat-w32.c b/lib/stat-w32.c
index c1a29239..2f011975 100644
--- a/lib/stat-w32.c
+++ b/lib/stat-w32.c
@@ -1,5 +1,5 @@
 /* Core of implementation of fstat and stat for native Windows.
-   Copyright (C) 2017-2022 Free Software Foundation, Inc.
+   Copyright (C) 2017-2023 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
@@ -50,7 +50,6 @@
 #include "stat-w32.h"
 
 #include "pathmax.h"
-#include "verify.h"
 
 /* Don't assume that UNICODE is not defined.  */
 #undef LoadLibrary
@@ -228,7 +227,7 @@ _gl_fstat_by_handle (HANDLE h, const char *path, struct stat *buf)
           if (GetFileInformationByHandleExFunc (h, FileIdInfo, &id, sizeof (id)))
             {
               buf->st_dev = id.VolumeSerialNumber;
-              verify (sizeof (ino_t) == sizeof (id.FileId));
+              static_assert (sizeof (ino_t) == sizeof (id.FileId));
               memcpy (&buf->st_ino, &id.FileId, sizeof (ino_t));
               goto ino_done;
             }
diff --git a/lib/stat-w32.h b/lib/stat-w32.h
index 0f79d614..c6738749 100644
--- a/lib/stat-w32.h
+++ b/lib/stat-w32.h
@@ -1,5 +1,5 @@
 /* Core of implementation of fstat and stat for native Windows.
-   Copyright (C) 2017-2022 Free Software Foundation, Inc.
+   Copyright (C) 2017-2023 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
diff --git a/lib/stat.c b/lib/stat.c
index 574489ac..7987e265 100644
--- a/lib/stat.c
+++ b/lib/stat.c
@@ -1,5 +1,5 @@
 /* Work around platform bugs in stat.
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 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
@@ -55,11 +55,9 @@ orig_stat (const char *filename, struct stat *buf)
 
 #include <errno.h>
 #include <limits.h>
-#include <stdbool.h>
 #include <string.h>
 #include "filename.h"
 #include "malloca.h"
-#include "verify.h"
 
 #ifdef WINDOWS_NATIVE
 # define WIN32_LEAN_AND_MEAN
diff --git a/lib/stdalign.in.h b/lib/stdalign.in.h
deleted file mode 100644
index 3b117df1..00000000
--- a/lib/stdalign.in.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/* A substitute for ISO C11 <stdalign.h>.
-
-   Copyright 2011-2022 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 <https://www.gnu.org/licenses/>.  */
-
-/* Written by Paul Eggert and Bruno Haible.  */
-
-#ifndef _GL_STDALIGN_H
-#define _GL_STDALIGN_H
-
-/* ISO C11 <stdalign.h> for platforms that lack it.
-
-   References:
-   ISO C11 (latest free draft
-   <http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf>)
-   sections 6.5.3.4, 6.7.5, 7.15.
-   C++11 (latest free draft
-   <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf>)
-   section 18.10. */
-
-/* alignof (TYPE), also known as _Alignof (TYPE), yields the alignment
-   requirement of a structure member (i.e., slot or field) that is of
-   type TYPE, as an integer constant expression.
-
-   This differs from GCC's and clang's __alignof__ operator, which can
-   yield a better-performing alignment for an object of that type.  For
-   example, on x86 with GCC and on Linux/x86 with clang,
-   __alignof__ (double) and __alignof__ (long long) are 8, whereas
-   alignof (double) and alignof (long long) are 4 unless the option
-   '-malign-double' is used.
-
-   The result cannot be used as a value for an 'enum' constant, if you
-   want to be portable to HP-UX 10.20 cc and AIX 3.2.5 xlc.
-
-   Include <stddef.h> for offsetof.  */
-#include <stddef.h>
-
-/* FreeBSD 9.1 <sys/cdefs.h>, included by <stddef.h> and lots of other
-   standard headers, defines conflicting implementations of _Alignas
-   and _Alignof that are no better than ours; override them.  */
-#undef _Alignas
-#undef _Alignof
-
-/* GCC releases before GCC 4.9 had a bug in _Alignof.  See GCC bug 52023
-   <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>.
-   clang versions < 8.0.0 have the same bug.  */
-#if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \
-     || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9) \
-         && !defined __clang__) \
-     || (defined __clang__ && __clang_major__ < 8))
-# ifdef __cplusplus
-#  if 201103 <= __cplusplus
-#   define _Alignof(type) alignof (type)
-#  else
-   template <class __t> struct __alignof_helper { char __a; __t __b; };
-#   define _Alignof(type) offsetof (__alignof_helper<type>, __b)
-#  endif
-# else
-#  define _Alignof(type) offsetof (struct { char __a; type __b; }, __b)
-# endif
-#endif
-#if ! (defined __cplusplus && 201103 <= __cplusplus)
-# define alignof _Alignof
-#endif
-#define __alignof_is_defined 1
-
-/* alignas (A), also known as _Alignas (A), aligns a variable or type
-   to the alignment A, where A is an integer constant expression.  For
-   example:
-
-      int alignas (8) foo;
-      struct s { int a; int alignas (8) bar; };
-
-   aligns the address of FOO and the offset of BAR to be multiples of 8.
-
-   A should be a power of two that is at least the type's alignment
-   and at most the implementation's alignment limit.  This limit is
-   2**28 on typical GNUish hosts, and 2**13 on MSVC.  To be portable
-   to MSVC through at least version 10.0, A should be an integer
-   constant, as MSVC does not support expressions such as 1 << 3.
-   To be portable to Sun C 5.11, do not align auto variables to
-   anything stricter than their default alignment.
-
-   The following C11 requirements are not supported here:
-
-     - If A is zero, alignas has no effect.
-     - alignas can be used multiple times; the strictest one wins.
-     - alignas (TYPE) is equivalent to alignas (alignof (TYPE)).
-
-   */
-
-#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112
-# if defined __cplusplus && 201103 <= __cplusplus
-#  define _Alignas(a) alignas (a)
-# elif (!defined __attribute__ \
-        && ((defined __APPLE__ && defined __MACH__ \
-             ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
-             : __GNUC__ && !defined __ibmxl__) \
-            || (4 <= __clang_major__) \
-            || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \
-            || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__))
-#  define _Alignas(a) __attribute__ ((__aligned__ (a)))
-# elif 1300 <= _MSC_VER
-#  define _Alignas(a) __declspec (align (a))
-# endif
-#endif
-#if ((defined _Alignas && ! (defined __cplusplus && 201103 <= __cplusplus)) \
-     || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__))
-# define alignas _Alignas
-#endif
-#if defined alignas || (defined __cplusplus && 201103 <= __cplusplus)
-# define __alignas_is_defined 1
-#endif
-
-#endif /* _GL_STDALIGN_H */
diff --git a/lib/stdarg.in.h b/lib/stdarg.in.h
index 95306bfb..8145216e 100644
--- a/lib/stdarg.in.h
+++ b/lib/stdarg.in.h
@@ -1,5 +1,5 @@
 /* Substitute for and wrapper around <stdarg.h>.
-   Copyright (C) 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 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
@@ -27,6 +27,11 @@
 #ifndef _@GUARD_PREFIX@_STDARG_H
 #define _@GUARD_PREFIX@_STDARG_H
 
+/* This file uses va_copy.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #ifndef va_copy
 # define va_copy(a,b) ((a) = (b))
 #endif
diff --git a/lib/stdbool.in.h b/lib/stdbool.in.h
deleted file mode 100644
index 03840f10..00000000
--- a/lib/stdbool.in.h
+++ /dev/null
@@ -1,132 +0,0 @@
-/* Copyright (C) 2001-2003, 2006-2022 Free Software Foundation, Inc.
-   Written by Bruno Haible <haible@clisp.cons.org>, 2001.
-
-   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 <https://www.gnu.org/licenses/>.  */
-
-#ifndef _GL_STDBOOL_H
-#define _GL_STDBOOL_H
-
-/* ISO C 99 <stdbool.h> for platforms that lack it.  */
-
-/* Usage suggestions:
-
-   Programs that use <stdbool.h> should be aware of some limitations
-   and standards compliance issues.
-
-   Standards compliance:
-
-       - <stdbool.h> must be #included before 'bool', 'false', 'true'
-         can be used.
-
-       - You cannot assume that sizeof (bool) == 1.
-
-       - Programs should not undefine the macros bool, true, and false,
-         as C99 lists that as an "obsolescent feature".
-
-   Limitations of this substitute, when used in a C89 environment:
-
-       - <stdbool.h> must be #included before the '_Bool' type can be used.
-
-       - You cannot assume that _Bool is a typedef; it might be a macro.
-
-       - Bit-fields of type 'bool' are not supported.  Portable code
-         should use 'unsigned int foo : 1;' rather than 'bool foo : 1;'.
-
-       - In C99, casts and automatic conversions to '_Bool' or 'bool' are
-         performed in such a way that every nonzero value gets converted
-         to 'true', and zero gets converted to 'false'.  This doesn't work
-         with this substitute.  With this substitute, only the values 0 and 1
-         give the expected result when converted to _Bool' or 'bool'.
-
-       - C99 allows the use of (_Bool)0.0 in constant expressions, but
-         this substitute cannot always provide this property.
-
-   Also, it is suggested that programs use 'bool' rather than '_Bool';
-   this isn't required, but 'bool' is more common.  */
-
-
-/* 7.16. Boolean type and values */
-
-/* BeOS <sys/socket.h> already #defines false 0, true 1.  We use the same
-   definitions below, but temporarily we have to #undef them.  */
-#if defined __BEOS__ && !defined __HAIKU__
-# include <OS.h> /* defines bool but not _Bool */
-# undef false
-# undef true
-#endif
-
-#ifdef __cplusplus
-# define _Bool bool
-# define bool bool
-#else
-# if defined __BEOS__ && !defined __HAIKU__
-  /* A compiler known to have 'bool'.  */
-  /* If the compiler already has both 'bool' and '_Bool', we can assume they
-     are the same types.  */
-#  if !@HAVE__BOOL@
-typedef bool _Bool;
-#  endif
-# else
-#  if !defined __GNUC__
-   /* If @HAVE__BOOL@:
-        Some HP-UX cc and AIX IBM C compiler versions have compiler bugs when
-        the built-in _Bool type is used.  See
-          https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
-          https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html
-          https://lists.gnu.org/r/bug-coreutils/2005-10/msg00086.html
-        Similar bugs are likely with other compilers as well; this file
-        wouldn't be used if <stdbool.h> was working.
-        So we override the _Bool type.
-      If !@HAVE__BOOL@:
-        Need to define _Bool ourselves. As 'signed char' or as an enum type?
-        Use of a typedef, with SunPRO C, leads to a stupid
-          "warning: _Bool is a keyword in ISO C99".
-        Use of an enum type, with IRIX cc, leads to a stupid
-          "warning(1185): enumerated type mixed with another type".
-        Even the existence of an enum type, without a typedef,
-          "Invalid enumerator. (badenum)" with HP-UX cc on Tru64.
-        The only benefit of the enum, debuggability, is not important
-        with these compilers.  So use 'signed char' and no enum.  */
-#   define _Bool signed char
-#  else
-   /* With this compiler, trust the _Bool type if the compiler has it.  */
-#   if !@HAVE__BOOL@
-   /* For the sake of symbolic names in gdb, define true and false as
-      enum constants, not only as macros.
-      It is tempting to write
-         typedef enum { false = 0, true = 1 } _Bool;
-      so that gdb prints values of type 'bool' symbolically.  But then
-      values of type '_Bool' might promote to 'int' or 'unsigned int'
-      (see ISO C 99 6.7.2.2.(4)); however, '_Bool' must promote to 'int'
-      (see ISO C 99 6.3.1.1.(2)).  So add a negative value to the
-      enum; this ensures that '_Bool' promotes to 'int'.  */
-typedef enum { _Bool_must_promote_to_int = -1, false = 0, true = 1 } _Bool;
-#   endif
-#  endif
-# endif
-# define bool _Bool
-#endif
-
-/* The other macros must be usable in preprocessor directives.  */
-#ifdef __cplusplus
-# define false false
-# define true true
-#else
-# define false 0
-# define true 1
-#endif
-
-#define __bool_true_false_are_defined 1
-
-#endif /* _GL_STDBOOL_H */
diff --git a/lib/stdckdint.in.h b/lib/stdckdint.in.h
new file mode 100644
index 00000000..71bab5f0
--- /dev/null
+++ b/lib/stdckdint.in.h
@@ -0,0 +1,35 @@
+/* stdckdint.h -- checked integer arithmetic
+
+   Copyright 2022-2023 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.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.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+#ifndef _GL_STDCKDINT_H
+#define _GL_STDCKDINT_H
+
+#include "intprops-internal.h"
+
+/* Store into *R the low-order bits of A + B, A - B, A * B, respectively.
+   Return 1 if the result overflows, 0 otherwise.
+   A, B, and *R can have any integer type other than char, bool, a
+   bit-precise integer type, or an enumeration type.
+
+   These are like the standard macros introduced in C23, except that
+   arguments should not have side effects.  */
+
+#define ckd_add(r, a, b) ((bool) _GL_INT_ADD_WRAPV (a, b, r))
+#define ckd_sub(r, a, b) ((bool) _GL_INT_SUBTRACT_WRAPV (a, b, r))
+#define ckd_mul(r, a, b) ((bool) _GL_INT_MULTIPLY_WRAPV (a, b, r))
+
+#endif /* _GL_STDCKDINT_H */
diff --git a/lib/stddef.in.h b/lib/stddef.in.h
index 5c9a747d..431e819b 100644
--- a/lib/stddef.in.h
+++ b/lib/stddef.in.h
@@ -1,6 +1,6 @@
 /* A substitute for POSIX 2008 <stddef.h>, for platforms that have issues.
 
-   Copyright (C) 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2009-2023 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
@@ -18,7 +18,7 @@
 /* Written by Eric Blake.  */
 
 /*
- * POSIX 2008 <stddef.h> for platforms that have issues.
+ * POSIX 2008 and ISO C 23 <stddef.h> for platforms that have issues.
  * <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/stddef.h.html>
  */
 
@@ -37,9 +37,9 @@
    remember if special invocation has ever been used to obtain wint_t,
    in which case we need to clean up NULL yet again.  */
 
-# if !(defined _@GUARD_PREFIX@_STDDEF_H && defined _GL_STDDEF_WINT_T)
+# if !(defined _@GUARD_PREFIX@_STDDEF_H && defined _@GUARD_PREFIX@_STDDEF_WINT_T)
 #  ifdef __need_wint_t
-#   define _GL_STDDEF_WINT_T
+#   define _@GUARD_PREFIX@_STDDEF_WINT_T
 #  endif
 #  @INCLUDE_NEXT@ @NEXT_STDDEF_H@
    /* On TinyCC, make sure that the macros that indicate the special invocation
@@ -69,6 +69,7 @@ typedef long rpl_max_align_t;
 typedef long max_align_t;
 #     define _MAX_ALIGN_T
 #    endif
+#    define __CLANG_MAX_ALIGN_T_DEFINED
 #    define GNULIB_defined_max_align_t 1
 #   endif
 #  endif
@@ -79,7 +80,7 @@ typedef long max_align_t;
 
 /* On NetBSD 5.0, the definition of NULL lacks proper parentheses.  */
 #  if (@REPLACE_NULL@ \
-       && (!defined _@GUARD_PREFIX@_STDDEF_H || defined _GL_STDDEF_WINT_T))
+       && (!defined _@GUARD_PREFIX@_STDDEF_H || defined _@GUARD_PREFIX@_STDDEF_WINT_T))
 #   undef NULL
 #   ifdef __cplusplus
    /* ISO C++ says that the macro NULL must expand to an integer constant
@@ -100,6 +101,11 @@ typedef long max_align_t;
 #  ifndef _@GUARD_PREFIX@_STDDEF_H
 #   define _@GUARD_PREFIX@_STDDEF_H
 
+/* This file uses _Noreturn.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 /* Some platforms lack wchar_t.  */
 #if !@HAVE_WCHAR_T@
 # define wchar_t int
@@ -137,11 +143,49 @@ typedef union
   long int __i _GL_STDDEF_ALIGNAS (long int);
 } rpl_max_align_t;
 #   define max_align_t rpl_max_align_t
+#   define __CLANG_MAX_ALIGN_T_DEFINED
 #   define GNULIB_defined_max_align_t 1
 #  endif
 # endif
 #endif
 
+/* ISO C 23 § 7.21.1 The unreachable macro  */
+#ifndef unreachable
+
+/* Code borrowed from verify.h.  */
+# ifndef _GL_HAS_BUILTIN_UNREACHABLE
+#  if defined __clang_major__ && __clang_major__ < 5
+#   define _GL_HAS_BUILTIN_UNREACHABLE 0
+#  elif 4 < __GNUC__ + (5 <= __GNUC_MINOR__)
+#   define _GL_HAS_BUILTIN_UNREACHABLE 1
+#  elif defined __has_builtin
+#   define _GL_HAS_BUILTIN_UNREACHABLE __has_builtin (__builtin_unreachable)
+#  else
+#   define _GL_HAS_BUILTIN_UNREACHABLE 0
+#  endif
+# endif
+
+# if _GL_HAS_BUILTIN_UNREACHABLE
+#  define unreachable() __builtin_unreachable ()
+# elif 1200 <= _MSC_VER
+#  define unreachable() __assume (0)
+# else
+/* Declare abort(), without including <stdlib.h>.  */
+extern
+#  if defined __cplusplus
+"C"
+#  endif
+_Noreturn
+void abort (void)
+#  if defined __cplusplus && (__GLIBC__ >= 2)
+throw ()
+#  endif
+;
+#  define unreachable() abort ()
+# endif
+
+#endif
+
 #  endif /* _@GUARD_PREFIX@_STDDEF_H */
 # endif /* _@GUARD_PREFIX@_STDDEF_H */
 #endif /* __need_XXX */
diff --git a/lib/stdint.in.h b/lib/stdint.in.h
index eaa7874f..5ddc644b 100644
--- a/lib/stdint.in.h
+++ b/lib/stdint.in.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2002, 2004-2022 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2002, 2004-2023 Free Software Foundation, Inc.
    Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood.
    This file is part of gnulib.
 
diff --git a/lib/stdio-impl.h b/lib/stdio-impl.h
index ed32e698..46608bed 100644
--- a/lib/stdio-impl.h
+++ b/lib/stdio-impl.h
@@ -1,5 +1,5 @@
 /* Implementation details of FILE streams.
-   Copyright (C) 2007-2008, 2010-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007-2008, 2010-2023 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
@@ -70,6 +70,12 @@
 #   define _gl_flags_file_t int
 #  else
 #   define _gl_flags_file_t short
+#  endif
+#  ifdef __LP64__
+#   define _gl_file_offset_t int64_t
+#  else
+    /* see https://android.googlesource.com/platform/bionic/+/master/docs/32-bit-abi.md */
+#   define _gl_file_offset_t __kernel_off_t
 #  endif
   /* Up to this commit from 2015-10-12
      <https://android.googlesource.com/platform/bionic.git/+/f0141dfab10a4b332769d52fa76631a64741297a>
@@ -96,7 +102,7 @@
                          unsigned char _nbuf[1]; \
                          struct { unsigned char *_base; size_t _size; } _lb; \
                          int _blksize; \
-                         fpos_t _offset; \
+                         _gl_file_offset_t _offset; \
                          /* More fields, not relevant here.  */ \
                        } *) fp)
 # else
diff --git a/lib/stdio-read.c b/lib/stdio-read.c
index 85efa0d4..6e2984c5 100644
--- a/lib/stdio-read.c
+++ b/lib/stdio-read.c
@@ -1,5 +1,5 @@
 /* POSIX compatible FILE stream read function.
-   Copyright (C) 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2011.
 
    This file is free software: you can redistribute it and/or modify
diff --git a/lib/stdio-write.c b/lib/stdio-write.c
index 82facf54..9cf36cca 100644
--- a/lib/stdio-write.c
+++ b/lib/stdio-write.c
@@ -1,5 +1,5 @@
 /* POSIX compatible FILE stream write function.
-   Copyright (C) 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2008.
 
    This file is free software: you can redistribute it and/or modify
diff --git a/lib/stdio.in.h b/lib/stdio.in.h
index 7b36dac2..433e8488 100644
--- a/lib/stdio.in.h
+++ b/lib/stdio.in.h
@@ -1,6 +1,6 @@
 /* A GNU-like <stdio.h>.
 
-   Copyright (C) 2004, 2007-2022 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2007-2023 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
@@ -36,6 +36,12 @@
 
 #ifndef _@GUARD_PREFIX@_STDIO_H
 
+/* Suppress macOS deprecation warnings for sprintf and vsprintf.  */
+#if (defined __APPLE__ && defined __MACH__) && !defined _POSIX_C_SOURCE
+# define _POSIX_C_SOURCE 200809L
+# define _GL_DEFINED__POSIX_C_SOURCE
+#endif
+
 #define _GL_ALREADY_INCLUDING_STDIO_H
 
 /* The include_next requires a split double-inclusion guard.  */
@@ -43,9 +49,20 @@
 
 #undef _GL_ALREADY_INCLUDING_STDIO_H
 
+#ifdef _GL_DEFINED__POSIX_C_SOURCE
+# undef _GL_DEFINED__POSIX_C_SOURCE
+# undef _POSIX_C_SOURCE
+#endif
+
 #ifndef _@GUARD_PREFIX@_STDIO_H
 #define _@GUARD_PREFIX@_STDIO_H
 
+/* This file uses _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_FORMAT,
+   GNULIB_POSIXCHECK, HAVE_RAW_DECL_*.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 /* Get va_list.  Needed on many systems, including glibc 2.8.  */
 #include <stdarg.h>
 
@@ -193,6 +210,36 @@
 # undef putc_unlocked
 #endif
 
+
+/* Maximum number of characters produced by printing a NaN value.  */
+#ifndef _PRINTF_NAN_LEN_MAX
+# if defined __FreeBSD__ || defined __DragonFly__ \
+     || defined __NetBSD__ \
+     || (defined __APPLE__ && defined __MACH__)
+/* On BSD systems, a NaN value prints as just "nan", without a sign.  */
+#  define _PRINTF_NAN_LEN_MAX 3
+# elif (__GLIBC__ >= 2) || MUSL_LIBC || defined __OpenBSD__ || defined __sun || defined __CYGWIN__
+/* glibc, musl libc, OpenBSD, Solaris libc, and Cygwin produce "[-]nan".  */
+#  define _PRINTF_NAN_LEN_MAX 4
+# elif defined _AIX
+/* AIX produces "[-]NaNQ".  */
+#  define _PRINTF_NAN_LEN_MAX 5
+# elif defined _WIN32 && !defined __CYGWIN__
+/* On native Windows, the output can be:
+   - with MSVC ucrt: "[-]nan" or "[-]nan(ind)" or "[-]nan(snan)",
+   - with mingw: "[-]1.#IND" or "[-]1.#QNAN".  */
+#  define _PRINTF_NAN_LEN_MAX 10
+# elif defined __sgi
+/* On IRIX, the output typically is "[-]nan0xNNNNNNNN" with 8 hexadecimal
+   digits.  */
+#  define _PRINTF_NAN_LEN_MAX 14
+# else
+/* We don't know, but 32 should be a safe maximum.  */
+#  define _PRINTF_NAN_LEN_MAX 32
+# endif
+#endif
+
+
 #if @GNULIB_DPRINTF@
 # if @REPLACE_DPRINTF@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
@@ -210,7 +257,9 @@ _GL_FUNCDECL_SYS (dprintf, int, (int fd, const char *restrict format, ...)
 #  endif
 _GL_CXXALIAS_SYS (dprintf, int, (int fd, const char *restrict format, ...));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (dprintf);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef dprintf
 # if HAVE_RAW_DECL_DPRINTF
@@ -882,7 +931,9 @@ _GL_CXXALIAS_SYS (getdelim, ssize_t,
                    int delimiter,
                    FILE *restrict stream));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (getdelim);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef getdelim
 # if HAVE_RAW_DECL_GETDELIM
@@ -921,7 +972,7 @@ _GL_CXXALIAS_SYS (getline, ssize_t,
                   (char **restrict lineptr, size_t *restrict linesize,
                    FILE *restrict stream));
 # endif
-# if @HAVE_DECL_GETLINE@
+# if __GLIBC__ >= 2 && @HAVE_DECL_GETLINE@
 _GL_CXXALIASWARN (getline);
 # endif
 #elif defined GNULIB_POSIXCHECK
@@ -951,9 +1002,17 @@ _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
 #  endif
 _GL_CXXALIAS_MDA (getw, int, (FILE *restrict stream));
 # else
+#  if @HAVE_DECL_GETW@
+#   if defined __APPLE__ && defined __MACH__
+/* The presence of the declaration depends on _POSIX_C_SOURCE.  */
+_GL_FUNCDECL_SYS (getw, int, (FILE *restrict stream));
+#   endif
 _GL_CXXALIAS_SYS (getw, int, (FILE *restrict stream));
+#  endif
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (getw);
+# endif
 #endif
 
 #if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@
@@ -1190,9 +1249,17 @@ _GL_CXXALIASWARN (puts);
 #  endif
 _GL_CXXALIAS_MDA (putw, int, (int w, FILE *restrict stream));
 # else
+#  if @HAVE_DECL_PUTW@
+#   if defined __APPLE__ && defined __MACH__
+/* The presence of the declaration depends on _POSIX_C_SOURCE.  */
+_GL_FUNCDECL_SYS (putw, int, (int w, FILE *restrict stream));
+#   endif
 _GL_CXXALIAS_SYS (putw, int, (int w, FILE *restrict stream));
+#  endif
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (putw);
+# endif
 #endif
 
 #if @GNULIB_REMOVE@
diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h
index a86643c3..1479a2b2 100644
--- a/lib/stdlib.in.h
+++ b/lib/stdlib.in.h
@@ -1,6 +1,6 @@
 /* A GNU-like <stdlib.h>.
 
-   Copyright (C) 1995, 2001-2004, 2006-2022 Free Software Foundation, Inc.
+   Copyright (C) 1995, 2001-2004, 2006-2023 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
@@ -37,6 +37,12 @@
 #ifndef _@GUARD_PREFIX@_STDLIB_H
 #define _@GUARD_PREFIX@_STDLIB_H
 
+/* This file uses _Noreturn, _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_MALLOC,
+   _GL_ATTRIBUTE_PURE, GNULIB_POSIXCHECK, HAVE_RAW_DECL_*.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 /* NetBSD 5.0 mis-defines NULL.  */
 #include <stddef.h>
 
@@ -67,9 +73,7 @@
 #  include <random.h>
 # endif
 
-# if !@HAVE_STRUCT_RANDOM_DATA@ || @REPLACE_RANDOM_R@ || !@HAVE_RANDOM_R@
-#  include <stdint.h>
-# endif
+# include <stdint.h>
 
 # if !@HAVE_STRUCT_RANDOM_DATA@
 /* Define 'struct random_data'.
@@ -164,11 +168,22 @@ struct random_data
 #if @GNULIB__EXIT@
 /* Terminate the current process with the given return code, without running
    the 'atexit' handlers.  */
-# if !@HAVE__EXIT@
+# if @REPLACE__EXIT@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef _Exit
+#   define _Exit rpl__Exit
+#  endif
+_GL_FUNCDECL_RPL (_Exit, _Noreturn void, (int status));
+_GL_CXXALIAS_RPL (_Exit, void, (int status));
+# else
+#  if !@HAVE__EXIT@
 _GL_FUNCDECL_SYS (_Exit, _Noreturn void, (int status));
-# endif
+#  endif
 _GL_CXXALIAS_SYS (_Exit, void, (int status));
+# endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (_Exit);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef _Exit
 # if HAVE_RAW_DECL__EXIT
@@ -226,7 +241,7 @@ _GL_FUNCDECL_SYS (aligned_alloc, void *,
 _GL_CXXALIAS_SYS (aligned_alloc, void *, (size_t alignment, size_t size));
 #  endif
 # endif
-# if @HAVE_ALIGNED_ALLOC@
+# if (__GLIBC__ >= 2) && @HAVE_ALIGNED_ALLOC@
 _GL_CXXALIASWARN (aligned_alloc);
 # endif
 #else
@@ -416,12 +431,24 @@ _GL_CXXALIASWARN (gcvt);
    The three numbers are the load average of the last 1 minute, the last 5
    minutes, and the last 15 minutes, respectively.
    LOADAVG is an array of NELEM numbers.  */
-# if !@HAVE_DECL_GETLOADAVG@
+# if @REPLACE_GETLOADAVG@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef getloadavg
+#   define getloadavg rpl_getloadavg
+#  endif
+_GL_FUNCDECL_RPL (getloadavg, int, (double loadavg[], int nelem)
+                                   _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (getloadavg, int, (double loadavg[], int nelem));
+# else
+#  if !@HAVE_DECL_GETLOADAVG@
 _GL_FUNCDECL_SYS (getloadavg, int, (double loadavg[], int nelem)
                                    _GL_ARG_NONNULL ((1)));
-# endif
+#  endif
 _GL_CXXALIAS_SYS (getloadavg, int, (double loadavg[], int nelem));
+# endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (getloadavg);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef getloadavg
 # if HAVE_RAW_DECL_GETLOADAVG
@@ -430,6 +457,41 @@ _GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - "
 # endif
 #endif
 
+#if @GNULIB_GETPROGNAME@
+/* Return the base name of the executing program.
+   On native Windows this will usually end in ".exe" or ".EXE". */
+# if @REPLACE_GETPROGNAME@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef getprogname
+#   define getprogname rpl_getprogname
+#  endif
+#  if @HAVE_DECL_PROGRAM_INVOCATION_NAME@
+_GL_FUNCDECL_RPL (getprogname, const char *, (void) _GL_ATTRIBUTE_PURE);
+#  else
+_GL_FUNCDECL_RPL (getprogname, const char *, (void));
+#  endif
+_GL_CXXALIAS_RPL (getprogname, const char *, (void));
+# else
+#  if !@HAVE_GETPROGNAME@
+#   if @HAVE_DECL_PROGRAM_INVOCATION_NAME@
+_GL_FUNCDECL_SYS (getprogname, const char *, (void) _GL_ATTRIBUTE_PURE);
+#   else
+_GL_FUNCDECL_SYS (getprogname, const char *, (void));
+#   endif
+#  endif
+_GL_CXXALIAS_SYS (getprogname, const char *, (void));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (getprogname);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef getprogname
+# if HAVE_RAW_DECL_GETPROGNAME
+_GL_WARN_ON_USE (getprogname, "getprogname is unportable - "
+                 "use gnulib module getprogname for portability");
+# endif
+#endif
+
 #if @GNULIB_GETSUBOPT@
 /* Assuming *OPTIONP is a comma separated list of elements of the form
    "token" or "token=value", getsubopt parses the first of these elements.
@@ -442,14 +504,28 @@ _GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - "
    Otherwise it returns -1, and *OPTIONP and *VALUEP are undefined.
    For more details see the POSIX specification.
    https://pubs.opengroup.org/onlinepubs/9699919799/functions/getsubopt.html */
-# if !@HAVE_GETSUBOPT@
+# if @REPLACE_GETSUBOPT@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef getsubopt
+#   define getsubopt rpl_getsubopt
+#  endif
+_GL_FUNCDECL_RPL (getsubopt, int,
+                  (char **optionp, char *const *tokens, char **valuep)
+                  _GL_ARG_NONNULL ((1, 2, 3)));
+_GL_CXXALIAS_RPL (getsubopt, int,
+                  (char **optionp, char *const *tokens, char **valuep));
+# else
+#  if !@HAVE_GETSUBOPT@
 _GL_FUNCDECL_SYS (getsubopt, int,
                   (char **optionp, char *const *tokens, char **valuep)
                   _GL_ARG_NONNULL ((1, 2, 3)));
-# endif
+#  endif
 _GL_CXXALIAS_SYS (getsubopt, int,
                   (char **optionp, char *const *tokens, char **valuep));
+# endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (getsubopt);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef getsubopt
 # if HAVE_RAW_DECL_GETSUBOPT
@@ -517,6 +593,51 @@ _GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - "
 # endif
 #endif
 
+/* Return maximum number of bytes of a multibyte character.  */
+#if @REPLACE_MB_CUR_MAX@
+# if !GNULIB_defined_MB_CUR_MAX
+static inline
+int gl_MB_CUR_MAX (void)
+{
+  /* Turn the value 3 to the value 4, as needed for the UTF-8 encoding.  */
+  return MB_CUR_MAX + (MB_CUR_MAX == 3);
+}
+#  undef MB_CUR_MAX
+#  define MB_CUR_MAX gl_MB_CUR_MAX ()
+#  define GNULIB_defined_MB_CUR_MAX 1
+# endif
+#endif
+
+/* Convert a string to a wide string.  */
+#if @GNULIB_MBSTOWCS@
+# if @REPLACE_MBSTOWCS@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef mbstowcs
+#   define mbstowcs rpl_mbstowcs
+#  endif
+_GL_FUNCDECL_RPL (mbstowcs, size_t,
+                  (wchar_t *restrict dest, const char *restrict src,
+                   size_t len)
+                  _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (mbstowcs, size_t,
+                  (wchar_t *restrict dest, const char *restrict src,
+                   size_t len));
+# else
+_GL_CXXALIAS_SYS (mbstowcs, size_t,
+                  (wchar_t *restrict dest, const char *restrict src,
+                   size_t len));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (mbstowcs);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef mbstowcs
+# if HAVE_RAW_DECL_MBSTOWCS
+_GL_WARN_ON_USE (mbstowcs, "mbstowcs is unportable - "
+                 "use gnulib module mbstowcs for portability");
+# endif
+#endif
+
 /* Convert a multibyte character to a wide character.  */
 #if @GNULIB_MBTOWC@
 # if @REPLACE_MBTOWC@
@@ -579,12 +700,24 @@ _GL_WARN_ON_USE (mkdtemp, "mkdtemp is unportable - "
    implementation.
    Returns the open file descriptor if successful, otherwise -1 and errno
    set.  */
-# if !@HAVE_MKOSTEMP@
+# if @REPLACE_MKOSTEMP@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef mkostemp
+#   define mkostemp rpl_mkostemp
+#  endif
+_GL_FUNCDECL_RPL (mkostemp, int, (char * /*template*/, int /*flags*/)
+                                 _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (mkostemp, int, (char * /*template*/, int /*flags*/));
+# else
+#  if !@HAVE_MKOSTEMP@
 _GL_FUNCDECL_SYS (mkostemp, int, (char * /*template*/, int /*flags*/)
                                  _GL_ARG_NONNULL ((1)));
-# endif
+#  endif
 _GL_CXXALIAS_SYS (mkostemp, int, (char * /*template*/, int /*flags*/));
+# endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (mkostemp);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef mkostemp
 # if HAVE_RAW_DECL_MKOSTEMP
@@ -607,14 +740,28 @@ _GL_WARN_ON_USE (mkostemp, "mkostemp is unportable - "
    implementation.
    Returns the open file descriptor if successful, otherwise -1 and errno
    set.  */
-# if !@HAVE_MKOSTEMPS@
+# if @REPLACE_MKOSTEMPS@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef mkostemps
+#   define mkostemps rpl_mkostemps
+#  endif
+_GL_FUNCDECL_RPL (mkostemps, int,
+                  (char * /*template*/, int /*suffixlen*/, int /*flags*/)
+                  _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (mkostemps, int,
+                  (char * /*template*/, int /*suffixlen*/, int /*flags*/));
+# else
+#  if !@HAVE_MKOSTEMPS@
 _GL_FUNCDECL_SYS (mkostemps, int,
                   (char * /*template*/, int /*suffixlen*/, int /*flags*/)
                   _GL_ARG_NONNULL ((1)));
-# endif
+#  endif
 _GL_CXXALIAS_SYS (mkostemps, int,
                   (char * /*template*/, int /*suffixlen*/, int /*flags*/));
+# endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (mkostemps);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef mkostemps
 # if HAVE_RAW_DECL_MKOSTEMPS
@@ -713,7 +860,7 @@ _GL_CXXALIAS_SYS (posix_memalign, int,
                   (void **memptr, size_t alignment, size_t size));
 #  endif
 # endif
-# if @HAVE_POSIX_MEMALIGN@
+# if __GLIBC__ >= 2 && @HAVE_POSIX_MEMALIGN@
 _GL_CXXALIASWARN (posix_memalign);
 # endif
 #elif defined GNULIB_POSIXCHECK
@@ -727,11 +874,22 @@ _GL_WARN_ON_USE (posix_memalign, "posix_memalign is not portable - "
 #if @GNULIB_POSIX_OPENPT@
 /* Return an FD open to the master side of a pseudo-terminal.  Flags should
    include O_RDWR, and may also include O_NOCTTY.  */
-# if !@HAVE_POSIX_OPENPT@
+# if @REPLACE_POSIX_OPENPT@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef posix_openpt
+#   define posix_openpt rpl_posix_openpt
+#  endif
+_GL_FUNCDECL_RPL (posix_openpt, int, (int flags));
+_GL_CXXALIAS_RPL (posix_openpt, int, (int flags));
+# else
+#  if !@HAVE_POSIX_OPENPT@
 _GL_FUNCDECL_SYS (posix_openpt, int, (int flags));
-# endif
+#  endif
 _GL_CXXALIAS_SYS (posix_openpt, int, (int flags));
+# endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (posix_openpt);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef posix_openpt
 # if HAVE_RAW_DECL_POSIX_OPENPT
@@ -900,7 +1058,9 @@ _GL_FUNCDECL_SYS (random, long, (void));
                                int.  */
 _GL_CXXALIAS_SYS_CAST (random, long, (void));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (random);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef random
 # if HAVE_RAW_DECL_RANDOM
@@ -925,7 +1085,9 @@ _GL_FUNCDECL_SYS (srandom, void, (unsigned int seed));
                                        unsigned long seed.  */
 _GL_CXXALIAS_SYS_CAST (srandom, void, (unsigned int seed));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (srandom);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef srandom
 # if HAVE_RAW_DECL_SRANDOM
@@ -956,7 +1118,9 @@ _GL_FUNCDECL_SYS (initstate, char *,
 _GL_CXXALIAS_SYS_CAST (initstate, char *,
                        (unsigned int seed, char *buf, size_t buf_size));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (initstate);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef initstate
 # if HAVE_RAW_DECL_INITSTATE
@@ -981,7 +1145,9 @@ _GL_FUNCDECL_SYS (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1)));
    is                                     const char *arg_state.  */
 _GL_CXXALIAS_SYS_CAST (setstate, char *, (char *arg_state));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (setstate);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef setstate
 # if HAVE_RAW_DECL_SETSTATE
@@ -1167,7 +1333,9 @@ _GL_FUNCDECL_SYS (reallocarray, void *,
 _GL_CXXALIAS_SYS (reallocarray, void *,
                   (void *ptr, size_t nmemb, size_t size));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (reallocarray);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef reallocarray
 # if HAVE_RAW_DECL_REALLOCARRAY
@@ -1363,7 +1531,9 @@ _GL_CXXALIAS_SYS (strtol, long,
                   (const char *restrict string, char **restrict endptr,
                    int base));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (strtol);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef strtol
 # if HAVE_RAW_DECL_STRTOL
@@ -1444,7 +1614,9 @@ _GL_CXXALIAS_SYS (strtoul, unsigned long,
                   (const char *restrict string, char **restrict endptr,
                    int base));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (strtoul);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef strtoul
 # if HAVE_RAW_DECL_STRTOUL
diff --git a/lib/stpcpy.c b/lib/stpcpy.c
index 434f84ae..73c1eb78 100644
--- a/lib/stpcpy.c
+++ b/lib/stpcpy.c
@@ -1,5 +1,5 @@
 /* stpcpy.c -- copy a string and return pointer to end of new string
-   Copyright (C) 1992, 1995, 1997-1998, 2006, 2009-2022 Free Software
+   Copyright (C) 1992, 1995, 1997-1998, 2006, 2009-2023 Free Software
    Foundation, Inc.
 
    NOTE: The canonical source of this file is maintained with the GNU C Library.
diff --git a/lib/str-kmp.h b/lib/str-kmp.h
index 959ff65a..b8821f84 100644
--- a/lib/str-kmp.h
+++ b/lib/str-kmp.h
@@ -1,6 +1,6 @@
 /* Substring search in a NUL terminated string of UNIT elements,
    using the Knuth-Morris-Pratt algorithm.
-   Copyright (C) 2005-2022 Free Software Foundation, Inc.
+   Copyright (C) 2005-2023 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2005.
 
    This file is free software.
diff --git a/lib/str-two-way.h b/lib/str-two-way.h
index b00017c0..dfe70224 100644
--- a/lib/str-two-way.h
+++ b/lib/str-two-way.h
@@ -1,5 +1,5 @@
 /* Byte-wise substring search, using the Two-Way algorithm.
-   Copyright (C) 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Eric Blake <ebb9@byu.net>, 2008.
 
diff --git a/lib/strdup.c b/lib/strdup.c
index 2a0df023..08c40d57 100644
--- a/lib/strdup.c
+++ b/lib/strdup.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1996-1998, 2002-2004, 2006-2007, 2009-2022 Free Software
+/* Copyright (C) 1991, 1996-1998, 2002-2004, 2006-2007, 2009-2023 Free Software
    Foundation, Inc.
 
    This file is part of the GNU C Library.
diff --git a/lib/streq.h b/lib/streq.h
index 49f73c1b..712948eb 100644
--- a/lib/streq.h
+++ b/lib/streq.h
@@ -1,5 +1,5 @@
 /* Optimized string comparison.
-   Copyright (C) 2001-2002, 2007, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002, 2007, 2009-2023 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
diff --git a/lib/strerror-override.c b/lib/strerror-override.c
index 6be1afdc..cddaa4a9 100644
--- a/lib/strerror-override.c
+++ b/lib/strerror-override.c
@@ -1,6 +1,6 @@
 /* strerror-override.c --- POSIX compatible system error routine
 
-   Copyright (C) 2010-2022 Free Software Foundation, Inc.
+   Copyright (C) 2010-2023 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
diff --git a/lib/strerror-override.h b/lib/strerror-override.h
index d010d27c..c9b3ba8c 100644
--- a/lib/strerror-override.h
+++ b/lib/strerror-override.h
@@ -1,6 +1,6 @@
 /* strerror-override.h --- POSIX compatible system error routine
 
-   Copyright (C) 2010-2022 Free Software Foundation, Inc.
+   Copyright (C) 2010-2023 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
@@ -18,6 +18,11 @@
 #ifndef _GL_STRERROR_OVERRIDE_H
 # define _GL_STRERROR_OVERRIDE_H
 
+/* This file uses _GL_ATTRIBUTE_CONST.  */
+# if !_GL_CONFIG_H_INCLUDED
+#  error "Please include config.h first."
+# endif
+
 # include <errno.h>
 # include <stddef.h>
 
diff --git a/lib/strerror.c b/lib/strerror.c
index 67c5216e..d754f601 100644
--- a/lib/strerror.c
+++ b/lib/strerror.c
@@ -1,6 +1,6 @@
 /* strerror.c --- POSIX compatible system error routine
 
-   Copyright (C) 2007-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007-2023 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
@@ -27,7 +27,6 @@
 
 #include "intprops.h"
 #include "strerror-override.h"
-#include "verify.h"
 
 /* Use the system functions, not the gnulib overrides in this file.  */
 #undef sprintf
@@ -55,7 +54,7 @@ strerror (int n)
   if (!msg || !*msg)
     {
       static char const fmt[] = "Unknown error %d";
-      verify (sizeof buf >= sizeof (fmt) + INT_STRLEN_BOUND (n));
+      static_assert (sizeof buf >= sizeof (fmt) + INT_STRLEN_BOUND (n));
       sprintf (buf, fmt, n);
       errno = EINVAL;
       return buf;
diff --git a/lib/striconv.c b/lib/striconv.c
index d3da10a4..ec5e1a82 100644
--- a/lib/striconv.c
+++ b/lib/striconv.c
@@ -1,5 +1,5 @@
 /* Charset conversion.
-   Copyright (C) 2001-2007, 2010-2022 Free Software Foundation, Inc.
+   Copyright (C) 2001-2007, 2010-2023 Free Software Foundation, Inc.
    Written by Bruno Haible and Simon Josefsson.
 
    This file is free software: you can redistribute it and/or modify
diff --git a/lib/striconv.h b/lib/striconv.h
index 5a184ac1..a4164da6 100644
--- a/lib/striconv.h
+++ b/lib/striconv.h
@@ -1,5 +1,5 @@
 /* Charset conversion.
-   Copyright (C) 2001-2004, 2006-2007, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2001-2004, 2006-2007, 2009-2023 Free Software Foundation, Inc.
    Written by Bruno Haible and Simon Josefsson.
 
    This file is free software: you can redistribute it and/or modify
@@ -18,6 +18,11 @@
 #ifndef _STRICONV_H
 #define _STRICONV_H
 
+/* This file uses _GL_ATTRIBUTE_MALLOC, HAVE_ICONV.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #include <stdlib.h>
 #if HAVE_ICONV
 #include <iconv.h>
diff --git a/lib/string.in.h b/lib/string.in.h
index 3996da9f..912d0f7a 100644
--- a/lib/string.in.h
+++ b/lib/string.in.h
@@ -1,6 +1,6 @@
 /* A GNU-like <string.h>.
 
-   Copyright (C) 1995-1996, 2001-2022 Free Software Foundation, Inc.
+   Copyright (C) 1995-1996, 2001-2023 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
@@ -44,6 +44,12 @@
 #ifndef _@GUARD_PREFIX@_STRING_H
 #define _@GUARD_PREFIX@_STRING_H
 
+/* This file uses _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_MALLOC,
+   _GL_ATTRIBUTE_PURE, GNULIB_POSIXCHECK, HAVE_RAW_DECL_*.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 /* NetBSD 5.0 mis-defines NULL.  */
 #include <stddef.h>
 
@@ -59,10 +65,11 @@
 # include <unistd.h>
 #endif
 
-/* AIX 7.2 declares ffsl and ffsll in <strings.h>, not in <string.h>.  */
+/* AIX 7.2 and Android 13 declare ffsl and ffsll in <strings.h>, not in
+   <string.h>.  */
 /* But in any case avoid namespace pollution on glibc systems.  */
 #if ((@GNULIB_FFSL@ || @GNULIB_FFSLL@ || defined GNULIB_POSIXCHECK) \
-     && defined _AIX) \
+     && (defined _AIX || defined __ANDROID__)) \
     && ! defined __GLIBC__
 # include <strings.h>
 #endif
@@ -82,7 +89,14 @@
    can be freed via 'free'; it can be used only after declaring 'free'.  */
 /* Applies to: functions.  Cannot be used on inline functions.  */
 #ifndef _GL_ATTRIBUTE_DEALLOC_FREE
-# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (free, 1)
+# if defined __cplusplus && defined __GNUC__ && !defined __clang__
+/* Work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108231> */
+#  define _GL_ATTRIBUTE_DEALLOC_FREE \
+     _GL_ATTRIBUTE_DEALLOC ((void (*) (void *)) free, 1)
+# else
+#  define _GL_ATTRIBUTE_DEALLOC_FREE \
+     _GL_ATTRIBUTE_DEALLOC (free, 1)
+# endif
 #endif
 
 /* _GL_ATTRIBUTE_MALLOC declares that the function returns a pointer to freshly
@@ -118,7 +132,11 @@
 # if (@REPLACE_FREE@ && !defined free \
       && !(defined __cplusplus && defined GNULIB_NAMESPACE))
 /* We can't do '#define free rpl_free' here.  */
+#  if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2)
+_GL_EXTERN_C void rpl_free (void *) throw ();
+#  else
 _GL_EXTERN_C void rpl_free (void *);
+#  endif
 #  undef _GL_ATTRIBUTE_DEALLOC_FREE
 #  define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (rpl_free, 1)
 # else
@@ -300,16 +318,32 @@ _GL_WARN_ON_USE (memmem, "memmem is unportable and often quadratic - "
 /* Copy N bytes of SRC to DEST, return pointer to bytes after the
    last written byte.  */
 #if @GNULIB_MEMPCPY@
-# if ! @HAVE_MEMPCPY@
+# if @REPLACE_MEMPCPY@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef mempcpy
+#   define mempcpy rpl_mempcpy
+#  endif
+_GL_FUNCDECL_RPL (mempcpy, void *,
+                  (void *restrict __dest, void const *restrict __src,
+                   size_t __n)
+                  _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (mempcpy, void *,
+                  (void *restrict __dest, void const *restrict __src,
+                   size_t __n));
+# else
+#  if !@HAVE_MEMPCPY@
 _GL_FUNCDECL_SYS (mempcpy, void *,
                   (void *restrict __dest, void const *restrict __src,
                    size_t __n)
                   _GL_ARG_NONNULL ((1, 2)));
-# endif
+#  endif
 _GL_CXXALIAS_SYS (mempcpy, void *,
                   (void *restrict __dest, void const *restrict __src,
                    size_t __n));
+# endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (mempcpy);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef mempcpy
 # if HAVE_RAW_DECL_MEMPCPY
@@ -336,7 +370,7 @@ _GL_CXXALIAS_SYS_CAST2 (memrchr,
          || defined __clang__)
 _GL_CXXALIASWARN1 (memrchr, void *, (void *, int, size_t) throw ());
 _GL_CXXALIASWARN1 (memrchr, void const *, (void const *, int, size_t) throw ());
-# else
+# elif __GLIBC__ >= 2
 _GL_CXXALIASWARN (memrchr);
 # endif
 #elif defined GNULIB_POSIXCHECK
@@ -347,6 +381,23 @@ _GL_WARN_ON_USE (memrchr, "memrchr is unportable - "
 # endif
 #endif
 
+/* Overwrite a block of memory.  The compiler will not optimize
+   effects away, even if the block is dead after the call.  */
+#if @GNULIB_MEMSET_EXPLICIT@
+# if ! @HAVE_MEMSET_EXPLICIT@
+_GL_FUNCDECL_SYS (memset_explicit, void *,
+                  (void *__dest, int __c, size_t __n) _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (memset_explicit, void *, (void *__dest, int __c, size_t __n));
+_GL_CXXALIASWARN (memset_explicit);
+#elif defined GNULIB_POSIXCHECK
+# undef memset_explicit
+# if HAVE_RAW_DECL_MEMSET_EXPLICIT
+_GL_WARN_ON_USE (memset_explicit, "memset_explicit is unportable - "
+                 "use gnulib module memset_explicit for portability");
+# endif
+#endif
+
 /* Find the first occurrence of C in S.  More efficient than
    memchr(S,C,N), at the expense of undefined behavior if C does not
    occur within N bytes.  */
@@ -381,14 +432,28 @@ _GL_WARN_ON_USE (rawmemchr, "rawmemchr is unportable - "
 
 /* Copy SRC to DST, returning the address of the terminating '\0' in DST.  */
 #if @GNULIB_STPCPY@
-# if ! @HAVE_STPCPY@
+# if @REPLACE_STPCPY@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef stpcpy
+#   define stpcpy rpl_stpcpy
+#  endif
+_GL_FUNCDECL_RPL (stpcpy, char *,
+                  (char *restrict __dst, char const *restrict __src)
+                  _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (stpcpy, char *,
+                  (char *restrict __dst, char const *restrict __src));
+# else
+#  if !@HAVE_STPCPY@
 _GL_FUNCDECL_SYS (stpcpy, char *,
                   (char *restrict __dst, char const *restrict __src)
                   _GL_ARG_NONNULL ((1, 2)));
-# endif
+#  endif
 _GL_CXXALIAS_SYS (stpcpy, char *,
                   (char *restrict __dst, char const *restrict __src));
+# endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (stpcpy);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef stpcpy
 # if HAVE_RAW_DECL_STPCPY
@@ -423,7 +488,9 @@ _GL_CXXALIAS_SYS (stpncpy, char *,
                   (char *restrict __dst, char const *restrict __src,
                    size_t __n));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (stpncpy);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef stpncpy
 # if HAVE_RAW_DECL_STPNCPY
@@ -474,7 +541,7 @@ _GL_CXXALIAS_SYS_CAST2 (strchrnul,
 _GL_CXXALIASWARN1 (strchrnul, char *, (char *__s, int __c_in) throw ());
 _GL_CXXALIASWARN1 (strchrnul, char const *,
                    (char const *__s, int __c_in) throw ());
-# else
+# elif __GLIBC__ >= 2
 _GL_CXXALIASWARN (strchrnul);
 # endif
 #elif defined GNULIB_POSIXCHECK
@@ -839,7 +906,7 @@ _GL_CXXALIASWARN1 (strcasestr, char *,
                    (char *haystack, const char *needle) throw ());
 _GL_CXXALIASWARN1 (strcasestr, const char *,
                    (const char *haystack, const char *needle) throw ());
-# else
+# elif __GLIBC__ >= 2
 _GL_CXXALIASWARN (strcasestr);
 # endif
 #elif defined GNULIB_POSIXCHECK
@@ -943,7 +1010,9 @@ _GL_FUNCDECL_SYS (mbslen, size_t, (const char *string)
                                   _GL_ARG_NONNULL ((1)));
 _GL_CXXALIAS_SYS (mbslen, size_t, (const char *string));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (mbslen);
+# endif
 #endif
 
 #if @GNULIB_MBSNLEN@
@@ -1185,7 +1254,7 @@ _GL_FUNCDECL_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen)
 #  endif
 _GL_CXXALIAS_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen));
 # endif
-# if @HAVE_DECL_STRERROR_R@
+# if __GLIBC__ >= 2 && @HAVE_DECL_STRERROR_R@
 _GL_CXXALIASWARN (strerror_r);
 # endif
 #elif defined GNULIB_POSIXCHECK
diff --git a/lib/stripslash.c b/lib/stripslash.c
index aee89b78..fe46a9c1 100644
--- a/lib/stripslash.c
+++ b/lib/stripslash.c
@@ -1,6 +1,6 @@
 /* stripslash.c -- remove redundant trailing slashes from a file name
 
-   Copyright (C) 1990, 2001, 2003-2006, 2009-2022 Free Software Foundation,
+   Copyright (C) 1990, 2001, 2003-2006, 2009-2023 Free Software Foundation,
    Inc.
 
    This file is free software: you can redistribute it and/or modify
diff --git a/lib/strnlen.c b/lib/strnlen.c
index c8fc69c6..09c010ea 100644
--- a/lib/strnlen.c
+++ b/lib/strnlen.c
@@ -1,5 +1,5 @@
 /* Find the length of STRING, but scan at most MAXLEN characters.
-   Copyright (C) 2005-2007, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2005-2007, 2009-2023 Free Software Foundation, Inc.
    Written by Simon Josefsson.
 
    This file is free software: you can redistribute it and/or modify
diff --git a/lib/strnlen1.c b/lib/strnlen1.c
index c22f96b6..25866c5e 100644
--- a/lib/strnlen1.c
+++ b/lib/strnlen1.c
@@ -1,5 +1,5 @@
 /* Find the length of STRING + 1, but scan at most MAXLEN bytes.
-   Copyright (C) 2005-2006, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2005-2006, 2009-2023 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
diff --git a/lib/strnlen1.h b/lib/strnlen1.h
index d45dd91e..02dcd4c4 100644
--- a/lib/strnlen1.h
+++ b/lib/strnlen1.h
@@ -1,5 +1,5 @@
 /* Find the length of STRING + 1, but scan at most MAXLEN bytes.
-   Copyright (C) 2005, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2009-2023 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
@@ -17,6 +17,11 @@
 #ifndef _STRNLEN1_H
 #define _STRNLEN1_H
 
+/* This file uses _GL_ATTRIBUTE_PURE.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #include <stddef.h>
 
 
diff --git a/lib/strstr.c b/lib/strstr.c
index 62369159..574f4d50 100644
--- a/lib/strstr.c
+++ b/lib/strstr.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2022 Free Software
+/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2023 Free Software
    Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -24,8 +24,6 @@
 /* Specification of strstr.  */
 #include <string.h>
 
-#include <stdbool.h>
-
 #define RETURN_TYPE char *
 #define AVAILABLE(h, h_l, j, n_l)                       \
   (!memchr ((h) + (h_l), '\0', (j) + (n_l) - (h_l))     \
diff --git a/lib/strtoimax.c b/lib/strtoimax.c
index cad12d0d..f7977e28 100644
--- a/lib/strtoimax.c
+++ b/lib/strtoimax.c
@@ -1,6 +1,6 @@
 /* Convert string representation of a number into an intmax_t value.
 
-   Copyright (C) 1999, 2001-2004, 2006, 2009-2022 Free Software Foundation,
+   Copyright (C) 1999, 2001-2004, 2006, 2009-2023 Free Software Foundation,
    Inc.
 
    This file is free software: you can redistribute it and/or modify
@@ -25,8 +25,6 @@
 
 #include <stdlib.h>
 
-#include "verify.h"
-
 #ifdef UNSIGNED
 # ifndef HAVE_DECL_STRTOULL
 "this configure-time declaration test was not run"
@@ -62,8 +60,8 @@ long long int strtoll (char const *, char **, int);
 Int
 Strtoimax (char const *ptr, char **endptr, int base)
 {
-  verify (sizeof (Int) == sizeof (Unsigned long int)
-          || sizeof (Int) == sizeof (Unsigned long long int));
+  static_assert (sizeof (Int) == sizeof (Unsigned long int)
+                 || sizeof (Int) == sizeof (Unsigned long long int));
 
   if (sizeof (Int) != sizeof (Unsigned long int))
     return Strtoll (ptr, endptr, base);
diff --git a/lib/strtol.c b/lib/strtol.c
index 6c2e9333..b93483dc 100644
--- a/lib/strtol.c
+++ b/lib/strtol.c
@@ -1,6 +1,6 @@
 /* Convert string representation of a number into an integer value.
 
-   Copyright (C) 1991-1992, 1994-1999, 2003, 2005-2007, 2009-2022 Free Software
+   Copyright (C) 1991-1992, 1994-1999, 2003, 2005-2007, 2009-2023 Free Software
    Foundation, Inc.
 
    NOTE: The canonical source of this file is maintained with the GNU C
@@ -288,6 +288,11 @@ INTERNAL (strtol) (const STRING_TYPE *nptr, STRING_TYPE **endptr,
           s += 2;
           base = 16;
         }
+      else if ((base == 0 || base == 2) && TOUPPER (s[1]) == L_('B'))
+        {
+          s += 2;
+          base = 2;
+        }
       else if (base == 0)
         base = 8;
     }
@@ -378,11 +383,14 @@ INTERNAL (strtol) (const STRING_TYPE *nptr, STRING_TYPE **endptr,
 noconv:
   /* We must handle a special case here: the base is 0 or 16 and the
      first two characters are '0' and 'x', but the rest are no
-     hexadecimal digits.  This is no error case.  We return 0 and
-     ENDPTR points to the 'x'.  */
+     hexadecimal digits.  Likewise when the base is 0 or 2 and the
+     first two characters are '0' and 'b', but the rest are no binary
+     digits.  This is no error case.  We return 0 and ENDPTR points to
+     the 'x' or 'b'.  */
   if (endptr != NULL)
     {
-      if (save - nptr >= 2 && TOUPPER (save[-1]) == L_('X')
+      if (save - nptr >= 2
+          && (TOUPPER (save[-1]) == L_('X') || TOUPPER (save[-1]) == L_('B'))
           && save[-2] == L_('0'))
         *endptr = (STRING_TYPE *) &save[-1];
       else
diff --git a/lib/strtoll.c b/lib/strtoll.c
index acea42ee..9fdfa19b 100644
--- a/lib/strtoll.c
+++ b/lib/strtoll.c
@@ -1,5 +1,5 @@
 /* Function to parse a 'long long int' from text.
-   Copyright (C) 1995-1997, 1999, 2001, 2009-2022 Free Software Foundation,
+   Copyright (C) 1995-1997, 1999, 2001, 2009-2023 Free Software Foundation,
    Inc.
    This file is part of the GNU C Library.
 
diff --git a/lib/strtoul.c b/lib/strtoul.c
index 7408b54b..2a360c75 100644
--- a/lib/strtoul.c
+++ b/lib/strtoul.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1997, 2009-2022 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1997, 2009-2023 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    This file is free software: you can redistribute it and/or modify
diff --git a/lib/strtoull.c b/lib/strtoull.c
index 84657b95..f05d34f0 100644
--- a/lib/strtoull.c
+++ b/lib/strtoull.c
@@ -1,5 +1,5 @@
 /* Function to parse an 'unsigned long long int' from text.
-   Copyright (C) 1995-1997, 1999, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 1995-1997, 1999, 2009-2023 Free Software Foundation, Inc.
    NOTE: The canonical source of this file is maintained with the GNU C
    Library.  Bugs can be reported to bug-glibc@gnu.org.
 
diff --git a/lib/strtoumax.c b/lib/strtoumax.c
index 05a87fd9..3f9b0dc2 100644
--- a/lib/strtoumax.c
+++ b/lib/strtoumax.c
@@ -1,6 +1,6 @@
 /* Convert string representation of a number into a uintmax_t value.
 
-   Copyright (C) 1999-2022 Free Software Foundation, Inc.
+   Copyright (C) 1999-2023 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
diff --git a/lib/sys-limits.h b/lib/sys-limits.h
index d154f0b2..0e9556d6 100644
--- a/lib/sys-limits.h
+++ b/lib/sys-limits.h
@@ -1,6 +1,6 @@
 /* System call limits
 
-   Copyright 2018-2022 Free Software Foundation, Inc.
+   Copyright 2018-2023 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
diff --git a/lib/sys_stat.in.h b/lib/sys_stat.in.h
index 714c3cb1..ad4da17f 100644
--- a/lib/sys_stat.in.h
+++ b/lib/sys_stat.in.h
@@ -1,5 +1,5 @@
 /* Provide a more complete sys/stat.h header file.
-   Copyright (C) 2005-2022 Free Software Foundation, Inc.
+   Copyright (C) 2005-2023 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
@@ -25,6 +25,13 @@
 #endif
 @PRAGMA_COLUMNS@
 
+/* This file uses #include_next of a system file that defines time_t.
+   For the 'year2038' module to work right, <config.h> needs to have been
+   included before.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #if defined __need_system_sys_stat_h
 /* Special invocation convention.  */
 
@@ -48,6 +55,11 @@
 #ifndef _@GUARD_PREFIX@_SYS_STAT_H
 #define _@GUARD_PREFIX@_SYS_STAT_H
 
+/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
 
 /* The definition of _GL_ARG_NONNULL is copied here.  */
@@ -549,7 +561,7 @@ _GL_FUNCDECL_SYS (futimens, int, (int fd, struct timespec const times[2]));
 #  endif
 _GL_CXXALIAS_SYS (futimens, int, (int fd, struct timespec const times[2]));
 # endif
-# if @HAVE_FUTIMENS@
+# if __GLIBC__ >= 2 && @HAVE_FUTIMENS@
 _GL_CXXALIASWARN (futimens);
 # endif
 #elif defined GNULIB_POSIXCHECK
@@ -596,44 +608,6 @@ _GL_WARN_ON_USE (lchmod, "lchmod is unportable - "
 #endif
 
 
-#if @GNULIB_LSTAT@
-# if ! @HAVE_LSTAT@
-/* mingw does not support symlinks, therefore it does not have lstat.  But
-   without links, stat does just fine.  */
-#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-#   define lstat stat
-#  endif
-_GL_CXXALIAS_RPL_1 (lstat, stat, int,
-                    (const char *restrict name, struct stat *restrict buf));
-# elif @REPLACE_LSTAT@
-#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-#   undef lstat
-#   define lstat rpl_lstat
-#  endif
-_GL_FUNCDECL_RPL (lstat, int,
-                  (const char *restrict name, struct stat *restrict buf)
-                  _GL_ARG_NONNULL ((1, 2)));
-_GL_CXXALIAS_RPL (lstat, int,
-                  (const char *restrict name, struct stat *restrict buf));
-# else
-_GL_CXXALIAS_SYS (lstat, int,
-                  (const char *restrict name, struct stat *restrict buf));
-# endif
-# if @HAVE_LSTAT@
-_GL_CXXALIASWARN (lstat);
-# endif
-#elif @GNULIB_OVERRIDES_STRUCT_STAT@
-# undef lstat
-# define lstat lstat_used_without_requesting_gnulib_module_lstat
-#elif defined GNULIB_POSIXCHECK
-# undef lstat
-# if HAVE_RAW_DECL_LSTAT
-_GL_WARN_ON_USE (lstat, "lstat is unportable - "
-                 "use gnulib module lstat for portability");
-# endif
-#endif
-
-
 #if @GNULIB_MKDIR@
 # if @REPLACE_MKDIR@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
@@ -754,7 +728,9 @@ _GL_FUNCDECL_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode)
 #  endif
 _GL_CXXALIAS_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (mkfifoat);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef mkfifoat
 # if HAVE_RAW_DECL_MKFIFOAT
@@ -811,7 +787,9 @@ _GL_FUNCDECL_SYS (mknodat, int,
 _GL_CXXALIAS_SYS (mknodat, int,
                   (int fd, char const *file, mode_t mode, dev_t dev));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (mknodat);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef mknodat
 # if HAVE_RAW_DECL_MKNODAT
@@ -895,6 +873,44 @@ _GL_WARN_ON_USE (stat, "stat is unportable - "
 #endif
 
 
+#if @GNULIB_LSTAT@
+# if ! @HAVE_LSTAT@
+/* mingw does not support symlinks, therefore it does not have lstat.  But
+   without links, stat does just fine.  */
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define lstat stat
+#  endif
+_GL_CXXALIAS_RPL_1 (lstat, stat, int,
+                    (const char *restrict name, struct stat *restrict buf));
+# elif @REPLACE_LSTAT@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef lstat
+#   define lstat rpl_lstat
+#  endif
+_GL_FUNCDECL_RPL (lstat, int,
+                  (const char *restrict name, struct stat *restrict buf)
+                  _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (lstat, int,
+                  (const char *restrict name, struct stat *restrict buf));
+# else
+_GL_CXXALIAS_SYS (lstat, int,
+                  (const char *restrict name, struct stat *restrict buf));
+# endif
+# if @HAVE_LSTAT@
+_GL_CXXALIASWARN (lstat);
+# endif
+#elif @GNULIB_OVERRIDES_STRUCT_STAT@
+# undef lstat
+# define lstat lstat_used_without_requesting_gnulib_module_lstat
+#elif defined GNULIB_POSIXCHECK
+# undef lstat
+# if HAVE_RAW_DECL_LSTAT
+_GL_WARN_ON_USE (lstat, "lstat is unportable - "
+                 "use gnulib module lstat for portability");
+# endif
+#endif
+
+
 #if @GNULIB_MDA_UMASK@
 /* On native Windows, map 'umask' to '_umask', so that -loldnames is not
    required.  In C++ with GNULIB_NAMESPACE, avoid differences between
@@ -937,7 +953,7 @@ _GL_FUNCDECL_SYS (utimensat, int, (int fd, char const *name,
 _GL_CXXALIAS_SYS (utimensat, int, (int fd, char const *name,
                                    struct timespec const times[2], int flag));
 # endif
-# if @HAVE_UTIMENSAT@
+# if __GLIBC__ >= 2 && @HAVE_UTIMENSAT@
 _GL_CXXALIASWARN (utimensat);
 # endif
 #elif defined GNULIB_POSIXCHECK
diff --git a/lib/sys_types.in.h b/lib/sys_types.in.h
index 698e88d6..ea77e140 100644
--- a/lib/sys_types.in.h
+++ b/lib/sys_types.in.h
@@ -1,6 +1,6 @@
 /* Provide a more complete sys/types.h.
 
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 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
@@ -20,6 +20,13 @@
 #endif
 @PRAGMA_COLUMNS@
 
+/* This file uses #include_next of a system file that defines time_t.
+   For the 'year2038' module to work right, <config.h> needs to have been
+   included before.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #if defined _WIN32 && !defined __CYGWIN__ \
     && (defined __need_off_t || defined __need___off64_t \
         || defined __need_ssize_t || defined __need_time_t)
diff --git a/lib/time.in.h b/lib/time.in.h
index 6d4c7719..06428adb 100644
--- a/lib/time.in.h
+++ b/lib/time.in.h
@@ -1,6 +1,6 @@
 /* A more-standard <time.h>.
 
-   Copyright (C) 2007-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007-2023 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
@@ -20,6 +20,13 @@
 #endif
 @PRAGMA_COLUMNS@
 
+/* This file uses #include_next of a system file that defines time_t.
+   For the 'year2038' module to work right, <config.h> needs to have been
+   included before.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 /* Don't get in the way of glibc when it includes time.h merely to
    declare a few standard symbols, rather than to declare all the
    symbols.  (However, skip this for MinGW as it treats __need_time_t
@@ -45,6 +52,12 @@
 
 # @INCLUDE_NEXT@ @NEXT_TIME_H@
 
+/* This file uses _GL_ATTRIBUTE_DEPRECATED, GNULIB_POSIXCHECK,
+   HAVE_RAW_DECL_*.  */
+# if !_GL_CONFIG_H_INCLUDED
+#  error "Please include config.h first."
+# endif
+
 /* NetBSD 5.0 mis-defines NULL.  */
 # include <stddef.h>
 
@@ -112,12 +125,24 @@ struct __time_t_must_be_integral {
 /* Set *TS to the current time, and return BASE.
    Upon failure, return 0.  */
 # if @GNULIB_TIMESPEC_GET@
-#  if ! @HAVE_TIMESPEC_GET@
+#  if @REPLACE_TIMESPEC_GET@
+#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#    undef timespec_get
+#    define timespec_get rpl_timespec_get
+#   endif
+_GL_FUNCDECL_RPL (timespec_get, int, (struct timespec *ts, int base)
+                                     _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (timespec_get, int, (struct timespec *ts, int base));
+#  else
+#   if !@HAVE_TIMESPEC_GET@
 _GL_FUNCDECL_SYS (timespec_get, int, (struct timespec *ts, int base)
                                      _GL_ARG_NONNULL ((1)));
-#  endif
+#   endif
 _GL_CXXALIAS_SYS (timespec_get, int, (struct timespec *ts, int base));
+#  endif
+#  if __GLIBC__ >= 2
 _GL_CXXALIASWARN (timespec_get);
+#  endif
 # endif
 
 /* Set *TS to the current time resolution, and return BASE.
@@ -131,6 +156,22 @@ _GL_CXXALIAS_SYS (timespec_getres, int, (struct timespec *ts, int base));
 _GL_CXXALIASWARN (timespec_getres);
 # endif
 
+/* Return the number of seconds that have elapsed since the Epoch.  */
+# if @GNULIB_TIME@
+#  if @REPLACE_TIME@
+#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#    define time rpl_time
+#   endif
+_GL_FUNCDECL_RPL (time, time_t, (time_t *__tp));
+_GL_CXXALIAS_RPL (time, time_t, (time_t *__tp));
+#  else
+_GL_CXXALIAS_SYS (time, time_t, (time_t *__tp));
+#  endif
+#  if __GLIBC__ >= 2
+_GL_CXXALIASWARN (time);
+#  endif
+# endif
+
 /* Sleep for at least RQTP seconds unless interrupted,  If interrupted,
    return -1 and store the remaining time into RMTP.  See
    <https://pubs.opengroup.org/onlinepubs/9699919799/functions/nanosleep.html>.  */
@@ -315,6 +356,9 @@ _GL_CXXALIASWARN (strptime);
 #   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #    define ctime rpl_ctime
 #   endif
+#   ifndef __cplusplus
+_GL_ATTRIBUTE_DEPRECATED
+#   endif
 _GL_FUNCDECL_RPL (ctime, char *, (time_t const *__tp)
                                  _GL_ARG_NONNULL ((1)));
 _GL_CXXALIAS_RPL (ctime, char *, (time_t const *__tp));
@@ -422,7 +466,9 @@ _GL_FUNCDECL_SYS (timegm, time_t, (struct tm *__tm) _GL_ARG_NONNULL ((1)));
 #   endif
 _GL_CXXALIAS_SYS (timegm, time_t, (struct tm *__tm));
 #  endif
+#  if __GLIBC__ >= 2
 _GL_CXXALIASWARN (timegm);
+#  endif
 # endif
 
 /* Encourage applications to avoid unsafe functions that can overrun
@@ -435,8 +481,10 @@ _GL_WARN_ON_USE (asctime, "asctime can overrun buffers in some cases - "
 # endif
 # if defined GNULIB_POSIXCHECK
 #  undef asctime_r
+#  if HAVE_RAW_DECL_ASCTIME_R
 _GL_WARN_ON_USE (asctime_r, "asctime_r can overrun buffers in some cases - "
                  "better use strftime (or even sprintf) instead");
+#  endif
 # endif
 # if defined GNULIB_POSIXCHECK
 #  undef ctime
@@ -445,8 +493,10 @@ _GL_WARN_ON_USE (ctime, "ctime can overrun buffers in some cases - "
 # endif
 # if defined GNULIB_POSIXCHECK
 #  undef ctime_r
+#  if HAVE_RAW_DECL_CTIME_R
 _GL_WARN_ON_USE (ctime_r, "ctime_r can overrun buffers in some cases - "
                  "better use strftime (or even sprintf) instead");
+#  endif
 # endif
 
 #endif
diff --git a/lib/trim.c b/lib/trim.c
index def08eb3..d33dd13a 100644
--- a/lib/trim.c
+++ b/lib/trim.c
@@ -1,5 +1,5 @@
 /* Removes leading and/or trailing whitespaces
-   Copyright (C) 2006-2022 Free Software Foundation, Inc.
+   Copyright (C) 2006-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -30,13 +30,6 @@
 #include "mbiter.h"
 #include "xalloc.h"
 
-/* Use this to suppress gcc's "...may be used before initialized" warnings. */
-#if defined GCC_LINT || defined lint
-# define IF_LINT(Code) Code
-#else
-# define IF_LINT(Code) /* empty */
-#endif
-
 char *
 trim2 (const char *s, int how)
 {
@@ -65,42 +58,21 @@ trim2 (const char *s, int how)
       /* Trim trailing whitespaces. */
       if (how != TRIM_LEADING)
         {
-          unsigned int state = 0;
-          char *r IF_LINT (= NULL); /* used only while state = 2 */
+          char *start_of_spaces = NULL;
 
           mbi_init (i, d, strlen (d));
 
           for (; mbi_avail (i); mbi_advance (i))
-            {
-              if (state == 0 && mb_isspace (mbi_cur (i)))
-                continue;
-
-              if (state == 0 && !mb_isspace (mbi_cur (i)))
-                {
-                  state = 1;
-                  continue;
-                }
-
-              if (state == 1 && !mb_isspace (mbi_cur (i)))
-                continue;
-
-              if (state == 1 && mb_isspace (mbi_cur (i)))
-                {
-                  state = 2;
-                  r = (char *) mbi_cur_ptr (i);
-                }
-              else if (state == 2 && mb_isspace (mbi_cur (i)))
-                {
-                  /* empty */
-                }
-              else
-                {
-                  state = 1;
-                }
-            }
-
-          if (state == 2)
-            *r = '\0';
+            if (mb_isspace (mbi_cur (i)))
+              {
+                if (start_of_spaces == NULL)
+                  start_of_spaces = (char *) mbi_cur_ptr (i);
+              }
+            else
+              start_of_spaces = NULL;
+
+          if (start_of_spaces != NULL)
+            *start_of_spaces = '\0';
         }
     }
   else
diff --git a/lib/trim.h b/lib/trim.h
index b520e808..a8040ef3 100644
--- a/lib/trim.h
+++ b/lib/trim.h
@@ -1,5 +1,5 @@
 /* Removes leading and/or trailing whitespaces
-   Copyright (C) 2006, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2009-2023 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
@@ -16,6 +16,11 @@
 
 /* Written by Davide Angelocola <davide.angelocola@gmail.com> */
 
+/* This file uses _GL_ATTRIBUTE_MALLOC, _GL_ATTRIBUTE_RETURNS_NONNULL.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #include <stdlib.h>
 
 /* Trim mode. */
diff --git a/lib/unictype/bitmap.h b/lib/unictype/bitmap.h
index 5bd46368..9da85c11 100644
--- a/lib/unictype/bitmap.h
+++ b/lib/unictype/bitmap.h
@@ -1,5 +1,5 @@
 /* Three-level bitmap lookup.
-   Copyright (C) 2000-2002, 2005-2007, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2000-2002, 2005-2007, 2009-2023 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2000-2002.
 
    This file is free software: you can redistribute it and/or modify
diff --git a/lib/unistd--.h b/lib/unistd--.h
index d395f7e0..ae4fb680 100644
--- a/lib/unistd--.h
+++ b/lib/unistd--.h
@@ -1,6 +1,6 @@
 /* Like unistd.h, but redefine some names to avoid glitches.
 
-   Copyright (C) 2005, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/lib/unistd-safer.h b/lib/unistd-safer.h
index db82c854..32686e71 100644
--- a/lib/unistd-safer.h
+++ b/lib/unistd-safer.h
@@ -1,6 +1,6 @@
 /* Invoke unistd-like functions, but avoid some glitches.
 
-   Copyright (C) 2001, 2003, 2005, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2003, 2005, 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/lib/unistd.c b/lib/unistd.c
index 95978e6a..be7a8255 100644
--- a/lib/unistd.c
+++ b/lib/unistd.c
@@ -1,6 +1,6 @@
 /* Inline functions for <unistd.h>.
 
-   Copyright (C) 2012-2022 Free Software Foundation, Inc.
+   Copyright (C) 2012-2023 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
diff --git a/lib/unistd.in.h b/lib/unistd.in.h
index 57df09ec..2ae040a7 100644
--- a/lib/unistd.in.h
+++ b/lib/unistd.in.h
@@ -1,5 +1,5 @@
 /* Substitute for and wrapper around <unistd.h>.
-   Copyright (C) 2003-2022 Free Software Foundation, Inc.
+   Copyright (C) 2003-2023 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
@@ -40,6 +40,24 @@
 # undef _GL_INCLUDING_UNISTD_H
 #endif
 
+/* Avoid lseek bugs in FreeBSD, macOS <https://bugs.gnu.org/61386>.
+   This bug is fixed after FreeBSD 13; see <https://bugs.freebsd.org/256205>.
+   Use macOS "9999" to stand for a future fixed macOS version.  */
+#if defined __FreeBSD__ && __FreeBSD__ < 14
+# undef SEEK_DATA
+# undef SEEK_HOLE
+#elif defined __APPLE__ && defined __MACH__ && defined SEEK_DATA
+# ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
+#  include <AvailabilityMacros.h>
+# endif
+# if (!defined MAC_OS_X_VERSION_MIN_REQUIRED \
+      || MAC_OS_X_VERSION_MIN_REQUIRED < 99990000)
+#  include <sys/fcntl.h> /* It also defines the two macros.  */
+#  undef SEEK_DATA
+#  undef SEEK_HOLE
+# endif
+#endif
+
 /* Get all possible declarations of gethostname().  */
 #if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ \
   && !defined _GL_INCLUDING_WINSOCK2_H
@@ -51,6 +69,12 @@
 #if !defined _@GUARD_PREFIX@_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H
 #define _@GUARD_PREFIX@_UNISTD_H
 
+/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, GNULIB_POSIXCHECK,
+   HAVE_RAW_DECL_*.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 /* NetBSD 5.0 mis-defines NULL.  Also get size_t.  */
 /* But avoid namespace pollution on glibc systems.  */
 #ifndef __GLIBC__
@@ -152,9 +176,6 @@
 # include <getopt-pfx-core.h>
 #endif
 
-#ifndef _GL_INLINE_HEADER_BEGIN
- #error "Please include config.h first."
-#endif
 _GL_INLINE_HEADER_BEGIN
 #ifndef _GL_UNISTD_INLINE
 # define _GL_UNISTD_INLINE _GL_INLINE
@@ -541,17 +562,22 @@ _GL_CXXALIASWARN (dup2);
    Return newfd if successful, otherwise -1 and errno set.
    See the Linux man page at
    <https://www.kernel.org/doc/man-pages/online/pages/man2/dup3.2.html>.  */
-# if @HAVE_DUP3@
+# if @REPLACE_DUP3@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef dup3
 #   define dup3 rpl_dup3
 #  endif
 _GL_FUNCDECL_RPL (dup3, int, (int oldfd, int newfd, int flags));
 _GL_CXXALIAS_RPL (dup3, int, (int oldfd, int newfd, int flags));
 # else
+#  if !@HAVE_DUP3@
 _GL_FUNCDECL_SYS (dup3, int, (int oldfd, int newfd, int flags));
+#  endif
 _GL_CXXALIAS_SYS (dup3, int, (int oldfd, int newfd, int flags));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (dup3);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef dup3
 # if HAVE_RAW_DECL_DUP3
@@ -870,7 +896,9 @@ _GL_FUNCDECL_SYS (execvpe, int,
 _GL_CXXALIAS_SYS (execvpe, int,
                   (const char *program, char * const *argv, char * const *env));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (execvpe);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef execvpe
 # if HAVE_RAW_DECL_EXECVPE
@@ -925,7 +953,9 @@ _GL_FUNCDECL_SYS (faccessat, int,
 _GL_CXXALIAS_SYS (faccessat, int,
                   (int fd, char const *file, int mode, int flag));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (faccessat);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef faccessat
 # if HAVE_RAW_DECL_FACCESSAT
@@ -1002,11 +1032,22 @@ _GL_WARN_ON_USE (fchownat, "fchownat is not portable - "
    Return 0 if successful, otherwise -1 and errno set.
    See POSIX:2008 specification
    <https://pubs.opengroup.org/onlinepubs/9699919799/functions/fdatasync.html>.  */
-# if !@HAVE_FDATASYNC@ || !@HAVE_DECL_FDATASYNC@
+# if @REPLACE_FDATASYNC@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef fdatasync
+#   define fdatasync rpl_fdatasync
+#  endif
+_GL_FUNCDECL_RPL (fdatasync, int, (int fd));
+_GL_CXXALIAS_RPL (fdatasync, int, (int fd));
+# else
+#  if !@HAVE_FDATASYNC@|| !@HAVE_DECL_FDATASYNC@
 _GL_FUNCDECL_SYS (fdatasync, int, (int fd));
-# endif
+#  endif
 _GL_CXXALIAS_SYS (fdatasync, int, (int fd));
+# endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (fdatasync);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef fdatasync
 # if HAVE_RAW_DECL_FDATASYNC
@@ -1053,7 +1094,9 @@ _GL_FUNCDECL_SYS (ftruncate, int, (int fd, off_t length));
 #  endif
 _GL_CXXALIAS_SYS (ftruncate, int, (int fd, off_t length));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (ftruncate);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef ftruncate
 # if HAVE_RAW_DECL_FTRUNCATE
@@ -1143,7 +1186,9 @@ _GL_FUNCDECL_SYS (getdomainname, int, (char *name, size_t len)
 #  endif
 _GL_CXXALIAS_SYS (getdomainname, int, (char *name, size_t len));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (getdomainname);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef getdomainname
 # if HAVE_RAW_DECL_GETDOMAINNAME
@@ -1183,11 +1228,22 @@ _GL_WARN_ON_USE (getdtablesize, "getdtablesize is unportable - "
 
 #if @GNULIB_GETENTROPY@
 /* Fill a buffer with random bytes.  */
-# if !@HAVE_GETENTROPY@
+# if @REPLACE_GETENTROPY@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef getentropy
+#   define getentropy rpl_getentropy
+#  endif
+_GL_FUNCDECL_RPL (getentropy, int, (void *buffer, size_t length));
+_GL_CXXALIAS_RPL (getentropy, int, (void *buffer, size_t length));
+# else
+#  if !@HAVE_GETENTROPY@
 _GL_FUNCDECL_SYS (getentropy, int, (void *buffer, size_t length));
-# endif
+#  endif
 _GL_CXXALIAS_SYS (getentropy, int, (void *buffer, size_t length));
+# endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (getentropy);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef getentropy
 # if HAVE_RAW_DECL_GETENTROPY
@@ -1321,7 +1377,9 @@ _GL_FUNCDECL_SYS (getlogin_r, int, (char *name, size_t size)
                                                      int size.  */
 _GL_CXXALIAS_SYS_CAST (getlogin_r, int, (char *name, size_t size));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (getlogin_r);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef getlogin_r
 # if HAVE_RAW_DECL_GETLOGIN_R
@@ -1659,7 +1717,9 @@ _GL_CXXALIAS_SYS (linkat, int,
                   (int fd1, const char *path1, int fd2, const char *path2,
                    int flag));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (linkat);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef linkat
 # if HAVE_RAW_DECL_LINKAT
@@ -1740,8 +1800,9 @@ _GL_WARN_ON_USE (pipe, "pipe is unportable - "
    Return 0 upon success, or -1 with errno set upon failure.
    See also the Linux man page at
    <https://www.kernel.org/doc/man-pages/online/pages/man2/pipe2.2.html>.  */
-# if @HAVE_PIPE2@
+# if @REPLACE_PIPE2@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pipe2
 #   define pipe2 rpl_pipe2
 #  endif
 _GL_FUNCDECL_RPL (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1)));
@@ -1750,7 +1811,9 @@ _GL_CXXALIAS_RPL (pipe2, int, (int fd[2], int flags));
 _GL_FUNCDECL_SYS (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1)));
 _GL_CXXALIAS_SYS (pipe2, int, (int fd[2], int flags));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (pipe2);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef pipe2
 # if HAVE_RAW_DECL_PIPE2
@@ -1785,7 +1848,9 @@ _GL_FUNCDECL_SYS (pread, ssize_t,
 _GL_CXXALIAS_SYS (pread, ssize_t,
                   (int fd, void *buf, size_t bufsize, off_t offset));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (pread);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef pread
 # if HAVE_RAW_DECL_PREAD
@@ -1820,7 +1885,9 @@ _GL_FUNCDECL_SYS (pwrite, ssize_t,
 _GL_CXXALIAS_SYS (pwrite, ssize_t,
                   (int fd, const void *buf, size_t bufsize, off_t offset));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (pwrite);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef pwrite
 # if HAVE_RAW_DECL_PWRITE
@@ -1934,7 +2001,9 @@ _GL_CXXALIAS_SYS (readlinkat, ssize_t,
                   (int fd, char const *restrict file,
                    char *restrict buf, size_t len));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (readlinkat);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef readlinkat
 # if HAVE_RAW_DECL_READLINKAT
@@ -1994,15 +2063,27 @@ _GL_CXXALIASWARN (rmdir);
 
    Platforms with no ability to set the hostname return -1 and set
    errno = ENOSYS.  */
-# if !@HAVE_SETHOSTNAME@ || !@HAVE_DECL_SETHOSTNAME@
+# if @REPLACE_SETHOSTNAME@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef sethostname
+#   define sethostname rpl_sethostname
+#  endif
+_GL_FUNCDECL_RPL (sethostname, int, (const char *name, size_t len)
+                                    _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (sethostname, int, (const char *name, size_t len));
+# else
+#  if !@HAVE_SETHOSTNAME@ || !@HAVE_DECL_SETHOSTNAME@
 _GL_FUNCDECL_SYS (sethostname, int, (const char *name, size_t len)
                                     _GL_ARG_NONNULL ((1)));
-# endif
+#  endif
 /* Need to cast, because on Solaris 11 2011-10, Mac OS X 10.5, IRIX 6.5
    and FreeBSD 6.4 the second parameter is int.  On Solaris 11
    2011-10, the first parameter is not const.  */
 _GL_CXXALIAS_SYS_CAST (sethostname, int, (const char *name, size_t len));
+# endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (sethostname);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef sethostname
 # if HAVE_RAW_DECL_SETHOSTNAME
@@ -2055,7 +2136,7 @@ _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 */
+#  elif defined __sun && (defined __SunOS_5_10 || defined __XOPEN_OR_POSIX) && !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));
@@ -2111,7 +2192,9 @@ _GL_FUNCDECL_SYS (symlinkat, int,
 _GL_CXXALIAS_SYS (symlinkat, int,
                   (char const *contents, int fd, char const *file));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (symlinkat);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef symlinkat
 # if HAVE_RAW_DECL_SYMLINKAT
@@ -2141,7 +2224,9 @@ _GL_FUNCDECL_SYS (truncate, int, (const char *filename, off_t length)
 #  endif
 _GL_CXXALIAS_SYS (truncate, int, (const char *filename, off_t length));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (truncate);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef truncate
 # if HAVE_RAW_DECL_TRUNCATE
@@ -2171,7 +2256,9 @@ _GL_FUNCDECL_SYS (ttyname_r, int,
 _GL_CXXALIAS_SYS (ttyname_r, int,
                   (int fd, char *buf, size_t buflen));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (ttyname_r);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef ttyname_r
 # if HAVE_RAW_DECL_TTYNAME_R
diff --git a/lib/unistr.in.h b/lib/unistr.in.h
index 4d487515..d85ad517 100644
--- a/lib/unistr.in.h
+++ b/lib/unistr.in.h
@@ -1,5 +1,5 @@
 /* Elementary Unicode string functions.
-   Copyright (C) 2001-2002, 2005-2022 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002, 2005-2023 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
diff --git a/lib/unistr/u8-mbtoucr.c b/lib/unistr/u8-mbtoucr.c
index 6672298a..d0905112 100644
--- a/lib/unistr/u8-mbtoucr.c
+++ b/lib/unistr/u8-mbtoucr.c
@@ -1,5 +1,5 @@
 /* Look at first character in UTF-8 string, returning an error code.
-   Copyright (C) 1999-2002, 2006-2007, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 1999-2002, 2006-2007, 2009-2023 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2001.
 
    This file is free software: you can redistribute it and/or modify
diff --git a/lib/unistr/u8-uctomb-aux.c b/lib/unistr/u8-uctomb-aux.c
index 5ca21915..6deeeb72 100644
--- a/lib/unistr/u8-uctomb-aux.c
+++ b/lib/unistr/u8-uctomb-aux.c
@@ -1,5 +1,5 @@
 /* Conversion UCS-4 to UTF-8.
-   Copyright (C) 2002, 2006-2007, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2006-2007, 2009-2023 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2002.
 
    This file is free software: you can redistribute it and/or modify
diff --git a/lib/unistr/u8-uctomb.c b/lib/unistr/u8-uctomb.c
index 2259b1db..58de19bb 100644
--- a/lib/unistr/u8-uctomb.c
+++ b/lib/unistr/u8-uctomb.c
@@ -1,5 +1,5 @@
 /* Store a character in UTF-8 string.
-   Copyright (C) 2002, 2005-2006, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2005-2006, 2009-2023 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2002.
 
    This file is free software: you can redistribute it and/or modify
diff --git a/lib/unitypes.in.h b/lib/unitypes.in.h
index 4ea83aa8..d3a4c67a 100644
--- a/lib/unitypes.in.h
+++ b/lib/unitypes.in.h
@@ -1,5 +1,5 @@
 /* Elementary types and macros for the GNU UniString library.
-   Copyright (C) 2002, 2005-2006, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2005-2006, 2009-2023 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
diff --git a/lib/uniwidth.in.h b/lib/uniwidth.in.h
index d5e62c4b..66829e45 100644
--- a/lib/uniwidth.in.h
+++ b/lib/uniwidth.in.h
@@ -1,5 +1,5 @@
 /* Display width functions.
-   Copyright (C) 2001-2002, 2005, 2007, 2009-2022 Free Software Foundation,
+   Copyright (C) 2001-2002, 2005, 2007, 2009-2023 Free Software Foundation,
    Inc.
 
    This file is free software: you can redistribute it and/or modify
diff --git a/lib/uniwidth/cjk.h b/lib/uniwidth/cjk.h
index b791ba96..98f7e926 100644
--- a/lib/uniwidth/cjk.h
+++ b/lib/uniwidth/cjk.h
@@ -1,5 +1,5 @@
 /* Test for CJK encoding.
-   Copyright (C) 2001-2002, 2005-2007, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002, 2005-2007, 2009-2023 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2002.
 
    This file is free software: you can redistribute it and/or modify
diff --git a/lib/uniwidth/width.c b/lib/uniwidth/width.c
index 1c945a88..c9d4d1df 100644
--- a/lib/uniwidth/width.c
+++ b/lib/uniwidth/width.c
@@ -1,5 +1,5 @@
 /* Determine display width of Unicode character.
-   Copyright (C) 2001-2002, 2006-2022 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002, 2006-2023 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2002.
 
    This file is free software: you can redistribute it and/or modify
diff --git a/lib/uniwidth/width0.h b/lib/uniwidth/width0.h
index eda0a1d3..0c1713ac 100644
--- a/lib/uniwidth/width0.h
+++ b/lib/uniwidth/width0.h
@@ -1,31 +1,23 @@
 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
 /* Table of non-spacing or control characters.  */
-/* Generated automatically by gen-uni-tables.c for Unicode 14.0.0.  */
+/* Generated automatically by gen-uni-tables.c for Unicode 15.0.0.  */
 
 /* Copyright (C) 2000-2022 Free Software Foundation, Inc.
 
-   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 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 and the GNU 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 and of the GNU General Public License along with this
-   program.  If not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
-static const unsigned char nonspacing_table_data[47*64] = {
+static const unsigned char nonspacing_table_data[48*64] = {
   /* 0x0000-0x01ff */
   0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, /* 0x0000-0x003f */
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, /* 0x0040-0x007f */
@@ -93,7 +85,7 @@ static const unsigned char nonspacing_table_data[47*64] = {
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf2, 0x07, /* 0x0e00-0x0e3f */
   0x80, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0e40-0x0e7f */
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf2, 0x1f, /* 0x0e80-0x0ebf */
-  0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0ec0-0x0eff */
+  0x00, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0ec0-0x0eff */
   0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0xa0, 0x02, /* 0x0f00-0x0f3f */
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x7f, /* 0x0f40-0x0f7f */
   0xdf, 0xe0, 0xff, 0xfe, 0xff, 0xff, 0xff, 0x1f, /* 0x0f80-0x0fbf */
@@ -273,7 +265,7 @@ static const unsigned char nonspacing_table_data[47*64] = {
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10e00-0x10e3f */
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10e40-0x10e7f */
   0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, /* 0x10e80-0x10ebf */
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10ec0-0x10eff */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, /* 0x10ec0-0x10eff */
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10f00-0x10f3f */
   0xc0, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10f40-0x10f7f */
   0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10f80-0x10fbf */
@@ -289,7 +281,7 @@ static const unsigned char nonspacing_table_data[47*64] = {
   0x00, 0x9e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x111c0-0x111ff */
   /* 0x11200-0x113ff */
   0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xd3, 0x40, /* 0x11200-0x1123f */
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11240-0x1127f */
+  0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11240-0x1127f */
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11280-0x112bf */
   0x00, 0x00, 0x00, 0x80, 0xf8, 0x07, 0x00, 0x00, /* 0x112c0-0x112ff */
   0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, /* 0x11300-0x1133f */
@@ -346,13 +338,13 @@ static const unsigned char nonspacing_table_data[47*64] = {
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11e40-0x11e7f */
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11e80-0x11ebf */
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, /* 0x11ec0-0x11eff */
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11f00-0x11f3f */
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11f40-0x11f7f */
+  0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x07, /* 0x11f00-0x11f3f */
+  0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11f40-0x11f7f */
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11f80-0x11fbf */
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11fc0-0x11fff */
   /* 0x13400-0x135ff */
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, /* 0x13400-0x1343f */
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x13440-0x1347f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, /* 0x13400-0x1343f */
+  0x81, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x13440-0x1347f */
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x13480-0x134bf */
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x134c0-0x134ff */
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x13500-0x1353f */
@@ -425,7 +417,7 @@ static const unsigned char nonspacing_table_data[47*64] = {
   /* 0x1e000-0x1e1ff */
   0x7f, 0xff, 0xff, 0xf9, 0xdb, 0x07, 0x00, 0x00, /* 0x1e000-0x1e03f */
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e040-0x1e07f */
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e080-0x1e0bf */
+  0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e080-0x1e0bf */
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e0c0-0x1e0ff */
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x00, /* 0x1e100-0x1e13f */
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e140-0x1e17f */
@@ -440,6 +432,15 @@ static const unsigned char nonspacing_table_data[47*64] = {
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e340-0x1e37f */
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e380-0x1e3bf */
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e3c0-0x1e3ff */
+  /* 0x1e400-0x1e5ff */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e400-0x1e43f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e440-0x1e47f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e480-0x1e4bf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, /* 0x1e4c0-0x1e4ff */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e500-0x1e53f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e540-0x1e57f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e580-0x1e5bf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e5c0-0x1e5ff */
   /* 0x1e800-0x1e9ff */
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e800-0x1e83f */
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e840-0x1e87f */
@@ -481,5 +482,5 @@ static const signed char nonspacing_table_ind[248] = {
   -1, -1, -1, -1, -1, -1, 39, -1, /* 0x1b000-0x1bfff */
   -1, -1, -1, -1, -1, -1, -1, 40, /* 0x1c000-0x1cfff */
   41, 42, -1, -1, -1, 43, -1, -1, /* 0x1d000-0x1dfff */
-  44, 45, -1, -1, 46, -1, -1, -1  /* 0x1e000-0x1efff */
+  44, 45, 46, -1, 47, -1, -1, -1  /* 0x1e000-0x1efff */
 };
diff --git a/lib/uniwidth/width2.h b/lib/uniwidth/width2.h
index 25364d3b..19c8c02a 100644
--- a/lib/uniwidth/width2.h
+++ b/lib/uniwidth/width2.h
@@ -1,29 +1,21 @@
 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
 /* Width 2 property of Unicode characters.  */
-/* Generated automatically by gen-uni-tables.c for Unicode 14.0.0.  */
+/* Generated automatically by gen-uni-tables.c for Unicode 15.0.0.  */
 
 /* Copyright (C) 2000-2022 Free Software Foundation, Inc.
 
-   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 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 and the GNU 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 and of the GNU General Public License along with this
-   program.  If not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #define header_0 16
 #define header_2 9
diff --git a/lib/unlocked-io.h b/lib/unlocked-io.h
index 7461d740..4830df4a 100644
--- a/lib/unlocked-io.h
+++ b/lib/unlocked-io.h
@@ -1,6 +1,6 @@
 /* Prefer faster, non-thread-safe stdio functions if available.
 
-   Copyright (C) 2001-2004, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2001-2004, 2009-2023 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
@@ -31,6 +31,11 @@
    the *_unlocked functions directly.  On hosts that lack those
    functions, invoke the non-thread-safe versions instead.  */
 
+/* This file uses HAVE_DECL_*_UNLOCKED.  */
+# if !_GL_CONFIG_H_INCLUDED
+#  error "Please include config.h first."
+# endif
+
 # include <stdio.h>
 
 # if HAVE_DECL_CLEARERR_UNLOCKED || defined clearerr_unlocked
diff --git a/lib/verify.h b/lib/verify.h
index c5c63ae9..e4af9151 100644
--- a/lib/verify.h
+++ b/lib/verify.h
@@ -1,6 +1,6 @@
 /* Compile-time assert-like macros.
 
-   Copyright (C) 2005-2006, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2005-2006, 2009-2023 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
@@ -25,19 +25,19 @@
    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 C23.  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
    'configure' down we could also use it with other compilers, but
    since this affects only the quality of diagnostics, why bother?  */
 #ifndef __cplusplus
-# if (201112L <= __STDC_VERSION__ \
+# if (201112 <= __STDC_VERSION__ \
       || (!defined __STRICT_ANSI__ \
           && (4 < __GNUC__ + (6 <= __GNUC_MINOR__) || 5 <= __clang_major__)))
 #  define _GL_HAVE__STATIC_ASSERT 1
 # endif
-# if (202000L <= __STDC_VERSION__ \
+# if (202311 <= __STDC_VERSION__ \
       || (!defined __STRICT_ANSI__ && 9 <= __GNUC__))
 #  define _GL_HAVE__STATIC_ASSERT1 1
 # endif
@@ -202,12 +202,12 @@ template <int w>
 
    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 C23 one-argument syntax.
 
    Unfortunately, unlike C11, this implementation must appear as an
    ordinary declaration, and cannot appear inside struct { ... }.  */
 
-#if 200410 <= __cpp_static_assert
+#if 202311 <= __STDC_VERSION__ || 200410 <= __cpp_static_assert
 # define _GL_VERIFY(R, DIAGNOSTIC, ...) static_assert (R, DIAGNOSTIC)
 #elif defined _GL_HAVE__STATIC_ASSERT
 # define _GL_VERIFY(R, DIAGNOSTIC, ...) _Static_assert (R, DIAGNOSTIC)
@@ -222,18 +222,68 @@ template <int w>
 
 /* _GL_STATIC_ASSERT_H is defined if this code is copied into assert.h.  */
 #ifdef _GL_STATIC_ASSERT_H
-# if !defined _GL_HAVE__STATIC_ASSERT1 && !defined _Static_assert
-#  define _Static_assert(...) \
-     _GL_VERIFY (__VA_ARGS__, "static assertion failed", -)
+/* Define _Static_assert if needed.  */
+/* With clang ≥ 3.8.0 in C++ mode, _Static_assert already works and accepts
+   1 or 2 arguments.  We better don't override it, because clang's standard
+   C++ library uses static_assert inside classes in several places, and our
+   replacement via _GL_VERIFY does not work in these contexts.  */
+# if (defined __cplusplus && defined __clang__ \
+      && (4 <= __clang_major__ + (8 <= __clang_minor__)))
+#  if 5 <= __clang_major__
+/* Avoid "warning: 'static_assert' with no message is a C++17 extension".  */
+#   pragma clang diagnostic ignored "-Wc++17-extensions"
+#  else
+/* Avoid "warning: static_assert with no message is a C++1z extension".  */
+#   pragma clang diagnostic ignored "-Wc++1z-extensions"
+#  endif
+# elif !defined _GL_HAVE__STATIC_ASSERT1 && !defined _Static_assert
+#  if !defined _MSC_VER || defined __clang__
+#   define _Static_assert(...) \
+      _GL_VERIFY (__VA_ARGS__, "static assertion failed", -)
+#  else
+#   if defined __cplusplus && _MSC_VER >= 1910
+     /* In MSVC 14.1 or newer, static_assert accepts one or two arguments,
+        but _Static_assert is not defined.  */
+#    define _Static_assert static_assert
+#   else
+     /* Work around MSVC preprocessor incompatibility with ISO C; see
+        <https://stackoverflow.com/questions/5134523/>.  */
+#    define _Static_assert(R, ...) \
+       _GL_VERIFY ((R), "static assertion failed", -)
+#   endif
+#  endif
 # endif
-# if __cpp_static_assert < 201411 && !defined static_assert
-#  define static_assert _Static_assert /* C11 requires this #define.  */
+/* Define static_assert if needed.  */
+# if (!defined static_assert \
+      && __STDC_VERSION__ < 202311 \
+      && (!defined __cplusplus \
+          || (__cpp_static_assert < 201411 \
+              && __GNUG__ < 6 && __clang_major__ < 6 && _MSC_VER < 1910)))
+#  if defined __cplusplus && _MSC_VER >= 1900 && !defined __clang__
+/* MSVC 14 in C++ mode supports the two-arguments static_assert but not
+   the one-argument static_assert, and it does not support _Static_assert.
+   We have to play preprocessor tricks to distinguish the two cases.
+   Since the MSVC preprocessor is not ISO C compliant (see above),.
+   the solution is specific to MSVC.  */
+#   define _GL_EXPAND(x) x
+#   define _GL_SA1(a1) static_assert ((a1), "static assertion failed")
+#   define _GL_SA2 static_assert
+#   define _GL_SA3 static_assert
+#   define _GL_SA_PICK(x1,x2,x3,x4,...) x4
+#   define static_assert(...) _GL_EXPAND(_GL_SA_PICK(__VA_ARGS__,_GL_SA3,_GL_SA2,_GL_SA1)) (__VA_ARGS__)
+/* Avoid "fatal error C1189: #error:  The C++ Standard Library forbids macroizing keywords."  */
+#   define _ALLOW_KEYWORD_MACROS 1
+#  else
+#   define static_assert _Static_assert /* C11 requires this #define. */
+#  endif
 # endif
 #endif
 
 /* @assert.h omit start@  */
 
-#if 3 < __GNUC__ + (3 < __GNUC_MINOR__ + (4 <= __GNUC_PATCHLEVEL__))
+#if defined __clang_major__ && __clang_major__ < 5
+# define _GL_HAS_BUILTIN_TRAP 0
+#elif 3 < __GNUC__ + (3 < __GNUC_MINOR__ + (4 <= __GNUC_PATCHLEVEL__))
 # define _GL_HAS_BUILTIN_TRAP 1
 #elif defined __has_builtin
 # define _GL_HAS_BUILTIN_TRAP __has_builtin (__builtin_trap)
@@ -241,12 +291,16 @@ template <int w>
 # define _GL_HAS_BUILTIN_TRAP 0
 #endif
 
-#if 4 < __GNUC__ + (5 <= __GNUC_MINOR__)
-# define _GL_HAS_BUILTIN_UNREACHABLE 1
-#elif defined __has_builtin
-# define _GL_HAS_BUILTIN_UNREACHABLE __has_builtin (__builtin_unreachable)
-#else
-# define _GL_HAS_BUILTIN_UNREACHABLE 0
+#ifndef _GL_HAS_BUILTIN_UNREACHABLE
+# if defined __clang_major__ && __clang_major__ < 5
+#  define _GL_HAS_BUILTIN_UNREACHABLE 0
+# elif 4 < __GNUC__ + (5 <= __GNUC_MINOR__)
+#  define _GL_HAS_BUILTIN_UNREACHABLE 1
+# elif defined __has_builtin
+#  define _GL_HAS_BUILTIN_UNREACHABLE __has_builtin (__builtin_unreachable)
+# else
+#  define _GL_HAS_BUILTIN_UNREACHABLE 0
+# endif
 #endif
 
 /* Each of these macros verifies that its argument R is nonzero.  To
@@ -303,13 +357,16 @@ template <int w>
 # define assume(R) ((R) ? (void) 0 : __builtin_unreachable ())
 #elif 1200 <= _MSC_VER
 # define assume(R) __assume (R)
+#elif 202311 <= __STDC_VERSION__
+# include <stddef.h>
+# define assume(R) ((R) ? (void) 0 : unreachable ())
 #elif (defined GCC_LINT || defined lint) && _GL_HAS_BUILTIN_TRAP
   /* Doing it this way helps various packages when configured with
      --enable-gcc-warnings, which compiles with -Dlint.  It's nicer
-     when 'assume' silences warnings even with older GCCs.  */
+     if 'assume' silences warnings with GCC 3.4 through GCC 4.4.7 (2012).  */
 # define assume(R) ((R) ? (void) 0 : __builtin_trap ())
 #else
-  /* Some tools grok NOTREACHED, e.g., Oracle Studio 12.6.  */
+  /* Some older tools grok NOTREACHED, e.g., Oracle Studio 12.6 (2017).  */
 # define assume(R) ((R) ? (void) 0 : /*NOTREACHED*/ (void) 0)
 #endif
 
diff --git a/lib/version-etc-fsf.c b/lib/version-etc-fsf.c
index 79ea256d..a34996d1 100644
--- a/lib/version-etc-fsf.c
+++ b/lib/version-etc-fsf.c
@@ -1,5 +1,5 @@
 /* Variable with FSF copyright information, for version-etc.
-   Copyright (C) 1999-2006, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 1999-2006, 2009-2023 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
diff --git a/lib/version-etc.c b/lib/version-etc.c
index 6b27e327..8e3b5738 100644
--- a/lib/version-etc.c
+++ b/lib/version-etc.c
@@ -1,5 +1,5 @@
 /* Print --version and bug-reporting information in a consistent format.
-   Copyright (C) 1999-2022 Free Software Foundation, Inc.
+   Copyright (C) 1999-2023 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
@@ -37,7 +37,7 @@
 # define PACKAGE PACKAGE_TARNAME
 #endif
 
-enum { COPYRIGHT_YEAR = 2022 };
+enum { COPYRIGHT_YEAR = 2023 };
 
 /* The three functions below display the --version information the
    standard way.
diff --git a/lib/version-etc.h b/lib/version-etc.h
index c6b4eef4..2313d98b 100644
--- a/lib/version-etc.h
+++ b/lib/version-etc.h
@@ -1,5 +1,5 @@
 /* Print --version and bug-reporting information in a consistent format.
-   Copyright (C) 1999, 2003, 2005, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2003, 2005, 2009-2023 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
@@ -19,6 +19,11 @@
 #ifndef VERSION_ETC_H
 # define VERSION_ETC_H 1
 
+/* This file uses _GL_ATTRIBUTE_SENTINEL.  */
+# if !_GL_CONFIG_H_INCLUDED
+#  error "Please include config.h first."
+# endif
+
 # include <stdarg.h>
 # include <stdio.h>
 
diff --git a/lib/warn-on-use.h b/lib/warn-on-use.h
index 94f5b920..30756034 100644
--- a/lib/warn-on-use.h
+++ b/lib/warn-on-use.h
@@ -1,5 +1,5 @@
 /* A C macro for emitting warnings if a function is used.
-   Copyright (C) 2010-2022 Free Software Foundation, Inc.
+   Copyright (C) 2010-2023 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
diff --git a/lib/wchar.in.h b/lib/wchar.in.h
index 835ddbe6..69fa2f8f 100644
--- a/lib/wchar.in.h
+++ b/lib/wchar.in.h
@@ -1,6 +1,6 @@
 /* A substitute for ISO C99 <wchar.h>, for platforms that have issues.
 
-   Copyright (C) 2007-2022 Free Software Foundation, Inc.
+   Copyright (C) 2007-2023 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
@@ -84,6 +84,12 @@
 #ifndef _@GUARD_PREFIX@_WCHAR_H
 #define _@GUARD_PREFIX@_WCHAR_H
 
+/* This file uses _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_MALLOC,
+   _GL_ATTRIBUTE_PURE, GNULIB_POSIXCHECK, HAVE_RAW_DECL_*.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 /* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers
    that can be freed by passing them as the Ith argument to the
    function F.  */
@@ -99,7 +105,14 @@
    can be freed via 'free'; it can be used only after declaring 'free'.  */
 /* Applies to: functions.  Cannot be used on inline functions.  */
 #ifndef _GL_ATTRIBUTE_DEALLOC_FREE
-# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (free, 1)
+# if defined __cplusplus && defined __GNUC__ && !defined __clang__
+/* Work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108231> */
+#  define _GL_ATTRIBUTE_DEALLOC_FREE \
+     _GL_ATTRIBUTE_DEALLOC ((void (*) (void *)) free, 1)
+# else
+#  define _GL_ATTRIBUTE_DEALLOC_FREE \
+     _GL_ATTRIBUTE_DEALLOC (free, 1)
+# endif
 #endif
 
 /* _GL_ATTRIBUTE_MALLOC declares that the function returns a pointer to freshly
@@ -181,7 +194,11 @@ typedef int rpl_mbstate_t;
 # if (@REPLACE_FREE@ && !defined free \
       && !(defined __cplusplus && defined GNULIB_NAMESPACE))
 /* We can't do '#define free rpl_free' here.  */
+#  if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2)
+_GL_EXTERN_C void rpl_free (void *) throw ();
+#  else
 _GL_EXTERN_C void rpl_free (void *);
+#  endif
 #  undef _GL_ATTRIBUTE_DEALLOC_FREE
 #  define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (rpl_free, 1)
 # else
@@ -434,7 +451,9 @@ _GL_CXXALIAS_SYS (mbsnrtowcs, size_t,
                    const char **restrict srcp, size_t srclen, size_t len,
                    mbstate_t *restrict ps));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (mbsnrtowcs);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef mbsnrtowcs
 # if HAVE_RAW_DECL_MBSNRTOWCS
@@ -622,13 +641,25 @@ _GL_WARN_ON_USE (wmemchr, "wmemchr is unportable - "
 
 /* Compare N wide characters of S1 and S2.  */
 #if @GNULIB_WMEMCMP@
-# if !@HAVE_WMEMCMP@
+# if @REPLACE_WMEMCMP@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef wmemcmp
+#   define wmemcmp rpl_wmemcmp
+#  endif
+_GL_FUNCDECL_RPL (wmemcmp, int,
+                  (const wchar_t *s1, const wchar_t *s2, size_t n)
+                  _GL_ATTRIBUTE_PURE);
+_GL_CXXALIAS_RPL (wmemcmp, int,
+                  (const wchar_t *s1, const wchar_t *s2, size_t n));
+# else
+#  if !@HAVE_WMEMCMP@
 _GL_FUNCDECL_SYS (wmemcmp, int,
                   (const wchar_t *s1, const wchar_t *s2, size_t n)
                   _GL_ATTRIBUTE_PURE);
-# endif
+#  endif
 _GL_CXXALIAS_SYS (wmemcmp, int,
                   (const wchar_t *s1, const wchar_t *s2, size_t n));
+# endif
 # if __GLIBC__ >= 2
 _GL_CXXALIASWARN (wmemcmp);
 # endif
@@ -687,14 +718,27 @@ _GL_WARN_ON_USE (wmemmove, "wmemmove is unportable - "
 /* Copy N wide characters of SRC to DEST.
    Return pointer to wide characters after the last written wide character.  */
 #if @GNULIB_WMEMPCPY@
-# if !@HAVE_WMEMPCPY@
+# if @REPLACE_WMEMPCPY@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef wmempcpy
+#   define wmempcpy rpl_wmempcpy
+#  endif
+_GL_FUNCDECL_RPL (wmempcpy, wchar_t *,
+                  (wchar_t *restrict dest,
+                   const wchar_t *restrict src, size_t n));
+_GL_CXXALIAS_RPL (wmempcpy, wchar_t *,
+                  (wchar_t *restrict dest,
+                   const wchar_t *restrict src, size_t n));
+# else
+#  if !@HAVE_WMEMPCPY@
 _GL_FUNCDECL_SYS (wmempcpy, wchar_t *,
                   (wchar_t *restrict dest,
                    const wchar_t *restrict src, size_t n));
-# endif
+#  endif
 _GL_CXXALIAS_SYS (wmempcpy, wchar_t *,
                   (wchar_t *restrict dest,
                    const wchar_t *restrict src, size_t n));
+# endif
 # if __GLIBC__ >= 2
 _GL_CXXALIASWARN (wmempcpy);
 # endif
@@ -745,7 +789,10 @@ _GL_WARN_ON_USE (wcslen, "wcslen is unportable - "
 
 /* Return the number of wide characters in S, but at most MAXLEN.  */
 #if @GNULIB_WCSNLEN@
-# if !@HAVE_WCSNLEN@
+/* On Solaris 11.3, the header files declare the function in the std::
+   namespace, not in the global namespace.  So, force a declaration in
+   the global namespace.  */
+# if !@HAVE_WCSNLEN@ || (defined __sun && defined __cplusplus)
 _GL_FUNCDECL_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen)
                                    _GL_ATTRIBUTE_PURE);
 # endif
@@ -782,7 +829,10 @@ _GL_WARN_ON_USE (wcscpy, "wcscpy is unportable - "
 
 /* Copy SRC to DEST, returning the address of the terminating L'\0' in DEST.  */
 #if @GNULIB_WCPCPY@
-# if !@HAVE_WCPCPY@
+/* On Solaris 11.3, the header files declare the function in the std::
+   namespace, not in the global namespace.  So, force a declaration in
+   the global namespace.  */
+# if !@HAVE_WCPCPY@ || (defined __sun && defined __cplusplus)
 _GL_FUNCDECL_SYS (wcpcpy, wchar_t *,
                   (wchar_t *restrict dest, const wchar_t *restrict src));
 # endif
@@ -823,7 +873,10 @@ _GL_WARN_ON_USE (wcsncpy, "wcsncpy is unportable - "
 /* Copy no more than N characters of SRC to DEST, returning the address of
    the last character written into DEST.  */
 #if @GNULIB_WCPNCPY@
-# if !@HAVE_WCPNCPY@
+/* On Solaris 11.3, the header files declare the function in the std::
+   namespace, not in the global namespace.  So, force a declaration in
+   the global namespace.  */
+# if !@HAVE_WCPNCPY@ || (defined __sun && defined __cplusplus)
 _GL_FUNCDECL_SYS (wcpncpy, wchar_t *,
                   (wchar_t *restrict dest,
                    const wchar_t *restrict src, size_t n));
@@ -885,11 +938,21 @@ _GL_WARN_ON_USE (wcsncat, "wcsncat is unportable - "
 
 /* Compare S1 and S2.  */
 #if @GNULIB_WCSCMP@
-# if !@HAVE_WCSCMP@
+# if @REPLACE_WCSCMP@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef wcscmp
+#   define wcscmp rpl_wcscmp
+#  endif
+_GL_FUNCDECL_RPL (wcscmp, int, (const wchar_t *s1, const wchar_t *s2)
+                               _GL_ATTRIBUTE_PURE);
+_GL_CXXALIAS_RPL (wcscmp, int, (const wchar_t *s1, const wchar_t *s2));
+# else
+#  if !@HAVE_WCSCMP@
 _GL_FUNCDECL_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2)
                                _GL_ATTRIBUTE_PURE);
-# endif
+#  endif
 _GL_CXXALIAS_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2));
+# endif
 # if __GLIBC__ >= 2
 _GL_CXXALIASWARN (wcscmp);
 # endif
@@ -904,13 +967,25 @@ _GL_WARN_ON_USE (wcscmp, "wcscmp is unportable - "
 
 /* Compare no more than N wide characters of S1 and S2.  */
 #if @GNULIB_WCSNCMP@
-# if !@HAVE_WCSNCMP@
+# if @REPLACE_WCSNCMP@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef wcsncmp
+#   define wcsncmp rpl_wcsncmp
+#  endif
+_GL_FUNCDECL_RPL (wcsncmp, int,
+                  (const wchar_t *s1, const wchar_t *s2, size_t n)
+                  _GL_ATTRIBUTE_PURE);
+_GL_CXXALIAS_RPL (wcsncmp, int,
+                  (const wchar_t *s1, const wchar_t *s2, size_t n));
+# else
+#  if !@HAVE_WCSNCMP@
 _GL_FUNCDECL_SYS (wcsncmp, int,
                   (const wchar_t *s1, const wchar_t *s2, size_t n)
                   _GL_ATTRIBUTE_PURE);
-# endif
+#  endif
 _GL_CXXALIAS_SYS (wcsncmp, int,
                   (const wchar_t *s1, const wchar_t *s2, size_t n));
+# endif
 # if __GLIBC__ >= 2
 _GL_CXXALIASWARN (wcsncmp);
 # endif
@@ -925,7 +1000,10 @@ _GL_WARN_ON_USE (wcsncmp, "wcsncmp is unportable - "
 
 /* Compare S1 and S2, ignoring case.  */
 #if @GNULIB_WCSCASECMP@
-# if !@HAVE_WCSCASECMP@
+/* On Solaris 11.3, the header files declare the function in the std::
+   namespace, not in the global namespace.  So, force a declaration in
+   the global namespace.  */
+# if !@HAVE_WCSCASECMP@ || (defined __sun && defined __cplusplus)
 _GL_FUNCDECL_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2)
                                    _GL_ATTRIBUTE_PURE);
 # endif
@@ -942,7 +1020,10 @@ _GL_WARN_ON_USE (wcscasecmp, "wcscasecmp is unportable - "
 
 /* Compare no more than N chars of S1 and S2, ignoring case.  */
 #if @GNULIB_WCSNCASECMP@
-# if !@HAVE_WCSNCASECMP@
+/* On Solaris 11.3, the header files declare the function in the std::
+   namespace, not in the global namespace.  So, force a declaration in
+   the global namespace.  */
+# if !@HAVE_WCSNCASECMP@ || (defined __sun && defined __cplusplus)
 _GL_FUNCDECL_SYS (wcsncasecmp, int,
                   (const wchar_t *s1, const wchar_t *s2, size_t n)
                   _GL_ATTRIBUTE_PURE);
@@ -1009,7 +1090,10 @@ _GL_WARN_ON_USE (wcsxfrm, "wcsxfrm is unportable - "
 #  endif
 _GL_CXXALIAS_MDA (wcsdup, wchar_t *, (const wchar_t *s));
 # else
-#  if !@HAVE_WCSDUP@ || __GNUC__ >= 11
+/* On Solaris 11.3, the header files declare the function in the std::
+   namespace, not in the global namespace.  So, force a declaration in
+   the global namespace.  */
+#  if !@HAVE_WCSDUP@ || (defined __sun && defined __cplusplus) || __GNUC__ >= 11
 _GL_FUNCDECL_SYS (wcsdup, wchar_t *,
                   (const wchar_t *s)
                   _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
@@ -1190,12 +1274,25 @@ _GL_WARN_ON_USE (wcspbrk, "wcspbrk is unportable - "
 
 /* Find the first occurrence of NEEDLE in HAYSTACK.  */
 #if @GNULIB_WCSSTR@
-# if !@HAVE_WCSSTR@
+# if @REPLACE_WCSSTR@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef wcsstr
+#   define wcsstr rpl_wcsstr
+#  endif
+_GL_FUNCDECL_RPL (wcsstr, wchar_t *,
+                  (const wchar_t *restrict haystack,
+                   const wchar_t *restrict needle)
+                  _GL_ATTRIBUTE_PURE);
+_GL_CXXALIAS_RPL (wcsstr, wchar_t *,
+                  (const wchar_t *restrict haystack,
+                   const wchar_t *restrict needle));
+# else
+#  if !@HAVE_WCSSTR@
 _GL_FUNCDECL_SYS (wcsstr, wchar_t *,
                   (const wchar_t *restrict haystack,
                    const wchar_t *restrict needle)
                   _GL_ATTRIBUTE_PURE);
-# endif
+#  endif
   /* On some systems, this function is defined as an overloaded function:
        extern "C++" {
          const wchar_t * std::wcsstr (const wchar_t *, const wchar_t *);
@@ -1206,6 +1303,7 @@ _GL_CXXALIAS_SYS_CAST2 (wcsstr,
                         (const wchar_t *restrict, const wchar_t *restrict),
                         const wchar_t *,
                         (const wchar_t *restrict, const wchar_t *restrict));
+# endif
 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
      && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
 _GL_CXXALIASWARN1 (wcsstr, wchar_t *,
diff --git a/lib/wcrtomb.c b/lib/wcrtomb.c
index e14d8022..48a6c8eb 100644
--- a/lib/wcrtomb.c
+++ b/lib/wcrtomb.c
@@ -1,5 +1,5 @@
 /* Convert wide character to multibyte character.
-   Copyright (C) 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2008.
 
    This file is free software: you can redistribute it and/or modify
diff --git a/lib/wctob.c b/lib/wctob.c
index 806d0fca..df27febd 100644
--- a/lib/wctob.c
+++ b/lib/wctob.c
@@ -1,5 +1,5 @@
 /* Convert wide character to unibyte character.
-   Copyright (C) 2008, 2010-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008, 2010-2023 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2008.
 
    This file is free software: you can redistribute it and/or modify
diff --git a/lib/wctomb-impl.h b/lib/wctomb-impl.h
index 7a0995a0..9ba727ed 100644
--- a/lib/wctomb-impl.h
+++ b/lib/wctomb-impl.h
@@ -1,5 +1,5 @@
 /* Convert wide character to multibyte character.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2011.
 
    This file is free software: you can redistribute it and/or modify
diff --git a/lib/wctomb.c b/lib/wctomb.c
index bbaf2e0e..1143a95d 100644
--- a/lib/wctomb.c
+++ b/lib/wctomb.c
@@ -1,5 +1,5 @@
 /* Convert wide character to multibyte character.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2011.
 
    This file is free software: you can redistribute it and/or modify
diff --git a/lib/wctype-h.c b/lib/wctype-h.c
index 12781433..7d3e14a6 100644
--- a/lib/wctype-h.c
+++ b/lib/wctype-h.c
@@ -1,6 +1,6 @@
 /* Inline functions for <wctype.h>.
 
-   Copyright (C) 2012-2022 Free Software Foundation, Inc.
+   Copyright (C) 2012-2023 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
diff --git a/lib/wctype.in.h b/lib/wctype.in.h
index 98cafee7..227fdac2 100644
--- a/lib/wctype.in.h
+++ b/lib/wctype.in.h
@@ -1,6 +1,6 @@
 /* A substitute for ISO C99 <wctype.h>, for platforms that lack it.
 
-   Copyright (C) 2006-2022 Free Software Foundation, Inc.
+   Copyright (C) 2006-2023 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
@@ -44,6 +44,12 @@
 
 #ifndef _@GUARD_PREFIX@_WCTYPE_H
 
+/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, GNULIB_POSIXCHECK,
+   HAVE_RAW_DECL_*.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #if @HAVE_WINT_T@
 /* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>.  */
 # include <wchar.h>
@@ -68,9 +74,6 @@
 #ifndef _@GUARD_PREFIX@_WCTYPE_H
 #define _@GUARD_PREFIX@_WCTYPE_H
 
-#ifndef _GL_INLINE_HEADER_BEGIN
- #error "Please include config.h first."
-#endif
 _GL_INLINE_HEADER_BEGIN
 #ifndef _GL_WCTYPE_INLINE
 # define _GL_WCTYPE_INLINE _GL_INLINE
diff --git a/lib/wcwidth.c b/lib/wcwidth.c
index f99a0a61..1d036654 100644
--- a/lib/wcwidth.c
+++ b/lib/wcwidth.c
@@ -1,5 +1,5 @@
 /* Determine the number of screen columns needed for a character.
-   Copyright (C) 2006-2007, 2010-2022 Free Software Foundation, Inc.
+   Copyright (C) 2006-2007, 2010-2023 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
diff --git a/lib/windows-initguard.h b/lib/windows-initguard.h
index a29d7e97..9d36f53c 100644
--- a/lib/windows-initguard.h
+++ b/lib/windows-initguard.h
@@ -1,5 +1,5 @@
 /* Init guards, somewhat like spinlocks (native Windows implementation).
-   Copyright (C) 2005-2022 Free Software Foundation, Inc.
+   Copyright (C) 2005-2023 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
diff --git a/lib/windows-mutex.c b/lib/windows-mutex.c
index 28e429c1..ab7258c9 100644
--- a/lib/windows-mutex.c
+++ b/lib/windows-mutex.c
@@ -1,5 +1,5 @@
 /* Plain mutexes (native Windows implementation).
-   Copyright (C) 2005-2022 Free Software Foundation, Inc.
+   Copyright (C) 2005-2023 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
diff --git a/lib/windows-mutex.h b/lib/windows-mutex.h
index 7aedfdf6..039eb707 100644
--- a/lib/windows-mutex.h
+++ b/lib/windows-mutex.h
@@ -1,5 +1,5 @@
 /* Plain mutexes (native Windows implementation).
-   Copyright (C) 2005-2022 Free Software Foundation, Inc.
+   Copyright (C) 2005-2023 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
diff --git a/lib/windows-once.c b/lib/windows-once.c
index deea5487..0d28281f 100644
--- a/lib/windows-once.c
+++ b/lib/windows-once.c
@@ -1,5 +1,5 @@
 /* Once-only control (native Windows implementation).
-   Copyright (C) 2005-2022 Free Software Foundation, Inc.
+   Copyright (C) 2005-2023 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
diff --git a/lib/windows-once.h b/lib/windows-once.h
index 85534c99..54885680 100644
--- a/lib/windows-once.h
+++ b/lib/windows-once.h
@@ -1,5 +1,5 @@
 /* Once-only control (native Windows implementation).
-   Copyright (C) 2005-2022 Free Software Foundation, Inc.
+   Copyright (C) 2005-2023 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
diff --git a/lib/windows-recmutex.c b/lib/windows-recmutex.c
index d8087ac1..a8ce9a04 100644
--- a/lib/windows-recmutex.c
+++ b/lib/windows-recmutex.c
@@ -1,5 +1,5 @@
 /* Plain recursive mutexes (native Windows implementation).
-   Copyright (C) 2005-2022 Free Software Foundation, Inc.
+   Copyright (C) 2005-2023 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
diff --git a/lib/windows-recmutex.h b/lib/windows-recmutex.h
index 746e75c0..08ff4597 100644
--- a/lib/windows-recmutex.h
+++ b/lib/windows-recmutex.h
@@ -1,5 +1,5 @@
 /* Plain recursive mutexes (native Windows implementation).
-   Copyright (C) 2005-2022 Free Software Foundation, Inc.
+   Copyright (C) 2005-2023 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
diff --git a/lib/windows-rwlock.c b/lib/windows-rwlock.c
index d186e037..7cbd7bb1 100644
--- a/lib/windows-rwlock.c
+++ b/lib/windows-rwlock.c
@@ -1,5 +1,5 @@
 /* Read-write locks (native Windows implementation).
-   Copyright (C) 2005-2022 Free Software Foundation, Inc.
+   Copyright (C) 2005-2023 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
diff --git a/lib/windows-rwlock.h b/lib/windows-rwlock.h
index 65c5ab49..fe8381e8 100644
--- a/lib/windows-rwlock.h
+++ b/lib/windows-rwlock.h
@@ -1,5 +1,5 @@
 /* Read-write locks (native Windows implementation).
-   Copyright (C) 2005-2022 Free Software Foundation, Inc.
+   Copyright (C) 2005-2023 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
diff --git a/lib/wmemchr-impl.h b/lib/wmemchr-impl.h
index f92a362e..96b9ad3a 100644
--- a/lib/wmemchr-impl.h
+++ b/lib/wmemchr-impl.h
@@ -1,5 +1,5 @@
 /* Search wide character array for a wide character.
-   Copyright (C) 1999, 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2011-2023 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 1999.
 
    This file is free software: you can redistribute it and/or modify
diff --git a/lib/wmemchr.c b/lib/wmemchr.c
index 127e1a52..5d282473 100644
--- a/lib/wmemchr.c
+++ b/lib/wmemchr.c
@@ -1,5 +1,5 @@
 /* Search wide character array for a wide character.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2023 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2011.
 
    This file is free software: you can redistribute it and/or modify
diff --git a/lib/wmempcpy.c b/lib/wmempcpy.c
index cdfa9133..6803ecb4 100644
--- a/lib/wmempcpy.c
+++ b/lib/wmempcpy.c
@@ -1,5 +1,5 @@
 /* Copy wide character array, return pointer after last written wide character.
-   Copyright (C) 2020-2022 Free Software Foundation, Inc.
+   Copyright (C) 2020-2023 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
diff --git a/lib/xalloc-die.c b/lib/xalloc-die.c
index 5b947f10..7605eee1 100644
--- a/lib/xalloc-die.c
+++ b/lib/xalloc-die.c
@@ -1,6 +1,6 @@
 /* Report a memory allocation failure and exit.
 
-   Copyright (C) 1997-2000, 2002-2004, 2006, 2009-2022 Free Software
+   Copyright (C) 1997-2000, 2002-2004, 2006, 2009-2023 Free Software
    Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
diff --git a/lib/xalloc-oversized.h b/lib/xalloc-oversized.h
index aefa6fd8..5dbdfb55 100644
--- a/lib/xalloc-oversized.h
+++ b/lib/xalloc-oversized.h
@@ -1,6 +1,6 @@
 /* xalloc-oversized.h -- memory allocation size checking
 
-   Copyright (C) 1990-2000, 2003-2004, 2006-2022 Free Software Foundation, Inc.
+   Copyright (C) 1990-2000, 2003-2004, 2006-2023 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
diff --git a/lib/xalloc.h b/lib/xalloc.h
index 9f4bf8d4..0a951e1d 100644
--- a/lib/xalloc.h
+++ b/lib/xalloc.h
@@ -1,6 +1,6 @@
 /* xalloc.h -- malloc with out-of-memory checking
 
-   Copyright (C) 1990-2000, 2003-2004, 2006-2022 Free Software Foundation, Inc.
+   Copyright (C) 1990-2000, 2003-2004, 2006-2023 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
@@ -18,18 +18,20 @@
 #ifndef XALLOC_H_
 #define XALLOC_H_
 
+/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, _Noreturn,
+   _GL_ATTRIBUTE_ALLOC_SIZE, _GL_ATTRIBUTE_MALLOC,
+   _GL_ATTRIBUTE_RETURNS_NONNULL.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #include <stddef.h>
 #include <stdlib.h>
-#include <stdint.h>
 
 #if GNULIB_XALLOC
 # include "idx.h"
-# include "intprops.h"
 #endif
 
-#ifndef _GL_INLINE_HEADER_BEGIN
- #error "Please include config.h first."
-#endif
 _GL_INLINE_HEADER_BEGIN
 #ifndef XALLOC_INLINE
 # define XALLOC_INLINE _GL_INLINE
diff --git a/lib/xbinary-io.c b/lib/xbinary-io.c
index fdc89ab5..a85ed549 100644
--- a/lib/xbinary-io.c
+++ b/lib/xbinary-io.c
@@ -1,5 +1,5 @@
 /* Binary mode I/O with checking
-   Copyright 2017-2022 Free Software Foundation, Inc.
+   Copyright 2017-2023 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
@@ -21,7 +21,6 @@
 
 #include <errno.h>
 #include <error.h>
-#include <stdbool.h>
 #include "exitfail.h"
 #include "verify.h"
 
diff --git a/lib/xbinary-io.h b/lib/xbinary-io.h
index 144df9e9..d38256b4 100644
--- a/lib/xbinary-io.h
+++ b/lib/xbinary-io.h
@@ -1,5 +1,5 @@
 /* Binary mode I/O with checking
-   Copyright 2017-2022 Free Software Foundation, Inc.
+   Copyright 2017-2023 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
@@ -17,11 +17,13 @@
 #ifndef _XBINARY_IO_H
 #define _XBINARY_IO_H
 
-#include "binary-io.h"
-
-#ifndef _GL_INLINE_HEADER_BEGIN
+/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, _Noreturn.  */
+#if !_GL_CONFIG_H_INCLUDED
  #error "Please include config.h first."
 #endif
+
+#include "binary-io.h"
+
 _GL_INLINE_HEADER_BEGIN
 #ifndef XBINARY_IO_INLINE
 # define XBINARY_IO_INLINE _GL_INLINE
diff --git a/lib/xmalloc.c b/lib/xmalloc.c
index 993c1eeb..289cbd05 100644
--- a/lib/xmalloc.c
+++ b/lib/xmalloc.c
@@ -1,6 +1,6 @@
 /* xmalloc.c -- malloc with out of memory checking
 
-   Copyright (C) 1990-2000, 2002-2006, 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 1990-2000, 2002-2006, 2008-2023 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
@@ -22,10 +22,11 @@
 #include "xalloc.h"
 
 #include "ialloc.h"
-#include "intprops.h"
 #include "minmax.h"
 
+#include <stdckdint.h>
 #include <stdlib.h>
+#include <stdint.h>
 #include <string.h>
 
 static void * _GL_ATTRIBUTE_PURE
@@ -195,7 +196,7 @@ x2nrealloc (void *p, size_t *pn, size_t s)
   else
     {
       /* Set N = floor (1.5 * N) + 1 to make progress even if N == 0.  */
-      if (INT_ADD_WRAPV (n, (n >> 1) + 1, &n))
+      if (ckd_add (&n, n, (n >> 1) + 1))
         xalloc_die ();
     }
 
@@ -236,7 +237,7 @@ xpalloc (void *pa, idx_t *pn, idx_t n_incr_min, ptrdiff_t n_max, idx_t s)
      N_MAX, and what the C language can represent safely.  */
 
   idx_t n;
-  if (INT_ADD_WRAPV (n0, n0 >> 1, &n))
+  if (ckd_add (&n, n0, n0 >> 1))
     n = IDX_MAX;
   if (0 <= n_max && n_max < n)
     n = n_max;
@@ -251,7 +252,7 @@ xpalloc (void *pa, idx_t *pn, idx_t n_incr_min, ptrdiff_t n_max, idx_t s)
   size_t nbytes;
 #endif
   idx_t adjusted_nbytes
-    = (INT_MULTIPLY_WRAPV (n, s, &nbytes)
+    = (ckd_mul (&nbytes, n, s)
        ? MIN (IDX_MAX, SIZE_MAX)
        : nbytes < DEFAULT_MXFAST ? DEFAULT_MXFAST : 0);
   if (adjusted_nbytes)
@@ -263,9 +264,9 @@ xpalloc (void *pa, idx_t *pn, idx_t n_incr_min, ptrdiff_t n_max, idx_t s)
   if (! pa)
     *pn = 0;
   if (n - n0 < n_incr_min
-      && (INT_ADD_WRAPV (n0, n_incr_min, &n)
+      && (ckd_add (&n, n0, n_incr_min)
           || (0 <= n_max && n_max < n)
-          || INT_MULTIPLY_WRAPV (n, s, &nbytes)))
+          || ckd_mul (&nbytes, n, s)))
     xalloc_die ();
   pa = xrealloc (pa, nbytes);
   *pn = n;
diff --git a/lib/xstriconv.c b/lib/xstriconv.c
index 939d195f..77b7ac03 100644
--- a/lib/xstriconv.c
+++ b/lib/xstriconv.c
@@ -1,5 +1,5 @@
 /* Charset conversion with out-of-memory checking.
-   Copyright (C) 2001-2004, 2006, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2001-2004, 2006, 2009-2023 Free Software Foundation, Inc.
    Written by Bruno Haible.
 
    This program is free software: you can redistribute it and/or modify
diff --git a/lib/xstriconv.h b/lib/xstriconv.h
index 34752707..5a3a6636 100644
--- a/lib/xstriconv.h
+++ b/lib/xstriconv.h
@@ -1,5 +1,5 @@
 /* Charset conversion with out-of-memory checking.
-   Copyright (C) 2001-2004, 2006-2007, 2009-2022 Free Software Foundation, Inc.
+   Copyright (C) 2001-2004, 2006-2007, 2009-2023 Free Software Foundation, Inc.
    Written by Bruno Haible and Simon Josefsson.
 
    This program is free software: you can redistribute it and/or modify
@@ -18,6 +18,11 @@
 #ifndef _XSTRICONV_H
 #define _XSTRICONV_H
 
+/* This file uses _GL_ATTRIBUTE_MALLOC, HAVE_ICONV.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 #include <stdlib.h>
 #if HAVE_ICONV
 #include <iconv.h>
diff --git a/lib/xstrtoimax.c b/lib/xstrtoimax.c
index f01d2d74..1064bc30 100644
--- a/lib/xstrtoimax.c
+++ b/lib/xstrtoimax.c
@@ -1,6 +1,6 @@
 /* A more useful interface to strtoimax.
 
-   Copyright (C) 2001-2022 Free Software Foundation, Inc.
+   Copyright (C) 2001-2023 Free Software Foundation, Inc.
 
    This file is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published
diff --git a/lib/xstrtol.c b/lib/xstrtol.c
index e0a692ff..9695b42e 100644
--- a/lib/xstrtol.c
+++ b/lib/xstrtol.c
@@ -1,6 +1,6 @@
 /* A more useful interface to strtol.
 
-   Copyright (C) 1995-1996, 1998-2001, 2003-2007, 2009-2022 Free Software
+   Copyright (C) 1995-1996, 1998-2001, 2003-2007, 2009-2023 Free Software
    Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
@@ -140,7 +140,7 @@ __xstrtol (const char *s, char **ptr, int strtol_base,
       switch (**p)
         {
         case 'E': case 'G': case 'g': case 'k': case 'K': case 'M': case 'm':
-        case 'P': case 'T': case 't': case 'Y': case 'Z':
+        case 'P': case 'Q': case 'R': case 'T': case 't': case 'Y': case 'Z':
 
           /* The "valid suffix" '0' is a special flag meaning that
              an optional second suffix is allowed, which can change
@@ -205,6 +205,14 @@ __xstrtol (const char *s, char **ptr, int strtol_base,
           overflow = bkm_scale_by_power (&tmp, base, 5);
           break;
 
+        case 'Q': /* quetta or 2**100 */
+          overflow = bkm_scale_by_power (&tmp, base, 10);
+          break;
+
+        case 'R': /* ronna or 2**90 */
+          overflow = bkm_scale_by_power (&tmp, base, 9);
+          break;
+
         case 'T': /* tera or tebi */
         case 't': /* 't' is undocumented; for compatibility only */
           overflow = bkm_scale_by_power (&tmp, base, 4);
diff --git a/lib/xstrtol.h b/lib/xstrtol.h
index a0159a77..f70119a8 100644
--- a/lib/xstrtol.h
+++ b/lib/xstrtol.h
@@ -1,6 +1,6 @@
 /* A more useful interface to strtol.
 
-   Copyright (C) 1995-1996, 1998-1999, 2001-2004, 2006-2022 Free Software
+   Copyright (C) 1995-1996, 1998-1999, 2001-2004, 2006-2023 Free Software
    Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
diff --git a/lib/xstrtoul.c b/lib/xstrtoul.c
index 368e8153..33c38d46 100644
--- a/lib/xstrtoul.c
+++ b/lib/xstrtoul.c
@@ -1,6 +1,6 @@
 /* Convert string to 'unsigned long', with error checking.
 
-   Copyright (C) 1994-2022 Free Software Foundation, Inc.
+   Copyright (C) 1994-2023 Free Software Foundation, Inc.
 
    This file is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published
diff --git a/m4/00gnulib.m4 b/m4/00gnulib.m4
index dea34e83..7fe03e0b 100644
--- a/m4/00gnulib.m4
+++ b/m4/00gnulib.m4
@@ -1,5 +1,5 @@
 # 00gnulib.m4 serial 8
-dnl Copyright (C) 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/__inline.m4 b/m4/__inline.m4
index fbe2098e..acf8668b 100644
--- a/m4/__inline.m4
+++ b/m4/__inline.m4
@@ -1,5 +1,5 @@
 # Test for __inline keyword
-dnl Copyright 2017-2022 Free Software Foundation, Inc.
+dnl Copyright 2017-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/absolute-header.m4 b/m4/absolute-header.m4
index 67d6507c..e7947648 100644
--- a/m4/absolute-header.m4
+++ b/m4/absolute-header.m4
@@ -1,5 +1,5 @@
 # absolute-header.m4 serial 17
-dnl Copyright (C) 2006-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/alloca.m4 b/m4/alloca.m4
index dc6f47e3..c685fac9 100644
--- a/m4/alloca.m4
+++ b/m4/alloca.m4
@@ -1,5 +1,5 @@
 # alloca.m4 serial 21
-dnl Copyright (C) 2002-2004, 2006-2007, 2009-2022 Free Software Foundation,
+dnl Copyright (C) 2002-2004, 2006-2007, 2009-2023 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
diff --git a/m4/arpa_inet_h.m4 b/m4/arpa_inet_h.m4
index 057e13fc..fa5fe831 100644
--- a/m4/arpa_inet_h.m4
+++ b/m4/arpa_inet_h.m4
@@ -1,5 +1,5 @@
 # arpa_inet_h.m4 serial 17
-dnl Copyright (C) 2006, 2008-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2008-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/asm-underscore.m4 b/m4/asm-underscore.m4
index 950aa8d2..65ae55a7 100644
--- a/m4/asm-underscore.m4
+++ b/m4/asm-underscore.m4
@@ -1,5 +1,5 @@
 # asm-underscore.m4 serial 5
-dnl Copyright (C) 2010-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2010-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/assert.m4 b/m4/assert.m4
index e88979a9..5ba2b92a 100644
--- a/m4/assert.m4
+++ b/m4/assert.m4
@@ -1,6 +1,6 @@
-#serial 7
+#serial 8
 
-# Copyright (C) 1998-1999, 2001, 2004, 2008-2022 Free Software Foundation, Inc.
+# Copyright (C) 1998-1999, 2001, 2004, 2008-2023 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -12,7 +12,7 @@ AC_DEFUN([gl_ASSERT],
 [
   AC_MSG_CHECKING([whether to enable assertions])
   AC_ARG_ENABLE([assert],
-    [AS_HELP_STRING([--disable-assert], [turn off assertions])],
+    [AS_HELP_STRING([[--disable-assert]], [turn off assertions])],
     [AS_IF([test "x$enableval" = xno],
       [AC_DEFINE([NDEBUG], [1],
         [Define to 1 if assertions should be disabled.])],
diff --git a/m4/assert_h.m4 b/m4/assert_h.m4
new file mode 100644
index 00000000..d255855d
--- /dev/null
+++ b/m4/assert_h.m4
@@ -0,0 +1,73 @@
+# assert-h.m4
+dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert.
+
+AC_DEFUN([gl_ASSERT_H],
+[
+  AC_CACHE_CHECK([for static_assert], [gl_cv_static_assert],
+    [gl_save_CFLAGS=$CFLAGS
+     for gl_working in "yes, a keyword" "yes, an <assert.h> macro"; do
+      AS_CASE([$gl_working],
+        [*assert.h*], [CFLAGS="$gl_save_CFLAGS -DINCLUDE_ASSERT_H"])
+
+      AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#if defined __clang__ && __STDC_VERSION__ < 202311
+             #pragma clang diagnostic error "-Wc2x-extensions"
+             #pragma clang diagnostic error "-Wc++1z-extensions"
+            #endif
+            #ifdef INCLUDE_ASSERT_H
+             #include <assert.h>
+            #endif
+            static_assert (2 + 2 == 4, "arithmetic does not work");
+            static_assert (2 + 2 == 4);
+          ]],
+          [[
+            static_assert (sizeof (char) == 1, "sizeof does not work");
+            static_assert (sizeof (char) == 1);
+          ]])],
+       [gl_cv_static_assert=$gl_working],
+       [gl_cv_static_assert=no])
+      CFLAGS=$gl_save_CFLAGS
+      test "$gl_cv_static_assert" != no && break
+     done])
+
+  GL_GENERATE_ASSERT_H=false
+  AS_CASE([$gl_cv_static_assert],
+    [yes*keyword*],
+      [AC_DEFINE([HAVE_C_STATIC_ASSERT], [1],
+         [Define to 1 if the static_assert keyword works.])],
+    [no],
+      [GL_GENERATE_ASSERT_H=true
+       gl_NEXT_HEADERS([assert.h])])
+
+  dnl The "zz" puts this toward config.h's end, to avoid potential
+  dnl collisions with other definitions.
+  dnl #undef assert so that programs are not tempted to use it without
+  dnl specifically including assert.h.
+  dnl #undef __ASSERT_H__ so that on IRIX, when programs later include
+  dnl <assert.h>, this include actually defines assert.
+  dnl Break the #undef_s apart with a comment so that 'configure' does
+  dnl not comment them out.
+  AH_VERBATIM([zzstatic_assert],
+[#if (!defined HAVE_C_STATIC_ASSERT && !defined assert \
+     && (!defined __cplusplus \
+         || (__cpp_static_assert < 201411 \
+             && __GNUG__ < 6 && __clang_major__ < 6)))
+ #include <assert.h>
+ #undef/**/assert
+ #ifdef __sgi
+  #undef/**/__ASSERT_H__
+ #endif
+ /* Solaris 11.4 <assert.h> defines static_assert as a macro with 2 arguments.
+    We need it also to be invocable with a single argument.  */
+ #if defined __sun && (__STDC_VERSION__ - 0 >= 201112L) && !defined __cplusplus
+  #undef/**/static_assert
+  #define static_assert _Static_assert
+ #endif
+#endif])
+])
diff --git a/m4/btowc.m4 b/m4/btowc.m4
index 45a61f5e..1cd100a2 100644
--- a/m4/btowc.m4
+++ b/m4/btowc.m4
@@ -1,5 +1,5 @@
-# btowc.m4 serial 12
-dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
+# btowc.m4 serial 13
+dnl Copyright (C) 2008-2023 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.
@@ -88,6 +88,49 @@ int main ()
         fi
       ])
 
+    dnl On mingw, in the C locale, btowc is inconsistent with mbrtowc:
+    dnl mbrtowc avoids calling MultiByteToWideChar when MB_CUR_MAX is 1 and
+    dnl ___lc_codepage_func() is 0, but btowc is lacking this special case.
+    AC_CHECK_FUNCS_ONCE([mbrtowc])
+    AC_CACHE_CHECK([whether btowc is consistent with mbrtowc in the C locale],
+      [gl_cv_func_btowc_consistent],
+      [
+        AC_RUN_IFELSE(
+          [AC_LANG_SOURCE([[
+#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+#if HAVE_MBRTOWC
+  wint_t wc1 = btowc (0x80);
+  wchar_t wc2 = (wchar_t) 0xbadface;
+  char buf[1] = { 0x80 };
+  mbstate_t state;
+  memset (&state, 0, sizeof (mbstate_t));
+  if (mbrtowc (&wc2, buf, 1, &state) != 1 || wc1 != wc2)
+    return 1;
+#endif
+  return 0;
+}]])],
+          [gl_cv_func_btowc_consistent=yes],
+          [gl_cv_func_btowc_consistent=no],
+          [case "$host_os" in
+                     # Guess no on mingw.
+             mingw*) AC_EGREP_CPP([Problem], [
+#ifdef __MINGW32__
+ Problem
+#endif
+                       ],
+                       [gl_cv_func_btowc_consistent="guessing no"],
+                       [gl_cv_func_btowc_consistent="guessing yes"])
+                     ;;
+                     # Guess yes otherwise.
+             *)      gl_cv_func_btowc_consistent="guessing yes" ;;
+           esac
+          ])
+      ])
+
     case "$gl_cv_func_btowc_nul" in
       *yes) ;;
       *) REPLACE_BTOWC=1 ;;
@@ -96,10 +139,22 @@ int main ()
       *yes) ;;
       *) REPLACE_BTOWC=1 ;;
     esac
+    case "$gl_cv_func_btowc_consistent" in
+      *yes) ;;
+      *) REPLACE_BTOWC=1 ;;
+    esac
+    if test $REPLACE_BTOWC = 0; then
+      gl_MBRTOWC_C_LOCALE
+      case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in
+        *yes) ;;
+        *) REPLACE_BTOWC=1 ;;
+      esac
+    fi
   fi
 ])
 
 # Prerequisites of lib/btowc.c.
 AC_DEFUN([gl_PREREQ_BTOWC], [
   :
+  AC_CHECK_FUNCS_ONCE([mbrtowc])
 ])
diff --git a/m4/build-to-host.m4 b/m4/build-to-host.m4
new file mode 100644
index 00000000..e3c72877
--- /dev/null
+++ b/m4/build-to-host.m4
@@ -0,0 +1,73 @@
+# build-to-host.m4 serial 1
+dnl Copyright (C) 2023 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Written by Bruno Haible.
+
+dnl When the build environment ($build_os) is different from the target runtime
+dnl environment ($host_os), file names may need to be converted from the build
+dnl environment syntax to the target runtime environment syntax. This is
+dnl because the Makefiles are executed (mostly) by build environment tools and
+dnl therefore expect file names in build environment syntax, whereas the runtime
+dnl expects file names in target runtime environment syntax.
+dnl
+dnl For example, if $build_os = cygwin and $host_os = mingw32, filenames need
+dnl be converted from Cygwin syntax to native Windows syntax:
+dnl   /cygdrive/c/foo/bar -> C:\foo\bar
+dnl   /usr/local/share    -> C:\cygwin64\usr\local\share
+dnl
+dnl gl_BUILD_TO_HOST([somedir])
+dnl This macro takes as input an AC_SUBSTed variable 'somedir', which must
+dnl already have its final value assigned, and produces two additional
+dnl AC_SUBSTed variables 'somedir_c' and 'somedir_c_make', that designate the
+dnl same file name value, just in different syntax:
+dnl   - somedir_c       is the file name in target runtime environment syntax,
+dnl                     as a C string (starting and ending with a double-quote,
+dnl                     and with escaped backslashes and double-quotes in
+dnl                     between).
+dnl   - somedir_c_make  is the same thing, escaped for use in a Makefile.
+
+AC_DEFUN([gl_BUILD_TO_HOST],
+[
+  AC_REQUIRE([AC_CANONICAL_BUILD])
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  AC_REQUIRE([gl_BUILD_TO_HOST_INIT])
+
+  dnl Define somedir_c.
+  gl_final_[$1]="$[$1]"
+  dnl Translate it from build syntax to host syntax.
+  case "$build_os" in
+    cygwin*)
+      case "$host_os" in
+        mingw*)
+          gl_final_[$1]=`cygpath -w "$gl_final_[$1]"` ;;
+      esac
+      ;;
+  esac
+  dnl Convert it to C string syntax.
+  [$1]_c=`echo "$gl_final_[$1]" | sed -e "$gl_sed_double_backslashes" -e "$gl_sed_escape_doublequotes"`
+  [$1]_c='"'"$[$1]_c"'"'
+  AC_SUBST([$1_c])
+
+  dnl Define somedir_c_make.
+  [$1]_c_make=`echo "$[$1]_c" | sed -e "$gl_sed_escape_for_make_1" -e "$gl_sed_escape_for_make_2"`
+  dnl Use the substituted somedir variable, when possible, so that the user
+  dnl may adjust somedir a posteriori when there are no special characters.
+  if test "$[$1]_c_make" = '\"'"${gl_final_[$1]}"'\"'; then
+    [$1]_c_make='\"$([$1])\"'
+  fi
+  AC_SUBST([$1_c_make])
+])
+
+dnl Some initializations for gl_BUILD_TO_HOST.
+AC_DEFUN([gl_BUILD_TO_HOST_INIT],
+[
+  gl_sed_double_backslashes='s/\\/\\\\/g'
+  gl_sed_escape_doublequotes='s/"/\\"/g'
+changequote(,)dnl
+  gl_sed_escape_for_make_1="s,\\([ \"&'();<>\\\\\`|]\\),\\\\\\1,g"
+changequote([,])dnl
+  gl_sed_escape_for_make_2='s,\$,\\$$,g'
+])
diff --git a/m4/builtin-expect.m4 b/m4/builtin-expect.m4
index b1fb12a3..531ed48a 100644
--- a/m4/builtin-expect.m4
+++ b/m4/builtin-expect.m4
@@ -1,6 +1,6 @@
 dnl Check for __builtin_expect.
 
-dnl Copyright 2016-2022 Free Software Foundation, Inc.
+dnl Copyright 2016-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/c-bool.m4 b/m4/c-bool.m4
new file mode 100644
index 00000000..f614371b
--- /dev/null
+++ b/m4/c-bool.m4
@@ -0,0 +1,51 @@
+# Check for bool that conforms to C2023.
+
+dnl Copyright 2022-2023 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_C_BOOL],
+[
+  AC_CACHE_CHECK([for bool, true, false], [gl_cv_c_bool],
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_SOURCE([[
+          #if true == false
+           #error "true == false"
+          #endif
+          extern bool b;
+          bool b = true == false;]])],
+       [gl_cv_c_bool=yes],
+       [gl_cv_c_bool=no])])
+  if test "$gl_cv_c_bool" = yes; then
+    AC_DEFINE([HAVE_C_BOOL], [1],
+      [Define to 1 if bool, true and false work as per C2023.])
+  fi
+
+  AC_CHECK_HEADERS_ONCE([stdbool.h])
+
+  dnl The "zz" puts this toward config.h's end, to avoid potential
+  dnl collisions with other definitions.
+  dnl If 'bool', 'true' and 'false' do not work, arrange for them to work.
+  dnl In C, this means including <stdbool.h> if it is not already included.
+  dnl However, if the preprocessor mistakenly treats 'true' as 0,
+  dnl define it to a bool expression equal to 1; this is needed in
+  dnl Sun C++ 5.11 (Oracle Solaris Studio 12.2, 2010) and older.
+  AH_VERBATIM([zzbool],
+[#ifndef HAVE_C_BOOL
+# if !defined __cplusplus && !defined __bool_true_false_are_defined
+#  if HAVE_STDBOOL_H
+#   include <stdbool.h>
+#  else
+#   if defined __SUNPRO_C
+#    error "<stdbool.h> is not usable with this configuration. To make it usable, add -D_STDC_C99= to $CC."
+#   else
+#    error "<stdbool.h> does not exist on this platform. Use gnulib module 'stdbool-c99' instead of gnulib module 'stdbool'."
+#   endif
+#  endif
+# endif
+# if !true
+#  define true (!false)
+# endif
+#endif])
+])
diff --git a/m4/c-stack.m4 b/m4/c-stack.m4
index da38c26c..5f6c5d2f 100644
--- a/m4/c-stack.m4
+++ b/m4/c-stack.m4
@@ -1,6 +1,6 @@
 # Check prerequisites for compiling lib/c-stack.c.
 
-# Copyright (C) 2002-2004, 2008-2022 Free Software Foundation, Inc.
+# Copyright (C) 2002-2004, 2008-2023 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
diff --git a/m4/calloc.m4 b/m4/calloc.m4
index c01520e5..3789cbff 100644
--- a/m4/calloc.m4
+++ b/m4/calloc.m4
@@ -1,6 +1,6 @@
-# calloc.m4 serial 29
+# calloc.m4 serial 30
 
-# Copyright (C) 2004-2022 Free Software Foundation, Inc.
+# Copyright (C) 2004-2023 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -36,14 +36,14 @@ AC_DEFUN([_AC_FUNC_CALLOC_IF],
          [ac_cv_func_calloc_0_nonnull=no])
      else
        case "$host_os" in
-                        # Guess yes on glibc systems.
-         *-gnu* | gnu*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
-                        # Guess yes on musl systems.
-         *-musl*)       ac_cv_func_calloc_0_nonnull="guessing yes" ;;
-                        # Guess yes on native Windows.
-         mingw*)        ac_cv_func_calloc_0_nonnull="guessing yes" ;;
-                        # If we don't know, obey --enable-cross-guesses.
-         *)             ac_cv_func_calloc_0_nonnull="$gl_cross_guess_normal" ;;
+                             # Guess yes on glibc systems.
+         *-gnu* | gnu*)      ac_cv_func_calloc_0_nonnull="guessing yes" ;;
+                             # Guess yes on musl systems.
+         *-musl* | midipix*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
+                             # Guess yes on native Windows.
+         mingw*)             ac_cv_func_calloc_0_nonnull="guessing yes" ;;
+                             # If we don't know, obey --enable-cross-guesses.
+         *)                  ac_cv_func_calloc_0_nonnull="$gl_cross_guess_normal" ;;
        esac
      fi
     ])
diff --git a/m4/chdir-long.m4 b/m4/chdir-long.m4
index 4cadc3ff..4a92b30e 100644
--- a/m4/chdir-long.m4
+++ b/m4/chdir-long.m4
@@ -6,7 +6,7 @@
 # never fails with ENAMETOOLONG.
 # Arrange to compile chdir-long.c only on systems that define PATH_MAX.
 
-dnl Copyright (C) 2004-2007, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2004-2007, 2009-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/close.m4 b/m4/close.m4
index f95dbc9d..0feabd69 100644
--- a/m4/close.m4
+++ b/m4/close.m4
@@ -1,10 +1,10 @@
-# close.m4 serial 9
-dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
+# close.m4 serial 10
+dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
-AC_DEFUN([gl_FUNC_CLOSE],
+AC_DEFUN_ONCE([gl_FUNC_CLOSE],
 [
   AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
   m4_ifdef([gl_MSVC_INVAL], [
diff --git a/m4/closedir.m4 b/m4/closedir.m4
index cac29d6d..7e702def 100644
--- a/m4/closedir.m4
+++ b/m4/closedir.m4
@@ -1,5 +1,5 @@
-# closedir.m4 serial 6
-dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
+# closedir.m4 serial 7
+dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -12,20 +12,23 @@ AC_DEFUN([gl_FUNC_CLOSEDIR],
   AC_CHECK_FUNCS([closedir])
   if test $ac_cv_func_closedir = no; then
     HAVE_CLOSEDIR=0
-  fi
-  dnl Replace closedir() for supporting the gnulib-defined fchdir() function,
-  dnl to keep fchdir's bookkeeping up-to-date.
-  m4_ifdef([gl_FUNC_FCHDIR], [
-    gl_TEST_FCHDIR
-    if test $HAVE_FCHDIR = 0; then
-      if test $HAVE_CLOSEDIR = 1; then
+  else
+    dnl Replace closedir() on native Windows, to support fdopendir().
+    AC_REQUIRE([gl_DIRENT_DIR])
+    if test $DIR_HAS_FD_MEMBER = 0; then
+      REPLACE_CLOSEDIR=1
+    fi
+    dnl Replace closedir() for supporting the gnulib-defined dirfd() function.
+    case $host_os in
+      os2*) REPLACE_CLOSEDIR=1 ;;
+    esac
+    dnl Replace closedir() for supporting the gnulib-defined fchdir() function,
+    dnl to keep fchdir's bookkeeping up-to-date.
+    m4_ifdef([gl_FUNC_FCHDIR], [
+      gl_TEST_FCHDIR
+      if test $HAVE_FCHDIR = 0; then
         REPLACE_CLOSEDIR=1
       fi
-    fi
-  ])
-  dnl Replace closedir() for supporting the gnulib-defined dirfd() function.
-  case $host_os,$HAVE_CLOSEDIR in
-    os2*,1)
-      REPLACE_CLOSEDIR=1;;
-  esac
+    ])
+  fi
 ])
diff --git a/m4/codeset.m4 b/m4/codeset.m4
index eb732601..5804f472 100644
--- a/m4/codeset.m4
+++ b/m4/codeset.m4
@@ -1,5 +1,5 @@
 # codeset.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2000-2002, 2006, 2008-2014, 2016, 2019-2022 Free Software
+dnl Copyright (C) 2000-2002, 2006, 2008-2014, 2016, 2019-2023 Free Software
 dnl Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
diff --git a/m4/configmake.m4 b/m4/configmake.m4
index c3a088bf..94f8ae24 100644
--- a/m4/configmake.m4
+++ b/m4/configmake.m4
@@ -1,5 +1,5 @@
-# configmake.m4 serial 4
-dnl Copyright (C) 2010-2022 Free Software Foundation, Inc.
+# configmake.m4 serial 5
+dnl Copyright (C) 2010-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -21,7 +21,148 @@ AC_DEFUN([gl_CONFIGMAKE_PREP],
     AC_SUBST([runstatedir], ['${localstatedir}/run'])
   fi
 
-  dnl Automake 1.11 provides pkglibexecdir merely without AC_SUBST.
-  dnl This blind use of AC_SUBST is safe.
+  dnl Automake 1.11 provides the pkg*dir variables merely without AC_SUBST,
+  dnl that is, only at the Makefile.am level.  AC_SUBST them, so that
+  dnl gl_CONFIGMAKE can compute the final values at configure time.
+  dnl Blindly assigning the value at configure time is OK, since configure
+  dnl does not have --pkg*dir=... options.
+  AC_SUBST([pkgdatadir], ['${datadir}/${PACKAGE}'])
+  AC_SUBST([pkgincludedir], ['${includedir}/${PACKAGE}'])
+  AC_SUBST([pkglibdir], ['${libdir}/${PACKAGE}'])
   AC_SUBST([pkglibexecdir], ['${libexecdir}/${PACKAGE}'])
 ])
+
+# gl_CONFIGMAKE
+# -------------
+# Find the final values of the standard directory variables, and create
+# AC_SUBSTed *_c and *_c_make variables with the corresponding values in
+# target runtime environment ($host_os) syntax.
+AC_DEFUN([gl_CONFIGMAKE],
+[
+  AC_REQUIRE([gl_CONFIGMAKE_PREP])
+
+  dnl Save the values.
+  gl_save_prefix="${prefix}"
+  gl_save_exec_prefix="${exec_prefix}"
+  gl_save_bindir="${bindir}"
+  gl_save_sbindir="${sbindir}"
+  gl_save_libexecdir="${libexecdir}"
+  gl_save_datarootdir="${datarootdir}"
+  gl_save_datadir="${datadir}"
+  gl_save_sysconfdir="${sysconfdir}"
+  gl_save_sharedstatedir="${sharedstatedir}"
+  gl_save_localstatedir="${localstatedir}"
+  gl_save_runstatedir="${runstatedir}"
+  gl_save_includedir="${includedir}"
+  gl_save_oldincludedir="${oldincludedir}"
+  gl_save_docdir="${docdir}"
+  gl_save_infodir="${infodir}"
+  gl_save_htmldir="${htmldir}"
+  gl_save_dvidir="${dvidir}"
+  gl_save_pdfdir="${pdfdir}"
+  gl_save_psdir="${psdir}"
+  gl_save_libdir="${libdir}"
+  gl_save_lispdir="${lispdir}"
+  gl_save_localedir="${localedir}"
+  gl_save_mandir="${mandir}"
+  gl_save_pkgdatadir="${pkgdatadir}"
+  gl_save_pkgincludedir="${pkgincludedir}"
+  gl_save_pkglibdir="${pkglibdir}"
+  gl_save_pkglibexecdir="${pkglibexecdir}"
+
+  dnl Find the final values.
+  dnl Unfortunately, prefix gets only finally determined at the end of
+  dnl configure.
+  if test "X$prefix" = "XNONE"; then
+    prefix="$ac_default_prefix"
+  fi
+  dnl Unfortunately, exec_prefix gets only finally determined at the end of
+  dnl configure.
+  if test "X$exec_prefix" = "XNONE"; then
+    exec_prefix='${prefix}'
+  fi
+  eval exec_prefix="$exec_prefix"
+  eval bindir="$bindir"
+  eval sbindir="$sbindir"
+  eval libexecdir="$libexecdir"
+  eval datarootdir="$datarootdir"
+  eval datadir="$datadir"
+  eval sysconfdir="$sysconfdir"
+  eval sharedstatedir="$sharedstatedir"
+  eval localstatedir="$localstatedir"
+  eval runstatedir="$runstatedir"
+  eval includedir="$includedir"
+  eval oldincludedir="$oldincludedir"
+  eval docdir="$docdir"
+  eval infodir="$infodir"
+  eval htmldir="$htmldir"
+  eval dvidir="$dvidir"
+  eval pdfdir="$pdfdir"
+  eval psdir="$psdir"
+  eval libdir="$libdir"
+  eval lispdir="$lispdir"
+  eval localedir="$localedir"
+  eval mandir="$mandir"
+  eval pkgdatadir="$pkgdatadir"
+  eval pkgincludedir="$pkgincludedir"
+  eval pkglibdir="$pkglibdir"
+  eval pkglibexecdir="$pkglibexecdir"
+
+  dnl Transform the final values.
+  gl_BUILD_TO_HOST([prefix])
+  gl_BUILD_TO_HOST([exec_prefix])
+  gl_BUILD_TO_HOST([bindir])
+  gl_BUILD_TO_HOST([sbindir])
+  gl_BUILD_TO_HOST([libexecdir])
+  gl_BUILD_TO_HOST([datarootdir])
+  gl_BUILD_TO_HOST([datadir])
+  gl_BUILD_TO_HOST([sysconfdir])
+  gl_BUILD_TO_HOST([sharedstatedir])
+  gl_BUILD_TO_HOST([localstatedir])
+  gl_BUILD_TO_HOST([runstatedir])
+  gl_BUILD_TO_HOST([includedir])
+  gl_BUILD_TO_HOST([oldincludedir])
+  gl_BUILD_TO_HOST([docdir])
+  gl_BUILD_TO_HOST([infodir])
+  gl_BUILD_TO_HOST([htmldir])
+  gl_BUILD_TO_HOST([dvidir])
+  gl_BUILD_TO_HOST([pdfdir])
+  gl_BUILD_TO_HOST([psdir])
+  gl_BUILD_TO_HOST([libdir])
+  gl_BUILD_TO_HOST([lispdir])
+  gl_BUILD_TO_HOST([localedir])
+  gl_BUILD_TO_HOST([mandir])
+  gl_BUILD_TO_HOST([pkgdatadir])
+  gl_BUILD_TO_HOST([pkgincludedir])
+  gl_BUILD_TO_HOST([pkglibdir])
+  gl_BUILD_TO_HOST([pkglibexecdir])
+
+  dnl Restore the values.
+  pkglibexecdir="${gl_save_pkglibexecdir}"
+  pkglibdir="${gl_save_pkglibdir}"
+  pkgincludedir="${gl_save_pkgincludedir}"
+  pkgdatadir="${gl_save_pkgdatadir}"
+  mandir="${gl_save_mandir}"
+  localedir="${gl_save_localedir}"
+  lispdir="${gl_save_lispdir}"
+  libdir="${gl_save_libdir}"
+  psdir="${gl_save_psdir}"
+  pdfdir="${gl_save_pdfdir}"
+  dvidir="${gl_save_dvidir}"
+  htmldir="${gl_save_htmldir}"
+  infodir="${gl_save_infodir}"
+  docdir="${gl_save_docdir}"
+  oldincludedir="${gl_save_oldincludedir}"
+  includedir="${gl_save_includedir}"
+  runstatedir="${gl_save_runstatedir}"
+  localstatedir="${gl_save_localstatedir}"
+  sharedstatedir="${gl_save_sharedstatedir}"
+  sysconfdir="${gl_save_sysconfdir}"
+  datadir="${gl_save_datadir}"
+  datarootdir="${gl_save_datarootdir}"
+  libexecdir="${gl_save_libexecdir}"
+  sbindir="${gl_save_sbindir}"
+  bindir="${gl_save_bindir}"
+  exec_prefix="${gl_save_exec_prefix}"
+  prefix="${gl_save_prefix}"
+])
diff --git a/m4/ctype_h.m4 b/m4/ctype_h.m4
index 6f420de3..219f2ed0 100644
--- a/m4/ctype_h.m4
+++ b/m4/ctype_h.m4
@@ -1,5 +1,5 @@
 # ctype_h.m4 serial 9
-dnl Copyright (C) 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/cycle-check.m4 b/m4/cycle-check.m4
index 4ad8739f..eaa3e773 100644
--- a/m4/cycle-check.m4
+++ b/m4/cycle-check.m4
@@ -1,5 +1,5 @@
 #serial 7
-dnl Copyright (C) 2005-2007, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2007, 2009-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/d-ino.m4 b/m4/d-ino.m4
index daefce9e..58f33115 100644
--- a/m4/d-ino.m4
+++ b/m4/d-ino.m4
@@ -1,11 +1,11 @@
-# serial 20
+# serial 21
 
 dnl From Jim Meyering.
 dnl
 dnl Check whether struct dirent has a member named d_ino.
 dnl
 
-# Copyright (C) 1997, 1999-2001, 2003-2004, 2006-2007, 2009-2022 Free Software
+# Copyright (C) 1997, 1999-2001, 2003-2004, 2006-2007, 2009-2023 Free Software
 # Foundation, Inc.
 
 # This file is free software; the Free Software Foundation
@@ -44,6 +44,8 @@ AC_DEFUN([gl_CHECK_TYPE_STRUCT_DIRENT_D_INO],
               linux*-gnu*)  gl_cv_struct_dirent_d_ino="guessing yes" ;;
                             # Guess yes on musl systems with Linux kernel.
               linux*-musl*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
+                            # Guess yes on systems that emulate the Linux system calls.
+              midipix*)     gl_cv_struct_dirent_d_ino="guessing yes" ;;
                             # Guess no on native Windows.
               mingw*)       gl_cv_struct_dirent_d_ino="guessing no" ;;
                             # If we don't know, obey --enable-cross-guesses.
diff --git a/m4/d-type.m4 b/m4/d-type.m4
index b8858b19..3f63bbe7 100644
--- a/m4/d-type.m4
+++ b/m4/d-type.m4
@@ -5,7 +5,7 @@ dnl
 dnl Check whether struct dirent has a member named d_type.
 dnl
 
-# Copyright (C) 1997, 1999-2004, 2006, 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 1997, 1999-2004, 2006, 2009-2023 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
diff --git a/m4/dirent_h.m4 b/m4/dirent_h.m4
index ddaca168..b6c189c0 100644
--- a/m4/dirent_h.m4
+++ b/m4/dirent_h.m4
@@ -1,5 +1,5 @@
-# dirent_h.m4 serial 19
-dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
+# dirent_h.m4 serial 20
+dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -21,12 +21,29 @@ AC_DEFUN_ONCE([gl_DIRENT_H],
   fi
   AC_SUBST([HAVE_DIRENT_H])
 
+  gl_DIRENT_DIR
+
   dnl Check for declarations of anything we want to poison if the
   dnl corresponding gnulib module is not in use.
   gl_WARN_ON_USE_PREPARE([[#include <dirent.h>
     ]], [alphasort closedir dirfd fdopendir opendir readdir rewinddir scandir])
 ])
 
+dnl Determine whether <dirent.h> needs to override the DIR type.
+AC_DEFUN_ONCE([gl_DIRENT_DIR],
+[
+  dnl Set DIR_HAS_FD_MEMBER if dirfd() works, i.e. not always returns -1,
+  dnl or has the __KLIBC__ workaround as in lib/dirfd.c.
+  dnl We could use the findings from gl_FUNC_DIRFD and gl_PREREQ_DIRFD, but
+  dnl it's simpler since we know the affected platforms.
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  case "$host_os" in
+    mingw*) DIR_HAS_FD_MEMBER=0 ;;
+    *)      DIR_HAS_FD_MEMBER=1 ;;
+  esac
+  AC_SUBST([DIR_HAS_FD_MEMBER])
+])
+
 # 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.
@@ -73,6 +90,8 @@ AC_DEFUN([gl_DIRENT_H_DEFAULTS],
   HAVE_SCANDIR=1;       AC_SUBST([HAVE_SCANDIR])
   HAVE_ALPHASORT=1;     AC_SUBST([HAVE_ALPHASORT])
   REPLACE_OPENDIR=0;    AC_SUBST([REPLACE_OPENDIR])
+  REPLACE_READDIR=0;    AC_SUBST([REPLACE_READDIR])
+  REPLACE_REWINDDIR=0;  AC_SUBST([REPLACE_REWINDDIR])
   REPLACE_CLOSEDIR=0;   AC_SUBST([REPLACE_CLOSEDIR])
   REPLACE_DIRFD=0;      AC_SUBST([REPLACE_DIRFD])
   REPLACE_FDOPENDIR=0;  AC_SUBST([REPLACE_FDOPENDIR])
diff --git a/m4/dirfd.m4 b/m4/dirfd.m4
index 92001700..d1ee2c7f 100644
--- a/m4/dirfd.m4
+++ b/m4/dirfd.m4
@@ -1,8 +1,8 @@
-# serial 26   -*- Autoconf -*-
+# serial 27   -*- Autoconf -*-
 
 dnl Find out how to get the file descriptor associated with an open DIR*.
 
-# Copyright (C) 2001-2006, 2008-2022 Free Software Foundation, Inc.
+# Copyright (C) 2001-2006, 2008-2023 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -12,7 +12,7 @@ dnl From Jim Meyering
 AC_DEFUN([gl_FUNC_DIRFD],
 [
   AC_REQUIRE([gl_DIRENT_H_DEFAULTS])
-  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_REQUIRE([AC_CANONICAL_HOST])
 
   dnl Persuade glibc <dirent.h> to declare dirfd().
   AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
@@ -36,15 +36,24 @@ AC_DEFUN([gl_FUNC_DIRFD],
        [gl_cv_func_dirfd_macro=yes],
        [gl_cv_func_dirfd_macro=no])])
 
-  # Use the replacement if we have no function or macro with that name,
-  # or if OS/2 kLIBC whose dirfd() does not work.
-  # Replace only if the system declares dirfd already.
-  case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
-    no,no,*,yes | *,*,os2*,yes)
+  if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then
+    HAVE_DIRFD=0
+  else
+    HAVE_DIRFD=1
+    dnl Replace only if the system declares dirfd already.
+    if test $ac_cv_have_decl_dirfd = yes; then
       REPLACE_DIRFD=1
-      AC_DEFINE([REPLACE_DIRFD], [1],
-        [Define to 1 if gnulib's dirfd() replacement is used.]);;
-  esac
+    fi
+    dnl Replace dirfd() on native Windows, to support fdopendir().
+    AC_REQUIRE([gl_DIRENT_DIR])
+    if test $DIR_HAS_FD_MEMBER = 0; then
+      REPLACE_DIRFD=1
+    fi
+    dnl OS/2 kLIBC dirfd() does not work.
+    case "$host_os" in
+      os2*) REPLACE_DIRFD=1 ;;
+    esac
+  fi
 ])
 
 dnl Prerequisites of lib/dirfd.c.
diff --git a/m4/double-slash-root.m4 b/m4/double-slash-root.m4
index 09ff5f0d..1776e5eb 100644
--- a/m4/double-slash-root.m4
+++ b/m4/double-slash-root.m4
@@ -1,5 +1,5 @@
 # double-slash-root.m4 serial 4   -*- Autoconf -*-
-dnl Copyright (C) 2006, 2008-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2008-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/dup.m4 b/m4/dup.m4
index 3109a651..fc41c99c 100644
--- a/m4/dup.m4
+++ b/m4/dup.m4
@@ -1,5 +1,5 @@
 # dup.m4 serial 7
-dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/dup2.m4 b/m4/dup2.m4
index 7e777cde..e1cc73e1 100644
--- a/m4/dup2.m4
+++ b/m4/dup2.m4
@@ -1,5 +1,5 @@
 #serial 27
-dnl Copyright (C) 2002, 2005, 2007, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2005, 2007, 2009-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/eealloc.m4 b/m4/eealloc.m4
index a6aa2f88..cb3e08fe 100644
--- a/m4/eealloc.m4
+++ b/m4/eealloc.m4
@@ -1,5 +1,5 @@
 # eealloc.m4 serial 3
-dnl Copyright (C) 2003, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2009-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/environ.m4 b/m4/environ.m4
index 583dac39..741dfc56 100644
--- a/m4/environ.m4
+++ b/m4/environ.m4
@@ -1,5 +1,5 @@
 # environ.m4 serial 8
-dnl Copyright (C) 2001-2004, 2006-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2004, 2006-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/errno_h.m4 b/m4/errno_h.m4
index 4be9780a..4c70d225 100644
--- a/m4/errno_h.m4
+++ b/m4/errno_h.m4
@@ -1,5 +1,5 @@
 # errno_h.m4 serial 14
-dnl Copyright (C) 2004, 2006, 2008-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2004, 2006, 2008-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/error.m4 b/m4/error.m4
index 7a103446..93a7558b 100644
--- a/m4/error.m4
+++ b/m4/error.m4
@@ -1,6 +1,6 @@
-#serial 15
+#serial 16
 
-# Copyright (C) 1996-1998, 2001-2004, 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 1996-1998, 2001-2004, 2009-2023 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -8,15 +8,6 @@
 
 AC_DEFUN([gl_ERROR],
 [
-  dnl We don't use AC_FUNC_ERROR_AT_LINE any more, because it is no longer
-  dnl maintained in Autoconf and because it invokes AC_LIBOBJ.
-  AC_CACHE_CHECK([for error_at_line], [ac_cv_lib_error_at_line],
-    [AC_LINK_IFELSE(
-       [AC_LANG_PROGRAM(
-          [[#include <error.h>]],
-          [[error_at_line (0, 0, "", 0, "an error occurred");]])],
-       [ac_cv_lib_error_at_line=yes],
-       [ac_cv_lib_error_at_line=no])])
 ])
 
 # Prerequisites of lib/error.c.
diff --git a/m4/error_h.m4 b/m4/error_h.m4
new file mode 100644
index 00000000..f38e4ead
--- /dev/null
+++ b/m4/error_h.m4
@@ -0,0 +1,125 @@
+# error_h.m4 serial 3
+dnl Copyright (C) 1996-2023 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+dnl Provide a working "error.h".
+
+AC_DEFUN_ONCE([gl_ERROR_H],
+[
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+
+  gl_CHECK_NEXT_HEADERS([error.h])
+  if test $ac_cv_header_error_h = yes; then
+    HAVE_ERROR_H=1
+  else
+    HAVE_ERROR_H=0
+  fi
+  AC_SUBST([HAVE_ERROR_H])
+
+  REPLACE_ERROR=0
+
+  gl_CHECK_FUNCS_ANDROID([error], [[#include <error.h>]])
+  if test $ac_cv_func_error = yes; then
+    HAVE_ERROR=1
+  else
+    HAVE_ERROR=0
+    case "$gl_cv_onwards_func_error" in
+      future*) REPLACE_ERROR=1 ;;
+    esac
+  fi
+
+  dnl We don't use AC_FUNC_ERROR_AT_LINE any more, because it is no longer
+  dnl maintained in Autoconf and because it invokes AC_LIBOBJ.
+  dnl We need to notice a missing declaration, like gl_CHECK_FUNCS_ANDROID does.
+  AC_CHECK_DECL([error_at_line], , , [[#include <error.h>]])
+  if test $ac_cv_have_decl_error_at_line = yes; then
+    AC_CACHE_CHECK([for error_at_line], [ac_cv_lib_error_at_line],
+      [AC_LINK_IFELSE(
+         [AC_LANG_PROGRAM(
+            [[#include <error.h>]],
+            [[error_at_line (0, 0, "", 0, "an error occurred");]])],
+         [ac_cv_lib_error_at_line=yes],
+         [ac_cv_lib_error_at_line=no])])
+  else
+    ac_cv_lib_error_at_line=no
+  fi
+  if test $ac_cv_lib_error_at_line = yes; then
+    HAVE_ERROR_AT_LINE=1
+  else
+    HAVE_ERROR_AT_LINE=0
+  fi
+  REPLACE_ERROR_AT_LINE=0
+
+  if test $ac_cv_func_error = yes && test $ac_cv_lib_error_at_line = yes; then
+    dnl On Android 11, when error_print_progname is set, the output of the
+    dnl error() function contains an extra space.
+    AC_CACHE_CHECK([for working error function],
+      [gl_cv_func_working_error],
+      [if test $cross_compiling != yes; then
+         AC_LINK_IFELSE(
+           [AC_LANG_PROGRAM([[
+              #include <error.h>
+              static void print_no_progname (void) {}
+            ]], [[
+              error_print_progname = print_no_progname;
+              error (0, 0, "foo");
+            ]])
+           ],
+           [rm -f conftest.out
+            if test -s conftest$ac_exeext \
+               && ./conftest$ac_exeext 2> conftest.out; then
+              if grep ' ' conftest.out >/dev/null; then
+                gl_cv_func_working_error=no
+              else
+                gl_cv_func_working_error=yes
+              fi
+            else
+              gl_cv_func_working_error=no
+            fi
+            rm -f conftest.out
+           ],
+           [gl_cv_func_working_error=no])
+       else
+         AC_COMPILE_IFELSE(
+           [AC_LANG_PROGRAM([[
+              #include <error.h>
+            ]], [[
+              error (0, 0, "foo");
+            ]])
+           ],
+           [case "$host_os" in
+                               # Guess yes on glibc systems.
+              *-gnu* | gnu*)   gl_cv_func_working_error="guessing yes" ;;
+                               # Guess no on Android.
+              linux*-android*) gl_cv_func_working_error="guessing no" ;;
+                               # If we don't know, obey --enable-cross-guesses.
+              *)               gl_cv_func_working_error="$gl_cross_guess_normal" ;;
+            esac
+           ],
+           [gl_cv_func_working_error=no])
+       fi
+      ])
+    case "$gl_cv_func_working_error" in
+      *no)
+        REPLACE_ERROR=1
+        REPLACE_ERROR_AT_LINE=1
+        ;;
+    esac
+  fi
+
+  if test $HAVE_ERROR = 0 || test $REPLACE_ERROR = 1 \
+     || test $HAVE_ERROR_AT_LINE = 0 || test $REPLACE_ERROR_AT_LINE = 1; then
+    dnl Provide a substitute <error.h> file.
+    GL_GENERATE_ERROR_H=true
+  else
+    GL_GENERATE_ERROR_H=false
+  fi
+
+  AC_SUBST([HAVE_ERROR])
+  AC_SUBST([HAVE_ERROR_AT_LINE])
+  AC_SUBST([REPLACE_ERROR])
+  AC_SUBST([REPLACE_ERROR_AT_LINE])
+])
diff --git a/m4/exponentd.m4 b/m4/exponentd.m4
index 83ac08bf..163114b8 100644
--- a/m4/exponentd.m4
+++ b/m4/exponentd.m4
@@ -1,9 +1,9 @@
-# exponentd.m4 serial 3
-dnl Copyright (C) 2007-2008, 2010-2022 Free Software Foundation, Inc.
+# exponentd.m4 serial 4
+dnl Copyright (C) 2007-2008, 2010-2023 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_DOUBLE_EXPONENT_LOCATION],
+AC_DEFUN_ONCE([gl_DOUBLE_EXPONENT_LOCATION],
 [
   AC_CACHE_CHECK([where to find the exponent in a 'double'],
     [gl_cv_cc_double_expbit0],
diff --git a/m4/extensions.m4 b/m4/extensions.m4
index 0b3e4b5a..5336b8da 100644
--- a/m4/extensions.m4
+++ b/m4/extensions.m4
@@ -1,7 +1,7 @@
-# serial 22  -*- Autoconf -*-
+# serial 23  -*- Autoconf -*-
 # Enable extensions on systems that normally disable them.
 
-# Copyright (C) 2003, 2006-2022 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006-2023 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -31,7 +31,7 @@ m4_ifndef([AC_CHECK_INCLUDES_DEFAULT],
 #      its dependencies. This will ensure that the gl_USE_SYSTEM_EXTENSIONS
 #      invocation occurs in gl_EARLY, not in gl_INIT.
 
-m4_version_prereq([2.70.1], [], [
+m4_version_prereq([2.72], [], [
 
 # AC_USE_SYSTEM_EXTENSIONS
 # ------------------------
@@ -113,11 +113,15 @@ AH_VERBATIM([USE_SYSTEM_EXTENSIONS],
 #ifndef __STDC_WANT_IEC_60559_DFP_EXT__
 # undef __STDC_WANT_IEC_60559_DFP_EXT__
 #endif
+/* Enable extensions specified by C23 Annex F.  */
+#ifndef __STDC_WANT_IEC_60559_EXT__
+# undef __STDC_WANT_IEC_60559_EXT__
+#endif
 /* Enable extensions specified by ISO/IEC TS 18661-4:2015.  */
 #ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
 # undef __STDC_WANT_IEC_60559_FUNCS_EXT__
 #endif
-/* Enable extensions specified by ISO/IEC TS 18661-3:2015.  */
+/* Enable extensions specified by C23 Annex H and ISO/IEC TS 18661-3:2015.  */
 #ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
 # undef __STDC_WANT_IEC_60559_TYPES_EXT__
 #endif
@@ -187,6 +191,7 @@ dnl it should only be defined when necessary.
   AC_DEFINE([__STDC_WANT_IEC_60559_ATTRIBS_EXT__])
   AC_DEFINE([__STDC_WANT_IEC_60559_BFP_EXT__])
   AC_DEFINE([__STDC_WANT_IEC_60559_DFP_EXT__])
+  AC_DEFINE([__STDC_WANT_IEC_60559_EXT__])
   AC_DEFINE([__STDC_WANT_IEC_60559_FUNCS_EXT__])
   AC_DEFINE([__STDC_WANT_IEC_60559_TYPES_EXT__])
   AC_DEFINE([__STDC_WANT_LIB_EXT2__])
diff --git a/m4/extern-inline.m4 b/m4/extern-inline.m4
index 8a12bddd..c001b1cf 100644
--- a/m4/extern-inline.m4
+++ b/m4/extern-inline.m4
@@ -1,6 +1,6 @@
 dnl 'extern inline' a la ISO C99.
 
-dnl Copyright 2012-2022 Free Software Foundation, Inc.
+dnl Copyright 2012-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/fchdir.m4 b/m4/fchdir.m4
index f85549a3..b587e0ea 100644
--- a/m4/fchdir.m4
+++ b/m4/fchdir.m4
@@ -1,5 +1,5 @@
-# fchdir.m4 serial 27
-dnl Copyright (C) 2006-2022 Free Software Foundation, Inc.
+# fchdir.m4 serial 28
+dnl Copyright (C) 2006-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -34,6 +34,8 @@ AC_DEFUN([gl_FUNC_FCHDIR],
          [case "$host_os" in
                              # Guess yes on Linux systems.
             linux-* | linux) gl_cv_func_open_directory_works="guessing yes" ;;
+                             # Guess yes on systems that emulate the Linux system calls.
+            midipix*)        gl_cv_func_open_directory_works="guessing yes" ;;
                              # Guess yes on glibc systems.
             *-gnu* | gnu*)   gl_cv_func_open_directory_works="guessing yes" ;;
                              # Guess no on native Windows.
diff --git a/m4/fclose.m4 b/m4/fclose.m4
new file mode 100644
index 00000000..e9291f0b
--- /dev/null
+++ b/m4/fclose.m4
@@ -0,0 +1,98 @@
+# fclose.m4 serial 11
+dnl Copyright (C) 2008-2023 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_ONCE([gl_FUNC_FCLOSE],
+[
+  AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+  AC_REQUIRE([AC_CANONICAL_HOST])
+
+  gl_FUNC_FFLUSH_STDIN
+  case "$gl_cv_func_fflush_stdin" in
+    *yes) ;;
+    *) REPLACE_FCLOSE=1 ;;
+  esac
+
+  AC_REQUIRE([gl_FUNC_CLOSE])
+  if test $REPLACE_CLOSE = 1; then
+    REPLACE_FCLOSE=1
+  fi
+
+  case "$host_os" in
+    openedition) REPLACE_FCLOSE=1 ;;
+  esac
+
+  if test $REPLACE_FCLOSE = 0; then
+    gl_FUNC_FCLOSE_STDIN
+    case "$gl_cv_func_fclose_stdin" in
+      *yes) ;;
+      *) REPLACE_FCLOSE=1 ;;
+    esac
+  fi
+])
+
+dnl Determine whether fclose works on input streams.
+dnl Sets gl_cv_func_fclose_stdin.
+
+AC_DEFUN([gl_FUNC_FCLOSE_STDIN],
+[
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CHECK_HEADERS_ONCE([unistd.h])
+  AC_CACHE_CHECK([whether fclose works on input streams],
+    [gl_cv_func_fclose_stdin],
+    [echo hello world > conftest.txt
+     AC_RUN_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <fcntl.h>
+            #include <stdio.h>
+            #if HAVE_UNISTD_H
+            # include <unistd.h>
+            #else /* on Windows with MSVC */
+            # include <io.h>
+            #endif
+           ]GL_MDA_DEFINES],
+          [[int fd;
+            int fd2;
+            FILE *fp;
+            fd = open ("conftest.txt", O_RDONLY);
+            if (fd < 0)
+              return 1;
+            if (lseek (fd, 1, SEEK_SET) != 1)
+              return 2;
+            fd2 = dup (fd);
+            if (fd2 < 0)
+              return 3;
+            fp = fdopen (fd2, "r");
+            if (fp == NULL)
+              return 4;
+            if (fgetc (fp) != 'e')
+              { fclose (fp); return 5; }
+            /* This fclose() call should reposition the underlying file
+               descriptor.  */
+            if (fclose (fp) != 0)
+              return 6;
+            if (lseek (fd2, 0, SEEK_CUR) != -1) /* should fail with EBADF */
+              return 7;
+            /* Verify the file position.  */
+            if (lseek (fd, 0, SEEK_CUR) != 2)
+              return 8;
+            return 0;
+          ]])],
+       [gl_cv_func_fclose_stdin=yes],
+       [gl_cv_func_fclose_stdin=no],
+       [case "$host_os" in
+                              # Guess no on glibc systems.
+          *-gnu* | gnu*)      gl_cv_func_fclose_stdin="guessing no" ;;
+                              # Guess yes on musl systems.
+          *-musl* | midipix*) gl_cv_func_fclose_stdin="guessing yes" ;;
+                              # Guess no on native Windows.
+          mingw*)             gl_cv_func_fclose_stdin="guessing no" ;;
+                              # If we don't know, obey --enable-cross-guesses.
+          *)                  gl_cv_func_fclose_stdin="$gl_cross_guess_normal" ;;
+        esac
+       ])
+     rm conftest.txt
+    ])
+])
diff --git a/m4/fcntl-o.m4 b/m4/fcntl-o.m4
index 4dcde9e0..59d558bd 100644
--- a/m4/fcntl-o.m4
+++ b/m4/fcntl-o.m4
@@ -1,5 +1,5 @@
 # fcntl-o.m4 serial 7
-dnl Copyright (C) 2006, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2009-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/fcntl-safer.m4 b/m4/fcntl-safer.m4
index 55e7f9e0..e6097f05 100644
--- a/m4/fcntl-safer.m4
+++ b/m4/fcntl-safer.m4
@@ -1,5 +1,5 @@
 #serial 9
-dnl Copyright (C) 2005-2007, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2007, 2009-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/fcntl.m4 b/m4/fcntl.m4
index 428e5709..524a99af 100644
--- a/m4/fcntl.m4
+++ b/m4/fcntl.m4
@@ -1,5 +1,5 @@
 # fcntl.m4 serial 11
-dnl Copyright (C) 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/fcntl_h.m4 b/m4/fcntl_h.m4
index 267f98bf..68f4e648 100644
--- a/m4/fcntl_h.m4
+++ b/m4/fcntl_h.m4
@@ -1,6 +1,6 @@
 # serial 20
 # Configure fcntl.h.
-dnl Copyright (C) 2006-2007, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2007, 2009-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/fdopen.m4 b/m4/fdopen.m4
index 32e0e1d8..6b3909b8 100644
--- a/m4/fdopen.m4
+++ b/m4/fdopen.m4
@@ -1,5 +1,5 @@
 # fdopen.m4 serial 5
-dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/fdopendir.m4 b/m4/fdopendir.m4
index 30016084..dfcc46c0 100644
--- a/m4/fdopendir.m4
+++ b/m4/fdopendir.m4
@@ -1,7 +1,7 @@
-# serial 14
+# serial 15
 # See if we need to provide fdopendir.
 
-dnl Copyright (C) 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2023 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.
@@ -49,12 +49,12 @@ DIR *fdopendir (int);
          [gl_cv_func_fdopendir_works=yes],
          [gl_cv_func_fdopendir_works=no],
          [case "$host_os" in
-                     # Guess yes on glibc systems.
-            *-gnu*)  gl_cv_func_fdopendir_works="guessing yes" ;;
-                     # Guess yes on musl systems.
-            *-musl*) gl_cv_func_fdopendir_works="guessing yes" ;;
-                     # If we don't know, obey --enable-cross-guesses.
-            *)       gl_cv_func_fdopendir_works="$gl_cross_guess_normal" ;;
+                                # Guess yes on glibc systems.
+            *-gnu*)             gl_cv_func_fdopendir_works="guessing yes" ;;
+                                # Guess yes on musl systems.
+            *-musl* | midipix*) gl_cv_func_fdopendir_works="guessing yes" ;;
+                                # If we don't know, obey --enable-cross-guesses.
+            *)                  gl_cv_func_fdopendir_works="$gl_cross_guess_normal" ;;
           esac
          ])])
     case "$gl_cv_func_fdopendir_works" in
diff --git a/m4/fflush.m4 b/m4/fflush.m4
new file mode 100644
index 00000000..3e3c8903
--- /dev/null
+++ b/m4/fflush.m4
@@ -0,0 +1,100 @@
+# fflush.m4 serial 18
+
+# Copyright (C) 2007-2023 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+dnl From Eric Blake
+
+dnl Find out how to obey POSIX semantics of fflush(stdin) discarding
+dnl unread input on seekable streams, rather than C99 undefined semantics.
+
+AC_DEFUN([gl_FUNC_FFLUSH],
+[
+  AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+  gl_FUNC_FFLUSH_STDIN
+  case "$gl_cv_func_fflush_stdin" in
+    *yes) ;;
+    *) REPLACE_FFLUSH=1 ;;
+  esac
+])
+
+dnl Determine whether fflush works on input streams.
+dnl Sets gl_cv_func_fflush_stdin.
+
+AC_DEFUN([gl_FUNC_FFLUSH_STDIN],
+[
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CHECK_HEADERS_ONCE([unistd.h])
+  AC_CACHE_CHECK([whether fflush works on input streams],
+    [gl_cv_func_fflush_stdin],
+    [echo hello world > conftest.txt
+     AC_RUN_IFELSE([AC_LANG_PROGRAM(
+       [[
+#include <stdio.h>
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#else /* on Windows with MSVC */
+# include <io.h>
+#endif
+       ]GL_MDA_DEFINES],
+       [[FILE *f = fopen ("conftest.txt", "r");
+         char buffer[10];
+         int fd;
+         int c;
+         if (f == NULL)
+           return 1;
+         fd = fileno (f);
+         if (fd < 0 || fread (buffer, 1, 5, f) != 5)
+           { fclose (f); return 2; }
+         /* For deterministic results, ensure f read a bigger buffer.  */
+         if (lseek (fd, 0, SEEK_CUR) == 5)
+           { fclose (f); return 3; }
+         /* POSIX requires fflush-fseek to set file offset of fd.  This fails
+            on BSD systems and on mingw.  */
+         if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
+           { fclose (f); return 4; }
+         if (lseek (fd, 0, SEEK_CUR) != 5)
+           { fclose (f); return 5; }
+         /* Verify behaviour of fflush after ungetc. See
+            <https://www.opengroup.org/austin/aardvark/latest/xshbug3.txt>  */
+         /* Verify behaviour of fflush after a backup ungetc.  This fails on
+            mingw.  */
+         c = fgetc (f);
+         ungetc (c, f);
+         fflush (f);
+         if (fgetc (f) != c)
+           { fclose (f); return 6; }
+         /* Verify behaviour of fflush after a non-backup ungetc.  This fails
+            on glibc 2.8 and on BSD systems.  */
+         c = fgetc (f);
+         ungetc ('@', f);
+         fflush (f);
+         if (fgetc (f) != c)
+           { fclose (f); return 7; }
+         fclose (f);
+         return 0;
+       ]])],
+       [gl_cv_func_fflush_stdin=yes],
+       [gl_cv_func_fflush_stdin=no],
+       [case "$host_os" in
+                  # Guess no on native Windows.
+          mingw*) gl_cv_func_fflush_stdin="guessing no" ;;
+          *)      gl_cv_func_fflush_stdin=cross ;;
+        esac
+       ])
+     rm conftest.txt
+    ])
+  case "$gl_cv_func_fflush_stdin" in
+    *yes) gl_func_fflush_stdin=1 ;;
+    *no)  gl_func_fflush_stdin=0 ;;
+    *)    gl_func_fflush_stdin='(-1)' ;;
+  esac
+  AC_DEFINE_UNQUOTED([FUNC_FFLUSH_STDIN], [$gl_func_fflush_stdin],
+    [Define to 1 if fflush is known to work on stdin as per POSIX.1-2008,
+     0 if fflush is known to not work, -1 if unknown.])
+])
+
+# Prerequisites of lib/fflush.c.
+AC_DEFUN([gl_PREREQ_FFLUSH], [:])
diff --git a/m4/filenamecat.m4 b/m4/filenamecat.m4
index 4546b832..3dab236d 100644
--- a/m4/filenamecat.m4
+++ b/m4/filenamecat.m4
@@ -1,5 +1,5 @@
-# filenamecat.m4 serial 11
-dnl Copyright (C) 2002-2006, 2009-2022 Free Software Foundation, Inc.
+# filenamecat.m4 serial 12
+dnl Copyright (C) 2002-2006, 2009-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -12,5 +12,5 @@ AC_DEFUN([gl_FILE_NAME_CONCAT],
 AC_DEFUN([gl_FILE_NAME_CONCAT_LGPL],
 [
   dnl Prerequisites of lib/filenamecat-lgpl.c.
-  AC_CHECK_FUNCS_ONCE([mempcpy])
+  gl_CHECK_FUNCS_ANDROID([mempcpy], [[#include <string.h>]])
 ])
diff --git a/m4/flexmember.m4 b/m4/flexmember.m4
index 3b4237e9..13f7e870 100644
--- a/m4/flexmember.m4
+++ b/m4/flexmember.m4
@@ -1,7 +1,7 @@
 # serial 5
 # Check for flexible array member support.
 
-# Copyright (C) 2006, 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2009-2023 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
diff --git a/m4/float_h.m4 b/m4/float_h.m4
index 0e845726..2f0c9c4e 100644
--- a/m4/float_h.m4
+++ b/m4/float_h.m4
@@ -1,5 +1,5 @@
 # float_h.m4 serial 13
-dnl Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/fnmatch.m4 b/m4/fnmatch.m4
index 9c605595..895db13a 100644
--- a/m4/fnmatch.m4
+++ b/m4/fnmatch.m4
@@ -1,6 +1,6 @@
-# Check for fnmatch - serial 15.  -*- coding: utf-8 -*-
+# Check for fnmatch - serial 16.  -*- coding: utf-8 -*-
 
-# Copyright (C) 2000-2007, 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2000-2007, 2009-2023 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -119,10 +119,10 @@ AC_DEFUN([gl_FUNC_FNMATCH_POSIX],
          [eval "$gl_fnmatch_cache_var=yes"],
          [eval "$gl_fnmatch_cache_var=no"],
          [case "$host_os" in
-                     # Guess yes on musl systems.
-            *-musl*) eval "$gl_fnmatch_cache_var=\"guessing yes\"" ;;
-                     # Guess no otherwise, even on glibc systems.
-            *)       eval "$gl_fnmatch_cache_var=\"guessing no\"" ;;
+                                # Guess yes on musl systems.
+            *-musl* | midipix*) eval "$gl_fnmatch_cache_var=\"guessing yes\"" ;;
+                                # Guess no otherwise, even on glibc systems.
+            *)                  eval "$gl_fnmatch_cache_var=\"guessing no\"" ;;
           esac
          ])
       ])
diff --git a/m4/fnmatch_h.m4 b/m4/fnmatch_h.m4
index ae5cd869..40a62b6a 100644
--- a/m4/fnmatch_h.m4
+++ b/m4/fnmatch_h.m4
@@ -1,5 +1,5 @@
 # fnmatch_h.m4 serial 8
-dnl Copyright (C) 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/fopen.m4 b/m4/fopen.m4
index 50767f82..7daa4cae 100644
--- a/m4/fopen.m4
+++ b/m4/fopen.m4
@@ -1,10 +1,10 @@
-# fopen.m4 serial 13
-dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
+# fopen.m4 serial 15
+dnl Copyright (C) 2007-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
-AC_DEFUN([gl_FUNC_FOPEN],
+AC_DEFUN([gl_FUNC_FOPEN_ITSELF],
 [
   AC_REQUIRE([gl_STDIO_H_DEFAULTS])
   AC_REQUIRE([AC_CANONICAL_HOST])
@@ -58,6 +58,15 @@ changequote([,])dnl
   esac
 ])
 
+AC_DEFUN([gl_FUNC_FOPEN],
+[
+  AC_REQUIRE([gl_FUNC_FOPEN_ITSELF])
+  AC_REQUIRE([gl_FUNC_FCLOSE])
+  if test $REPLACE_FCLOSE = 1; then
+    REPLACE_FOPEN=1
+  fi
+])
+
 AC_DEFUN([gl_FUNC_FOPEN_GNU],
 [
   AC_REQUIRE([gl_FUNC_FOPEN])
@@ -87,7 +96,7 @@ int main ()
        [gl_cv_func_fopen_mode_x=no],
        [case "$host_os" in
           # Guess yes on glibc and musl systems.
-          linux*-gnu* | gnu* | kfreebsd*-gnu | *-musl*)
+          linux*-gnu* | gnu* | kfreebsd*-gnu | *-musl* | midipix*)
             gl_cv_func_fopen_mode_x="guessing yes" ;;
           # If we don't know, obey --enable-cross-guesses.
           *)
@@ -124,7 +133,7 @@ int main ()
        [gl_cv_func_fopen_mode_e=no],
        [case "$host_os" in
           # Guess yes on glibc and musl systems.
-          linux*-gnu* | gnu* | kfreebsd*-gnu | *-musl*)
+          linux*-gnu* | gnu* | kfreebsd*-gnu | *-musl* | midipix*)
             gl_cv_func_fopen_mode_e="guessing yes" ;;
           # Guess no on native Windows.
           mingw*)
diff --git a/m4/fpending.m4 b/m4/fpending.m4
index de4eb7f9..6991f810 100644
--- a/m4/fpending.m4
+++ b/m4/fpending.m4
@@ -1,6 +1,6 @@
 # serial 23
 
-# Copyright (C) 2000-2001, 2004-2022 Free Software Foundation, Inc.
+# Copyright (C) 2000-2001, 2004-2023 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
diff --git a/m4/fpieee.m4 b/m4/fpieee.m4
index c0c23e95..706b3314 100644
--- a/m4/fpieee.m4
+++ b/m4/fpieee.m4
@@ -1,5 +1,5 @@
 # fpieee.m4 serial 2  -*- coding: utf-8 -*-
-dnl Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/free.m4 b/m4/free.m4
index dfeecd2b..0389dea3 100644
--- a/m4/free.m4
+++ b/m4/free.m4
@@ -1,5 +1,5 @@
 # free.m4 serial 6
-# Copyright (C) 2003-2005, 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2003-2005, 2009-2023 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
diff --git a/m4/fstat.m4 b/m4/fstat.m4
index 9e61bcce..7cb2edb0 100644
--- a/m4/fstat.m4
+++ b/m4/fstat.m4
@@ -1,5 +1,5 @@
 # fstat.m4 serial 8
-dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/fstatat.m4 b/m4/fstatat.m4
index e8604a6a..08307691 100644
--- a/m4/fstatat.m4
+++ b/m4/fstatat.m4
@@ -1,5 +1,5 @@
 # fstatat.m4 serial 4
-dnl Copyright (C) 2004-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2004-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/ftruncate.m4 b/m4/ftruncate.m4
index 2697e0eb..cbb5f423 100644
--- a/m4/ftruncate.m4
+++ b/m4/ftruncate.m4
@@ -1,8 +1,8 @@
-# serial 21
+# serial 23
 
 # See if we need to emulate a missing ftruncate function using _chsize.
 
-# Copyright (C) 2000-2001, 2003-2007, 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2000-2001, 2003-2007, 2009-2023 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -10,7 +10,7 @@
 AC_DEFUN([gl_FUNC_FTRUNCATE],
 [
   AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
-  AC_CHECK_FUNCS_ONCE([ftruncate])
+  gl_CHECK_FUNCS_ANDROID([ftruncate], [[#include <unistd.h>]])
   if test $ac_cv_func_ftruncate = yes; then
     m4_ifdef([gl_LARGEFILE], [
       AC_REQUIRE([AC_CANONICAL_HOST])
@@ -30,6 +30,9 @@ AC_DEFUN([gl_FUNC_FTRUNCATE],
     ])
   else
     HAVE_FTRUNCATE=0
+    case "$gl_cv_onwards_func_ftruncate" in
+      future*) REPLACE_FTRUNCATE=1 ;;
+    esac
   fi
 ])
 
diff --git a/m4/fts.m4 b/m4/fts.m4
index c722fe36..6f521f51 100644
--- a/m4/fts.m4
+++ b/m4/fts.m4
@@ -1,5 +1,5 @@
-#serial 22
-dnl Copyright (C) 2005-2022 Free Software Foundation, Inc.
+#serial 24
+dnl Copyright (C) 2005-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -29,9 +29,13 @@ AC_DEFUN([gl_FUNC_FTS_CORE],
     fi
   fi
 
-  AC_CHECK_FUNC([fts_open])
-  if test $ac_cv_func_fts_open = yes; then
-    dnl The system already has the symbols fts_open, etc.
+  gl_CHECK_FUNCS_ANDROID([fts_open], [[#include <fts.h>]])
+  if case "$gl_cv_onwards_func_fts_open" in \
+       yes | future*) true ;; \
+       *) false ;; \
+     esac; then
+    dnl The system already has the symbols fts_open, etc. or will have them
+    dnl in a future version.
     dnl Avoid conflicts between these symbols and ours at the linker level.
     AC_DEFINE([fts_open], [rpl_fts_open],
       [Define to the overridden function name])
diff --git a/m4/getcwd.m4 b/m4/getcwd.m4
index 076ca314..e95db056 100644
--- a/m4/getcwd.m4
+++ b/m4/getcwd.m4
@@ -1,12 +1,12 @@
 # getcwd.m4 - check for working getcwd that is compatible with glibc
 
-# Copyright (C) 2001, 2003-2007, 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003-2007, 2009-2023 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
 # Written by Paul Eggert.
-# serial 19
+# serial 20
 
 AC_DEFUN([gl_FUNC_GETCWD_NULL],
   [
@@ -53,6 +53,8 @@ AC_DEFUN([gl_FUNC_GETCWD_NULL],
             *-gnu* | gnu*) gl_cv_func_getcwd_null="guessing yes";;
                            # Guess yes on musl systems.
             *-musl*)       gl_cv_func_getcwd_null="guessing yes";;
+                           # Guess yes on systems that emulate the Linux system calls.
+            midipix*)      gl_cv_func_getcwd_null="guessing yes";;
                            # Guess yes on Cygwin.
             cygwin*)       gl_cv_func_getcwd_null="guessing yes";;
                            # If we don't know, obey --enable-cross-guesses.
diff --git a/m4/getdtablesize.m4 b/m4/getdtablesize.m4
index 6134eaac..8bcda905 100644
--- a/m4/getdtablesize.m4
+++ b/m4/getdtablesize.m4
@@ -1,5 +1,5 @@
 # getdtablesize.m4 serial 8
-dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/getopt.m4 b/m4/getopt.m4
index ff78ed53..7981a095 100644
--- a/m4/getopt.m4
+++ b/m4/getopt.m4
@@ -1,5 +1,5 @@
 # getopt.m4 serial 48
-dnl Copyright (C) 2002-2006, 2008-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2008-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/getpagesize.m4 b/m4/getpagesize.m4
index 19f894ca..79925a73 100644
--- a/m4/getpagesize.m4
+++ b/m4/getpagesize.m4
@@ -1,5 +1,5 @@
 # getpagesize.m4 serial 10
-dnl Copyright (C) 2002, 2004-2005, 2007, 2009-2022 Free Software Foundation,
+dnl Copyright (C) 2002, 2004-2005, 2007, 2009-2023 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
diff --git a/m4/getprogname.m4 b/m4/getprogname.m4
index b26146e9..2b741f50 100644
--- a/m4/getprogname.m4
+++ b/m4/getprogname.m4
@@ -1,16 +1,33 @@
 # getprogname.m4 - check for getprogname or replacements for it
 
-# Copyright (C) 2016-2022 Free Software Foundation, Inc.
+# Copyright (C) 2016-2023 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 4
+# serial 8
 
 AC_DEFUN([gl_FUNC_GETPROGNAME],
 [
-  AC_CHECK_FUNCS_ONCE([getprogname getexecname])
+  AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+  gl_CHECK_FUNCS_ANDROID([getprogname], [[#include <stdlib.h>]])
+  if test $ac_cv_func_getprogname = no; then
+    HAVE_GETPROGNAME=0
+    case "$gl_cv_onwards_func_getprogname" in
+      future*) REPLACE_GETPROGNAME=1 ;;
+    esac
+  fi
+  AC_CHECK_DECLS([program_invocation_name],
+    [],
+    [HAVE_DECL_PROGRAM_INVOCATION_NAME=0],
+    [[#include <errno.h>]])
+])
+
+AC_DEFUN([gl_PREREQ_GETPROGNAME],
+[
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+  AC_CHECK_FUNCS_ONCE([getexecname])
   ac_found=0
   AC_CHECK_DECLS([program_invocation_name], [ac_found=1], [],
     [#include <errno.h>])
diff --git a/m4/gettimeofday.m4 b/m4/gettimeofday.m4
index f729601b..5051d61c 100644
--- a/m4/gettimeofday.m4
+++ b/m4/gettimeofday.m4
@@ -1,6 +1,6 @@
 # serial 29
 
-# Copyright (C) 2001-2003, 2005, 2007, 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2001-2003, 2005, 2007, 2009-2023 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4
index 30911d15..edb8572d 100644
--- a/m4/gnulib-common.m4
+++ b/m4/gnulib-common.m4
@@ -1,5 +1,5 @@
-# gnulib-common.m4 serial 73
-dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
+# gnulib-common.m4 serial 86
+dnl Copyright (C) 2007-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -15,6 +15,10 @@ AC_DEFUN([gl_COMMON], [
   AC_REQUIRE([gl_ZZGNULIB])
 ])
 AC_DEFUN([gl_COMMON_BODY], [
+  AH_VERBATIM([0witness],
+[/* Witness that <config.h> has been included.  */
+#define _GL_CONFIG_H_INCLUDED 1
+])
   AH_VERBATIM([_GL_GNUC_PREREQ],
 [/* True if the compiler says it groks GNU C version MAJOR.MINOR.  */
 #if defined __GNUC__ && defined __GNUC_MINOR__
@@ -38,6 +42,11 @@ AC_DEFUN([gl_COMMON_BODY], [
        AIX system header files and several gnulib header files use precisely
        this syntax with 'extern'.  */
 #  define _Noreturn [[noreturn]]
+# elif (defined __clang__ && __clang_major__ < 16 \
+        && defined _GL_WORK_AROUND_LLVM_BUG_59792)
+   /* Compile with -D_GL_WORK_AROUND_LLVM_BUG_59792 to work around
+      that rare LLVM bug, though you may get many false-alarm warnings.  */
+#  define _Noreturn
 # elif ((!defined __cplusplus || defined __clang__) \
         && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \
             || (!defined __STRICT_ANSI__ \
@@ -71,7 +80,7 @@ AC_DEFUN([gl_COMMON_BODY], [
      && (!defined __clang_minor__ \
          || (defined __apple_build_version__ \
              ? 6000000 <= __apple_build_version__ \
-             : 3 < __clang_major__ + (5 <= __clang_minor__))))
+             : 5 <= __clang_major__)))
 # define _GL_HAS_ATTRIBUTE(attr) __has_attribute (__##attr##__)
 #else
 # define _GL_HAS_ATTRIBUTE(attr) _GL_ATTR_##attr
@@ -105,17 +114,27 @@ AC_DEFUN([gl_COMMON_BODY], [
 # define _GL_ATTR_warn_unused_result _GL_GNUC_PREREQ (3, 4)
 #endif
 
-#ifdef __has_c_attribute
-# if ((defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) <= 201710 \
-      && _GL_GNUC_PREREQ (4, 6))
-#  pragma GCC diagnostic ignored "-Wpedantic"
+/* Disable GCC -Wpedantic if using __has_c_attribute and this is not C23+.  */
+#if (defined __has_c_attribute && _GL_GNUC_PREREQ (4, 6) \
+     && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) <= 201710)
+# pragma GCC diagnostic ignored "-Wpedantic"
+#endif
+
+/* Define if, in a function declaration, the attributes in bracket syntax
+   [[...]] must come before the attributes in __attribute__((...)) syntax.
+   If this is defined, it is best to avoid the bracket syntax, so that the
+   various _GL_ATTRIBUTE_* can be cumulated on the same declaration in any
+   order.  */
+#ifdef __cplusplus
+# if defined __clang__
+#  define _GL_BRACKET_BEFORE_ATTRIBUTE 1
 # endif
-# define _GL_HAS_C_ATTRIBUTE(attr) __has_c_attribute (__##attr##__)
 #else
-# define _GL_HAS_C_ATTRIBUTE(attr) 0
+# if defined __GNUC__ && !defined __clang__
+#  define _GL_BRACKET_BEFORE_ATTRIBUTE 1
+# endif
 #endif
-
-]dnl There is no _GL_ATTRIBUTE_ALIGNED; use stdalign's _Alignas instead.
+]dnl There is no _GL_ATTRIBUTE_ALIGNED; use stdalign's alignas instead.
 [
 /* _GL_ATTRIBUTE_ALLOC_SIZE ((N)) declares that the Nth argument of the function
    is the size of the returned memory block.
@@ -123,29 +142,35 @@ AC_DEFUN([gl_COMMON_BODY], [
    by the Nth argument of the function is the size of the returned memory block.
  */
 /* Applies to: function, pointer to function, function types.  */
-#if _GL_HAS_ATTRIBUTE (alloc_size)
-# define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args))
-#else
-# define _GL_ATTRIBUTE_ALLOC_SIZE(args)
+#ifndef _GL_ATTRIBUTE_ALLOC_SIZE
+# if _GL_HAS_ATTRIBUTE (alloc_size)
+#  define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args))
+# else
+#  define _GL_ATTRIBUTE_ALLOC_SIZE(args)
+# endif
 #endif
 
 /* _GL_ATTRIBUTE_ALWAYS_INLINE tells that the compiler should always inline the
    function and report an error if it cannot do so.  */
 /* Applies to: function.  */
-#if _GL_HAS_ATTRIBUTE (always_inline)
-# define _GL_ATTRIBUTE_ALWAYS_INLINE __attribute__ ((__always_inline__))
-#else
-# define _GL_ATTRIBUTE_ALWAYS_INLINE
+#ifndef _GL_ATTRIBUTE_ALWAYS_INLINE
+# if _GL_HAS_ATTRIBUTE (always_inline)
+#  define _GL_ATTRIBUTE_ALWAYS_INLINE __attribute__ ((__always_inline__))
+# else
+#  define _GL_ATTRIBUTE_ALWAYS_INLINE
+# endif
 #endif
 
 /* _GL_ATTRIBUTE_ARTIFICIAL declares that the function is not important to show
     in stack traces when debugging.  The compiler should omit the function from
     stack traces.  */
 /* Applies to: function.  */
-#if _GL_HAS_ATTRIBUTE (artificial)
-# define _GL_ATTRIBUTE_ARTIFICIAL __attribute__ ((__artificial__))
-#else
-# define _GL_ATTRIBUTE_ARTIFICIAL
+#ifndef _GL_ATTRIBUTE_ARTIFICIAL
+# if _GL_HAS_ATTRIBUTE (artificial)
+#  define _GL_ATTRIBUTE_ARTIFICIAL __attribute__ ((__artificial__))
+# else
+#  define _GL_ATTRIBUTE_ARTIFICIAL
+# endif
 #endif
 
 /* _GL_ATTRIBUTE_COLD declares that the function is rarely executed.  */
@@ -153,14 +178,16 @@ AC_DEFUN([gl_COMMON_BODY], [
 /* Avoid __attribute__ ((cold)) on MinGW; see thread starting at
    <https://lists.gnu.org/r/emacs-devel/2019-04/msg01152.html>.
    Also, Oracle Studio 12.6 requires 'cold' not '__cold__'.  */
-#if _GL_HAS_ATTRIBUTE (cold) && !defined __MINGW32__
-# ifndef __SUNPRO_C
-#  define _GL_ATTRIBUTE_COLD __attribute__ ((__cold__))
+#ifndef _GL_ATTRIBUTE_COLD
+# if _GL_HAS_ATTRIBUTE (cold) && !defined __MINGW32__
+#  ifndef __SUNPRO_C
+#   define _GL_ATTRIBUTE_COLD __attribute__ ((__cold__))
+#  else
+#   define _GL_ATTRIBUTE_COLD __attribute__ ((cold))
+#  endif
 # else
-#  define _GL_ATTRIBUTE_COLD __attribute__ ((cold))
+#  define _GL_ATTRIBUTE_COLD
 # endif
-#else
-# define _GL_ATTRIBUTE_COLD
 #endif
 
 /* _GL_ATTRIBUTE_CONST declares that it is OK for a compiler to omit duplicate
@@ -170,10 +197,12 @@ AC_DEFUN([gl_COMMON_BODY], [
    forever, and does not call longjmp.
    (This attribute is stricter than _GL_ATTRIBUTE_PURE.)  */
 /* Applies to: functions.  */
-#if _GL_HAS_ATTRIBUTE (const)
-# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__))
-#else
-# define _GL_ATTRIBUTE_CONST
+#ifndef _GL_ATTRIBUTE_CONST
+# if _GL_HAS_ATTRIBUTE (const)
+#  define _GL_ATTRIBUTE_CONST __attribute__ ((__const__))
+# else
+#  define _GL_ATTRIBUTE_CONST
+# endif
 #endif
 
 /* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers
@@ -182,16 +211,25 @@ AC_DEFUN([gl_COMMON_BODY], [
    _GL_ATTRIBUTE_DEALLOC_FREE declares that the function returns pointers that
    can be freed via 'free'; it can be used only after declaring 'free'.  */
 /* Applies to: functions.  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)
+#ifndef _GL_ATTRIBUTE_DEALLOC
+# if _GL_GNUC_PREREQ (11, 0)
+#  define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i)))
+# else
+#  define _GL_ATTRIBUTE_DEALLOC(f, i)
+# endif
 #endif
 /* If gnulib's <string.h> or <wchar.h> has already defined this macro, continue
    to use this earlier definition, since <stdlib.h> may not have been included
    yet.  */
 #ifndef _GL_ATTRIBUTE_DEALLOC_FREE
-# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (free, 1)
+# if defined __cplusplus && defined __GNUC__ && !defined __clang__
+/* Work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108231> */
+#  define _GL_ATTRIBUTE_DEALLOC_FREE \
+     _GL_ATTRIBUTE_DEALLOC ((void (*) (void *)) free, 1)
+# else
+#  define _GL_ATTRIBUTE_DEALLOC_FREE \
+     _GL_ATTRIBUTE_DEALLOC (free, 1)
+# endif
 #endif
 
 /* _GL_ATTRIBUTE_DEPRECATED: Declares that an entity is deprecated.
@@ -202,12 +240,20 @@ AC_DEFUN([gl_COMMON_BODY], [
      - enumeration, enumeration item,
      - typedef,
    in C++ also: namespace, class, template specialization.  */
-#if _GL_HAS_C_ATTRIBUTE (deprecated)
-# define _GL_ATTRIBUTE_DEPRECATED [[__deprecated__]]
-#elif _GL_HAS_ATTRIBUTE (deprecated)
-# define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__))
-#else
-# define _GL_ATTRIBUTE_DEPRECATED
+#ifndef _GL_ATTRIBUTE_DEPRECATED
+# ifndef _GL_BRACKET_BEFORE_ATTRIBUTE
+#  ifdef __has_c_attribute
+#   if __has_c_attribute (__deprecated__)
+#    define _GL_ATTRIBUTE_DEPRECATED [[__deprecated__]]
+#   endif
+#  endif
+# endif
+# if !defined _GL_ATTRIBUTE_DEPRECATED && _GL_HAS_ATTRIBUTE (deprecated)
+#  define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__))
+# endif
+# ifndef _GL_ATTRIBUTE_DEPRECATED
+#  define _GL_ATTRIBUTE_DEPRECATED
+# endif
 #endif
 
 /* _GL_ATTRIBUTE_ERROR(msg) requests an error if a function is called and
@@ -215,24 +261,28 @@ AC_DEFUN([gl_COMMON_BODY], [
    _GL_ATTRIBUTE_WARNING(msg) requests a warning if a function is called and
    the function call is not optimized away.  */
 /* Applies to: functions.  */
-#if _GL_HAS_ATTRIBUTE (error)
-# define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__error__ (msg)))
-# define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__warning__ (msg)))
-#elif _GL_HAS_ATTRIBUTE (diagnose_if)
-# define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__diagnose_if__ (1, msg, "error")))
-# define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__diagnose_if__ (1, msg, "warning")))
-#else
-# define _GL_ATTRIBUTE_ERROR(msg)
-# define _GL_ATTRIBUTE_WARNING(msg)
+#if !(defined _GL_ATTRIBUTE_ERROR && defined _GL_ATTRIBUTE_WARNING)
+# if _GL_HAS_ATTRIBUTE (error)
+#  define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__error__ (msg)))
+#  define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__warning__ (msg)))
+# elif _GL_HAS_ATTRIBUTE (diagnose_if)
+#  define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__diagnose_if__ (1, msg, "error")))
+#  define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__diagnose_if__ (1, msg, "warning")))
+# else
+#  define _GL_ATTRIBUTE_ERROR(msg)
+#  define _GL_ATTRIBUTE_WARNING(msg)
+# endif
 #endif
 
 /* _GL_ATTRIBUTE_EXTERNALLY_VISIBLE declares that the entity should remain
    visible to debuggers etc., even with '-fwhole-program'.  */
 /* Applies to: functions, variables.  */
-#if _GL_HAS_ATTRIBUTE (externally_visible)
-# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE __attribute__ ((externally_visible))
-#else
-# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE
+#ifndef _GL_ATTRIBUTE_EXTERNALLY_VISIBLE
+# if _GL_HAS_ATTRIBUTE (externally_visible)
+#  define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE __attribute__ ((externally_visible))
+# else
+#  define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE
+# endif
 #endif
 
 /* _GL_ATTRIBUTE_FALLTHROUGH declares that it is not a programming mistake if
@@ -240,12 +290,18 @@ AC_DEFUN([gl_COMMON_BODY], [
    'default' label.  The compiler should not warn in this case.  */
 /* Applies to: Empty statement (;), inside a 'switch' statement.  */
 /* Always expands to something.  */
-#if _GL_HAS_C_ATTRIBUTE (fallthrough)
-# define _GL_ATTRIBUTE_FALLTHROUGH [[__fallthrough__]]
-#elif _GL_HAS_ATTRIBUTE (fallthrough)
-# define _GL_ATTRIBUTE_FALLTHROUGH __attribute__ ((__fallthrough__))
-#else
-# define _GL_ATTRIBUTE_FALLTHROUGH ((void) 0)
+#ifndef _GL_ATTRIBUTE_FALLTHROUGH
+# ifdef __has_c_attribute
+#  if __has_c_attribute (__fallthrough__)
+#   define _GL_ATTRIBUTE_FALLTHROUGH [[__fallthrough__]]
+#  endif
+# endif
+# if !defined _GL_ATTRIBUTE_FALLTHROUGH && _GL_HAS_ATTRIBUTE (fallthrough)
+#  define _GL_ATTRIBUTE_FALLTHROUGH __attribute__ ((__fallthrough__))
+# endif
+# ifndef _GL_ATTRIBUTE_FALLTHROUGH
+#  define _GL_ATTRIBUTE_FALLTHROUGH ((void) 0)
+# endif
 #endif
 
 /* _GL_ATTRIBUTE_FORMAT ((ARCHETYPE, STRING-INDEX, FIRST-TO-CHECK))
@@ -259,10 +315,12 @@ AC_DEFUN([gl_COMMON_BODY], [
    If FIRST-TO-CHECK is not 0, arguments starting at FIRST-TO_CHECK
    are suitable for the format string.  */
 /* Applies to: functions.  */
-#if _GL_HAS_ATTRIBUTE (format)
-# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
-#else
-# define _GL_ATTRIBUTE_FORMAT(spec)
+#ifndef _GL_ATTRIBUTE_FORMAT
+# if _GL_HAS_ATTRIBUTE (format)
+#  define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
+# else
+#  define _GL_ATTRIBUTE_FORMAT(spec)
+# endif
 #endif
 
 /* _GL_ATTRIBUTE_LEAF declares that if the function is called from some other
@@ -270,19 +328,23 @@ AC_DEFUN([gl_COMMON_BODY], [
    exception handling.  This declaration lets the compiler optimize that unit
    more aggressively.  */
 /* Applies to: functions.  */
-#if _GL_HAS_ATTRIBUTE (leaf)
-# define _GL_ATTRIBUTE_LEAF __attribute__ ((__leaf__))
-#else
-# define _GL_ATTRIBUTE_LEAF
+#ifndef _GL_ATTRIBUTE_LEAF
+# if _GL_HAS_ATTRIBUTE (leaf)
+#  define _GL_ATTRIBUTE_LEAF __attribute__ ((__leaf__))
+# else
+#  define _GL_ATTRIBUTE_LEAF
+# endif
 #endif
 
 /* _GL_ATTRIBUTE_MALLOC declares that the function returns a pointer to freshly
    allocated memory.  */
 /* Applies to: functions.  */
-#if _GL_HAS_ATTRIBUTE (malloc)
-# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
-#else
-# define _GL_ATTRIBUTE_MALLOC
+#ifndef _GL_ATTRIBUTE_MALLOC
+# if _GL_HAS_ATTRIBUTE (malloc)
+#  define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
+# else
+#  define _GL_ATTRIBUTE_MALLOC
+# endif
 #endif
 
 /* _GL_ATTRIBUTE_MAY_ALIAS declares that pointers to the type may point to the
@@ -290,10 +352,12 @@ AC_DEFUN([gl_COMMON_BODY], [
    strict aliasing optimization.  */
 /* Applies to: types.  */
 /* Oracle Studio 12.6 mishandles may_alias despite __has_attribute OK.  */
-#if _GL_HAS_ATTRIBUTE (may_alias) && !defined __SUNPRO_C
-# define _GL_ATTRIBUTE_MAY_ALIAS __attribute__ ((__may_alias__))
-#else
-# define _GL_ATTRIBUTE_MAY_ALIAS
+#ifndef _GL_ATTRIBUTE_MAY_ALIAS
+# if _GL_HAS_ATTRIBUTE (may_alias) && !defined __SUNPRO_C
+#  define _GL_ATTRIBUTE_MAY_ALIAS __attribute__ ((__may_alias__))
+# else
+#  define _GL_ATTRIBUTE_MAY_ALIAS
+# endif
 #endif
 
 /* _GL_ATTRIBUTE_MAYBE_UNUSED declares that it is not a programming mistake if
@@ -305,15 +369,29 @@ AC_DEFUN([gl_COMMON_BODY], [
      - enumeration, enumeration item,
      - typedef,
    in C++ also: class.  */
-/* In C++ and C2x, this is spelled [[__maybe_unused__]].
+/* In C++ and C23, this is spelled [[__maybe_unused__]].
    GCC's syntax is __attribute__ ((__unused__)).
-   clang supports both syntaxes.  */
-#if _GL_HAS_C_ATTRIBUTE (maybe_unused)
-# define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]]
-#else
-# define _GL_ATTRIBUTE_MAYBE_UNUSED _GL_ATTRIBUTE_UNUSED
+   clang supports both syntaxes.  Except that with clang ≥ 6, < 10, in C++ mode,
+   __has_c_attribute (__maybe_unused__) yields true but the use of
+   [[__maybe_unused__]] nevertheless produces a warning.  */
+#ifndef _GL_ATTRIBUTE_MAYBE_UNUSED
+# ifndef _GL_BRACKET_BEFORE_ATTRIBUTE
+#  if defined __clang__ && defined __cplusplus
+#   if !defined __apple_build_version__ && __clang_major__ >= 10
+#    define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]]
+#   endif
+#  elif defined __has_c_attribute
+#   if __has_c_attribute (__maybe_unused__)
+#    define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]]
+#   endif
+#  endif
+# endif
+# ifndef _GL_ATTRIBUTE_MAYBE_UNUSED
+#  define _GL_ATTRIBUTE_MAYBE_UNUSED _GL_ATTRIBUTE_UNUSED
+# endif
 #endif
-/* Alternative spelling of this macro, for convenience.  */
+/* Alternative spelling of this macro, for convenience and for
+   compatibility with glibc/include/libc-symbols.h.  */
 #define _GL_UNUSED _GL_ATTRIBUTE_MAYBE_UNUSED
 /* Earlier spellings of this macro.  */
 #define _UNUSED_PARAMETER_ _GL_ATTRIBUTE_MAYBE_UNUSED
@@ -322,21 +400,40 @@ AC_DEFUN([gl_COMMON_BODY], [
    discard the return value.  The compiler may warn if the caller does not use
    the return value, unless the caller uses something like ignore_value.  */
 /* Applies to: function, enumeration, class.  */
-#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__))
-#else
-# define _GL_ATTRIBUTE_NODISCARD
+#ifndef _GL_ATTRIBUTE_NODISCARD
+# ifndef _GL_BRACKET_BEFORE_ATTRIBUTE
+#  if defined __clang__ && defined __cplusplus
+  /* With clang up to 15.0.6 (at least), in C++ mode, [[__nodiscard__]] produces
+     a warning.
+     The 1000 below means a yet unknown threshold.  When clang++ version X
+     starts supporting [[__nodiscard__]] without warning about it, you can
+     replace the 1000 with X.  */
+#   if __clang_major__ >= 1000
+#    define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]]
+#   endif
+#  elif defined __has_c_attribute
+#   if __has_c_attribute (__nodiscard__)
+#    define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]]
+#   endif
+#  endif
+# endif
+# if !defined _GL_ATTRIBUTE_NODISCARD && _GL_HAS_ATTRIBUTE (warn_unused_result)
+#  define _GL_ATTRIBUTE_NODISCARD __attribute__ ((__warn_unused_result__))
+# endif
+# ifndef _GL_ATTRIBUTE_NODISCARD
+#  define _GL_ATTRIBUTE_NODISCARD
+# endif
 #endif
 
 /* _GL_ATTRIBUTE_NOINLINE tells that the compiler should not inline the
    function.  */
 /* Applies to: functions.  */
-#if _GL_HAS_ATTRIBUTE (noinline)
-# define _GL_ATTRIBUTE_NOINLINE __attribute__ ((__noinline__))
-#else
-# define _GL_ATTRIBUTE_NOINLINE
+#ifndef _GL_ATTRIBUTE_NOINLINE
+# if _GL_HAS_ATTRIBUTE (noinline)
+#  define _GL_ATTRIBUTE_NOINLINE __attribute__ ((__noinline__))
+# else
+#  define _GL_ATTRIBUTE_NOINLINE
+# endif
 #endif
 
 /* _GL_ATTRIBUTE_NONNULL ((N1, N2,...)) declares that the arguments N1, N2,...
@@ -344,20 +441,24 @@ AC_DEFUN([gl_COMMON_BODY], [
    _GL_ATTRIBUTE_NONNULL () declares that all pointer arguments must not be
    null.  */
 /* Applies to: functions.  */
-#if _GL_HAS_ATTRIBUTE (nonnull)
-# define _GL_ATTRIBUTE_NONNULL(args) __attribute__ ((__nonnull__ args))
-#else
-# define _GL_ATTRIBUTE_NONNULL(args)
+#ifndef _GL_ATTRIBUTE_NONNULL
+# if _GL_HAS_ATTRIBUTE (nonnull)
+#  define _GL_ATTRIBUTE_NONNULL(args) __attribute__ ((__nonnull__ args))
+# else
+#  define _GL_ATTRIBUTE_NONNULL(args)
+# endif
 #endif
 
 /* _GL_ATTRIBUTE_NONSTRING declares that the contents of a character array is
    not meant to be NUL-terminated.  */
 /* Applies to: struct/union members and variables that are arrays of element
    type '[[un]signed] char'.  */
-#if _GL_HAS_ATTRIBUTE (nonstring)
-# define _GL_ATTRIBUTE_NONSTRING __attribute__ ((__nonstring__))
-#else
-# define _GL_ATTRIBUTE_NONSTRING
+#ifndef _GL_ATTRIBUTE_NONSTRING
+# if _GL_HAS_ATTRIBUTE (nonstring)
+#  define _GL_ATTRIBUTE_NONSTRING __attribute__ ((__nonstring__))
+# else
+#  define _GL_ATTRIBUTE_NONSTRING
+# endif
 #endif
 
 /* There is no _GL_ATTRIBUTE_NORETURN; use _Noreturn instead.  */
@@ -365,10 +466,12 @@ AC_DEFUN([gl_COMMON_BODY], [
 /* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions.
  */
 /* Applies to: functions.  */
-#if _GL_HAS_ATTRIBUTE (nothrow) && !defined __cplusplus
-# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__))
-#else
-# define _GL_ATTRIBUTE_NOTHROW
+#ifndef _GL_ATTRIBUTE_NOTHROW
+# if _GL_HAS_ATTRIBUTE (nothrow) && !defined __cplusplus
+#  define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__))
+# else
+#  define _GL_ATTRIBUTE_NOTHROW
+# endif
 #endif
 
 /* _GL_ATTRIBUTE_PACKED declares:
@@ -377,10 +480,12 @@ AC_DEFUN([gl_COMMON_BODY], [
    minimizing the memory required.  */
 /* Applies to: struct members, struct, union,
    in C++ also: class.  */
-#if _GL_HAS_ATTRIBUTE (packed)
-# define _GL_ATTRIBUTE_PACKED __attribute__ ((__packed__))
-#else
-# define _GL_ATTRIBUTE_PACKED
+#ifndef _GL_ATTRIBUTE_PACKED
+# if _GL_HAS_ATTRIBUTE (packed)
+#  define _GL_ATTRIBUTE_PACKED __attribute__ ((__packed__))
+# else
+#  define _GL_ATTRIBUTE_PACKED
+# endif
 #endif
 
 /* _GL_ATTRIBUTE_PURE declares that It is OK for a compiler to omit duplicate
@@ -390,19 +495,23 @@ AC_DEFUN([gl_COMMON_BODY], [
    observable state, and always returns exactly once.
    (This attribute is looser than _GL_ATTRIBUTE_CONST.)  */
 /* Applies to: functions.  */
-#if _GL_HAS_ATTRIBUTE (pure)
-# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
-#else
-# define _GL_ATTRIBUTE_PURE
+#ifndef _GL_ATTRIBUTE_PURE
+# if _GL_HAS_ATTRIBUTE (pure)
+#  define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
+# else
+#  define _GL_ATTRIBUTE_PURE
+# endif
 #endif
 
 /* _GL_ATTRIBUTE_RETURNS_NONNULL declares that the function's return value is
    a non-NULL pointer.  */
 /* Applies to: functions.  */
-#if _GL_HAS_ATTRIBUTE (returns_nonnull)
-# define _GL_ATTRIBUTE_RETURNS_NONNULL __attribute__ ((__returns_nonnull__))
-#else
-# define _GL_ATTRIBUTE_RETURNS_NONNULL
+#ifndef _GL_ATTRIBUTE_RETURNS_NONNULL
+# if _GL_HAS_ATTRIBUTE (returns_nonnull)
+#  define _GL_ATTRIBUTE_RETURNS_NONNULL __attribute__ ((__returns_nonnull__))
+# else
+#  define _GL_ATTRIBUTE_RETURNS_NONNULL
+# endif
 #endif
 
 /* _GL_ATTRIBUTE_SENTINEL(pos) declares that the variadic function expects a
@@ -410,17 +519,21 @@ AC_DEFUN([gl_COMMON_BODY], [
    _GL_ATTRIBUTE_SENTINEL () - The last argument is NULL (requires C99).
    _GL_ATTRIBUTE_SENTINEL ((N)) - The (N+1)st argument from the end is NULL.  */
 /* Applies to: functions.  */
-#if _GL_HAS_ATTRIBUTE (sentinel)
-# define _GL_ATTRIBUTE_SENTINEL(pos) __attribute__ ((__sentinel__ pos))
-#else
-# define _GL_ATTRIBUTE_SENTINEL(pos)
+#ifndef _GL_ATTRIBUTE_SENTINEL
+# if _GL_HAS_ATTRIBUTE (sentinel)
+#  define _GL_ATTRIBUTE_SENTINEL(pos) __attribute__ ((__sentinel__ pos))
+# else
+#  define _GL_ATTRIBUTE_SENTINEL(pos)
+# endif
 #endif
 
 /* A helper macro.  Don't use it directly.  */
-#if _GL_HAS_ATTRIBUTE (unused)
-# define _GL_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
-#else
-# define _GL_ATTRIBUTE_UNUSED
+#ifndef _GL_ATTRIBUTE_UNUSED
+# if _GL_HAS_ATTRIBUTE (unused)
+#  define _GL_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
+# else
+#  define _GL_ATTRIBUTE_UNUSED
+# endif
 #endif
 
 ]dnl There is no _GL_ATTRIBUTE_VISIBILITY; see m4/visibility.m4 instead.
@@ -431,10 +544,24 @@ AC_DEFUN([gl_COMMON_BODY], [
 /* Applies to: label (both in C and C++).  */
 /* Note that g++ < 4.5 does not support the '__attribute__ ((__unused__)) ;'
    syntax.  But clang does.  */
-#if !(defined __cplusplus && !_GL_GNUC_PREREQ (4, 5)) || defined __clang__
-# define _GL_UNUSED_LABEL _GL_ATTRIBUTE_UNUSED
+#ifndef _GL_UNUSED_LABEL
+# if !(defined __cplusplus && !_GL_GNUC_PREREQ (4, 5)) || defined __clang__
+#  define _GL_UNUSED_LABEL _GL_ATTRIBUTE_UNUSED
+# else
+#  define _GL_UNUSED_LABEL
+# endif
+#endif
+])
+  AH_VERBATIM([c_linkage],
+[/* In C++, there is the concept of "language linkage", that encompasses
+    name mangling and function calling conventions.
+    The following macros start and end a block of "C" linkage.  */
+#ifdef __cplusplus
+# define _GL_BEGIN_C_LINKAGE extern "C" {
+# define _GL_END_C_LINKAGE }
 #else
-# define _GL_UNUSED_LABEL
+# define _GL_BEGIN_C_LINKAGE
+# define _GL_END_C_LINKAGE
 #endif
 ])
   AH_VERBATIM([async_safe],
@@ -492,7 +619,7 @@ AC_DEFUN([gl_COMMON_BODY], [
   dnl gl_cross_guess_normal    (to be used when 'yes' is good and 'no' is bad),
   dnl gl_cross_guess_inverted  (to be used when 'no' is good and 'yes' is bad).
   AC_ARG_ENABLE([cross-guesses],
-    [AS_HELP_STRING([--enable-cross-guesses={conservative|risky}],
+    [AS_HELP_STRING([[--enable-cross-guesses={conservative|risky}]],
        [specify policy for cross-compilation guesses])],
     [if test "x$enableval" != xconservative && test "x$enableval" != xrisky; then
        AC_MSG_WARN([invalid argument supplied to --enable-cross-guesses])
@@ -1004,6 +1131,238 @@ AC_DEFUN([gl_CONDITIONAL_HEADER],
   m4_popdef([gl_header_name])
 ])
 
+dnl Preparations for gl_CHECK_FUNCS_MACOS.
+AC_DEFUN([gl_PREPARE_CHECK_FUNCS_MACOS],
+[
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  AC_REQUIRE([gl_COMPILER_CLANG])
+  AC_CACHE_CHECK([for compiler option needed when checking for future declarations],
+    [gl_cv_compiler_check_future_option],
+    [case "$host_os" in
+       dnl This is only needed on macOS.
+       darwin*)
+         if test $gl_cv_compiler_clang = yes; then
+           dnl Test whether the compiler supports the option
+           dnl '-Werror=unguarded-availability-new'.
+           save_ac_compile="$ac_compile"
+           ac_compile="$ac_compile -Werror=unguarded-availability-new"
+           AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[]])],
+             [gl_cv_compiler_check_future_option='-Werror=unguarded-availability-new'],
+             [gl_cv_compiler_check_future_option=none])
+           ac_compile="$save_ac_compile"
+         else
+           gl_cv_compiler_check_future_option=none
+         fi
+         ;;
+       *) gl_cv_compiler_check_future_option=none ;;
+     esac
+    ])
+])
+
+dnl Pieces of the expansion of
+dnl gl_CHECK_FUNCS_ANDROID
+dnl gl_CHECK_FUNCS_MACOS
+dnl gl_CHECK_FUNCS_ANDROID_MACOS
+
+AC_DEFUN([gl_CHECK_FUNCS_DEFAULT_CASE],
+[
+         *)
+           AC_CHECK_FUNC([$1])
+           [gl_cv_onwards_func_][$1]=$[ac_cv_func_][$1]
+           ;;
+])
+
+AC_DEFUN([gl_CHECK_FUNCS_CASE_FOR_ANDROID],
+[
+         linux*-android*)
+           AC_CHECK_DECL([$1], , , [$2])
+           if test $[ac_cv_have_decl_][$1] = yes; then
+             AC_CHECK_FUNC([[$1]])
+             if test $[ac_cv_func_][$1] = yes; then
+               [gl_cv_onwards_func_][$1]=yes
+             else
+               dnl The function is declared but does not exist. This should not
+               dnl happen normally. But anyway, we know that a future version
+               dnl of Android will have the function.
+               [gl_cv_onwards_func_][$1]='future OS version'
+             fi
+           else
+             [gl_cv_onwards_func_][$1]='future OS version'
+           fi
+           ;;
+])
+
+AC_DEFUN([gl_CHECK_FUNCS_CASE_FOR_MACOS],
+[
+         darwin*)
+           if test "x$gl_cv_compiler_check_future_option" != "xnone"; then
+             dnl Use a compile test, not a link test.
+             save_ac_compile="$ac_compile"
+             ac_compile="$ac_compile $gl_cv_compiler_check_future_option"
+             save_ac_compile_for_check_decl="$ac_compile_for_check_decl"
+             ac_compile_for_check_decl="$ac_compile_for_check_decl $gl_cv_compiler_check_future_option"
+             unset [ac_cv_have_decl_][$1]
+             AC_CHECK_DECL([$1], , , [$2])
+             ac_compile="$save_ac_compile"
+             ac_compile_for_check_decl="$save_ac_compile_for_check_decl"
+             [ac_cv_func_][$1]="$[ac_cv_have_decl_][$1]"
+             if test $[ac_cv_func_][$1] = yes; then
+               [gl_cv_onwards_func_][$1]=yes
+             else
+               unset [ac_cv_have_decl_][$1]
+               AC_CHECK_DECL([$1], , , [$2])
+               if test $[ac_cv_have_decl_][$1] = yes; then
+                 [gl_cv_onwards_func_][$1]='future OS version'
+               else
+                 [gl_cv_onwards_func_][$1]=no
+               fi
+             fi
+           else
+             AC_CHECK_FUNC([$1])
+             [gl_cv_onwards_func_][$1]=$[ac_cv_func_][$1]
+           fi
+           ;;
+])
+
+AC_DEFUN([gl_CHECK_FUNCS_SET_RESULTS],
+[
+  case "$[gl_cv_onwards_func_][$1]" in
+    future*) [ac_cv_func_][$1]=no ;;
+    *)       [ac_cv_func_][$1]=$[gl_cv_onwards_func_][$1] ;;
+  esac
+  if test $[ac_cv_func_][$1] = yes; then
+    AC_DEFINE([HAVE_]m4_translit([[$1]],
+                                 [abcdefghijklmnopqrstuvwxyz],
+                                 [ABCDEFGHIJKLMNOPQRSTUVWXYZ]),
+              [1], [Define to 1 if you have the `$1' function.])
+  fi
+])
+
+dnl gl_CHECK_FUNCS_ANDROID([func], [[#include <foo.h>]])
+dnl is like AC_CHECK_FUNCS([func]), taking into account a portability problem
+dnl on Android.
+dnl
+dnl When code is compiled on Android, it is in the context of a certain
+dnl "Android API level", which indicates the minimum version of Android on
+dnl which the app can be installed. In other words, you don't compile for a
+dnl specific version of Android. You compile for all versions of Android,
+dnl onwards from the given API level.
+dnl Thus, the question "does the OS have the function func" has three possible
+dnl answers:
+dnl   - yes, in all versions starting from the given API level,
+dnl   - no, in no version,
+dnl   - not in the given API level, but in a later version of Android.
+dnl
+dnl In detail, this works as follows:
+dnl If func was added to Android API level, say, 28, then the libc.so has the
+dnl symbol func always, whereas the header file <foo.h> declares func
+dnl conditionally:
+dnl   #if __ANDROID_API__ >= 28
+dnl   ... func (...) __INTRODUCED_IN(28);
+dnl   #endif
+dnl Thus, when compiling with "clang -target armv7a-unknown-linux-android28",
+dnl the function func is declared and exists in libc.
+dnl Whereas when compiling with "clang -target armv7a-unknown-linux-android27",
+dnl the function func is not declared but exists in libc.
+dnl
+dnl This macro sets two variables:
+dnl   - gl_cv_onwards_func_<func>   to yes / no / "future OS version"
+dnl   - ac_cv_func_<func>           to yes / no / no
+dnl The first variable allows to distinguish all three cases.
+dnl The second variable is set, so that an invocation
+dnl   gl_CHECK_FUNCS_ANDROID([func], [[#include <foo.h>]])
+dnl can be used as a drop-in replacement for
+dnl   AC_CHECK_FUNCS([func]).
+AC_DEFUN([gl_CHECK_FUNCS_ANDROID],
+[
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  AC_CACHE_CHECK([for [$1]],
+    [[gl_cv_onwards_func_][$1]],
+    [gl_SILENT([
+       case "$host_os" in
+         gl_CHECK_FUNCS_CASE_FOR_ANDROID([$1], [$2])
+         gl_CHECK_FUNCS_DEFAULT_CASE([$1])
+       esac
+      ])
+    ])
+  gl_CHECK_FUNCS_SET_RESULTS([$1])
+])
+
+dnl gl_CHECK_FUNCS_MACOS([func], [[#include <foo.h>]])
+dnl is like AC_CHECK_FUNCS([func]), taking into account a portability problem
+dnl on macOS.
+dnl
+dnl When code is compiled on macOS, it is in the context of a certain minimum
+dnl macOS version, that can be set through the option '-mmacosx-version-min='.
+dnl In other words, you don't compile for a specific version of macOS. You
+dnl compile for all versions of macOS, onwards from the given version.
+dnl Thus, the question "does the OS have the function func" has three possible
+dnl answers:
+dnl   - yes, in all versions starting from the given version,
+dnl   - no, in no version,
+dnl   - not in the given version, but in a later version of macOS.
+dnl
+dnl In detail, this works as follows:
+dnl If func was added to, say, macOS version 13, then the libc has the
+dnl symbol func always, whereas the header file <foo.h> declares func
+dnl conditionally with a special availability attribute:
+dnl   ... func (...) __attribute__((availability(macos,introduced=13.0)));
+dnl Thus, when compiling with "clang mmacosx-version-min=13", there is no
+dnl warning about the use of func, and the resulting binary
+dnl   - runs fine on macOS 13,
+dnl   - aborts with a dyld "Symbol not found" message on macOS 12.
+dnl Whereas, when compiling with "clang mmacosx-version-min=12", there is a
+dnl   warning: 'func' is only available on macOS 13.0 or newer
+dnl   [-Wunguarded-availability-new],
+dnl and the resulting binary
+dnl   - runs fine on macOS 13,
+dnl   - crashes with a SIGSEGV (signal 11) on macOS 12.
+dnl
+dnl This macro sets two variables:
+dnl   - gl_cv_onwards_func_<func>   to yes / no / "future OS version"
+dnl   - ac_cv_func_<func>           to yes / no / no
+dnl The first variable allows to distinguish all three cases.
+dnl The second variable is set, so that an invocation
+dnl   gl_CHECK_FUNCS_MACOS([func], [[#include <foo.h>]])
+dnl can be used as a drop-in replacement for
+dnl   AC_CHECK_FUNCS([func]).
+AC_DEFUN([gl_CHECK_FUNCS_MACOS],
+[
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  AC_REQUIRE([gl_PREPARE_CHECK_FUNCS_MACOS])
+  AC_CACHE_CHECK([for [$1]],
+    [[gl_cv_onwards_func_][$1]],
+    [gl_SILENT([
+       case "$host_os" in
+         gl_CHECK_FUNCS_CASE_FOR_MACOS([$1], [$2])
+         gl_CHECK_FUNCS_DEFAULT_CASE([$1])
+       esac
+      ])
+    ])
+  gl_CHECK_FUNCS_SET_RESULTS([$1])
+])
+
+dnl gl_CHECK_FUNCS_ANDROID_MACOS([func], [[#include <foo.h>]])
+dnl is like AC_CHECK_FUNCS([func]), taking into account a portability problem
+dnl on Android and on macOS.
+dnl It is the combination of gl_CHECK_FUNCS_ANDROID and gl_CHECK_FUNCS_MACOS.
+AC_DEFUN([gl_CHECK_FUNCS_ANDROID_MACOS],
+[
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  AC_REQUIRE([gl_PREPARE_CHECK_FUNCS_MACOS])
+  AC_CACHE_CHECK([for [$1]],
+    [[gl_cv_onwards_func_][$1]],
+    [gl_SILENT([
+       case "$host_os" in
+         gl_CHECK_FUNCS_CASE_FOR_ANDROID([$1], [$2])
+         gl_CHECK_FUNCS_CASE_FOR_MACOS([$1], [$2])
+         gl_CHECK_FUNCS_DEFAULT_CASE([$1])
+       esac
+      ])
+    ])
+  gl_CHECK_FUNCS_SET_RESULTS([$1])
+])
+
 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 273f5275..7d46e610 100644
--- a/m4/gnulib-comp.m4
+++ b/m4/gnulib-comp.m4
@@ -1,5 +1,5 @@
 # DO NOT EDIT! GENERATED AUTOMATICALLY!
-# Copyright (C) 2002-2022 Free Software Foundation, Inc.
+# Copyright (C) 2002-2023 Free Software Foundation, Inc.
 #
 # This file is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -45,6 +45,8 @@ AC_DEFUN([gl_EARLY],
   # Code from module absolute-header:
   # Code from module accept:
   # Code from module accept-tests:
+  # Code from module alignasof:
+  # Code from module alignasof-tests:
   # Code from module alignof:
   # Code from module alignof-tests:
   # Code from module alloca:
@@ -56,6 +58,8 @@ AC_DEFUN([gl_EARLY],
   # Code from module arpa_inet:
   # Code from module arpa_inet-tests:
   # Code from module assert:
+  # Code from module assert-h:
+  # Code from module assert-h-tests:
   # Code from module assure:
   # Code from module at-internal:
   # Code from module attribute:
@@ -76,6 +80,8 @@ AC_DEFUN([gl_EARLY],
   # Code from module c-strcase:
   # Code from module c-strcase-tests:
   # Code from module c-strcaseeq:
+  # Code from module c-strcasestr:
+  # Code from module c-strcasestr-tests:
   # Code from module c99:
   # Code from module calloc-gnu:
   # Code from module calloc-gnu-tests:
@@ -111,13 +117,13 @@ AC_DEFUN([gl_EARLY],
   # Code from module dup-tests:
   # Code from module dup2:
   # Code from module dup2-tests:
-  # Code from module dynarray:
-  # Code from module dynarray-tests:
   # Code from module environ:
   # Code from module environ-tests:
   # Code from module errno:
   # Code from module errno-tests:
   # Code from module error:
+  # Code from module error-h:
+  # Code from module error-tests:
   # Code from module exclude:
   # Code from module exclude-tests:
   # Code from module exitfail:
@@ -186,6 +192,8 @@ AC_DEFUN([gl_EARLY],
   # Code from module gettimeofday-tests:
   # Code from module git-version-gen:
   # Code from module gitlog-to-changelog:
+  # Code from module glibc-internal/dynarray:
+  # Code from module glibc-internal/dynarray-tests:
   # Code from module gnu-web-doc-update:
   # Code from module gnumakefile:
   # Code from module gnupload:
@@ -235,7 +243,7 @@ AC_DEFUN([gl_EARLY],
   # Code from module langinfo-tests:
   # Code from module largefile:
   AC_REQUIRE([AC_SYS_LARGEFILE])
-  AC_REQUIRE([gl_YEAR2038_EARLY])
+  # Code from module largefile-tests:
   # Code from module libc-config:
   # Code from module limits-h:
   # Code from module limits-h-tests:
@@ -264,6 +272,7 @@ AC_DEFUN([gl_EARLY],
   # Code from module mbchar:
   # Code from module mbiter:
   # Code from module mbrlen:
+  # Code from module mbrlen-tests:
   # Code from module mbrtowc:
   # Code from module mbscasecmp:
   # Code from module mbscasecmp-tests:
@@ -383,8 +392,6 @@ AC_DEFUN([gl_EARLY],
   # Code from module stat-time:
   # Code from module stat-time-tests:
   # Code from module std-gnu11:
-  # Code from module stdalign:
-  # Code from module stdalign-tests:
   # Code from module stdarg:
   dnl Some compilers (e.g., AIX 5.3 cc) need to be in c99 mode
   dnl for the builtin va_copy to work.  gl_PROG_CC_C99 arranges for this.
@@ -392,11 +399,14 @@ AC_DEFUN([gl_EARLY],
   # Code from module stdarg-tests:
   # Code from module stdbool:
   # Code from module stdbool-tests:
+  # Code from module stdckdint:
+  # Code from module stdckdint-tests:
   # Code from module stddef:
   # Code from module stddef-tests:
   # Code from module stdint:
   # Code from module stdint-tests:
   # Code from module stdio:
+  gl_STDIO_H_EARLY
   # Code from module stdio-tests:
   # Code from module stdlib:
   # Code from module stdlib-tests:
@@ -450,8 +460,11 @@ AC_DEFUN([gl_EARLY],
   # Code from module threadlib:
   gl_THREADLIB_EARLY
   # Code from module time:
+  # Code from module time-h:
+  # Code from module time-h-tests:
   # Code from module time-tests:
   # Code from module trim:
+  # Code from module trim-tests:
   # Code from module unistd:
   # Code from module unistd-safer:
   # Code from module unistd-safer-tests:
@@ -514,6 +527,9 @@ AC_DEFUN([gl_EARLY],
   # Code from module xstrtol:
   # Code from module xstrtol-error:
   # Code from module xstrtol-tests:
+  # Code from module year2038:
+  AC_REQUIRE([AC_SYS_YEAR2038])
+  # Code from module year2038-tests:
 ])
 
 # This macro should be invoked from ./configure.ac, in the section
@@ -536,10 +552,14 @@ AC_DEFUN([gl_INIT],
   gl_COMMON
   gl_source_base='lib'
   gl_source_base_prefix=
+  gl_ALIGNASOF
   gl_FUNC_ALLOCA
   gl_CONDITIONAL_HEADER([alloca.h])
   AC_PROG_MKDIR_P
   gl_ASSERT
+  gl_ASSERT_H
+  gl_CONDITIONAL_HEADER([assert.h])
+  AC_PROG_MKDIR_P
   AC_REQUIRE([AC_CANONICAL_HOST])
   gl_FUNC_BTOWC
   gl_CONDITIONAL([GL_COND_OBJ_BTOWC],
@@ -576,7 +596,7 @@ AC_DEFUN([gl_INIT],
   gl_CONDITIONAL([GL_COND_OBJ_CLOSEDIR],
                  [test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1])
   gl_DIRENT_MODULE_INDICATOR([closedir])
-  gl_CONFIGMAKE_PREP
+  gl_CONFIGMAKE
   AC_PROG_MKDIR_P
   gl_CTYPE_H
   gl_CTYPE_H_REQUIRE_DEFAULTS
@@ -590,7 +610,7 @@ AC_DEFUN([gl_INIT],
   AC_PROG_MKDIR_P
   gl_FUNC_DIRFD
   gl_CONDITIONAL([GL_COND_OBJ_DIRFD],
-                 [test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no || test $REPLACE_DIRFD = 1])
+                 [test $HAVE_DIRFD = 0 || test $REPLACE_DIRFD = 1])
   AM_COND_IF([GL_COND_OBJ_DIRFD], [
     gl_PREREQ_DIRFD
   ])
@@ -608,18 +628,21 @@ AC_DEFUN([gl_INIT],
     gl_PREREQ_DUP2
   ])
   gl_UNISTD_MODULE_INDICATOR([dup2])
-  AC_PROG_MKDIR_P
   gl_HEADER_ERRNO_H
   gl_CONDITIONAL_HEADER([errno.h])
   AC_PROG_MKDIR_P
+  AC_REQUIRE([gl_ERROR_H])
   gl_ERROR
-  gl_CONDITIONAL([GL_COND_OBJ_ERROR], [test "$ac_cv_lib_error_at_line" = no])
+  gl_CONDITIONAL([GL_COND_OBJ_ERROR], [test $GL_GENERATE_ERROR_H = true])
   AM_COND_IF([GL_COND_OBJ_ERROR], [
     gl_PREREQ_ERROR
   ])
   m4_ifdef([AM_XGETTEXT_OPTION],
     [AM_][XGETTEXT_OPTION([--flag=error:3:c-format])
      AM_][XGETTEXT_OPTION([--flag=error_at_line:5:c-format])])
+  gl_ERROR_H
+  gl_CONDITIONAL_HEADER([error.h])
+  AC_PROG_MKDIR_P
   AC_REQUIRE([gl_EXTERN_INLINE])
   gl_FUNC_FCHDIR
   gl_CONDITIONAL([GL_COND_OBJ_FCHDIR], [test $HAVE_FCHDIR = 0])
@@ -725,8 +748,15 @@ AC_DEFUN([gl_INIT],
   gl_CONDITIONAL([GL_COND_OBJ_GETPAGESIZE], [test $REPLACE_GETPAGESIZE = 1])
   gl_UNISTD_MODULE_INDICATOR([getpagesize])
   gl_FUNC_GETPROGNAME
+  gl_CONDITIONAL([GL_COND_OBJ_GETPROGNAME],
+                 [test $HAVE_GETPROGNAME = 0 || test $REPLACE_GETPROGNAME = 1])
+  AM_COND_IF([GL_COND_OBJ_GETPROGNAME], [
+    gl_PREREQ_GETPROGNAME
+  ])
+  gl_STDLIB_MODULE_INDICATOR([getprogname])
   AC_SUBST([LIBINTL])
   AC_SUBST([LTLIBINTL])
+  AC_PROG_MKDIR_P
   # Autoconf 2.61a.99 and earlier don't support linking a file only
   # in VPATH builds.  But since GNUmakefile is for maintainer use
   # only, it does not matter if we skip the link with older autoconf.
@@ -738,7 +768,10 @@ AC_DEFUN([gl_INIT],
         [AC_CONFIG_LINKS([$GNUmakefile:$GNUmakefile], [],
           [GNUmakefile=$GNUmakefile])])
   AC_REQUIRE([gl_FUNC_SETLOCALE_NULL])
-  LIB_HARD_LOCALE="$LIB_SETLOCALE_NULL"
+  HARD_LOCALE_LIB="$SETLOCALE_NULL_LIB"
+  AC_SUBST([HARD_LOCALE_LIB])
+  dnl For backward compatibility.
+  LIB_HARD_LOCALE="$HARD_LOCALE_LIB"
   AC_SUBST([LIB_HARD_LOCALE])
   AC_DEFUN([gl_HAVE_MODULE_HAVELIB])
   AC_REQUIRE([gl_HOST_CPU_C_ABI])
@@ -884,7 +917,8 @@ AC_DEFUN([gl_INIT],
   ])
   gl_STRING_MODULE_INDICATOR([memchr])
   gl_FUNC_MEMPCPY
-  gl_CONDITIONAL([GL_COND_OBJ_MEMPCPY], [test $HAVE_MEMPCPY = 0])
+  gl_CONDITIONAL([GL_COND_OBJ_MEMPCPY],
+                 [test $HAVE_MEMPCPY = 0 || test $REPLACE_MEMPCPY = 1])
   AM_COND_IF([GL_COND_OBJ_MEMPCPY], [
     gl_PREREQ_MEMPCPY
   ])
@@ -965,7 +999,8 @@ AC_DEFUN([gl_INIT],
   ])
   gl_UNISTD_MODULE_INDICATOR([read])
   gl_FUNC_READDIR
-  gl_CONDITIONAL([GL_COND_OBJ_READDIR], [test $HAVE_READDIR = 0])
+  gl_CONDITIONAL([GL_COND_OBJ_READDIR],
+                 [test $HAVE_READDIR = 0 || test $REPLACE_READDIR = 1])
   gl_DIRENT_MODULE_INDICATOR([readdir])
   gl_FUNC_REALLOC_GNU
   if test $REPLACE_REALLOC_FOR_REALLOC_GNU = 1; then
@@ -1047,14 +1082,17 @@ AC_DEFUN([gl_INIT],
   gl_SYS_STAT_MODULE_INDICATOR([stat])
   gl_STAT_TIME
   gl_STAT_BIRTHTIME
-  gl_STDALIGN_H
-  gl_CONDITIONAL_HEADER([stdalign.h])
-  AC_PROG_MKDIR_P
   gl_STDARG_H
   gl_CONDITIONAL_HEADER([stdarg.h])
   AC_PROG_MKDIR_P
-  gl_STDBOOL_H
-  gl_CONDITIONAL_HEADER([stdbool.h])
+  gl_C_BOOL
+  AC_CHECK_HEADERS_ONCE([stdckdint.h])
+  if test $ac_cv_header_stdckdint_h = yes; then
+    GL_GENERATE_STDCKDINT_H=false
+  else
+    GL_GENERATE_STDCKDINT_H=true
+  fi
+  gl_CONDITIONAL_HEADER([stdckdint.h])
   AC_PROG_MKDIR_P
   gl_STDDEF_H
   gl_STDDEF_H_REQUIRE_DEFAULTS
@@ -1097,7 +1135,8 @@ AC_DEFUN([gl_INIT],
   gl_STDLIB_H_REQUIRE_DEFAULTS
   AC_PROG_MKDIR_P
   gl_FUNC_STPCPY
-  gl_CONDITIONAL([GL_COND_OBJ_STPCPY], [test $HAVE_STPCPY = 0])
+  gl_CONDITIONAL([GL_COND_OBJ_STPCPY],
+                 [test $HAVE_STPCPY = 0 || test $REPLACE_STPCPY = 1])
   AM_COND_IF([GL_COND_OBJ_STPCPY], [
     gl_PREREQ_STPCPY
   ])
@@ -1209,7 +1248,7 @@ AC_DEFUN([gl_INIT],
   ])
   gl_LIBUNISTRING_LIBHEADER([0.9.11], [uniwidth.h])
   AC_PROG_MKDIR_P
-  gl_LIBUNISTRING_MODULE([0.9.11], [uniwidth/width])
+  gl_LIBUNISTRING_MODULE([1.1], [uniwidth/width])
   AC_DEFINE([GNULIB_STDIO_SINGLE_THREAD], [1],
     [Define to 1 if you want the FILE stream functions getc, putc, etc.
      to use unlocked I/O if available, throughout the package.
@@ -1278,7 +1317,8 @@ AC_DEFUN([gl_INIT],
   gl_CONDITIONAL([GL_COND_OBJ_WMEMCHR], [test $HAVE_WMEMCHR = 0])
   gl_WCHAR_MODULE_INDICATOR([wmemchr])
   gl_FUNC_WMEMPCPY
-  gl_CONDITIONAL([GL_COND_OBJ_WMEMPCPY], [test $HAVE_WMEMPCPY = 0])
+  gl_CONDITIONAL([GL_COND_OBJ_WMEMPCPY],
+                 [test $HAVE_WMEMPCPY = 0 || test $REPLACE_WMEMPCPY = 1])
   gl_WCHAR_MODULE_INDICATOR([wmempcpy])
   gl_XALLOC
   gl_MODULE_INDICATOR([xalloc])
@@ -1394,7 +1434,7 @@ changequote([, ])dnl
   gl_SYS_TIME_MODULE_INDICATOR([gettimeofday])
   gl_MUSL_LIBC
   dnl Distinguish OpenBSD >= 6.2 from OpenBSD < 6.2.
-  AC_CHECK_FUNCS_ONCE([duplocale])
+  gl_CHECK_FUNCS_ANDROID([duplocale], [[#include <locale.h>]])
   gl_FUNC_INET_PTON
   gl_CONDITIONAL([GL_COND_OBJ_INET_PTON],
                  [test $HAVE_INET_PTON = 0 || test $REPLACE_INET_PTON = 1])
@@ -1419,10 +1459,14 @@ changequote([, ])dnl
   AC_REQUIRE([gl_SYS_SOCKET_H])
   gl_CONDITIONAL([GL_COND_OBJ_LISTEN], [test "$ac_cv_header_winsock2_h" = yes])
   gl_SYS_SOCKET_MODULE_INDICATOR([listen])
-  AC_CHECK_FUNCS_ONCE([newlocale])
+  gl_CHECK_FUNCS_ANDROID([newlocale], [[#include <locale.h>]])
   gl_LOCALENAME
   gl_LOCALE_MODULE_INDICATOR([localename])
-  AC_CHECK_FUNCS_ONCE([newlocale])
+  gl_CHECK_FUNCS_ANDROID([newlocale], [[#include <locale.h>]])
+  gt_LOCALE_FR
+  gt_LOCALE_FR_UTF8
+  gt_LOCALE_JA
+  gt_LOCALE_ZH_CN
   gt_LOCALE_TR_UTF8
   gt_LOCALE_FR_UTF8
   gt_LOCALE_FR
@@ -1451,6 +1495,7 @@ changequote([, ])dnl
   AC_PROG_MKDIR_P
   gt_LOCALE_FR
   gt_LOCALE_FR_UTF8
+  gt_FUNC_USELOCALE
   gl_FUNC_PERROR
   gl_CONDITIONAL([GL_COND_OBJ_PERROR], [test $REPLACE_PERROR = 1])
   gl_STRING_MODULE_INDICATOR([perror])
@@ -1547,6 +1592,7 @@ changequote([, ])dnl
   gl_TYPE_SOCKLEN_T
   AC_REQUIRE([gt_TYPE_WCHAR_T])
   AC_REQUIRE([gt_TYPE_WINT_T])
+  gl_DOUBLE_EXPONENT_LOCATION
   gl_FUNC_STRERROR_R
   AS_IF([test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1], [
     AC_LIBOBJ([strerror_r])
@@ -1585,6 +1631,12 @@ changequote([, ])dnl
   AC_PROG_MKDIR_P
   gl_THREAD
   AC_CHECK_HEADERS([sys/single_threaded.h])
+  gl_FUNC_TIME
+  gl_CONDITIONAL([GL_COND_OBJ_TIME], [test $REPLACE_TIME = 1])
+  AM_COND_IF([GL_COND_OBJ_TIME], [
+    gl_PREREQ_TIME
+  ])
+  gl_TIME_MODULE_INDICATOR([time])
   gl_FUNC_UNSETENV
   gl_CONDITIONAL([GL_COND_OBJ_UNSETENV],
                  [test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1])
@@ -1737,6 +1789,7 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/arg-nonnull.h
   lib/argmatch.c
   lib/argmatch.h
+  lib/assert.in.h
   lib/assure.h
   lib/at-func.c
   lib/attribute.h
@@ -1787,7 +1840,7 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/dynarray.h
   lib/errno.in.h
   lib/error.c
-  lib/error.h
+  lib/error.in.h
   lib/exclude.c
   lib/exclude.h
   lib/exitfail.c
@@ -1856,6 +1909,7 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/iconv_open.c
   lib/idx.h
   lib/ignore-value.h
+  lib/intprops-internal.h
   lib/intprops.h
   lib/inttypes.in.h
   lib/isatty.c
@@ -1973,9 +2027,8 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/stat-w32.c
   lib/stat-w32.h
   lib/stat.c
-  lib/stdalign.in.h
   lib/stdarg.in.h
-  lib/stdbool.in.h
+  lib/stdckdint.in.h
   lib/stddef.in.h
   lib/stdint.in.h
   lib/stdio-impl.h
@@ -2071,8 +2124,11 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/arpa_inet_h.m4
   m4/asm-underscore.m4
   m4/assert.m4
+  m4/assert_h.m4
   m4/btowc.m4
+  m4/build-to-host.m4
   m4/builtin-expect.m4
+  m4/c-bool.m4
   m4/c-stack.m4
   m4/calloc.m4
   m4/chdir-long.m4
@@ -2093,16 +2149,19 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/environ.m4
   m4/errno_h.m4
   m4/error.m4
+  m4/error_h.m4
   m4/exponentd.m4
   m4/extensions.m4
   m4/extern-inline.m4
   m4/fchdir.m4
+  m4/fclose.m4
   m4/fcntl-o.m4
   m4/fcntl-safer.m4
   m4/fcntl.m4
   m4/fcntl_h.m4
   m4/fdopen.m4
   m4/fdopendir.m4
+  m4/fflush.m4
   m4/filenamecat.m4
   m4/flexmember.m4
   m4/float_h.m4
@@ -2244,7 +2303,6 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/std-gnu11.m4
   m4/stdalign.m4
   m4/stdarg.m4
-  m4/stdbool.m4
   m4/stddef_h.m4
   m4/stdint.m4
   m4/stdint_h.m4
@@ -2271,6 +2329,7 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/sys_uio_h.m4
   m4/thread.m4
   m4/threadlib.m4
+  m4/time.m4
   m4/time_h.m4
   m4/unistd-safer.m4
   m4/unistd_h.m4
@@ -2295,20 +2354,22 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/xalloc.m4
   m4/xsize.m4
   m4/xstrtol.m4
-  m4/year2038.m4
   m4/zzgnulib.m4
   tests/altstack-util.h
   tests/init.sh
   tests/locale.c
   tests/macros.h
   tests/mmap-anon-util.h
+  tests/nan.h
   tests/nap.h
   tests/signature.h
   tests/test-accept.c
+  tests/test-alignasof.c
   tests/test-alignof.c
   tests/test-alloca-opt.c
   tests/test-argmatch.c
   tests/test-arpa_inet.c
+  tests/test-assert.c
   tests/test-binary-io.c
   tests/test-binary-io.sh
   tests/test-bind.c
@@ -2316,12 +2377,14 @@ AC_DEFUN([gl_FILE_LIST], [
   tests/test-btowc.c
   tests/test-btowc1.sh
   tests/test-btowc2.sh
+  tests/test-btowc3.sh
   tests/test-c-ctype.c
   tests/test-c-stack.c
   tests/test-c-stack.sh
   tests/test-c-stack2.sh
   tests/test-c-strcase.sh
   tests/test-c-strcasecmp.c
+  tests/test-c-strcasestr.c
   tests/test-c-strncasecmp.c
   tests/test-calloc-gnu.c
   tests/test-chdir.c
@@ -2340,6 +2403,8 @@ AC_DEFUN([gl_FILE_LIST], [
   tests/test-dynarray.c
   tests/test-environ.c
   tests/test-errno.c
+  tests/test-error.c
+  tests/test-error.sh
   tests/test-exclude.c
   tests/test-exclude1.sh
   tests/test-exclude2.sh
@@ -2401,6 +2466,7 @@ AC_DEFUN([gl_FILE_LIST], [
   tests/test-iswxdigit.c
   tests/test-iswxdigit.sh
   tests/test-langinfo.c
+  tests/test-largefile.c
   tests/test-limits-h.c
   tests/test-listen.c
   tests/test-localcharset.c
@@ -2413,6 +2479,20 @@ AC_DEFUN([gl_FILE_LIST], [
   tests/test-lstat.h
   tests/test-malloc-gnu.c
   tests/test-malloca.c
+  tests/test-mbrlen-w32-1.sh
+  tests/test-mbrlen-w32-2.sh
+  tests/test-mbrlen-w32-3.sh
+  tests/test-mbrlen-w32-4.sh
+  tests/test-mbrlen-w32-5.sh
+  tests/test-mbrlen-w32-6.sh
+  tests/test-mbrlen-w32-7.sh
+  tests/test-mbrlen-w32.c
+  tests/test-mbrlen.c
+  tests/test-mbrlen1.sh
+  tests/test-mbrlen2.sh
+  tests/test-mbrlen3.sh
+  tests/test-mbrlen4.sh
+  tests/test-mbrlen5.sh
   tests/test-mbscasecmp.c
   tests/test-mbscasecmp.sh
   tests/test-mbsinit.c
@@ -2422,6 +2502,7 @@ AC_DEFUN([gl_FILE_LIST], [
   tests/test-mbsrtowcs2.sh
   tests/test-mbsrtowcs3.sh
   tests/test-mbsrtowcs4.sh
+  tests/test-mbsrtowcs5.sh
   tests/test-mbsstr1.c
   tests/test-mbsstr2.c
   tests/test-mbsstr2.sh
@@ -2433,8 +2514,10 @@ AC_DEFUN([gl_FILE_LIST], [
   tests/test-nanosleep.c
   tests/test-netinet_in.c
   tests/test-nl_langinfo-mt.c
-  tests/test-nl_langinfo.c
-  tests/test-nl_langinfo.sh
+  tests/test-nl_langinfo1.c
+  tests/test-nl_langinfo1.sh
+  tests/test-nl_langinfo2.c
+  tests/test-nl_langinfo2.sh
   tests/test-open.c
   tests/test-open.h
   tests/test-openat-safer.c
@@ -2485,8 +2568,8 @@ AC_DEFUN([gl_FILE_LIST], [
   tests/test-stat-time.c
   tests/test-stat.c
   tests/test-stat.h
-  tests/test-stdalign.c
   tests/test-stdbool.c
+  tests/test-stdckdint.c
   tests/test-stddef.c
   tests/test-stdint.c
   tests/test-stdio.c
@@ -2513,7 +2596,12 @@ AC_DEFUN([gl_FILE_LIST], [
   tests/test-sys_wait.h
   tests/test-thread_create.c
   tests/test-thread_self.c
+  tests/test-time-h.c
   tests/test-time.c
+  tests/test-trim.c
+  tests/test-trim1.sh
+  tests/test-trim2.sh
+  tests/test-trim3.sh
   tests/test-unistd.c
   tests/test-unsetenv.c
   tests/test-vasnprintf.c
@@ -2544,6 +2632,7 @@ AC_DEFUN([gl_FILE_LIST], [
   tests/test-xstrtol.c
   tests/test-xstrtol.sh
   tests/test-xstrtoul.c
+  tests/test-year2038.c
   tests/unistr/test-u8-mbtoucr.c
   tests/unistr/test-u8-uctomb.c
   tests/uniwidth/test-uc_width.c
@@ -2559,6 +2648,8 @@ AC_DEFUN([gl_FILE_LIST], [
   tests=lib/asnprintf.c
   tests=lib/bind.c
   tests=lib/c++defs.h
+  tests=lib/c-strcasestr.c
+  tests=lib/c-strcasestr.h
   tests=lib/connect.c
   tests=lib/fdopen.c
   tests=lib/float+.h
@@ -2607,6 +2698,7 @@ AC_DEFUN([gl_FILE_LIST], [
   tests=lib/socket.c
   tests=lib/sockets.c
   tests=lib/sockets.h
+  tests=lib/str-two-way.h
   tests=lib/strerror_r.c
   tests=lib/symlink.c
   tests=lib/sys_ioctl.in.h
@@ -2616,6 +2708,7 @@ AC_DEFUN([gl_FILE_LIST], [
   tests=lib/sys_time.in.h
   tests=lib/sys_uio.in.h
   tests=lib/thread-optim.h
+  tests=lib/time.c
   tests=lib/uinttostr.c
   tests=lib/umaxtostr.c
   tests=lib/unsetenv.c
diff --git a/m4/host-cpu-c-abi.m4 b/m4/host-cpu-c-abi.m4
index b9223241..134f2283 100644
--- a/m4/host-cpu-c-abi.m4
+++ b/m4/host-cpu-c-abi.m4
@@ -1,5 +1,5 @@
 # host-cpu-c-abi.m4 serial 15
-dnl Copyright (C) 2002-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/i-ring.m4 b/m4/i-ring.m4
index 404e84f2..b1c68999 100644
--- a/m4/i-ring.m4
+++ b/m4/i-ring.m4
@@ -1,5 +1,5 @@
 # serial 2
-dnl Copyright (C) 2006, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2009-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/iconv.m4 b/m4/iconv.m4
index 2065c977..ff5d5261 100644
--- a/m4/iconv.m4
+++ b/m4/iconv.m4
@@ -1,5 +1,5 @@
 # iconv.m4 serial 26
-dnl Copyright (C) 2000-2002, 2007-2014, 2016-2022 Free Software Foundation,
+dnl Copyright (C) 2000-2002, 2007-2014, 2016-2023 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
diff --git a/m4/iconv_h.m4 b/m4/iconv_h.m4
index 58465662..40c985ee 100644
--- a/m4/iconv_h.m4
+++ b/m4/iconv_h.m4
@@ -1,5 +1,5 @@
 # iconv_h.m4 serial 16
-dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/iconv_open.m4 b/m4/iconv_open.m4
index 1ed26cd8..8a27709f 100644
--- a/m4/iconv_open.m4
+++ b/m4/iconv_open.m4
@@ -1,5 +1,5 @@
 # iconv_open.m4 serial 16
-dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/include_next.m4 b/m4/include_next.m4
index a9247f6f..9f19215e 100644
--- a/m4/include_next.m4
+++ b/m4/include_next.m4
@@ -1,5 +1,5 @@
 # include_next.m4 serial 26
-dnl Copyright (C) 2006-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/inet_pton.m4 b/m4/inet_pton.m4
index 9507296d..94695c12 100644
--- a/m4/inet_pton.m4
+++ b/m4/inet_pton.m4
@@ -1,5 +1,5 @@
 # inet_pton.m4 serial 19
-dnl Copyright (C) 2006, 2008-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2008-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/inline.m4 b/m4/inline.m4
index 3f072655..dbbb8116 100644
--- a/m4/inline.m4
+++ b/m4/inline.m4
@@ -1,5 +1,5 @@
 # inline.m4 serial 4
-dnl Copyright (C) 2006, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2009-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/intl-thread-locale.m4 b/m4/intl-thread-locale.m4
index d5d5b26a..90bc3b1a 100644
--- a/m4/intl-thread-locale.m4
+++ b/m4/intl-thread-locale.m4
@@ -1,5 +1,5 @@
-# intl-thread-locale.m4 serial 9
-dnl Copyright (C) 2015-2022 Free Software Foundation, Inc.
+# intl-thread-locale.m4 serial 10
+dnl Copyright (C) 2015-2023 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.
@@ -171,7 +171,7 @@ AC_DEFUN([gt_FUNC_USELOCALE],
   dnl Persuade glibc and Solaris <locale.h> to define 'locale_t'.
   AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
 
-  AC_CHECK_FUNCS_ONCE([uselocale])
+  gl_CHECK_FUNCS_ANDROID([uselocale], [[#include <locale.h>]])
 
   dnl On AIX 7.2, the uselocale() function is not documented and leads to
   dnl crashes in subsequent setlocale() invocations.
diff --git a/m4/intlmacosx.m4 b/m4/intlmacosx.m4
index ecc88d6e..81eefd75 100644
--- a/m4/intlmacosx.m4
+++ b/m4/intlmacosx.m4
@@ -1,5 +1,5 @@
 # intlmacosx.m4 serial 8 (gettext-0.20.2)
-dnl Copyright (C) 2004-2014, 2016, 2019-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2004-2014, 2016, 2019-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/intmax_t.m4 b/m4/intmax_t.m4
index 8a15dabd..ef32e1b9 100644
--- a/m4/intmax_t.m4
+++ b/m4/intmax_t.m4
@@ -1,5 +1,5 @@
 # intmax_t.m4 serial 9
-dnl Copyright (C) 1997-2004, 2006-2007, 2009-2022 Free Software Foundation,
+dnl Copyright (C) 1997-2004, 2006-2007, 2009-2023 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
diff --git a/m4/inttostr.m4 b/m4/inttostr.m4
index 92784d14..0297ddd5 100644
--- a/m4/inttostr.m4
+++ b/m4/inttostr.m4
@@ -1,5 +1,5 @@
 #serial 8
-dnl Copyright (C) 2004-2006, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2004-2006, 2009-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/inttypes.m4 b/m4/inttypes.m4
index df25a21e..e7efbe94 100644
--- a/m4/inttypes.m4
+++ b/m4/inttypes.m4
@@ -1,5 +1,5 @@
-# inttypes.m4 serial 36
-dnl Copyright (C) 2006-2022 Free Software Foundation, Inc.
+# inttypes.m4 serial 37
+dnl Copyright (C) 2006-2023 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.
@@ -170,6 +170,10 @@ AC_DEFUN([gl_INTTYPES_H_DEFAULTS],
   HAVE_DECL_STRTOIMAX=1; AC_SUBST([HAVE_DECL_STRTOIMAX])
   HAVE_DECL_STRTOUMAX=1; AC_SUBST([HAVE_DECL_STRTOUMAX])
   HAVE_IMAXDIV_T=1;      AC_SUBST([HAVE_IMAXDIV_T])
+  HAVE_IMAXABS=1;        AC_SUBST([HAVE_IMAXABS])
+  HAVE_IMAXDIV=1;        AC_SUBST([HAVE_IMAXDIV])
+  REPLACE_IMAXABS=0;     AC_SUBST([REPLACE_IMAXABS])
+  REPLACE_IMAXDIV=0;     AC_SUBST([REPLACE_IMAXDIV])
   REPLACE_STRTOIMAX=0;   AC_SUBST([REPLACE_STRTOIMAX])
   REPLACE_STRTOUMAX=0;   AC_SUBST([REPLACE_STRTOUMAX])
   INT32_MAX_LT_INTMAX_MAX=1;  AC_SUBST([INT32_MAX_LT_INTMAX_MAX])
diff --git a/m4/inttypes_h.m4 b/m4/inttypes_h.m4
index 6e9eebf1..68c60e9d 100644
--- a/m4/inttypes_h.m4
+++ b/m4/inttypes_h.m4
@@ -1,5 +1,5 @@
 # inttypes_h.m4 serial 10
-dnl Copyright (C) 1997-2004, 2006, 2008-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 1997-2004, 2006, 2008-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/ioctl.m4 b/m4/ioctl.m4
index 7c721345..83036c3a 100644
--- a/m4/ioctl.m4
+++ b/m4/ioctl.m4
@@ -1,5 +1,5 @@
 # ioctl.m4 serial 6
-dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/isatty.m4 b/m4/isatty.m4
index 55ba760c..c073ca4f 100644
--- a/m4/isatty.m4
+++ b/m4/isatty.m4
@@ -1,5 +1,5 @@
 # isatty.m4 serial 3
-dnl Copyright (C) 2012-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2012-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/isblank.m4 b/m4/isblank.m4
index 1d0ed6ce..809eab46 100644
--- a/m4/isblank.m4
+++ b/m4/isblank.m4
@@ -1,5 +1,5 @@
 # isblank.m4 serial 3
-dnl Copyright (C) 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/iswblank.m4 b/m4/iswblank.m4
index ddecf9b8..b1220b1e 100644
--- a/m4/iswblank.m4
+++ b/m4/iswblank.m4
@@ -1,5 +1,5 @@
-# iswblank.m4 serial 5
-dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
+# iswblank.m4 serial 7
+dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -10,14 +10,18 @@ AC_DEFUN([gl_FUNC_ISWBLANK],
   AC_REQUIRE([gl_WCTYPE_H])
   dnl Persuade glibc <wctype.h> to declare iswblank().
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
-  AC_CHECK_FUNCS_ONCE([iswblank])
+  gl_CHECK_FUNCS_ANDROID([iswblank], [[#include <wctype.h>]])
   AC_CHECK_DECLS([iswblank], , , [[
     #include <wchar.h>
     #include <wctype.h>
   ]])
   if test $ac_cv_func_iswblank = no; then
     HAVE_ISWBLANK=0
-    if test $ac_cv_have_decl_iswblank = yes; then
+    if test $ac_cv_have_decl_iswblank = yes \
+       || case "$gl_cv_onwards_func_iswblank" in \
+            future*) true ;; \
+            *) false ;; \
+          esac; then
       REPLACE_ISWBLANK=1
     fi
   fi
diff --git a/m4/iswdigit.m4 b/m4/iswdigit.m4
index 643c5b29..0df7b303 100644
--- a/m4/iswdigit.m4
+++ b/m4/iswdigit.m4
@@ -1,5 +1,5 @@
 # iswdigit.m4 serial 3
-dnl Copyright (C) 2020-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2020-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/iswxdigit.m4 b/m4/iswxdigit.m4
index cc7c1a24..3f952f0b 100644
--- a/m4/iswxdigit.m4
+++ b/m4/iswxdigit.m4
@@ -1,5 +1,5 @@
 # iswxdigit.m4 serial 3
-dnl Copyright (C) 2020-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2020-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/langinfo_h.m4 b/m4/langinfo_h.m4
index 563c8c43..b17a526a 100644
--- a/m4/langinfo_h.m4
+++ b/m4/langinfo_h.m4
@@ -1,5 +1,5 @@
 # langinfo_h.m4 serial 12
-dnl Copyright (C) 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/largefile.m4 b/m4/largefile.m4
index 3e8b5e39..8d4bb7c2 100644
--- a/m4/largefile.m4
+++ b/m4/largefile.m4
@@ -1,7 +1,7 @@
 # Enable large files on systems where this is not the default.
 # Enable support for files on Linux file systems with 64-bit inode numbers.
 
-# Copyright 1992-1996, 1998-2022 Free Software Foundation, Inc.
+# Copyright 1992-1996, 1998-2023 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -10,8 +10,9 @@
 # It does not set _LARGEFILE_SOURCE=1 on HP-UX/ia64 32-bit, although this
 # setting of _LARGEFILE_SOURCE is needed so that <stdio.h> declares fseeko
 # and ftello in C++ mode as well.
+# This problem occurs in Autoconf 2.71 and earlier, which lack AC_SYS_YEAR2038.
 AC_DEFUN([gl_SET_LARGEFILE_SOURCE],
-[
+ m4_ifndef([AC_SYS_YEAR2038], [[
   AC_REQUIRE([AC_CANONICAL_HOST])
   AC_FUNC_FSEEKO
   case "$host_os" in
@@ -20,56 +21,254 @@ AC_DEFUN([gl_SET_LARGEFILE_SOURCE],
         [Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2).])
       ;;
   esac
+ ]])
+)
+
+m4_ifndef([AC_SYS_YEAR2038_RECOMMENDED], [
+# Support AC_SYS_YEAR2038_RECOMMENDED and related macros, even if
+# Autoconf 2.71 or earlier.  This code is taken from Autoconf master.
+
+# _AC_SYS_YEAR2038_TEST_CODE
+# --------------------------
+# C code used to probe for time_t that can represent time points more
+# than 2**31 - 1 seconds after the epoch.  With the usual Unix epoch,
+# these correspond to dates after 2038-01-18 22:14:07 +0000 (Gregorian),
+# hence the name.
+AC_DEFUN([_AC_SYS_YEAR2038_TEST_CODE],
+[[
+  #include <time.h>
+  /* 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];
+]])
+
+# _AC_SYS_YEAR2038_OPTIONS
+# ------------------------
+# List of known ways to enable support for large time_t.  If you change
+# this list you probably also need to change the AS_CASE at the end of
+# _AC_SYS_YEAR2038_PROBE.
+m4_define([_AC_SYS_YEAR2038_OPTIONS], m4_normalize(
+    ["none needed"]                   dnl 64-bit and newer 32-bit Unix
+    ["-D_TIME_BITS=64"]               dnl glibc 2.34 with some 32-bit ABIs
+    ["-D__MINGW_USE_VC2005_COMPAT"]   dnl 32-bit MinGW
+    ["-U_USE_32_BIT_TIME_T -D__MINGW_USE_VC2005_COMPAT"]
+                                      dnl 32-bit MinGW (misconfiguration)
+))
+
+# _AC_SYS_YEAR2038_PROBE
+# ----------------------
+# Subroutine of AC_SYS_YEAR2038.  Probe for time_t that can represent
+# time points more than 2**31 - 1 seconds after the epoch (dates after
+# 2038-01-18, see above) and set the cache variable ac_cv_sys_year2038_opts
+# to one of the values in the _AC_SYS_YEAR2038_OPTIONS list, or to
+# "support not detected" if none of them worked.  Then, set compilation
+# options and #defines as necessary to enable large time_t support.
+#
+# Note that we do not test whether mktime, localtime, etc. handle
+# large values of time_t correctly, as that would require use of
+# AC_TRY_RUN.  Note also that some systems only support large time_t
+# together with large off_t.
+#
+# If you change this macro you may also need to change
+# _AC_SYS_YEAR2038_OPTIONS.
+AC_DEFUN([_AC_SYS_YEAR2038_PROBE],
+[AC_CACHE_CHECK([for $CC option for timestamps after 2038],
+  [ac_cv_sys_year2038_opts],
+  [ac_save_CPPFLAGS="$CPPFLAGS"
+  ac_opt_found=no
+  for ac_opt in _AC_SYS_YEAR2038_OPTIONS; do
+    AS_IF([test x"$ac_opt" != x"none needed"],
+      [CPPFLAGS="$ac_save_CPPFLAGS $ac_opt"])
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([_AC_SYS_YEAR2038_TEST_CODE])],
+      [ac_cv_sys_year2038_opts="$ac_opt"
+      ac_opt_found=yes])
+    test $ac_opt_found = no || break
+  done
+  CPPFLAGS="$ac_save_CPPFLAGS"
+  test $ac_opt_found = yes || ac_cv_sys_year2038_opts="support not detected"])
+
+ac_have_year2038=yes
+AS_CASE([$ac_cv_sys_year2038_opts],
+  ["none needed"], [],
+  ["support not detected"],
+    [ac_have_year2038=no],
+
+  ["-D_TIME_BITS=64"],
+    [AC_DEFINE([_TIME_BITS], [64],
+      [Number of bits in time_t, on hosts where this is settable.])],
+
+  ["-D__MINGW_USE_VC2005_COMPAT"],
+    [AC_DEFINE([__MINGW_USE_VC2005_COMPAT], [1],
+      [Define to 1 on platforms where this makes time_t a 64-bit type.])],
+
+  ["-U_USE_32_BIT_TIME_T"*],
+    [AC_MSG_FAILURE(m4_text_wrap(
+      [the 'time_t' type is currently forced to be 32-bit.
+       It will stop working after mid-January 2038.
+       Remove _USE_32BIT_TIME_T from the compiler flags.],
+      [], [], [55]))],
+
+  [AC_MSG_ERROR(
+    [internal error: bad value for \$ac_cv_sys_year2038_opts])])
 ])
 
-# 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], [], [
+# _AC_SYS_YEAR2038_ENABLE
+# -----------------------
+# Depending on which of the YEAR2038 macros was used, add either an
+# --enable-year2038 or a --disable-year2038 to
+# the configure script.  This is expanded very late and
+# therefore there cannot be any code in the AC_ARG_ENABLE.  The
+# default value for 'enable_year2038' is emitted unconditionally
+# because the generated code always looks at this variable.
+m4_define([_AC_SYS_YEAR2038_ENABLE],
+[m4_divert_text([DEFAULTS],
+  m4_provide_if([AC_SYS_YEAR2038],
+    [enable_year2038=yes],
+    [enable_year2038=no]))]dnl
+[AC_ARG_ENABLE([year2038],
+  m4_provide_if([AC_SYS_YEAR2038],
+    [AS_HELP_STRING([--disable-year2038],
+      [don't support timestamps after 2038])],
+    [AS_HELP_STRING([--enable-year2038],
+      [support timestamps after 2038])]))])
 
-# _AC_SYS_LARGEFILE_TEST_INCLUDES
-# -------------------------------
-m4_define([_AC_SYS_LARGEFILE_TEST_INCLUDES],
-[#include <sys/types.h>
+# AC_SYS_YEAR2038
+# ---------------
+# Attempt to detect and activate support for large time_t.
+# On systems where time_t is not always 64 bits, this probe can be
+# skipped by passing the --disable-year2038 option to configure.
+AC_DEFUN([AC_SYS_YEAR2038],
+[AC_REQUIRE([AC_SYS_LARGEFILE])dnl
+AS_IF([test "$enable_year2038,$ac_have_year2038,$cross_compiling" = yes,no,no],
+ [# If we're not cross compiling and 'touch' works with a large
+  # timestamp, then we can presume the system supports wider time_t
+  # *somehow* and we just weren't able to detect it.  One common
+  # case that we deliberately *don't* probe for is a system that
+  # supports both 32- and 64-bit ABIs but only the 64-bit ABI offers
+  # wide time_t.  (It would be inappropriate for us to override an
+  # intentional use of -m32.)  Error out, demanding use of
+  # --disable-year2038 if this is intentional.
+  AS_IF([TZ=UTC0 touch -t 210602070628.15 conftest.time 2>/dev/null],
+    [AS_CASE([`TZ=UTC0 LC_ALL=C ls -l conftest.time 2>/dev/null`],
+       [*'Feb  7  2106'* | *'Feb  7 17:10'*],
+       [AC_MSG_FAILURE(m4_text_wrap(
+	  [this system appears to support timestamps after mid-January 2038,
+	   but no mechanism for enabling wide 'time_t' was detected.
+	   Did you mean to build a 64-bit binary? (E.g., 'CC="${CC} -m64"'.)
+	   To proceed with 32-bit time_t, configure with '--disable-year2038'.],
+	  [], [], [55]))])])])])
+
+# AC_SYS_YEAR2038_RECOMMENDED
+# ---------------------------
+# Same as AC_SYS_YEAR2038, but recommend support for large time_t.
+# If we cannot find any way to make time_t capable of representing
+# values larger than 2**31 - 1, error out unless --disable-year2038 is given.
+AC_DEFUN([AC_SYS_YEAR2038_RECOMMENDED],
+[AC_REQUIRE([AC_SYS_YEAR2038])dnl
+AS_IF([test "$enable_year2038,$ac_have_year2038" = yes,no],
+   [AC_MSG_FAILURE(m4_text_wrap(
+      [could not enable timestamps after mid-January 2038.
+       Did you mean to build a 64-bit binary? (E.g., 'CC="${CC} -m64"'.)
+       To proceed with 32-bit time_t, configure with '--disable-year2038'.],
+      [], [], [55]))])])
+
+# _AC_SYS_LARGEFILE_TEST_CODE
+# ---------------------------
+# C code used to probe for large file support.
+m4_define([_AC_SYS_LARGEFILE_TEST_CODE],
+[@%:@include <sys/types.h>
  /* Check that off_t can represent 2**63 - 1 correctly.
     We can't simply define LARGE_OFF_T to be 9223372036854775807,
     since some C++ compilers masquerading as C compilers
     incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
+@%:@define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
   int off_t_is_large[[(LARGE_OFF_T % 2147483629 == 721
-                       && LARGE_OFF_T % 2147483647 == 1)
-                      ? 1 : -1]];[]dnl
+		       && LARGE_OFF_T % 2147483647 == 1)
+		      ? 1 : -1]];[]dnl
 ])
-])# m4_version_prereq 2.70
-
-
-# _AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, VALUE,
-#                               CACHE-VAR,
-#                               DESCRIPTION,
-#                               PROLOGUE, [FUNCTION-BODY])
-# --------------------------------------------------------
-m4_define([_AC_SYS_LARGEFILE_MACRO_VALUE],
-[AC_CACHE_CHECK([for $1 value needed for large files], [$3],
-[while :; do
-  m4_ifval([$6], [AC_LINK_IFELSE], [AC_COMPILE_IFELSE])(
-    [AC_LANG_PROGRAM([$5], [$6])],
-    [$3=no; break])
-  m4_ifval([$6], [AC_LINK_IFELSE], [AC_COMPILE_IFELSE])(
-    [AC_LANG_PROGRAM([#undef $1
-#define $1 $2
-$5], [$6])],
-    [$3=$2; break])
-  $3=unknown
-  break
-done])
-case $$3 in #(
-  no | unknown) ;;
-  *) AC_DEFINE_UNQUOTED([$1], [$$3], [$4]);;
-esac
-rm -rf conftest*[]dnl
-])# _AC_SYS_LARGEFILE_MACRO_VALUE
+# Defined by Autoconf 2.71 and circa 2022 Gnulib unwisely depended on it.
+m4_define([_AC_SYS_LARGEFILE_TEST_INCLUDES], [_AC_SYS_LARGEFILE_TEST_CODE])
+
+# _AC_SYS_LARGEFILE_OPTIONS
+# -------------------------
+# List of known ways to enable support for large files.  If you change
+# this list you probably also need to change the AS_CASE at the end of
+# _AC_SYS_LARGEFILE_PROBE.
+m4_define([_AC_SYS_LARGEFILE_OPTIONS], m4_normalize(
+    ["none needed"]                   dnl Most current systems
+    ["-D_FILE_OFFSET_BITS=64"]        dnl X/Open LFS spec
+    ["-D_LARGE_FILES=1"]              dnl 32-bit AIX 4.2.1+, 32-bit z/OS
+    ["-n32"]                          dnl 32-bit IRIX 6, SGI cc (obsolete)
+))
+
+# _AC_SYS_LARGEFILE_PROBE
+# -----------------------
+# Subroutine of AC_SYS_LARGEFILE. Probe for large file support and set
+# the cache variable ac_cv_sys_largefile_opts to one of the values in
+# the _AC_SYS_LARGEFILE_OPTIONS list, or to "support not detected" if
+# none of the options in that list worked.  Then, set compilation
+# options and #defines as necessary to enable large file support.
+#
+# If large file support is not detected, the behavior depends on which of
+# the top-level AC_SYS_LARGEFILE macros was used (see below).
+#
+# If you change this macro you may also need to change
+# _AC_SYS_LARGEFILE_OPTIONS.
+AC_DEFUN([_AC_SYS_LARGEFILE_PROBE],
+[AC_CACHE_CHECK([for $CC option to enable large file support],
+  [ac_cv_sys_largefile_opts],
+  [ac_save_CC="$CC"
+  ac_opt_found=no
+  for ac_opt in _AC_SYS_LARGEFILE_OPTIONS; do
+    AS_IF([test x"$ac_opt" != x"none needed"],
+      [CC="$ac_save_CC $ac_opt"])
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([_AC_SYS_LARGEFILE_TEST_CODE])],
+      [ac_cv_sys_largefile_opts="$ac_opt"
+      ac_opt_found=yes])
+    test $ac_opt_found = no || break
+  done
+  CC="$ac_save_CC"
+  dnl Gnulib implements large file support for native Windows, based on the
+  dnl variables WINDOWS_64_BIT_OFF_T, WINDOWS_64_BIT_ST_SIZE.
+  m4_ifdef([gl_LARGEFILE], [
+    AC_REQUIRE([AC_CANONICAL_HOST])
+    if test $ac_opt_found != yes; then
+      AS_CASE([$host_os],
+        [mingw*],
+          [ac_cv_sys_largefile_opts="supported through gnulib"
+           ac_opt_found=yes]
+      )
+    fi
+  ])
+  test $ac_opt_found = yes || ac_cv_sys_largefile_opts="support not detected"])
+
+ac_have_largefile=yes
+AS_CASE([$ac_cv_sys_largefile_opts],
+  ["none needed"], [],
+  ["supported through gnulib"], [],
+  ["support not detected"],
+    [ac_have_largefile=no],
+
+  ["-D_FILE_OFFSET_BITS=64"],
+    [AC_DEFINE([_FILE_OFFSET_BITS], [64],
+      [Number of bits in a file offset, on hosts where this is settable.])],
+
+  ["-D_LARGE_FILES=1"],
+    [AC_DEFINE([_LARGE_FILES], [1],
+      [Define to 1 on platforms where this makes off_t a 64-bit type.])],
+
+  ["-n32"],
+    [CC="$CC -n32"],
+
+  [AC_MSG_ERROR(
+    [internal error: bad value for \$ac_cv_sys_largefile_opts])])
 
+AS_IF([test "$enable_year2038" != no],
+  [_AC_SYS_YEAR2038_PROBE])
+AC_CONFIG_COMMANDS_PRE([_AC_SYS_YEAR2038_ENABLE])])
 
 # AC_SYS_LARGEFILE
 # ----------------
@@ -81,43 +280,12 @@ rm -rf conftest*[]dnl
 # to have a 64-bit inode number cannot be accessed by 32-bit applications on
 # Linux x86/x86_64.  This can occur with file systems such as XFS and NFS.
 AC_DEFUN([AC_SYS_LARGEFILE],
-[AC_ARG_ENABLE(largefile,
-               [  --disable-largefile     omit support 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
-       ac_save_CC=$CC
-       while :; do
-         # IRIX 6.2 and later do not support large files by default,
-         # so use the C compiler's -n32 option if that helps.
-         AC_LANG_CONFTEST([AC_LANG_PROGRAM([_AC_SYS_LARGEFILE_TEST_INCLUDES])])
-         AC_COMPILE_IFELSE([], [break])
-         CC="$CC -n32"
-         AC_COMPILE_IFELSE([], [ac_cv_sys_largefile_CC=' -n32'; break])
-         break
-       done
-       CC=$ac_save_CC
-       rm -f conftest.$ac_ext
-    fi])
-  if test "$ac_cv_sys_largefile_CC" != no; then
-    CC=$CC$ac_cv_sys_largefile_CC
-  fi
-
-  _AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS, 64,
-    ac_cv_sys_file_offset_bits,
-    [Number of bits in a file offset, on hosts where this is settable.],
-    [_AC_SYS_LARGEFILE_TEST_INCLUDES])
-  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
+[AC_ARG_ENABLE([largefile],
+   [AS_HELP_STRING([--disable-largefile],
+      [omit support for large files])])dnl
+AS_IF([test "$enable_largefile,$enable_year2038" != no,no],
+  [_AC_SYS_LARGEFILE_PROBE])])
+])# m4_ifndef AC_SYS_YEAR2038_RECOMMENDED
 
 # Enable large files on systems where this is implemented by Gnulib, not by the
 # system headers.
diff --git a/m4/lcmessage.m4 b/m4/lcmessage.m4
index 1a3eefe7..2e56de66 100644
--- a/m4/lcmessage.m4
+++ b/m4/lcmessage.m4
@@ -1,5 +1,5 @@
 # lcmessage.m4 serial 8
-dnl Copyright (C) 1995-2002, 2004-2005, 2008-2014, 2016, 2019-2022 Free
+dnl Copyright (C) 1995-2002, 2004-2005, 2008-2014, 2016, 2019-2023 Free
 dnl Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
diff --git a/m4/lib-ld.m4 b/m4/lib-ld.m4
index 934207a7..acc61274 100644
--- a/m4/lib-ld.m4
+++ b/m4/lib-ld.m4
@@ -1,5 +1,5 @@
-# lib-ld.m4 serial 10
-dnl Copyright (C) 1996-2003, 2009-2022 Free Software Foundation, Inc.
+# lib-ld.m4 serial 11
+dnl Copyright (C) 1996-2003, 2009-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -29,7 +29,7 @@ AC_DEFUN([AC_LIB_PROG_LD],
 AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
 AC_ARG_WITH([gnu-ld],
-    [AS_HELP_STRING([--with-gnu-ld],
+    [AS_HELP_STRING([[--with-gnu-ld]],
         [assume the C compiler uses GNU ld [default=no]])],
     [test "$withval" = no || with_gnu_ld=yes],
     [with_gnu_ld=no])dnl
diff --git a/m4/lib-link.m4 b/m4/lib-link.m4
index 3b75bcd0..653e34f8 100644
--- a/m4/lib-link.m4
+++ b/m4/lib-link.m4
@@ -1,5 +1,5 @@
 # lib-link.m4 serial 33
-dnl Copyright (C) 2001-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/lib-prefix.m4 b/m4/lib-prefix.m4
index 999f712f..aefe7f71 100644
--- a/m4/lib-prefix.m4
+++ b/m4/lib-prefix.m4
@@ -1,5 +1,5 @@
 # lib-prefix.m4 serial 20
-dnl Copyright (C) 2001-2005, 2008-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2005, 2008-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/libsigsegv.m4 b/m4/libsigsegv.m4
index 4da1d2da..2819a4de 100644
--- a/m4/libsigsegv.m4
+++ b/m4/libsigsegv.m4
@@ -1,5 +1,5 @@
 # libsigsegv.m4 serial 4
-dnl Copyright (C) 2002-2003, 2008-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2008-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/libunistring-base.m4 b/m4/libunistring-base.m4
index a0892da4..6dd184a7 100644
--- a/m4/libunistring-base.m4
+++ b/m4/libunistring-base.m4
@@ -1,5 +1,5 @@
-# libunistring-base.m4 serial 7
-dnl Copyright (C) 2010-2022 Free Software Foundation, Inc.
+# libunistring-base.m4 serial 8
+dnl Copyright (C) 2010-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -18,6 +18,8 @@ dnl You have to bump the VERSION argument to the next projected version
 dnl number each time you make a change that affects the behaviour of the
 dnl functions defined in Module (even if the sources of Module itself do not
 dnl change).
+dnl
+dnl This macro invocation must not occur in macros that are AC_REQUIREd.
 
 AC_DEFUN([gl_LIBUNISTRING_MODULE],
 [
@@ -28,6 +30,35 @@ AC_DEFUN([gl_LIBUNISTRING_MODULE],
     [gl_LIBUNISTRING_VERSION_CMP([$1])])
 ])
 
+dnl gl_LIBUNISTRING_MODULE_WITH_VARIABLE([VERSION], [Module])
+dnl is like gl_LIBUNISTRING_MODULE([VERSION], [Module]), except that it also
+dnl defines an AC_SUBSTed autoconf variable GNULIB_$MODULE_DLL_VARIABLE.
+dnl What's the expansion of this autoconf variable?
+dnl   - When building libunistring, it expands to LIBUNISTRING_DLL_VARIABLE.
+dnl     (This is necessary because this token must be present in the .h files
+dnl     when the .h files get installed.)
+dnl   - When building gnulib or application code it expands to
+dnl       - LIBUNISTRING_DLL_VARIABLE by default,
+dnl       - empty if the automake conditional LIBUNISTRING_COMPILE_$MODULE
+dnl         evaluates to true.
+dnl     (This is necessary because when the conditional evaluates to false,
+dnl     the application code expects to use the declared variable from the
+dnl     installed libunistring; it's in this case that the
+dnl     LIBUNISTRING_DLL_VARIABLE macro from the installed
+dnl     <unistring/woe32dll.h> must be used.)
+dnl
+dnl This macro invocation must not occur in macros that are AC_REQUIREd.
+
+AC_DEFUN([gl_LIBUNISTRING_MODULE_WITH_VARIABLE],
+[
+  gl_LIBUNISTRING_MODULE([$1], [$2])
+  m4_ifndef([gl_IN_LIBUNISTRING],
+    [if test -z "${AS_TR_CPP([LIBUNISTRING_COMPILE_$2])_TRUE}"; then
+       GL_MODULE_INDICATOR_PREFIX[]_GNULIB_[]AS_TR_CPP([$2_DLL_VARIABLE])=
+     fi
+    ])
+])
+
 dnl gl_LIBUNISTRING_LIBHEADER([VERSION], [HeaderFile])
 dnl Declares that HeaderFile should be created, unless we are linking
 dnl with libunistring and its version is >= the given VERSION.
@@ -95,6 +126,26 @@ changequote([,])
     LIBUNISTRING_VERSION_MINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_minor"`
     LIBUNISTRING_VERSION_SUBMINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_subminor"`
   fi
+
+  dnl Determine whether <unistring/woe32dll.h> from an installed libunistring
+  dnl is available.
+  m4_ifdef([gl_IN_LIBUNISTRING],
+    [dnl In libunistring, all .h files that declare variables need to
+     dnl #include <unistring/woe32dll.h>.  This references the file
+     dnl unistring/woe32dll.h in libunistring.
+     HAVE_UNISTRING_WOE32DLL_H=1
+    ],
+    [dnl In gnulib or in applications, we need a #include <unistring/woe32dll.h>
+     dnl if and only if an installed libunistring is available.
+     if test "$HAVE_LIBUNISTRING" = yes; then
+       AC_CHECK_HEADERS([unistring/woe32dll.h],
+         [HAVE_UNISTRING_WOE32DLL_H=1],
+         [HAVE_UNISTRING_WOE32DLL_H=0])
+     else
+       HAVE_UNISTRING_WOE32DLL_H=0
+     fi
+    ])
+  AC_SUBST([HAVE_UNISTRING_WOE32DLL_H])
 ])
 
 dnl gl_LIBUNISTRING_VERSION_CMP([VERSION])
diff --git a/m4/limits-h.m4 b/m4/limits-h.m4
index 5d5a5bf5..4f8ce410 100644
--- a/m4/limits-h.m4
+++ b/m4/limits-h.m4
@@ -1,6 +1,6 @@
 dnl Check whether limits.h has needed features.
 
-dnl Copyright 2016-2022 Free Software Foundation, Inc.
+dnl Copyright 2016-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -23,6 +23,7 @@ AC_DEFUN_ONCE([gl_LIMITS_H],
             int wb = WORD_BIT;
             int ullw = ULLONG_WIDTH;
             int bw = BOOL_WIDTH;
+            int bm = BOOL_MAX;
           ]])],
        [gl_cv_header_limits_width=yes],
        [gl_cv_header_limits_width=no])])
diff --git a/m4/localcharset.m4 b/m4/localcharset.m4
index f5dbbd4f..15b6b2a5 100644
--- a/m4/localcharset.m4
+++ b/m4/localcharset.m4
@@ -1,5 +1,5 @@
 # localcharset.m4 serial 8
-dnl Copyright (C) 2002, 2004, 2006, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2004, 2006, 2009-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/locale-fr.m4 b/m4/locale-fr.m4
index 3753891f..5e13f394 100644
--- a/m4/locale-fr.m4
+++ b/m4/locale-fr.m4
@@ -1,5 +1,5 @@
-# locale-fr.m4 serial 20
-dnl Copyright (C) 2003, 2005-2022 Free Software Foundation, Inc.
+# locale-fr.m4 serial 21
+dnl Copyright (C) 2003, 2005-2023 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.
@@ -7,7 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
 dnl From Bruno Haible.
 
 dnl Determine the name of a french locale with traditional encoding.
-AC_DEFUN([gt_LOCALE_FR],
+AC_DEFUN_ONCE([gt_LOCALE_FR],
 [
   AC_REQUIRE([AC_CANONICAL_HOST])
   AC_REQUIRE([AM_LANGINFO_CODESET])
@@ -137,7 +137,7 @@ int main () {
 ])
 
 dnl Determine the name of a french locale with UTF-8 encoding.
-AC_DEFUN([gt_LOCALE_FR_UTF8],
+AC_DEFUN_ONCE([gt_LOCALE_FR_UTF8],
 [
   AC_REQUIRE([AM_LANGINFO_CODESET])
   AC_CACHE_CHECK([for a french Unicode locale], [gt_cv_locale_fr_utf8], [
diff --git a/m4/locale-ja.m4 b/m4/locale-ja.m4
index 73a5d1ae..f6ca327b 100644
--- a/m4/locale-ja.m4
+++ b/m4/locale-ja.m4
@@ -1,5 +1,5 @@
-# locale-ja.m4 serial 15
-dnl Copyright (C) 2003, 2005-2022 Free Software Foundation, Inc.
+# locale-ja.m4 serial 16
+dnl Copyright (C) 2003, 2005-2023 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.
@@ -7,7 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
 dnl From Bruno Haible.
 
 dnl Determine the name of a japanese locale with EUC-JP encoding.
-AC_DEFUN([gt_LOCALE_JA],
+AC_DEFUN_ONCE([gt_LOCALE_JA],
 [
   AC_REQUIRE([AC_CANONICAL_HOST])
   AC_REQUIRE([AM_LANGINFO_CODESET])
diff --git a/m4/locale-tr.m4 b/m4/locale-tr.m4
index 4b99e67d..d34df057 100644
--- a/m4/locale-tr.m4
+++ b/m4/locale-tr.m4
@@ -1,5 +1,5 @@
-# locale-tr.m4 serial 13
-dnl Copyright (C) 2003, 2005-2022 Free Software Foundation, Inc.
+# locale-tr.m4 serial 14
+dnl Copyright (C) 2003, 2005-2023 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.
@@ -7,7 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
 dnl From Bruno Haible.
 
 dnl Determine the name of a turkish locale with UTF-8 encoding.
-AC_DEFUN([gt_LOCALE_TR_UTF8],
+AC_DEFUN_ONCE([gt_LOCALE_TR_UTF8],
 [
   AC_REQUIRE([AC_CANONICAL_HOST])
   AC_REQUIRE([AM_LANGINFO_CODESET])
diff --git a/m4/locale-zh.m4 b/m4/locale-zh.m4
index c997971f..94c54590 100644
--- a/m4/locale-zh.m4
+++ b/m4/locale-zh.m4
@@ -1,5 +1,5 @@
-# locale-zh.m4 serial 15
-dnl Copyright (C) 2003, 2005-2022 Free Software Foundation, Inc.
+# locale-zh.m4 serial 16
+dnl Copyright (C) 2003, 2005-2023 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.
@@ -7,7 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
 dnl From Bruno Haible.
 
 dnl Determine the name of a chinese locale with GB18030 encoding.
-AC_DEFUN([gt_LOCALE_ZH_CN],
+AC_DEFUN_ONCE([gt_LOCALE_ZH_CN],
 [
   AC_REQUIRE([AC_CANONICAL_HOST])
   AC_REQUIRE([AM_LANGINFO_CODESET])
diff --git a/m4/locale_h.m4 b/m4/locale_h.m4
index ca5d0d0f..a33a0a46 100644
--- a/m4/locale_h.m4
+++ b/m4/locale_h.m4
@@ -1,5 +1,5 @@
 # locale_h.m4 serial 28
-dnl Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/localeconv.m4 b/m4/localeconv.m4
index 09c1a1ac..374dcbf5 100644
--- a/m4/localeconv.m4
+++ b/m4/localeconv.m4
@@ -1,5 +1,5 @@
-# localeconv.m4 serial 1
-dnl Copyright (C) 2012-2022 Free Software Foundation, Inc.
+# localeconv.m4 serial 2
+dnl Copyright (C) 2012-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -8,10 +8,45 @@ AC_DEFUN([gl_FUNC_LOCALECONV],
 [
   AC_REQUIRE([gl_LOCALE_H_DEFAULTS])
   AC_REQUIRE([gl_LOCALE_H])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
 
   if test $REPLACE_STRUCT_LCONV = 1; then
     REPLACE_LOCALECONV=1
   fi
+  if test $REPLACE_LOCALECONV = 0; then
+    dnl Test whether fields of type 'char' are filled correctly.
+    dnl This test fails on mingw 5.0.3.
+    AC_CACHE_CHECK([whether localeconv works],
+      [gl_cv_func_localeconv_works],
+      [AC_RUN_IFELSE(
+         [AC_LANG_SOURCE([[
+            #include <locale.h>
+            #include <limits.h>
+            int main ()
+            {
+              struct lconv *l = localeconv ();
+              return l->frac_digits != CHAR_MAX && l->frac_digits < 0;
+            }
+         ]])],
+         [gl_cv_func_localeconv_works=yes],
+         [gl_cv_func_localeconv_works=no],
+         [case "$host_os" in
+                                # Guess yes on glibc systems.
+            *-gnu* | gnu*)      gl_cv_func_localeconv_works="guessing yes" ;;
+                                # Guess yes on musl systems.
+            *-musl* | midipix*) gl_cv_func_localeconv_works="guessing yes" ;;
+                                # Guess no on native Windows.
+            mingw*)             gl_cv_func_localeconv_works="guessing no" ;;
+                                # If we don't know, obey --enable-cross-guesses.
+            *)                  gl_cv_func_localeconv_works="$gl_cross_guess_normal" ;;
+          esac
+         ])
+      ])
+    case "$gl_cv_func_localeconv_works" in
+      *yes) ;;
+      *) REPLACE_LOCALECONV=1 ;;
+    esac
+  fi
 ])
 
 # Prerequisites of lib/localeconv.c.
@@ -19,4 +54,6 @@ AC_DEFUN([gl_PREREQ_LOCALECONV],
 [
   AC_CHECK_MEMBERS([struct lconv.decimal_point], [], [],
     [[#include <locale.h>]])
+  AC_CHECK_MEMBERS([struct lconv.int_p_cs_precedes], [], [],
+    [[#include <locale.h>]])
 ])
diff --git a/m4/localename.m4 b/m4/localename.m4
index e0cf8c5c..8c43a13a 100644
--- a/m4/localename.m4
+++ b/m4/localename.m4
@@ -1,5 +1,5 @@
-# localename.m4 serial 8
-dnl Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
+# localename.m4 serial 10
+dnl Copyright (C) 2007, 2009-2023 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.
@@ -13,25 +13,39 @@ AC_DEFUN([gl_LOCALENAME],
   AC_REQUIRE([gt_INTL_MACOSX])
   AC_CHECK_HEADERS_ONCE([langinfo.h])
   if test $HAVE_LOCALE_T = 1; then
-    AC_CHECK_FUNCS_ONCE([newlocale duplocale freelocale])
+    gl_CHECK_FUNCS_ANDROID([newlocale], [[#include <locale.h>]])
+    gl_CHECK_FUNCS_ANDROID([duplocale], [[#include <locale.h>]])
+    gl_CHECK_FUNCS_ANDROID([freelocale], [[#include <locale.h>]])
     gl_func_newlocale="$ac_cv_func_newlocale"
     gl_func_duplocale="$ac_cv_func_duplocale"
     gl_func_freelocale="$ac_cv_func_freelocale"
   else
     dnl In 2019, some versions of z/OS lack the locale_t type and have broken
     dnl newlocale, duplocale, freelocale functions.
+    gl_cv_onwards_func_newlocale='future OS version'
+    gl_cv_onwards_func_duplocale='future OS version'
+    gl_cv_onwards_func_freelocale='future OS version'
     gl_func_newlocale=no
     gl_func_duplocale=no
     gl_func_freelocale=no
   fi
   if test $gl_func_newlocale != yes; then
     HAVE_NEWLOCALE=0
+    case "$gl_cv_onwards_func_newlocale" in
+      future*) REPLACE_NEWLOCALE=1 ;;
+    esac
   fi
   if test $gl_func_duplocale != yes; then
     HAVE_DUPLOCALE=0
+    case "$gl_cv_onwards_func_duplocale" in
+      future*) REPLACE_DUPLOCALE=1 ;;
+    esac
   fi
   if test $gl_func_freelocale != yes; then
     HAVE_FREELOCALE=0
+    case "$gl_cv_onwards_func_freelocale" in
+      future*) REPLACE_FREELOCALE=1 ;;
+    esac
   fi
   if test $gt_localename_enhances_locale_funcs = yes; then
     REPLACE_NEWLOCALE=1
diff --git a/m4/lock.m4 b/m4/lock.m4
index c4cbf07b..88cf5575 100644
--- a/m4/lock.m4
+++ b/m4/lock.m4
@@ -1,5 +1,5 @@
 # lock.m4 serial 14
-dnl Copyright (C) 2005-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/lseek.m4 b/m4/lseek.m4
index 0583511e..0da45880 100644
--- a/m4/lseek.m4
+++ b/m4/lseek.m4
@@ -1,5 +1,5 @@
-# lseek.m4 serial 12
-dnl Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
+# lseek.m4 serial 14
+dnl Copyright (C) 2007, 2009-2023 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.
@@ -17,9 +17,11 @@ AC_DEFUN([gl_FUNC_LSEEK],
          dnl Native Windows.
          dnl The result of lseek (fd, (off_t)0, SEEK_CUR) or
          dnl SetFilePointer(handle, 0, NULL, FILE_CURRENT)
-         dnl for a pipe depends on the environment: In a Cygwin 1.5
-         dnl environment it succeeds (wrong); in a Cygwin 1.7 environment
-         dnl it fails with a wrong errno value.
+         dnl for a pipe depends on the environment:
+         dnl In a Cygwin 1.5 environment it succeeds (wrong);
+         dnl in a Cygwin 1.7 environment it fails with a wrong errno value;
+         dnl in a Cygwin 2.9.0 environment it fails correctly;
+         dnl in a Cygwin 3.4.6 environment it succeeds again (wrong).
          gl_cv_func_lseek_pipe=no
          ;;
        *)
@@ -70,9 +72,29 @@ AC_DEFUN([gl_FUNC_LSEEK],
     REPLACE_LSEEK=1
   fi
 
-  dnl macOS SEEK_DATA is incompatible with other platforms.
-  case $host_os in
-    darwin*)
-      REPLACE_LSEEK=1;;
-  esac
+  AS_IF([test $REPLACE_LSEEK = 0],
+    [AC_CACHE_CHECK([whether SEEK_DATA works but is incompatible with GNU],
+       [gl_cv_func_lseek_works_but_incompatible],
+       [AC_PREPROC_IFELSE(
+          [AC_LANG_SOURCE(
+             dnl Use macOS "9999" to stand for a future fixed macOS version.
+             dnl See ../lib/unistd.in.h and <https://bugs.gnu.org/61386>.
+             [[#include <unistd.h>
+               #if defined __APPLE__ && defined __MACH__ && defined SEEK_DATA
+               # ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
+               #  include <AvailabilityMacros.h>
+               # endif
+               # if 99990000 <= MAC_OS_X_VERSION_MIN_REQUIRED
+               #  define LSEEK_WORKS_BUT_IS_INCOMPATIBLE_WITH_GNU
+               # endif
+               #endif
+               #ifndef LSEEK_WORKS_BUT_IS_INCOMPATIBLE_WITH_GNU
+                #error "No need to work around the bug"
+               #endif
+             ]])],
+          [gl_cv_func_lseek_works_but_incompatible=yes],
+          [gl_cv_func_lseek_works_but_incompatible=no])])
+     if test "$gl_cv_func_lseek_works_but_incompatible" = yes; then
+       REPLACE_LSEEK=1
+     fi])
 ])
diff --git a/m4/lstat.m4 b/m4/lstat.m4
index d987060b..2bc46697 100644
--- a/m4/lstat.m4
+++ b/m4/lstat.m4
@@ -1,6 +1,6 @@
-# serial 33
+# serial 34
 
-# Copyright (C) 1997-2001, 2003-2022 Free Software Foundation, Inc.
+# Copyright (C) 1997-2001, 2003-2023 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -56,6 +56,9 @@ AC_DEFUN([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK],
           linux-* | linux)
             # Guess yes on Linux systems.
             gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
+          midipix*)
+            # Guess yes on systems that emulate the Linux system calls.
+            gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
           *-gnu* | gnu*)
             # Guess yes on glibc systems.
             gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
diff --git a/m4/malloc.m4 b/m4/malloc.m4
index 6b76c1e6..bc580176 100644
--- a/m4/malloc.m4
+++ b/m4/malloc.m4
@@ -1,5 +1,5 @@
-# malloc.m4 serial 28
-dnl Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
+# malloc.m4 serial 29
+dnl Copyright (C) 2007, 2009-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -25,7 +25,7 @@ AC_DEFUN([_AC_FUNC_MALLOC_IF],
        [case "$host_os" in
           # Guess yes on platforms where we know the result.
           *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
-          | gnu* | *-musl* | midnightbsd* \
+          | gnu* | *-musl* | midipix* | midnightbsd* \
           | hpux* | solaris* | cygwin* | mingw* | msys* )
             ac_cv_func_malloc_0_nonnull="guessing yes" ;;
           # If we don't know, obey --enable-cross-guesses.
diff --git a/m4/malloca.m4 b/m4/malloca.m4
index 77eb96a0..1d777ebe 100644
--- a/m4/malloca.m4
+++ b/m4/malloca.m4
@@ -1,5 +1,5 @@
 # malloca.m4 serial 2
-dnl Copyright (C) 2003-2004, 2006-2007, 2009-2022 Free Software Foundation,
+dnl Copyright (C) 2003-2004, 2006-2007, 2009-2023 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
diff --git a/m4/manywarnings.m4 b/m4/manywarnings.m4
index f4b5853f..13db9965 100644
--- a/m4/manywarnings.m4
+++ b/m4/manywarnings.m4
@@ -1,5 +1,5 @@
 # manywarnings.m4 serial 23
-dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -46,8 +46,7 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC(C)],
   dnl First, check for some issues that only occur when combining multiple
   dnl gcc warning categories.
   AC_REQUIRE([AC_PROG_CC])
-  if test -n "$GCC"; then
-
+  AS_IF([test -n "$GCC"], [
     dnl Check if -Wextra -Werror -Wno-missing-field-initializers is supported
     dnl with the current $CC $CFLAGS $CPPFLAGS.
     AC_CACHE_CHECK([whether -Wno-missing-field-initializers is supported],
@@ -61,7 +60,7 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC(C)],
        CFLAGS="$gl_save_CFLAGS"
       ])
 
-    if test "$gl_cv_cc_nomfi_supported" = yes; then
+    AS_IF([test "$gl_cv_cc_nomfi_supported" = yes], [
       dnl Now check whether -Wno-missing-field-initializers is needed
       dnl for the { 0, } construct.
       AC_CACHE_CHECK([whether -Wno-missing-field-initializers is needed],
@@ -82,7 +81,7 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC(C)],
            [gl_cv_cc_nomfi_needed=yes])
          CFLAGS="$gl_save_CFLAGS"
         ])
-    fi
+    ])
 
     dnl Next, check if -Werror -Wuninitialized is useful with the
     dnl user's choice of $CFLAGS; some versions of gcc warn that it
@@ -97,8 +96,7 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC(C)],
          [gl_cv_cc_uninitialized_supported=no])
        CFLAGS="$gl_save_CFLAGS"
       ])
-
-  fi
+  ])
 
   # List all gcc warning categories.
   # To compare this list to your installed GCC's, run this Bash command:
@@ -109,7 +107,7 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC(C)],
   #  <(LC_ALL=C gcc --help=warnings | sed -n 's/^  \(-[^ ]*\) .*/\1/p' | sort)
 
   $1=
-  for gl_manywarn_item in -fanalyzer -fno-common \
+  for gl_manywarn_item in -fanalyzer -fstrict-flex-arrays \
     -Wall \
     -Warith-conversion \
     -Wbad-function-cast \
@@ -137,6 +135,7 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC(C)],
     -Wpointer-arith \
     -Wshadow \
     -Wstack-protector \
+    -Wstrict-flex-arrays \
     -Wstrict-overflow \
     -Wstrict-prototypes \
     -Wsuggest-attribute=cold \
@@ -178,14 +177,19 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC(C)],
   gl_AS_VAR_APPEND([$1], [' -Wvla-larger-than=4031'])
 
   # These are needed for older GCC versions.
-  if test -n "$GCC"; then
-    case `($CC --version) 2>/dev/null` in
+  if test -n "$GCC" && gl_gcc_version=`($CC --version) 2>/dev/null`; then
+    case $gl_gcc_version in
       'gcc (GCC) '[[0-3]].* | \
       'gcc (GCC) '4.[[0-7]].*)
         gl_AS_VAR_APPEND([$1], [' -fdiagnostics-show-option'])
         gl_AS_VAR_APPEND([$1], [' -funit-at-a-time'])
           ;;
     esac
+    case $gl_gcc_version in
+      'gcc (GCC) '[[0-9]].*)
+        gl_AS_VAR_APPEND([$1], [' -fno-common'])
+          ;;
+    esac
   fi
 
   # Disable specific options as needed.
diff --git a/m4/mbchar.m4 b/m4/mbchar.m4
index 22673922..aed40a53 100644
--- a/m4/mbchar.m4
+++ b/m4/mbchar.m4
@@ -1,5 +1,5 @@
 # mbchar.m4 serial 9
-dnl Copyright (C) 2005-2007, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2007, 2009-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/mbiter.m4 b/m4/mbiter.m4
index 7815edb0..8e879dc4 100644
--- a/m4/mbiter.m4
+++ b/m4/mbiter.m4
@@ -1,5 +1,5 @@
 # mbiter.m4 serial 7
-dnl Copyright (C) 2005, 2008-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2008-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/mbrlen.m4 b/m4/mbrlen.m4
index 3cb21afc..c3f04944 100644
--- a/m4/mbrlen.m4
+++ b/m4/mbrlen.m4
@@ -1,5 +1,5 @@
 # mbrlen.m4 serial 11  -*- coding: utf-8 -*-
-dnl Copyright (C) 2008, 2010-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2008, 2010-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/mbrtowc.m4 b/m4/mbrtowc.m4
index ec8716b5..893faff6 100644
--- a/m4/mbrtowc.m4
+++ b/m4/mbrtowc.m4
@@ -1,5 +1,5 @@
-# mbrtowc.m4 serial 38  -*- coding: utf-8 -*-
-dnl Copyright (C) 2001-2002, 2004-2005, 2008-2022 Free Software Foundation,
+# mbrtowc.m4 serial 40  -*- coding: utf-8 -*-
+dnl Copyright (C) 2001-2002, 2004-2005, 2008-2023 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -91,20 +91,23 @@ AC_DEFUN([gl_FUNC_MBRTOWC],
   fi
   if test $REPLACE_MBSTATE_T = 1; then
     case "$host_os" in
-      mingw*) LIB_MBRTOWC= ;;
+      mingw*) MBRTOWC_LIB= ;;
       *)
         gl_WEAK_SYMBOLS
         case "$gl_cv_have_weak" in
-          *yes) LIB_MBRTOWC= ;;
-          *)    LIB_MBRTOWC="$LIBPTHREAD" ;;
+          *yes) MBRTOWC_LIB= ;;
+          *)    MBRTOWC_LIB="$LIBPTHREAD" ;;
         esac
         ;;
     esac
   else
-    LIB_MBRTOWC=
+    MBRTOWC_LIB=
   fi
-  dnl LIB_MBRTOWC is expected to be '-pthread' or '-lpthread' on AIX
+  dnl MBRTOWC_LIB is expected to be '-pthread' or '-lpthread' on AIX
   dnl with gcc or xlc, and empty otherwise.
+  AC_SUBST([MBRTOWC_LIB])
+  dnl For backward compatibility.
+  LIB_MBRTOWC="$MBRTOWC_LIB"
   AC_SUBST([LIB_MBRTOWC])
 ])
 
@@ -114,7 +117,7 @@ dnl Result is REPLACE_MBSTATE_T.
 dnl When this is set to 1, we replace both mbsinit() and mbrtowc(), in order to
 dnl avoid inconsistencies.
 
-AC_DEFUN([gl_MBSTATE_T_BROKEN],
+AC_DEFUN_ONCE([gl_MBSTATE_T_BROKEN],
 [
   AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
   AC_REQUIRE([AC_CANONICAL_HOST])
@@ -709,6 +712,10 @@ dnl Test whether mbrtowc reports encoding errors in the C locale.
 dnl Although POSIX was never intended to allow this, the GNU C Library
 dnl and other implementations do it.  See:
 dnl https://sourceware.org/bugzilla/show_bug.cgi?id=19932
+dnl POSIX has now clarified it:
+dnl <https://pubs.opengroup.org/onlinepubs/9699919799/functions/mbrtowc.html>
+dnl says: "In the POSIX locale an [EILSEQ] error cannot occur since all byte
+dnl values are valid characters."
 
 AC_DEFUN([gl_MBRTOWC_C_LOCALE],
 [
diff --git a/m4/mbsinit.m4 b/m4/mbsinit.m4
index ebd2d4ff..c388a8b9 100644
--- a/m4/mbsinit.m4
+++ b/m4/mbsinit.m4
@@ -1,5 +1,5 @@
 # mbsinit.m4 serial 9
-dnl Copyright (C) 2008, 2010-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2008, 2010-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/mbslen.m4 b/m4/mbslen.m4
index 168fbcdc..a9e0ed2a 100644
--- a/m4/mbslen.m4
+++ b/m4/mbslen.m4
@@ -1,5 +1,5 @@
 # mbslen.m4 serial 3
-dnl Copyright (C) 2010-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2010-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/mbsrtowcs.m4 b/m4/mbsrtowcs.m4
index f672fa52..4f2e88c5 100644
--- a/m4/mbsrtowcs.m4
+++ b/m4/mbsrtowcs.m4
@@ -1,5 +1,5 @@
-# mbsrtowcs.m4 serial 14
-dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
+# mbsrtowcs.m4 serial 15
+dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -32,6 +32,13 @@ AC_DEFUN([gl_FUNC_MBSRTOWCS],
         *yes) ;;
         *) REPLACE_MBSRTOWCS=1 ;;
       esac
+      if test $REPLACE_MBSRTOWCS = 0; then
+        gl_MBRTOWC_C_LOCALE
+        case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in
+          *yes) ;;
+          *) REPLACE_MBSRTOWCS=1 ;;
+        esac
+      fi
     fi
   fi
 ])
diff --git a/m4/mbstate_t.m4 b/m4/mbstate_t.m4
index a6eba1bc..dcd66b96 100644
--- a/m4/mbstate_t.m4
+++ b/m4/mbstate_t.m4
@@ -1,5 +1,5 @@
 # mbstate_t.m4 serial 14
-dnl Copyright (C) 2000-2002, 2008-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2000-2002, 2008-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/mbtowc.m4 b/m4/mbtowc.m4
index 2827e833..02ed6ebb 100644
--- a/m4/mbtowc.m4
+++ b/m4/mbtowc.m4
@@ -1,5 +1,5 @@
-# mbtowc.m4 serial 3
-dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
+# mbtowc.m4 serial 5
+dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -8,9 +8,12 @@ AC_DEFUN([gl_FUNC_MBTOWC],
 [
   AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
 
-  AC_CHECK_FUNCS([mbtowc])
+  gl_CHECK_FUNCS_ANDROID([mbtowc], [[#include <stdlib.h>]])
   if test $ac_cv_func_mbtowc = no; then
     HAVE_MBTOWC=0
+    case "$gl_cv_onwards_func_mbtowc" in
+      future*) REPLACE_MBTOWC=1 ;;
+    esac
   else
     if false; then
       REPLACE_MBTOWC=1
diff --git a/m4/memchr.m4 b/m4/memchr.m4
index c7489d87..4f1aed01 100644
--- a/m4/memchr.m4
+++ b/m4/memchr.m4
@@ -1,5 +1,5 @@
 # memchr.m4 serial 18
-dnl Copyright (C) 2002-2004, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2004, 2009-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/mempcpy.m4 b/m4/mempcpy.m4
index 1107eb4a..612b77b3 100644
--- a/m4/mempcpy.m4
+++ b/m4/mempcpy.m4
@@ -1,5 +1,5 @@
-# mempcpy.m4 serial 12
-dnl Copyright (C) 2003-2004, 2006-2007, 2009-2022 Free Software Foundation,
+# mempcpy.m4 serial 14
+dnl Copyright (C) 2003-2004, 2006-2007, 2009-2023 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -14,9 +14,12 @@ AC_DEFUN([gl_FUNC_MEMPCPY],
   AC_REQUIRE([AC_C_RESTRICT])
 
   AC_REQUIRE([gl_STRING_H_DEFAULTS])
-  AC_CHECK_FUNCS([mempcpy])
+  gl_CHECK_FUNCS_ANDROID([mempcpy], [[#include <string.h>]])
   if test $ac_cv_func_mempcpy = no; then
     HAVE_MEMPCPY=0
+    case "$gl_cv_onwards_func_mempcpy" in
+      future*) REPLACE_MEMPCPY=1 ;;
+    esac
   fi
 ])
 
diff --git a/m4/memrchr.m4 b/m4/memrchr.m4
index ec5e2083..7611ac7e 100644
--- a/m4/memrchr.m4
+++ b/m4/memrchr.m4
@@ -1,5 +1,5 @@
 # memrchr.m4 serial 11
-dnl Copyright (C) 2002-2003, 2005-2007, 2009-2022 Free Software Foundation,
+dnl Copyright (C) 2002-2003, 2005-2007, 2009-2023 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
diff --git a/m4/minmax.m4 b/m4/minmax.m4
index b9767397..fd09846f 100644
--- a/m4/minmax.m4
+++ b/m4/minmax.m4
@@ -1,5 +1,5 @@
 # minmax.m4 serial 4
-dnl Copyright (C) 2005, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2009-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/mmap-anon.m4 b/m4/mmap-anon.m4
index a4580ff9..d07d26e4 100644
--- a/m4/mmap-anon.m4
+++ b/m4/mmap-anon.m4
@@ -1,5 +1,5 @@
 # mmap-anon.m4 serial 12
-dnl Copyright (C) 2005, 2007, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2007, 2009-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/mode_t.m4 b/m4/mode_t.m4
index e08d27a7..82197c02 100644
--- a/m4/mode_t.m4
+++ b/m4/mode_t.m4
@@ -1,5 +1,5 @@
 # mode_t.m4 serial 2
-dnl Copyright (C) 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/msvc-inval.m4 b/m4/msvc-inval.m4
index b32cf6eb..8d9d21b5 100644
--- a/m4/msvc-inval.m4
+++ b/m4/msvc-inval.m4
@@ -1,5 +1,5 @@
 # msvc-inval.m4 serial 1
-dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/msvc-nothrow.m4 b/m4/msvc-nothrow.m4
index 16ceb1f1..0263e490 100644
--- a/m4/msvc-nothrow.m4
+++ b/m4/msvc-nothrow.m4
@@ -1,5 +1,5 @@
 # msvc-nothrow.m4 serial 1
-dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/multiarch.m4 b/m4/multiarch.m4
index 5d942765..3ba5b0f7 100644
--- a/m4/multiarch.m4
+++ b/m4/multiarch.m4
@@ -1,5 +1,5 @@
 # multiarch.m4 serial 9
-dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/musl.m4 b/m4/musl.m4
index 111f75d3..e28a3fed 100644
--- a/m4/musl.m4
+++ b/m4/musl.m4
@@ -1,5 +1,5 @@
-# musl.m4 serial 3
-dnl Copyright (C) 2019-2022 Free Software Foundation, Inc.
+# musl.m4 serial 4
+dnl Copyright (C) 2019-2023 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.
@@ -13,6 +13,8 @@ AC_DEFUN_ONCE([gl_MUSL_LIBC],
 [
   AC_REQUIRE([AC_CANONICAL_HOST])
   case "$host_os" in
-    *-musl*) AC_DEFINE([MUSL_LIBC], [1], [Define to 1 on musl libc.]) ;;
+    *-musl* | midipix*)
+      AC_DEFINE([MUSL_LIBC], [1], [Define to 1 on musl libc.])
+      ;;
   esac
 ])
diff --git a/m4/nanosleep.m4 b/m4/nanosleep.m4
index 1964b1ea..e21a3e34 100644
--- a/m4/nanosleep.m4
+++ b/m4/nanosleep.m4
@@ -1,11 +1,11 @@
-# serial 41
+# serial 43
 
 dnl From Jim Meyering.
 dnl Check for the nanosleep function.
 dnl If not found, use the supplied replacement.
 dnl
 
-# Copyright (C) 1999-2001, 2003-2022 Free Software Foundation, Inc.
+# Copyright (C) 1999-2001, 2003-2023 Free Software Foundation, Inc.
 
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -25,11 +25,11 @@ AC_DEFUN([gl_FUNC_NANOSLEEP],
 
  # Solaris 2.5.1 needs -lposix4 to get the nanosleep function.
  # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
- LIB_NANOSLEEP=
- AC_SUBST([LIB_NANOSLEEP])
+ NANOSLEEP_LIB=
+ AC_SUBST([NANOSLEEP_LIB])
  AC_SEARCH_LIBS([nanosleep], [rt posix4],
                 [test "$ac_cv_search_nanosleep" = "none required" ||
-                 LIB_NANOSLEEP=$ac_cv_search_nanosleep])
+                 NANOSLEEP_LIB=$ac_cv_search_nanosleep])
  if test "x$ac_cv_search_nanosleep" != xno; then
    dnl The system has a nanosleep function.
 
@@ -100,15 +100,22 @@ AC_DEFUN([gl_FUNC_NANOSLEEP],
             #else /* A simpler test for native Windows.  */
             if (nanosleep (&ts_sleep, &ts_remaining) < 0)
               return 3;
+            /* Test for 32-bit mingw bug: negative nanosecond values do not
+               cause failure.  */
+            ts_sleep.tv_sec = 1;
+            ts_sleep.tv_nsec = -1;
+            if (nanosleep (&ts_sleep, &ts_remaining) != -1)
+              return 7;
             #endif
             return 0;
           }]])],
        [gl_cv_func_nanosleep=yes],
-       [case $? in dnl (
-        4|5|6) gl_cv_func_nanosleep='no (mishandles large arguments)';; dnl (
-        *)   gl_cv_func_nanosleep=no;;
+       [case $? in
+        4|5|6) gl_cv_func_nanosleep='no (mishandles large arguments)' ;;
+        7)     gl_cv_func_nanosleep='no (mishandles negative tv_nsec)' ;;
+        *)     gl_cv_func_nanosleep=no ;;
         esac],
-       [case "$host_os" in dnl ((
+       [case "$host_os" in
           linux*) # Guess it halfway works when the kernel is Linux.
             gl_cv_func_nanosleep='guessing no (mishandles large arguments)' ;;
           mingw*) # Guess no on native Windows.
@@ -136,4 +143,8 @@ AC_DEFUN([gl_FUNC_NANOSLEEP],
    HAVE_NANOSLEEP=0
  fi
  LIBS=$nanosleep_save_libs
+
+ # For backward compatibility.
+ LIB_NANOSLEEP="$NANOSLEEP_LIB"
+ AC_SUBST([LIB_NANOSLEEP])
 ])
diff --git a/m4/netinet_in_h.m4 b/m4/netinet_in_h.m4
index de26fe85..71154191 100644
--- a/m4/netinet_in_h.m4
+++ b/m4/netinet_in_h.m4
@@ -1,5 +1,5 @@
 # netinet_in_h.m4 serial 6
-dnl Copyright (C) 2006-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/nl_langinfo.m4 b/m4/nl_langinfo.m4
index d20a09cf..7648d524 100644
--- a/m4/nl_langinfo.m4
+++ b/m4/nl_langinfo.m4
@@ -1,5 +1,5 @@
-# nl_langinfo.m4 serial 8
-dnl Copyright (C) 2009-2022 Free Software Foundation, Inc.
+# nl_langinfo.m4 serial 11
+dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -8,7 +8,7 @@ AC_DEFUN([gl_FUNC_NL_LANGINFO],
 [
   AC_REQUIRE([gl_LANGINFO_H_DEFAULTS])
   AC_REQUIRE([gl_LANGINFO_H])
-  AC_CHECK_FUNCS_ONCE([nl_langinfo])
+  gl_CHECK_FUNCS_ANDROID([nl_langinfo], [[#include <langinfo.h>]])
   AC_REQUIRE([AC_CANONICAL_HOST])
   AC_REQUIRE([gl_FUNC_SETLOCALE_NULL])
   AC_REQUIRE([gl_PTHREADLIB])
@@ -60,9 +60,12 @@ AC_DEFUN([gl_FUNC_NL_LANGINFO],
     fi
   else
     HAVE_NL_LANGINFO=0
+    case "$gl_cv_onwards_func_nl_langinfo" in
+      future*) REPLACE_NL_LANGINFO=1 ;;
+    esac
   fi
   if test $HAVE_NL_LANGINFO = 0 || test $HAVE_LANGINFO_CODESET = 0; then
-    LIB_NL_LANGINFO="$LIB_SETLOCALE_NULL"
+    LIB_NL_LANGINFO="$SETLOCALE_NULL_LIB"
   else
     LIB_NL_LANGINFO=
   fi
diff --git a/m4/nocrash.m4 b/m4/nocrash.m4
index 91f00c1b..6a766387 100644
--- a/m4/nocrash.m4
+++ b/m4/nocrash.m4
@@ -1,5 +1,5 @@
 # nocrash.m4 serial 5
-dnl Copyright (C) 2005, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2009-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/obstack.m4 b/m4/obstack.m4
index 3a26cba4..ef70a520 100644
--- a/m4/obstack.m4
+++ b/m4/obstack.m4
@@ -1,6 +1,6 @@
 # See if we need to provide obstacks.
 
-dnl Copyright 1996-2022 Free Software Foundation, Inc.
+dnl Copyright 1996-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/off_t.m4 b/m4/off_t.m4
index 0890adaf..880f3472 100644
--- a/m4/off_t.m4
+++ b/m4/off_t.m4
@@ -1,5 +1,5 @@
 # off_t.m4 serial 1
-dnl Copyright (C) 2012-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2012-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/open-cloexec.m4 b/m4/open-cloexec.m4
index 16cd5ec4..fd572fcd 100644
--- a/m4/open-cloexec.m4
+++ b/m4/open-cloexec.m4
@@ -1,6 +1,6 @@
 # Test whether O_CLOEXEC is defined.
 
-dnl Copyright 2017-2022 Free Software Foundation, Inc.
+dnl Copyright 2017-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/open-slash.m4 b/m4/open-slash.m4
index 4fbf491a..1f731f8a 100644
--- a/m4/open-slash.m4
+++ b/m4/open-slash.m4
@@ -1,5 +1,5 @@
 # open-slash.m4 serial 2
-dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/open.m4 b/m4/open.m4
index f82fd6ca..94fa2bb7 100644
--- a/m4/open.m4
+++ b/m4/open.m4
@@ -1,5 +1,5 @@
 # open.m4 serial 15
-dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/openat.m4 b/m4/openat.m4
index de747994..bbbcad85 100644
--- a/m4/openat.m4
+++ b/m4/openat.m4
@@ -1,7 +1,7 @@
 # serial 46
 # See if we need to use our replacement for Solaris' openat et al functions.
 
-dnl Copyright (C) 2004-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2004-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/opendir.m4 b/m4/opendir.m4
index 7816dc54..2e9be769 100644
--- a/m4/opendir.m4
+++ b/m4/opendir.m4
@@ -1,5 +1,5 @@
-# opendir.m4 serial 5
-dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
+# opendir.m4 serial 6
+dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -12,21 +12,24 @@ AC_DEFUN([gl_FUNC_OPENDIR],
   AC_CHECK_FUNCS([opendir])
   if test $ac_cv_func_opendir = no; then
     HAVE_OPENDIR=0
-  fi
-  dnl Replace opendir() for supporting the gnulib-defined fchdir() function,
-  dnl to keep fchdir's bookkeeping up-to-date.
-  m4_ifdef([gl_FUNC_FCHDIR], [
-    gl_TEST_FCHDIR
-    if test $HAVE_FCHDIR = 0; then
-      if test $HAVE_OPENDIR = 1; then
+  else
+    dnl Replace opendir() on native Windows, to support fdopendir().
+    AC_REQUIRE([gl_DIRENT_DIR])
+    if test $DIR_HAS_FD_MEMBER = 0; then
+      REPLACE_OPENDIR=1
+    fi
+    dnl Replace opendir() on OS/2 kLIBC to support dirfd() function replaced
+    dnl by gnulib.
+    case $host_os in
+      os2*) REPLACE_OPENDIR=1 ;;
+    esac
+    dnl Replace opendir() for supporting the gnulib-defined fchdir() function,
+    dnl to keep fchdir's bookkeeping up-to-date.
+    m4_ifdef([gl_FUNC_FCHDIR], [
+      gl_TEST_FCHDIR
+      if test $HAVE_FCHDIR = 0; then
         REPLACE_OPENDIR=1
       fi
-    fi
-  ])
-  dnl Replace opendir() on OS/2 kLIBC to support dirfd() function replaced
-  dnl by gnulib.
-  case $host_os,$HAVE_OPENDIR in
-    os2*,1)
-      REPLACE_OPENDIR=1;;
-  esac
+    ])
+  fi
 ])
diff --git a/m4/pathmax.m4 b/m4/pathmax.m4
index 44add990..6d47d2c0 100644
--- a/m4/pathmax.m4
+++ b/m4/pathmax.m4
@@ -1,5 +1,5 @@
 # pathmax.m4 serial 11
-dnl Copyright (C) 2002-2003, 2005-2006, 2009-2022 Free Software Foundation,
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2023 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
diff --git a/m4/pcre.m4 b/m4/pcre.m4
index af77be46..40007822 100644
--- a/m4/pcre.m4
+++ b/m4/pcre.m4
@@ -1,6 +1,6 @@
 # pcre.m4 - check for PCRE library support
 
-# Copyright (C) 2010-2022 Free Software Foundation, Inc.
+# Copyright (C) 2010-2023 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -21,7 +21,10 @@ AC_DEFUN([gl_FUNC_PCRE],
   use_pcre=no
 
   if test $test_pcre != no; then
-    PKG_CHECK_MODULES([PCRE], [libpcre2-8], [], [: ${PCRE_LIBS=-lpcre2-8}])
+
+    if test -z "${PCRE_CFLAGS+set}" && test -z "${PCRE_LIBS+set}"; then
+      PKG_CHECK_MODULES([PCRE], [libpcre2-8], [], [: ${PCRE_LIBS=-lpcre2-8}])
+    fi
 
     AC_CACHE_CHECK([for pcre2_compile], [pcre_cv_have_pcre2_compile],
       [pcre_saved_CFLAGS=$CFLAGS
diff --git a/m4/perl.m4 b/m4/perl.m4
index 74d05ffa..d9ff7905 100644
--- a/m4/perl.m4
+++ b/m4/perl.m4
@@ -3,7 +3,7 @@
 dnl From Jim Meyering.
 dnl Find a new-enough version of Perl.
 
-# Copyright (C) 1998-2001, 2003-2004, 2007, 2009-2022 Free Software Foundation,
+# Copyright (C) 1998-2001, 2003-2004, 2007, 2009-2023 Free Software Foundation,
 # Inc.
 #
 # This file is free software; the Free Software Foundation
diff --git a/m4/perror.m4 b/m4/perror.m4
index 02d44ca2..9842b24c 100644
--- a/m4/perror.m4
+++ b/m4/perror.m4
@@ -1,5 +1,5 @@
-# perror.m4 serial 10
-dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
+# perror.m4 serial 12
+dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -10,7 +10,7 @@ AC_DEFUN([gl_FUNC_PERROR],
   AC_REQUIRE([gl_HEADER_ERRNO_H])
   AC_REQUIRE([gl_FUNC_STRERROR_R])
   AC_REQUIRE([gl_FUNC_STRERROR_0])
-  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_REQUIRE([AC_CANONICAL_HOST])
   dnl We intentionally do not check for the broader REPLACE_STRERROR_R,
   dnl since on glibc systems, strerror_r is replaced only for signature
   dnl issues, and perror is just fine.  Rather, we only want to
@@ -48,12 +48,12 @@ AC_DEFUN([gl_FUNC_PERROR],
             rm -rf conftest.txt1 conftest.txt2],
            [gl_cv_func_perror_works=no],
            [case "$host_os" in
-                       # Guess yes on musl systems.
-              *-musl*) gl_cv_func_perror_works="guessing yes" ;;
-                       # Guess yes on native Windows.
-              mingw*)  gl_cv_func_perror_works="guessing yes" ;;
-                       # Otherwise obey --enable-cross-guesses.
-              *)       gl_cv_func_perror_works="$gl_cross_guess_normal" ;;
+                                  # Guess yes on musl systems.
+              *-musl* | midipix*) gl_cv_func_perror_works="guessing yes" ;;
+                                  # Guess yes on native Windows.
+              mingw*)             gl_cv_func_perror_works="guessing yes" ;;
+                                  # Otherwise obey --enable-cross-guesses.
+              *)                  gl_cv_func_perror_works="$gl_cross_guess_normal" ;;
             esac
            ])
         ])
@@ -68,4 +68,9 @@ AC_DEFUN([gl_FUNC_PERROR],
       REPLACE_PERROR=1
       ;;
   esac
+  dnl Does perror clobber the strerror buffer?
+  case "$host_os" in
+                     # Yes on Android 11.
+    linux*-android*) REPLACE_PERROR=1 ;;
+  esac
 ])
diff --git a/m4/pipe.m4 b/m4/pipe.m4
index 62871c6d..1ad6688f 100644
--- a/m4/pipe.m4
+++ b/m4/pipe.m4
@@ -1,5 +1,5 @@
 # pipe.m4 serial 2
-dnl Copyright (C) 2010-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2010-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/printf.m4 b/m4/printf.m4
index 667452e3..efb85a57 100644
--- a/m4/printf.m4
+++ b/m4/printf.m4
@@ -1,5 +1,5 @@
-# printf.m4 serial 73
-dnl Copyright (C) 2003, 2007-2022 Free Software Foundation, Inc.
+# printf.m4 serial 82
+dnl Copyright (C) 2003, 2007-2023 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.
@@ -63,7 +63,7 @@ changequote(,)dnl
                                  # Guess yes on glibc systems.
            *-gnu* | gnu*)        gl_cv_func_printf_sizes_c99="guessing yes";;
                                  # Guess yes on musl systems.
-           *-musl*)              gl_cv_func_printf_sizes_c99="guessing yes";;
+           *-musl* | midipix*)   gl_cv_func_printf_sizes_c99="guessing yes";;
                                  # Guess yes on FreeBSD >= 5.
            freebsd[1-4].*)       gl_cv_func_printf_sizes_c99="guessing no";;
            freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
@@ -101,6 +101,92 @@ changequote([,])dnl
     ])
 ])
 
+dnl Test whether the *printf family of functions supports the 'w8', 'w16',
+dnl 'w32', 'w64', 'wf8', 'wf16', 'wf32', 'wf64' size specifiers. (ISO C23)
+dnl Result is gl_cv_func_printf_sizes_c23.
+
+AC_DEFUN([gl_PRINTF_SIZES_C23],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([gl_AC_HEADER_STDINT_H])
+  AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether printf supports size specifiers as in C23],
+    [gl_cv_func_printf_sizes_c23],
+    [
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/types.h>
+#if HAVE_STDINT_H_WITH_UINTMAX
+# include <stdint.h>
+#endif
+#if HAVE_INTTYPES_H_WITH_UINTMAX
+# include <inttypes.h>
+#endif
+static char buf[100];
+int main ()
+{
+  int result = 0;
+  buf[0] = '\0';
+  if (sprintf (buf, "%w8u %d", (uint8_t) 123, 33, 44, 55) < 0
+      || strcmp (buf, "123 33") != 0)
+    result |= 1;
+  buf[0] = '\0';
+  if (sprintf (buf, "%wf8u %d", (uint_fast8_t) 123, 33, 44, 55) < 0
+      || strcmp (buf, "123 33") != 0)
+    result |= 1;
+  buf[0] = '\0';
+  if (sprintf (buf, "%w16u %d", (uint16_t) 12345, 33, 44, 55) < 0
+      || strcmp (buf, "12345 33") != 0)
+    result |= 2;
+  buf[0] = '\0';
+  if (sprintf (buf, "%wf16u %d", (uint_fast16_t) 12345, 33, 44, 55) < 0
+      || strcmp (buf, "12345 33") != 0)
+    result |= 2;
+  buf[0] = '\0';
+  if (sprintf (buf, "%w32u %d", (uint32_t) 12345671, 33, 44, 55) < 0
+      || strcmp (buf, "12345671 33") != 0)
+    result |= 4;
+  buf[0] = '\0';
+  if (sprintf (buf, "%wf32u %d", (uint_fast32_t) 12345671, 33, 44, 55) < 0
+      || strcmp (buf, "12345671 33") != 0)
+    result |= 4;
+#if HAVE_STDINT_H_WITH_UINTMAX || HAVE_INTTYPES_H_WITH_UINTMAX
+  buf[0] = '\0';
+  if (sprintf (buf, "%w64u %d", (uint64_t) 12345671, 33, 44, 55) < 0
+      || strcmp (buf, "12345671 33") != 0)
+    result |= 8;
+  buf[0] = '\0';
+  if (sprintf (buf, "%wf64u %d", (uint_fast64_t) 12345671, 33, 44, 55) < 0
+      || strcmp (buf, "12345671 33") != 0)
+    result |= 8;
+#else
+  result |= 8;
+#endif
+  return result;
+}]])],
+        [gl_cv_func_printf_sizes_c23=yes],
+        [gl_cv_func_printf_sizes_c23=no],
+        [
+         case "$host_os" in
+                               # Guess no on glibc systems.
+           *-gnu* | gnu*)      gl_cv_func_printf_sizes_c23="guessing no";;
+                               # Guess no on musl systems.
+           *-musl* | midipix*) gl_cv_func_printf_sizes_c23="guessing no";;
+                               # Guess no on Android.
+           linux*-android*)    gl_cv_func_printf_sizes_c23="guessing no";;
+                               # Guess no on native Windows.
+           mingw*)             gl_cv_func_printf_sizes_c23="guessing no";;
+                               # If we don't know, obey --enable-cross-guesses.
+           *)                  gl_cv_func_printf_sizes_c23="$gl_cross_guess_normal";;
+         esac
+        ])
+    ])
+])
+
 dnl Test whether the *printf family of functions supports 'long double'
 dnl arguments together with the 'L' size specifier. (ISO C99, POSIX:2001)
 dnl Result is gl_cv_func_printf_long_double.
@@ -244,7 +330,7 @@ changequote(,)dnl
                                  # Guess yes on glibc systems.
            *-gnu* | gnu*)        gl_cv_func_printf_infinite="guessing yes";;
                                  # Guess yes on musl systems.
-           *-musl*)              gl_cv_func_printf_infinite="guessing yes";;
+           *-musl* | midipix*)   gl_cv_func_printf_infinite="guessing yes";;
                                  # Guess yes on FreeBSD >= 6.
            freebsd[1-5].*)       gl_cv_func_printf_infinite="guessing no";;
            freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";;
@@ -467,7 +553,7 @@ changequote(,)dnl
                                          # Guess yes on glibc systems.
                    *-gnu* | gnu*)        gl_cv_func_printf_infinite_long_double="guessing yes";;
                                          # Guess yes on musl systems.
-                   *-musl*)              gl_cv_func_printf_infinite_long_double="guessing yes";;
+                   *-musl* | midipix*)   gl_cv_func_printf_infinite_long_double="guessing yes";;
                                          # Guess yes on FreeBSD >= 6.
                    freebsd[1-5].*)       gl_cv_func_printf_infinite_long_double="guessing no";;
                    freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";;
@@ -591,7 +677,7 @@ int main ()
                [gl_cv_func_printf_directive_a="guessing no"])
              ;;
                                  # Guess yes on musl systems.
-           *-musl*)              gl_cv_func_printf_directive_a="guessing yes";;
+           *-musl* | midipix*)   gl_cv_func_printf_directive_a="guessing yes";;
                                  # Guess no on Android.
            linux*-android*)      gl_cv_func_printf_directive_a="guessing no";;
                                  # Guess no on native Windows.
@@ -603,6 +689,116 @@ int main ()
     ])
 ])
 
+dnl Test whether the *printf family of functions supports the 'b' conversion
+dnl specifier for binary output of integers.
+dnl (ISO C23)
+dnl Result is gl_cv_func_printf_directive_b.
+
+AC_DEFUN([gl_PRINTF_DIRECTIVE_B],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether printf supports the 'b' directive],
+    [gl_cv_func_printf_directive_b],
+    [
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+  int result = 0;
+  if (sprintf (buf, "%b %d", 12345, 33, 44, 55) < 0
+      || strcmp (buf, "11000000111001 33") != 0)
+    result |= 1;
+  return result;
+}]])],
+        [gl_cv_func_printf_directive_b=yes],
+        [gl_cv_func_printf_directive_b=no],
+        [
+         case "$host_os" in
+                               # Guess yes on glibc >= 2.35 systems.
+           *-gnu* | gnu*)
+             AC_EGREP_CPP([Lucky], [
+               #include <features.h>
+               #ifdef __GNU_LIBRARY__
+                #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 35) || (__GLIBC__ > 2)
+                 Lucky user
+                #endif
+               #endif
+               ],
+               [gl_cv_func_printf_directive_uppercase_b="guessing yes"],
+               [gl_cv_func_printf_directive_uppercase_b="guessing no"])
+             ;;
+                               # Guess no on musl systems.
+           *-musl* | midipix*) gl_cv_func_printf_directive_b="guessing no";;
+                               # Guess no on Android.
+           linux*-android*)    gl_cv_func_printf_directive_b="guessing no";;
+                               # Guess no on native Windows.
+           mingw*)             gl_cv_func_printf_directive_b="guessing no";;
+                               # If we don't know, obey --enable-cross-guesses.
+           *)                  gl_cv_func_printf_directive_b="$gl_cross_guess_normal";;
+         esac
+        ])
+    ])
+])
+
+dnl Test whether the *printf family of functions supports the 'B' conversion
+dnl specifier for binary output of integers.
+dnl (GNU, encouraged by ISO C23 § 7.23.6.1)
+dnl Result is gl_cv_func_printf_directive_uppercase_b.
+
+AC_DEFUN([gl_PRINTF_DIRECTIVE_UPPERCASE_B],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether printf supports the 'B' directive],
+    [gl_cv_func_printf_directive_uppercase_b],
+    [
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+  int result = 0;
+  if (sprintf (buf, "%#B %d", 12345, 33, 44, 55) < 0
+      || strcmp (buf, "0B11000000111001 33") != 0)
+    result |= 1;
+  return result;
+}]])],
+        [gl_cv_func_printf_directive_uppercase_b=yes],
+        [gl_cv_func_printf_directive_uppercase_b=no],
+        [
+         case "$host_os" in
+                               # Guess yes on glibc >= 2.35 systems.
+           *-gnu* | gnu*)
+             AC_EGREP_CPP([Lucky], [
+               #include <features.h>
+               #ifdef __GNU_LIBRARY__
+                #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 35) || (__GLIBC__ > 2)
+                 Lucky user
+                #endif
+               #endif
+               ],
+               [gl_cv_func_printf_directive_uppercase_b="guessing yes"],
+               [gl_cv_func_printf_directive_uppercase_b="guessing no"])
+             ;;
+                               # Guess no on musl systems.
+           *-musl* | midipix*) gl_cv_func_printf_directive_uppercase_b="guessing no";;
+                               # Guess no on Android.
+           linux*-android*)    gl_cv_func_printf_directive_uppercase_b="guessing no";;
+                               # Guess no on native Windows.
+           mingw*)             gl_cv_func_printf_directive_uppercase_b="guessing no";;
+                               # If we don't know, obey --enable-cross-guesses.
+           *)                  gl_cv_func_printf_directive_uppercase_b="$gl_cross_guess_normal";;
+         esac
+        ])
+    ])
+])
+
 dnl Test whether the *printf family of functions supports the %F format
 dnl directive. (ISO C99, POSIX:2001)
 dnl Result is gl_cv_func_printf_directive_f.
@@ -643,7 +839,7 @@ changequote(,)dnl
                                  # Guess yes on glibc systems.
            *-gnu* | gnu*)        gl_cv_func_printf_directive_f="guessing yes";;
                                  # Guess yes on musl systems.
-           *-musl*)              gl_cv_func_printf_directive_f="guessing yes";;
+           *-musl* | midipix*)   gl_cv_func_printf_directive_f="guessing yes";;
                                  # Guess yes on FreeBSD >= 6.
            freebsd[1-5].*)       gl_cv_func_printf_directive_f="guessing no";;
            freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";;
@@ -829,11 +1025,58 @@ changequote([,])dnl
     ])
 ])
 
+dnl Test whether the *printf family of functions supports the %lc format
+dnl directive and in particular, when the argument is a null wide character,
+dnl whether the functions don't produce a NUL byte.
+dnl Result is gl_cv_func_printf_directive_lc.
+
+AC_DEFUN([gl_PRINTF_DIRECTIVE_LC],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether printf supports the 'lc' directive correctly],
+    [gl_cv_func_printf_directive_lc],
+    [
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
+#include <stdio.h>
+#include <wchar.h>
+#include <string.h>
+int main ()
+{
+  int result = 0;
+  char buf[100];
+  /* This test fails on glibc 2.35, FreeBSD 13.1, NetBSD 9.0, OpenBSD 7.2,
+     macOS 12.5, AIX 7.2, Solaris 11.4.
+     glibc 2.35 bug: <https://sourceware.org/bugzilla/show_bug.cgi?id=30257>  */
+  {
+    buf[0] = '\0';
+    if (sprintf (buf, "%lc%lc%lc", (wint_t) 'a', (wint_t) 0, (wint_t) 'z') < 0
+        || strcmp (buf, "az") != 0)
+      result |= 1;
+  }
+  return result;
+}]])],
+        [gl_cv_func_printf_directive_lc=yes],
+        [gl_cv_func_printf_directive_lc=no],
+        [
+changequote(,)dnl
+         case "$host_os" in
+                               # Guess yes on musl libc.
+           *-musl* | midipix*) gl_cv_func_printf_directive_lc="guessing yes";;
+                               # Guess no otherwise.
+           *)                  gl_cv_func_printf_directive_lc="guessing no";;
+         esac
+changequote([,])dnl
+        ])
+    ])
+])
+
 dnl Test whether the *printf family of functions supports POSIX/XSI format
 dnl strings with positions. (POSIX:2001)
 dnl Result is gl_cv_func_printf_positions.
 
-AC_DEFUN([gl_PRINTF_POSITIONS],
+AC_DEFUN_ONCE([gl_PRINTF_POSITIONS],
 [
   AC_REQUIRE([AC_PROG_CC])
   AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
@@ -990,18 +1233,18 @@ int main ()
         [
 changequote(,)dnl
          case "$host_os" in
-                            # Guess yes on glibc systems.
-           *-gnu* | gnu*)   gl_cv_func_printf_flag_zero="guessing yes";;
-                            # Guess yes on musl systems.
-           *-musl*)         gl_cv_func_printf_flag_zero="guessing yes";;
-                            # Guess yes on BeOS.
-           beos*)           gl_cv_func_printf_flag_zero="guessing yes";;
-                            # Guess no on Android.
-           linux*-android*) gl_cv_func_printf_flag_zero="guessing no";;
-                            # Guess no on native Windows.
-           mingw*)          gl_cv_func_printf_flag_zero="guessing no";;
-                            # If we don't know, obey --enable-cross-guesses.
-           *)               gl_cv_func_printf_flag_zero="$gl_cross_guess_normal";;
+                               # Guess yes on glibc systems.
+           *-gnu* | gnu*)      gl_cv_func_printf_flag_zero="guessing yes";;
+                               # Guess yes on musl systems.
+           *-musl* | midipix*) gl_cv_func_printf_flag_zero="guessing yes";;
+                               # Guess yes on BeOS.
+           beos*)              gl_cv_func_printf_flag_zero="guessing yes";;
+                               # Guess no on Android.
+           linux*-android*)    gl_cv_func_printf_flag_zero="guessing no";;
+                               # Guess no on native Windows.
+           mingw*)             gl_cv_func_printf_flag_zero="guessing no";;
+                               # If we don't know, obey --enable-cross-guesses.
+           *)                  gl_cv_func_printf_flag_zero="$gl_cross_guess_normal";;
          esac
 changequote([,])dnl
         ])
@@ -1239,7 +1482,7 @@ changequote(,)dnl
                                  # Guess yes on glibc systems.
            *-gnu* | gnu*)        gl_cv_func_snprintf_truncation_c99="guessing yes";;
                                  # Guess yes on musl systems.
-           *-musl*)              gl_cv_func_snprintf_truncation_c99="guessing yes";;
+           *-musl* | midipix*)   gl_cv_func_snprintf_truncation_c99="guessing yes";;
                                  # Guess yes on FreeBSD >= 5.
            freebsd[1-4].*)       gl_cv_func_snprintf_truncation_c99="guessing no";;
            freebsd* | kfreebsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
@@ -1344,7 +1587,7 @@ changequote(,)dnl
                                  # Guess yes on glibc systems.
            *-gnu* | gnu*)        gl_cv_func_snprintf_retval_c99="guessing yes";;
                                  # Guess yes on musl systems.
-           *-musl*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
+           *-musl* | midipix*)   gl_cv_func_snprintf_retval_c99="guessing yes";;
                                  # Guess yes on FreeBSD >= 5.
            freebsd[1-4].*)       gl_cv_func_snprintf_retval_c99="guessing no";;
            freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
@@ -1447,7 +1690,7 @@ int main ()
                                  ;;
 changequote(,)dnl
                                  # Guess yes on musl systems.
-           *-musl*)              gl_cv_func_snprintf_directive_n="guessing yes";;
+           *-musl* | midipix*)   gl_cv_func_snprintf_directive_n="guessing yes";;
                                  # Guess yes on FreeBSD >= 5.
            freebsd[1-4].*)       gl_cv_func_snprintf_directive_n="guessing no";;
            freebsd* | kfreebsd*) gl_cv_func_snprintf_directive_n="guessing yes";;
@@ -1604,7 +1847,7 @@ changequote(,)dnl
                                  # Guess yes on glibc systems.
            *-gnu* | gnu*)        gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
                                  # Guess yes on musl systems.
-           *-musl*)              gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+           *-musl* | midipix*)   gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
                                  # Guess yes on FreeBSD >= 5.
            freebsd[1-4].*)       gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
            freebsd* | kfreebsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
@@ -1641,88 +1884,227 @@ changequote([,])dnl
     ])
 ])
 
+dnl Test whether the swprintf function works correctly when it produces output
+dnl that contains null wide characters.
+dnl Result is gl_cv_func_swprintf_works.
+
+AC_DEFUN([gl_SWPRINTF_WORKS],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CHECK_FUNCS_ONCE([swprintf])
+  AC_CACHE_CHECK([whether swprintf works],
+    [gl_cv_func_swprintf_works],
+    [
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
+#ifndef __USE_MINGW_ANSI_STDIO
+# define __USE_MINGW_ANSI_STDIO 1
+#endif
+#include <stdio.h>
+#include <wchar.h>
+int main()
+{
+  int result = 0;
+  { /* This test fails on musl, FreeBSD, NetBSD, OpenBSD, macOS, AIX.  */
+    wchar_t buf[5] = { 0xBEEF, 0xBEEF, 0xBEEF, 0xBEEF, 0xBEEF };
+    int ret = swprintf (buf, 4, L"%cz", '\0');
+    /* Expected result:
+         ret = 2, buf[0] = 0x0, buf[1] = 0x7a, buf[2] = 0x0, buf[3] = 0xbeef
+       musl libc 1.2.3:
+         ret = 2, buf[0] = 0x0, buf[1] = 0x0, buf[2] = 0x0, buf[3] = 0x0
+         Reported at <https://www.openwall.com/lists/musl/2023/03/22/9>.
+       FreeBSD 13.1, NetBSD 9.0, OpenBSD 7.2, macOS 12.5, AIX 7.2:
+         ret = 2, buf[0] = 0x0, buf[1] = 0xbeef, buf[2] = 0xbeef, buf[3] = 0xbeef
+     */
+    if (ret < 0 || buf[1] != 'z')
+      result |= 1;
+  }
+  { /* This test fails on mingw.  */
+    wchar_t buf[2];
+    int ret = swprintf (buf, 2, L"%lc", (wint_t)0);
+    /* Expected: ret = 1
+       mingw:    ret = 0
+     */
+    if (ret != 1)
+      result |= 2;
+  }
+  return result;
+}]])],
+        [gl_cv_func_swprintf_works=yes],
+        [gl_cv_func_swprintf_works=no],
+        [case "$host_os" in
+                               # Guess yes on glibc systems.
+           *-gnu* | gnu*)      gl_cv_func_swprintf_works="guessing yes";;
+                               # Guess no on musl systems.
+           *-musl* | midipix*) gl_cv_func_swprintf_works="guessing yes";;
+                               # Guess no on FreeBSD, NetBSD, OpenBSD, macOS, AIX.
+           freebsd* | midnightbsd* | netbsd* | openbsd* | darwin* | aix*)
+                               gl_cv_func_swprintf_works="guessing no";;
+                               # Guess no on native Windows.
+           mingw* | pw*)       gl_cv_func_swprintf_works="guessing no";;
+                               # If we don't know, obey --enable-cross-guesses.
+           *)                  gl_cv_func_swprintf_works="$gl_cross_guess_normal";;
+         esac
+        ])
+    ])
+])
+
+dnl Test whether the *wprintf family of functions supports the 'a' and 'A'
+dnl conversion specifier for hexadecimal output of 'long double' numbers.
+dnl (ISO C99, POSIX:2001)
+dnl Result is gl_cv_func_swprintf_directive_la.
+
+AC_DEFUN([gl_SWPRINTF_DIRECTIVE_LA],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether swprintf supports the 'La' and 'LA' directives],
+    [gl_cv_func_swprintf_directive_la],
+    [
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
+#include <stdio.h>
+#include <wchar.h>
+static wchar_t buf[100];
+int main ()
+{
+  int result = 0;
+  /* This catches a glibc 2.15 and Haiku 2022 bug.  */
+  if (swprintf (buf, sizeof (buf) / sizeof (wchar_t),
+                L"%La %d", 3.1416015625L, 33, 44, 55) < 0
+      || (wcscmp (buf, L"0x1.922p+1 33") != 0
+          && wcscmp (buf, L"0x3.244p+0 33") != 0
+          && wcscmp (buf, L"0x6.488p-1 33") != 0
+          && wcscmp (buf, L"0xc.91p-2 33") != 0))
+    result |= 1;
+  return result;
+}]])],
+        [gl_cv_func_swprintf_directive_la=yes],
+        [gl_cv_func_swprintf_directive_la=no],
+        [case "$host_os" in
+                                 # Guess yes on glibc >= 2.17 systems.
+           *-gnu* | gnu*)
+             AC_EGREP_CPP([Unlucky], [
+               #include <features.h>
+               #ifdef __GNU_LIBRARY__
+                #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 16) || (__GLIBC__ > 2)) && !defined __UCLIBC__
+                 Unlucky
+                #endif
+               #endif
+               ],
+               [gl_cv_func_swprintf_directive_la="guessing yes"],
+               [gl_cv_func_swprintf_directive_la="guessing no"])
+             ;;
+                                 # Guess yes on musl systems.
+           *-musl* | midipix*)   gl_cv_func_swprintf_directive_la="guessing yes";;
+                                 # Guess yes on Android.
+           linux*-android*)      gl_cv_func_swprintf_directive_la="guessing no";;
+                                 # Guess yes on native Windows.
+           mingw*)               gl_cv_func_swprintf_directive_la="guessing no";;
+                                 # If we don't know, obey --enable-cross-guesses.
+           *)                    gl_cv_func_swprintf_directive_la="$gl_cross_guess_normal";;
+         esac
+        ])
+    ])
+])
+
 dnl The results of these tests on various platforms are:
 dnl
 dnl 1 = gl_PRINTF_SIZES_C99
-dnl 2 = gl_PRINTF_LONG_DOUBLE
-dnl 3 = gl_PRINTF_INFINITE
-dnl 4 = gl_PRINTF_INFINITE_LONG_DOUBLE
-dnl 5 = gl_PRINTF_DIRECTIVE_A
-dnl 6 = gl_PRINTF_DIRECTIVE_F
-dnl 7 = gl_PRINTF_DIRECTIVE_N
-dnl 8 = gl_PRINTF_DIRECTIVE_LS
-dnl 9 = gl_PRINTF_POSITIONS
-dnl 10 = gl_PRINTF_FLAG_GROUPING
-dnl 11 = gl_PRINTF_FLAG_LEFTADJUST
-dnl 12 = gl_PRINTF_FLAG_ZERO
-dnl 13 = gl_PRINTF_PRECISION
-dnl 14 = gl_PRINTF_ENOMEM
-dnl 15 = gl_SNPRINTF_PRESENCE
-dnl 16 = gl_SNPRINTF_TRUNCATION_C99
-dnl 17 = gl_SNPRINTF_RETVAL_C99
-dnl 18 = gl_SNPRINTF_DIRECTIVE_N
-dnl 19 = gl_SNPRINTF_SIZE1
-dnl 20 = gl_VSNPRINTF_ZEROSIZE_C99
+dnl 2 = gl_PRINTF_SIZES_C23
+dnl 3 = gl_PRINTF_LONG_DOUBLE
+dnl 4 = gl_PRINTF_INFINITE
+dnl 5 = gl_PRINTF_INFINITE_LONG_DOUBLE
+dnl 6 = gl_PRINTF_DIRECTIVE_A
+dnl 7 = gl_PRINTF_DIRECTIVE_B
+dnl 8 = gl_PRINTF_DIRECTIVE_UPPERCASE_B
+dnl 9 = gl_PRINTF_DIRECTIVE_F
+dnl 10 = gl_PRINTF_DIRECTIVE_N
+dnl 11 = gl_PRINTF_DIRECTIVE_LS
+dnl 12 = gl_PRINTF_DIRECTIVE_LC
+dnl 13 = gl_PRINTF_POSITIONS
+dnl 14 = gl_PRINTF_FLAG_GROUPING
+dnl 15 = gl_PRINTF_FLAG_LEFTADJUST
+dnl 16 = gl_PRINTF_FLAG_ZERO
+dnl 17 = gl_PRINTF_PRECISION
+dnl 18 = gl_PRINTF_ENOMEM
+dnl 19 = gl_SNPRINTF_PRESENCE
+dnl 20 = gl_SNPRINTF_TRUNCATION_C99
+dnl 21 = gl_SNPRINTF_RETVAL_C99
+dnl 22 = gl_SNPRINTF_DIRECTIVE_N
+dnl 23 = gl_SNPRINTF_SIZE1
+dnl 24 = gl_VSNPRINTF_ZEROSIZE_C99
+dnl 25 = gl_SWPRINTF_WORKS
+dnl 26 = gl_SWPRINTF_DIRECTIVE_LA
 dnl
 dnl 1 = checking whether printf supports size specifiers as in C99...
-dnl 2 = checking whether printf supports 'long double' arguments...
-dnl 3 = checking whether printf supports infinite 'double' arguments...
-dnl 4 = checking whether printf supports infinite 'long double' arguments...
-dnl 5 = checking whether printf supports the 'a' and 'A' directives...
-dnl 6 = checking whether printf supports the 'F' directive...
-dnl 7 = checking whether printf supports the 'n' directive...
-dnl 8 = checking whether printf supports the 'ls' directive...
-dnl 9 = checking whether printf supports POSIX/XSI format strings with positions...
-dnl 10 = checking whether printf supports the grouping flag...
-dnl 11 = checking whether printf supports the left-adjust flag correctly...
-dnl 12 = checking whether printf supports the zero flag correctly...
-dnl 13 = checking whether printf supports large precisions...
-dnl 14 = checking whether printf survives out-of-memory conditions...
-dnl 15 = checking for snprintf...
-dnl 16 = checking whether snprintf truncates the result as in C99...
-dnl 17 = checking whether snprintf returns a byte count as in C99...
-dnl 18 = checking whether snprintf fully supports the 'n' directive...
-dnl 19 = checking whether snprintf respects a size of 1...
-dnl 20 = checking whether vsnprintf respects a zero size as in C99...
+dnl 2 = checking whether printf supports size specifiers as in C23...
+dnl 3 = checking whether printf supports 'long double' arguments...
+dnl 4 = checking whether printf supports infinite 'double' arguments...
+dnl 5 = checking whether printf supports infinite 'long double' arguments...
+dnl 6 = checking whether printf supports the 'a' and 'A' directives...
+dnl 7 = checking whether printf supports the 'b' directive...
+dnl 8 = checking whether printf supports the 'B' directive...
+dnl 9 = checking whether printf supports the 'F' directive...
+dnl 10 = checking whether printf supports the 'n' directive...
+dnl 11 = checking whether printf supports the 'ls' directive...
+dnl 12 = checking whether printf supports the 'lc' directive correctly...
+dnl 13 = checking whether printf supports POSIX/XSI format strings with positions...
+dnl 14 = checking whether printf supports the grouping flag...
+dnl 15 = checking whether printf supports the left-adjust flag correctly...
+dnl 16 = checking whether printf supports the zero flag correctly...
+dnl 17 = checking whether printf supports large precisions...
+dnl 18 = checking whether printf survives out-of-memory conditions...
+dnl 19 = checking for snprintf...
+dnl 20 = checking whether snprintf truncates the result as in C99...
+dnl 21 = checking whether snprintf returns a byte count as in C99...
+dnl 22 = checking whether snprintf fully supports the 'n' directive...
+dnl 23 = checking whether snprintf respects a size of 1...
+dnl 24 = checking whether vsnprintf respects a zero size as in C99...
+dnl 25 = checking whether swprintf works...
+dnl 26 = checking whether swprintf supports the 'La' and 'LA' directives...
 dnl
 dnl . = yes, # = no.
 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                .  .  .  #  #  .  .  .  .  .  .  #  .  .  .  .  .  .  .  .
-dnl   Mac OS X 10.3.9                .  .  .  .  #  .  .  .  .  .  .  #  .  #  .  .  .  .  .  .
-dnl   OpenBSD 6.0, 6.7               .  .  .  .  #  .  .  .  .  .  .  .  .  #  .  .  .  .  .  .
-dnl   OpenBSD 3.9, 4.0               .  .  #  #  #  #  .  #  .  #  .  #  .  #  .  .  .  .  .  .
-dnl   Cygwin 1.7.0 (2009)            .  .  .  #  .  .  .  ?  .  .  .  .  .  ?  .  .  .  .  .  .
-dnl   Cygwin 1.5.25 (2008)           .  .  .  #  #  .  .  #  .  .  .  .  .  #  .  .  .  .  .  .
-dnl   Cygwin 1.5.19 (2006)           #  .  .  #  #  #  .  #  .  #  .  #  #  #  .  .  .  .  .  .
-dnl   Solaris 11.4                   .  .  #  #  #  .  .  #  .  .  .  #  .  .  .  .  .  .  .  .
-dnl   Solaris 11.3                   .  .  .  .  #  .  .  #  .  .  .  .  .  .  .  .  .  .  .  .
-dnl   Solaris 11.0                   .  .  #  #  #  .  .  #  .  .  .  #  .  .  .  .  .  .  .  .
-dnl   Solaris 10                     .  .  #  #  #  .  .  #  .  .  .  #  #  .  .  .  .  .  .  .
-dnl   Solaris 2.6 ... 9              #  .  #  #  #  #  .  #  .  .  .  #  #  .  .  .  #  .  .  .
-dnl   Solaris 2.5.1                  #  .  #  #  #  #  .  #  .  .  .  #  .  .  #  #  #  #  #  #
-dnl   AIX 7.1                        .  .  #  #  #  .  .  .  .  .  .  #  #  .  .  .  .  .  .  .
-dnl   AIX 5.2                        .  .  #  #  #  .  .  .  .  .  .  #  .  .  .  .  .  .  .  .
-dnl   AIX 4.3.2, 5.1                 #  .  #  #  #  #  .  .  .  .  .  #  .  .  .  .  #  .  .  .
-dnl   HP-UX 11.31                    .  .  .  .  #  .  .  .  .  .  .  #  .  .  .  .  #  #  .  .
-dnl   HP-UX 11.{00,11,23}            #  .  .  .  #  #  .  .  .  .  .  #  .  .  .  .  #  #  .  #
-dnl   HP-UX 10.20                    #  .  #  .  #  #  .  ?  .  .  #  #  .  .  .  .  #  #  ?  #
-dnl   IRIX 6.5                       #  .  #  #  #  #  .  #  .  .  .  #  .  .  .  .  #  .  .  .
-dnl   OSF/1 5.1                      #  .  #  #  #  #  .  .  .  .  .  #  .  .  .  .  #  .  .  #
-dnl   OSF/1 4.0d                     #  .  #  #  #  #  .  .  .  .  .  #  .  .  #  #  #  #  #  #
-dnl   NetBSD 9.0                     .  .  .  .  #  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .
-dnl   NetBSD 5.0                     .  .  .  #  #  .  .  .  .  .  .  #  .  #  .  .  .  .  .  .
-dnl   NetBSD 4.0                     .  ?  ?  ?  ?  ?  .  ?  .  ?  ?  ?  ?  ?  .  .  .  ?  ?  ?
-dnl   NetBSD 3.0                     .  .  .  .  #  #  .  ?  #  #  ?  #  .  #  .  .  .  .  .  .
-dnl   Haiku                          .  .  .  #  #  #  .  #  .  .  .  .  .  ?  .  .  ?  .  .  .
-dnl   BeOS                           #  #  .  #  #  #  .  ?  #  .  ?  .  #  ?  .  .  ?  .  .  .
-dnl   Android 4.3                    .  .  #  #  #  #  #  #  .  #  .  #  .  #  .  .  .  #  .  .
-dnl   old mingw / msvcrt             #  #  #  #  #  #  .  .  #  #  .  #  #  ?  .  #  #  #  .  .
-dnl   MSVC 9                         #  #  #  #  #  #  #  .  #  #  .  #  #  ?  #  #  #  #  .  .
-dnl   mingw 2009-2011                .  #  .  #  .  .  .  .  #  #  .  .  .  ?  .  .  .  .  .  .
-dnl   mingw-w64 2011                 #  #  #  #  #  #  .  .  #  #  .  #  #  ?  .  #  #  #  .  .
+dnl                                  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
+dnl   musl libc 1.2.3                .  #  .  .  .  .  #  #  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  #  .
+dnl   glibc 2.35                     .  #  .  .  .  .  .  .  .  .  .  #  .  .  .  .  .  .  .  .  .  .  .  .  .  .
+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                .  #  .  .  #  #  #  #  .  .  .  #  .  .  .  #  .  .  .  .  .  .  .  .  #  ?
+dnl   Mac OS X 10.3.9                .  #  .  .  .  #  #  #  .  .  .  #  .  .  .  #  .  #  .  .  .  .  .  .  #  ?
+dnl   OpenBSD 6.0, 6.7               .  #  .  .  .  #  #  #  .  .  .  #  .  .  .  .  .  #  .  .  .  .  .  .  #  .
+dnl   OpenBSD 3.9, 4.0               .  #  .  #  #  #  #  #  #  .  #  #  .  #  .  #  .  #  .  .  .  .  .  .  #  ?
+dnl   Cygwin 1.7.0 (2009)            .  #  .  .  #  .  #  #  .  .  ?  ?  .  .  .  .  .  ?  .  .  .  .  .  .  ?  ?
+dnl   Cygwin 1.5.25 (2008)           .  #  .  .  #  #  #  #  .  .  #  ?  .  .  .  .  .  #  .  .  .  .  .  .  ?  ?
+dnl   Cygwin 1.5.19 (2006)           #  #  .  .  #  #  #  #  #  .  #  ?  .  #  .  #  #  #  .  .  .  .  .  .  ?  ?
+dnl   Solaris 11.4                   .  #  .  #  #  #  #  #  .  .  #  #  .  .  .  #  .  .  .  .  .  .  .  .  .  ?
+dnl   Solaris 11.3                   .  #  .  .  .  #  #  #  .  .  #  #  .  .  .  .  .  .  .  .  .  .  .  .  .  ?
+dnl   Solaris 11.0                   .  #  .  #  #  #  #  #  .  .  #  #  .  .  .  #  .  .  .  .  .  .  .  .  ?  ?
+dnl   Solaris 10                     .  #  .  #  #  #  #  #  .  .  #  #  .  .  .  #  #  .  .  .  .  .  .  .  ?  ?
+dnl   Solaris 2.6 ... 9              #  #  .  #  #  #  #  #  #  .  #  #  .  .  .  #  #  .  .  .  #  .  .  .  ?  ?
+dnl   Solaris 2.5.1                  #  #  .  #  #  #  #  #  #  .  #  #  .  .  .  #  .  .  #  #  #  #  #  #  ?  ?
+dnl   AIX 7.1                        .  #  .  #  #  #  #  #  .  .  .  #  .  .  .  #  #  .  .  .  .  .  .  .  #  .
+dnl   AIX 5.2                        .  #  .  #  #  #  #  #  .  .  .  #  .  .  .  #  .  .  .  .  .  .  .  .  #  ?
+dnl   AIX 4.3.2, 5.1                 #  #  .  #  #  #  #  #  #  .  .  #  .  .  .  #  .  .  .  .  #  .  .  .  #  ?
+dnl   HP-UX 11.31                    .  #  .  .  .  #  #  #  .  .  .  ?  .  .  .  #  .  .  .  .  #  #  .  .  ?  ?
+dnl   HP-UX 11.{00,11,23}            #  #  .  .  .  #  #  #  #  .  .  ?  .  .  .  #  .  .  .  .  #  #  .  #  ?  ?
+dnl   HP-UX 10.20                    #  #  .  #  .  #  #  #  #  .  ?  ?  .  .  #  #  .  .  .  .  #  #  ?  #  ?  ?
+dnl   IRIX 6.5                       #  #  .  #  #  #  #  #  #  .  #  #  .  .  .  #  .  .  .  .  #  .  .  .  #  ?
+dnl   OSF/1 5.1                      #  #  .  #  #  #  #  #  #  .  .  ?  .  .  .  #  .  .  .  .  #  .  .  #  ?  ?
+dnl   OSF/1 4.0d                     #  #  .  #  #  #  #  #  #  .  .  ?  .  .  .  #  .  .  #  #  #  #  #  #  ?  ?
+dnl   NetBSD 9.0                     .  #  .  .  .  #  #  #  .  .  .  #  .  .  .  .  .  .  .  .  .  .  .  .  #  .
+dnl   NetBSD 5.0                     .  #  .  .  #  #  #  #  .  .  .  #  .  .  .  #  .  #  .  .  .  .  .  .  #  ?
+dnl   NetBSD 4.0                     .  #  ?  ?  ?  ?  #  #  ?  .  ?  #  .  ?  ?  ?  ?  ?  .  .  .  ?  ?  ?  #  ?
+dnl   NetBSD 3.0                     .  #  .  .  .  #  #  #  #  .  ?  #  #  #  ?  #  .  #  .  .  .  .  .  .  #  ?
+dnl   Haiku                          .  #  .  .  #  #  #  #  #  .  #  ?  .  .  .  .  .  ?  .  .  ?  .  .  .  .  #
+dnl   BeOS                           #  #  #  .  #  #  #  #  #  .  ?  ?  #  .  ?  .  #  ?  .  .  ?  .  .  .  ?  ?
+dnl   Android 4.3                    .  #  .  #  #  #  #  #  #  #  #  ?  .  #  .  #  .  #  .  .  .  #  .  .  ?  ?
+dnl   old mingw / msvcrt             #  #  #  #  #  #  #  #  #  .  .  ?  #  #  .  #  #  ?  .  #  #  #  .  .  #  ?
+dnl   MSVC 9                         #  #  #  #  #  #  #  #  #  #  .  ?  #  #  .  #  #  ?  #  #  #  #  .  .  #  ?
+dnl   mingw 2009-2011                .  #  #  .  #  .  #  #  .  .  .  ?  #  #  .  .  .  ?  .  .  .  .  .  .  #  ?
+dnl   mingw-w64 2011                 #  #  #  #  #  #  #  #  #  .  .  ?  #  #  .  #  #  ?  .  #  #  #  .  .  #  ?
diff --git a/m4/pselect.m4 b/m4/pselect.m4
index 86114416..6c3d1b8f 100644
--- a/m4/pselect.m4
+++ b/m4/pselect.m4
@@ -1,5 +1,5 @@
-# pselect.m4 serial 10
-dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
+# pselect.m4 serial 11
+dnl Copyright (C) 2011-2023 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.
@@ -54,6 +54,8 @@ AC_DEFUN([gl_FUNC_PSELECT],
            case "$host_os" in
                              # Guess yes on Linux systems.
             linux-* | linux) gl_cv_func_pselect_detects_ebadf="guessing yes" ;;
+                             # Guess yes on systems that emulate the Linux system calls.
+            midipix*)        gl_cv_func_pselect_detects_ebadf="guessing yes" ;;
                              # Guess yes on glibc systems.
             *-gnu* | gnu*)   gl_cv_func_pselect_detects_ebadf="guessing yes" ;;
                              # If we don't know, obey --enable-cross-guesses.
diff --git a/m4/pthread-thread.m4 b/m4/pthread-thread.m4
index 969628ea..aafd9793 100644
--- a/m4/pthread-thread.m4
+++ b/m4/pthread-thread.m4
@@ -1,5 +1,5 @@
 # pthread-thread.m4 serial 2
-dnl Copyright (C) 2019-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2019-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/pthread_h.m4 b/m4/pthread_h.m4
index 4146aef3..0d536fc9 100644
--- a/m4/pthread_h.m4
+++ b/m4/pthread_h.m4
@@ -1,5 +1,5 @@
 # pthread_h.m4 serial 8
-dnl Copyright (C) 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/pthread_rwlock_rdlock.m4 b/m4/pthread_rwlock_rdlock.m4
index 8ad78392..66b29f89 100644
--- a/m4/pthread_rwlock_rdlock.m4
+++ b/m4/pthread_rwlock_rdlock.m4
@@ -1,5 +1,5 @@
-# pthread_rwlock_rdlock.m4 serial 4
-dnl Copyright (C) 2017-2022 Free Software Foundation, Inc.
+# pthread_rwlock_rdlock.m4 serial 5
+dnl Copyright (C) 2017-2023 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.
@@ -156,22 +156,22 @@ main ()
        [gl_cv_pthread_rwlock_rdlock_prefer_writer=yes],
        [gl_cv_pthread_rwlock_rdlock_prefer_writer=no],
        [case "$host_os" in
-                         # Guess no on glibc systems.
-          *-gnu* | gnu*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
-                         # Guess no on musl systems.
-          *-musl*)       gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
-                         # Guess no on bionic systems.
-          *-android*)    gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
-                         # Guess yes on native Windows with the mingw-w64 winpthreads library.
-                         # Guess no on native Windows with the gnulib windows-rwlock module.
-          mingw*)        if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
-                           gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes"
-                         else
-                           gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no"
-                         fi
-                         ;;
-                         # If we don't know, obey --enable-cross-guesses.
-          *)             gl_cv_pthread_rwlock_rdlock_prefer_writer="$gl_cross_guess_normal" ;;
+                              # Guess no on glibc systems.
+          *-gnu* | gnu*)      gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
+                              # Guess no on musl systems.
+          *-musl* | midipix*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
+                              # Guess no on bionic systems.
+          *-android*)         gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
+                              # Guess yes on native Windows with the mingw-w64 winpthreads library.
+                              # Guess no on native Windows with the gnulib windows-rwlock module.
+          mingw*)             if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
+                                gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes"
+                              else
+                                gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no"
+                              fi
+                              ;;
+                              # If we don't know, obey --enable-cross-guesses.
+          *)                  gl_cv_pthread_rwlock_rdlock_prefer_writer="$gl_cross_guess_normal" ;;
          esac
        ])
      LIBS="$save_LIBS"
diff --git a/m4/pthread_sigmask.m4 b/m4/pthread_sigmask.m4
index 0aa8c53f..27795282 100644
--- a/m4/pthread_sigmask.m4
+++ b/m4/pthread_sigmask.m4
@@ -1,5 +1,5 @@
-# pthread_sigmask.m4 serial 21
-dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
+# pthread_sigmask.m4 serial 22
+dnl Copyright (C) 2011-2023 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.
@@ -24,7 +24,7 @@ AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK],
        [gl_cv_func_pthread_sigmask_macro=no])
     ])
 
-  LIB_PTHREAD_SIGMASK=
+  PTHREAD_SIGMASK_LIB=
 
   if test $gl_cv_func_pthread_sigmask_macro = yes; then
     dnl pthread_sigmask is a dummy macro.
@@ -62,7 +62,7 @@ AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK],
               ])
             if test $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD = yes; then
               dnl pthread_sigmask is available with -pthread or -lpthread.
-              LIB_PTHREAD_SIGMASK="$LIBMULTITHREAD"
+              PTHREAD_SIGMASK_LIB="$LIBMULTITHREAD"
             else
               dnl pthread_sigmask is not available at all.
               HAVE_PTHREAD_SIGMASK=0
@@ -101,6 +101,9 @@ AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK],
     ])
   fi
 
+  AC_SUBST([PTHREAD_SIGMASK_LIB])
+  dnl For backward compatibility.
+  LIB_PTHREAD_SIGMASK="$PTHREAD_SIGMASK_LIB"
   AC_SUBST([LIB_PTHREAD_SIGMASK])
   dnl We don't need a variable LTLIB_PTHREAD_SIGMASK, because when
   dnl "$gl_threads_api" = posix, $LTLIBMULTITHREAD and $LIBMULTITHREAD are the
@@ -114,7 +117,7 @@ AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK],
     dnl On FreeBSD 13.0, MidnightBSD 1.1, HP-UX 11.31, Solaris 9, in programs
     dnl that are not linked with -lpthread, the pthread_sigmask() function
     dnl always returns 0 and has no effect.
-    if test -z "$LIB_PTHREAD_SIGMASK"; then
+    if test -z "$PTHREAD_SIGMASK_LIB"; then
       case " $LIBS " in
         *' -pthread '*) ;;
         *' -lpthread '*) ;;
@@ -162,7 +165,7 @@ AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK],
       [gl_cv_func_pthread_sigmask_return_works],
       [
         gl_save_LIBS="$LIBS"
-        LIBS="$LIBS $LIB_PTHREAD_SIGMASK"
+        LIBS="$LIBS $PTHREAD_SIGMASK_LIB"
         AC_RUN_IFELSE(
           [AC_LANG_SOURCE([[
 #include <pthread.h>
@@ -208,13 +211,14 @@ int main ()
             gl_cv_func_pthread_sigmask_unblock_works="guessing yes";;
         esac
         m4_ifdef([gl_][THREADLIB],
-          [dnl Link against $LIBMULTITHREAD, not only $LIB_PTHREAD_SIGMASK.
+          [dnl Link against $LIBMULTITHREAD, not only $PTHREAD_SIGMASK_LIB.
            dnl Otherwise we get a false positive on those platforms where
            dnl $gl_cv_func_pthread_sigmask_in_libc_works is "no".
            gl_save_LIBS=$LIBS
            LIBS="$LIBS $LIBMULTITHREAD"])
         AC_RUN_IFELSE(
           [AC_LANG_SOURCE([[
+#include <limits.h>
 #include <pthread.h>
 #include <signal.h>
 #include <stdio.h>
@@ -230,14 +234,16 @@ sigint_handler (int sig)
 int main ()
 {
   sigset_t set;
-  int pid = getpid ();
+  pid_t pid = getpid ();
   char command[80];
+  if (LONG_MAX < pid)
+    return 6;
   signal (SIGINT, sigint_handler);
   sigemptyset (&set);
   sigaddset (&set, SIGINT);
   if (!(pthread_sigmask (SIG_BLOCK, &set, NULL) == 0))
     return 1;
-  sprintf (command, "sh -c 'sleep 1; kill -%d %d' &", SIGINT, pid);
+  sprintf (command, "sh -c 'sleep 1; kill -INT %ld' &", (long) pid);
   if (!(system (command) == 0))
     return 2;
   sleep (2);
diff --git a/m4/putenv.m4 b/m4/putenv.m4
index c7b45034..d37a6021 100644
--- a/m4/putenv.m4
+++ b/m4/putenv.m4
@@ -1,5 +1,5 @@
-# putenv.m4 serial 25
-dnl Copyright (C) 2002-2022 Free Software Foundation, Inc.
+# putenv.m4 serial 26
+dnl Copyright (C) 2002-2023 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.
@@ -38,14 +38,14 @@ AC_DEFUN([gl_FUNC_PUTENV],
        [gl_cv_func_svid_putenv=no],
        [dnl When crosscompiling, assume putenv is broken.
         case "$host_os" in
-                         # Guess yes on glibc systems.
-          *-gnu* | gnu*) gl_cv_func_svid_putenv="guessing yes" ;;
-                         # Guess yes on musl systems.
-          *-musl*)       gl_cv_func_svid_putenv="guessing yes" ;;
-                         # Guess no on native Windows.
-          mingw*)        gl_cv_func_svid_putenv="guessing no" ;;
-                         # If we don't know, obey --enable-cross-guesses.
-          *)             gl_cv_func_svid_putenv="$gl_cross_guess_normal" ;;
+                              # Guess yes on glibc systems.
+          *-gnu* | gnu*)      gl_cv_func_svid_putenv="guessing yes" ;;
+                              # Guess yes on musl systems.
+          *-musl* | midipix*) gl_cv_func_svid_putenv="guessing yes" ;;
+                              # Guess no on native Windows.
+          mingw*)             gl_cv_func_svid_putenv="guessing no" ;;
+                              # If we don't know, obey --enable-cross-guesses.
+          *)                  gl_cv_func_svid_putenv="$gl_cross_guess_normal" ;;
         esac
        ])
     ])
diff --git a/m4/quote.m4 b/m4/quote.m4
index 47b1a0fc..551437fe 100644
--- a/m4/quote.m4
+++ b/m4/quote.m4
@@ -1,5 +1,5 @@
 # quote.m4 serial 6
-dnl Copyright (C) 2002-2003, 2005-2006, 2009-2022 Free Software Foundation,
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2023 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
diff --git a/m4/quotearg.m4 b/m4/quotearg.m4
index a07420fd..15e4aa68 100644
--- a/m4/quotearg.m4
+++ b/m4/quotearg.m4
@@ -1,5 +1,5 @@
 # quotearg.m4 serial 10
-dnl Copyright (C) 2002, 2004-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2004-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/raise.m4 b/m4/raise.m4
index 0c78d095..f20c439f 100644
--- a/m4/raise.m4
+++ b/m4/raise.m4
@@ -1,5 +1,5 @@
 # raise.m4 serial 4
-dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/rawmemchr.m4 b/m4/rawmemchr.m4
index dae41935..a48d8295 100644
--- a/m4/rawmemchr.m4
+++ b/m4/rawmemchr.m4
@@ -1,5 +1,5 @@
 # rawmemchr.m4 serial 3
-dnl Copyright (C) 2003, 2007-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2007-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/read.m4 b/m4/read.m4
index 1c199eab..33316891 100644
--- a/m4/read.m4
+++ b/m4/read.m4
@@ -1,5 +1,5 @@
 # read.m4 serial 5
-dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/readdir.m4 b/m4/readdir.m4
index ff3d2ab7..81337e2f 100644
--- a/m4/readdir.m4
+++ b/m4/readdir.m4
@@ -1,5 +1,5 @@
-# readdir.m4 serial 1
-dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
+# readdir.m4 serial 2
+dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -11,5 +11,11 @@ AC_DEFUN([gl_FUNC_READDIR],
   AC_CHECK_FUNCS([readdir])
   if test $ac_cv_func_readdir = no; then
     HAVE_READDIR=0
+  else
+    dnl Replace readdir() on native Windows, to support fdopendir().
+    AC_REQUIRE([gl_DIRENT_DIR])
+    if test $DIR_HAS_FD_MEMBER = 0; then
+      REPLACE_READDIR=1
+    fi
   fi
 ])
diff --git a/m4/realloc.m4 b/m4/realloc.m4
index 86e57c25..26053914 100644
--- a/m4/realloc.m4
+++ b/m4/realloc.m4
@@ -1,5 +1,5 @@
-# realloc.m4 serial 26
-dnl Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
+# realloc.m4 serial 27
+dnl Copyright (C) 2007, 2009-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -25,7 +25,7 @@ AC_DEFUN([_AC_FUNC_REALLOC_IF],
        [case "$host_os" in
           # Guess yes on platforms where we know the result.
           *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
-          | gnu* | *-musl* | midnightbsd* \
+          | gnu* | *-musl* | midipix* | midnightbsd* \
           | hpux* | solaris* | cygwin* | mingw* | msys* )
             ac_cv_func_realloc_0_nonnull="guessing yes" ;;
           # If we don't know, obey --enable-cross-guesses.
diff --git a/m4/reallocarray.m4 b/m4/reallocarray.m4
index f39ab6ea..6a5b5ab3 100644
--- a/m4/reallocarray.m4
+++ b/m4/reallocarray.m4
@@ -1,5 +1,5 @@
-# reallocarray.m4 serial 3
-dnl Copyright (C) 2017-2022 Free Software Foundation, Inc.
+# reallocarray.m4 serial 5
+dnl Copyright (C) 2017-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -11,9 +11,12 @@ AC_DEFUN([gl_FUNC_REALLOCARRAY],
 
   AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
   AC_REQUIRE([gl_CHECK_MALLOC_PTRDIFF])
-  AC_CHECK_FUNCS([reallocarray])
+  gl_CHECK_FUNCS_ANDROID([reallocarray], [[#include <stdlib.h>]])
   if test "$ac_cv_func_reallocarray" = no; then
     HAVE_REALLOCARRAY=0
+    case "$gl_cv_onwards_func_reallocarray" in
+      future*) REPLACE_REALLOCARRAY=1 ;;
+    esac
   elif test "$gl_cv_malloc_ptrdiff" = no; then
     REPLACE_REALLOCARRAY=1
   fi
diff --git a/m4/regex.m4 b/m4/regex.m4
index 47342986..7acadc48 100644
--- a/m4/regex.m4
+++ b/m4/regex.m4
@@ -1,6 +1,6 @@
-# serial 73
+# serial 74
 
-# Copyright (C) 1996-2001, 2003-2022 Free Software Foundation, Inc.
+# Copyright (C) 1996-2001, 2003-2023 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,7 @@ AC_DEFUN([gl_REGEX],
 [
   AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
   AC_ARG_WITH([included-regex],
-    [AS_HELP_STRING([--without-included-regex],
+    [AS_HELP_STRING([[--without-included-regex]],
                     [don't compile regex; this is the default on systems
                      with recent-enough versions of the GNU C Library
                      (use with caution on other systems).])])
diff --git a/m4/safe-read.m4 b/m4/safe-read.m4
index 54d47699..fe4ab757 100644
--- a/m4/safe-read.m4
+++ b/m4/safe-read.m4
@@ -1,5 +1,5 @@
 # safe-read.m4 serial 6
-dnl Copyright (C) 2002-2003, 2005-2006, 2009-2022 Free Software Foundation,
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2023 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
diff --git a/m4/save-cwd.m4 b/m4/save-cwd.m4
index 90073eeb..2e6cf58e 100644
--- a/m4/save-cwd.m4
+++ b/m4/save-cwd.m4
@@ -1,5 +1,5 @@
 # serial 10
-dnl Copyright (C) 2002-2006, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/sched_h.m4 b/m4/sched_h.m4
index ce44f7b3..980d2564 100644
--- a/m4/sched_h.m4
+++ b/m4/sched_h.m4
@@ -1,5 +1,5 @@
 # sched_h.m4 serial 15
-dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/select.m4 b/m4/select.m4
index 163f8fbf..88861af4 100644
--- a/m4/select.m4
+++ b/m4/select.m4
@@ -1,5 +1,5 @@
-# select.m4 serial 13
-dnl Copyright (C) 2009-2022 Free Software Foundation, Inc.
+# select.m4 serial 15
+dnl Copyright (C) 2009-2023 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.
@@ -77,6 +77,8 @@ changequote([,])dnl
            case "$host_os" in
                              # Guess yes on Linux systems.
             linux-* | linux) gl_cv_func_select_detects_ebadf="guessing yes" ;;
+                             # Guess yes on systems that emulate the Linux system calls.
+            midipix*)        gl_cv_func_select_detects_ebadf="guessing yes" ;;
                              # Guess yes on glibc systems.
             *-gnu* | gnu*)   gl_cv_func_select_detects_ebadf="guessing yes" ;;
                              # If we don't know, obey --enable-cross-guesses.
@@ -91,7 +93,7 @@ changequote([,])dnl
   fi
 
   dnl Determine the needed libraries.
-  LIB_SELECT="$LIBSOCKET"
+  SELECT_LIB="$LIBSOCKET"
   if test $REPLACE_SELECT = 1; then
     case "$host_os" in
       mingw*)
@@ -109,9 +111,12 @@ main ()
   return 0;
 }]])],
           [],
-          [LIB_SELECT="$LIB_SELECT -luser32"])
+          [SELECT_LIB="$SELECT_LIB -luser32"])
         ;;
     esac
   fi
+  AC_SUBST([SELECT_LIB])
+  dnl For backward compatibility.
+  LIB_SELECT="$LIB_SELECT"
   AC_SUBST([LIB_SELECT])
 ])
diff --git a/m4/setenv.m4 b/m4/setenv.m4
index 2000039a..ef068ad8 100644
--- a/m4/setenv.m4
+++ b/m4/setenv.m4
@@ -1,5 +1,5 @@
-# setenv.m4 serial 30
-dnl Copyright (C) 2001-2004, 2006-2022 Free Software Foundation, Inc.
+# setenv.m4 serial 32
+dnl Copyright (C) 2001-2004, 2006-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -35,12 +35,12 @@ AC_DEFUN([gl_FUNC_SETENV],
       ]])],
       [gl_cv_func_setenv_works=yes], [gl_cv_func_setenv_works=no],
       [case "$host_os" in
-                        # Guess yes on glibc systems.
-         *-gnu* | gnu*) gl_cv_func_setenv_works="guessing yes" ;;
-                        # Guess yes on musl systems.
-         *-musl*)       gl_cv_func_setenv_works="guessing yes" ;;
-                        # If we don't know, obey --enable-cross-guesses.
-         *)             gl_cv_func_setenv_works="$gl_cross_guess_normal" ;;
+                             # Guess yes on glibc systems.
+         *-gnu* | gnu*)      gl_cv_func_setenv_works="guessing yes" ;;
+                             # Guess yes on musl systems.
+         *-musl* | midipix*) gl_cv_func_setenv_works="guessing yes" ;;
+                             # If we don't know, obey --enable-cross-guesses.
+         *)                  gl_cv_func_setenv_works="$gl_cross_guess_normal" ;;
        esac
       ])])
     case "$gl_cv_func_setenv_works" in
@@ -155,7 +155,7 @@ AC_DEFUN([gl_PREREQ_SETENV],
   AC_REQUIRE([gl_ENVIRON])
   AC_CHECK_HEADERS_ONCE([unistd.h])
   AC_CHECK_HEADERS([search.h])
-  AC_CHECK_FUNCS([tsearch])
+  gl_CHECK_FUNCS_ANDROID([tsearch], [[#include <search.h>]])
 ])
 
 # Prerequisites of lib/unsetenv.c.
diff --git a/m4/setlocale.m4 b/m4/setlocale.m4
index c0023d9c..2e8094dc 100644
--- a/m4/setlocale.m4
+++ b/m4/setlocale.m4
@@ -1,5 +1,5 @@
-# setlocale.m4 serial 7
-dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
+# setlocale.m4 serial 9
+dnl Copyright (C) 2011-2023 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.
@@ -66,12 +66,15 @@ int main ()
   fi
 
   if test $NEED_SETLOCALE_MTSAFE = 1; then
-    LIB_SETLOCALE="$LIB_SETLOCALE_NULL"
+    SETLOCALE_LIB="$SETLOCALE_NULL_LIB"
   else
-    LIB_SETLOCALE=
+    SETLOCALE_LIB=
   fi
-  dnl LIB_SETLOCALE is expected to be '-pthread' or '-lpthread' on AIX with gcc
+  dnl SETLOCALE_LIB is expected to be '-pthread' or '-lpthread' on AIX with gcc
   dnl or xlc, and empty otherwise.
+  AC_SUBST([SETLOCALE_LIB])
+  dnl For backward compatibility.
+  LIB_SETLOCALE="$SETLOCALE_LIB"
   AC_SUBST([LIB_SETLOCALE])
 ])
 
diff --git a/m4/setlocale_null.m4 b/m4/setlocale_null.m4
index 09ea50ea..1105d693 100644
--- a/m4/setlocale_null.m4
+++ b/m4/setlocale_null.m4
@@ -1,5 +1,5 @@
-# setlocale_null.m4 serial 5
-dnl Copyright (C) 2019-2022 Free Software Foundation, Inc.
+# setlocale_null.m4 serial 8
+dnl Copyright (C) 2019-2023 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.
@@ -13,9 +13,23 @@ AC_DEFUN([gl_FUNC_SETLOCALE_NULL],
   AC_CACHE_CHECK([whether setlocale (LC_ALL, NULL) is multithread-safe],
     [gl_cv_func_setlocale_null_all_mtsafe],
     [case "$host_os" in
-       # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
-       *-musl* | darwin* | freebsd* | midnightbsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
+       # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku.
+       *-musl* | midipix* | darwin* | freebsd* | midnightbsd* | netbsd* | openbsd* | aix* | haiku*)
          gl_cv_func_setlocale_null_all_mtsafe=no ;;
+       # Guess no on Cygwin < 3.4.6.
+       cygwin*)
+         AC_EGREP_CPP([Lucky user],
+           [
+#if defined __CYGWIN__
+ #include <cygwin/version.h>
+ #if CYGWIN_VERSION_DLL_COMBINED >= CYGWIN_VERSION_DLL_MAKE_COMBINED (3004, 6)
+  Lucky user
+ #endif
+#endif
+          ],
+          [gl_cv_func_setlocale_null_all_mtsafe=yes],
+          [gl_cv_func_setlocale_null_all_mtsafe=no])
+        ;;
        # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
        *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
          gl_cv_func_setlocale_null_all_mtsafe=yes ;;
@@ -48,7 +62,7 @@ AC_DEFUN([gl_FUNC_SETLOCALE_NULL],
        openbsd* | aix*)
          gl_cv_func_setlocale_null_one_mtsafe=no ;;
        # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
-       *-gnu* | gnu* | *-musl* | darwin* | freebsd* | midnightbsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
+       *-gnu* | gnu* | *-musl* | midipix* | darwin* | freebsd* | midnightbsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
          gl_cv_func_setlocale_null_one_mtsafe=yes ;;
        # If we don't know, obey --enable-cross-guesses.
        *)
@@ -74,20 +88,23 @@ AC_DEFUN([gl_FUNC_SETLOCALE_NULL],
   dnl Determine link dependencies of lib/setlocale_null.c and lib/setlocale-lock.c.
   if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
     case "$host_os" in
-      mingw*) LIB_SETLOCALE_NULL= ;;
+      mingw*) SETLOCALE_NULL_LIB= ;;
       *)
         gl_WEAK_SYMBOLS
         case "$gl_cv_have_weak" in
-          *yes) LIB_SETLOCALE_NULL= ;;
-          *)    LIB_SETLOCALE_NULL="$LIBPTHREAD" ;;
+          *yes) SETLOCALE_NULL_LIB= ;;
+          *)    SETLOCALE_NULL_LIB="$LIBPTHREAD" ;;
         esac
         ;;
     esac
   else
-    LIB_SETLOCALE_NULL=
+    SETLOCALE_NULL_LIB=
   fi
-  dnl LIB_SETLOCALE_NULL is expected to be '-pthread' or '-lpthread' on AIX
+  dnl SETLOCALE_NULL_LIB is expected to be '-pthread' or '-lpthread' on AIX
   dnl with gcc or xlc, and empty otherwise.
+  AC_SUBST([SETLOCALE_NULL_LIB])
+  dnl For backward compatibility.
+  LIB_SETLOCALE_NULL="$SETLOCALE_NULL_LIB"
   AC_SUBST([LIB_SETLOCALE_NULL])
 ])
 
diff --git a/m4/sigaltstack.m4 b/m4/sigaltstack.m4
index f6e75339..03180fc1 100644
--- a/m4/sigaltstack.m4
+++ b/m4/sigaltstack.m4
@@ -1,5 +1,5 @@
 # sigaltstack.m4 serial 15
-dnl Copyright (C) 2002-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2023 Free Software Foundation, Inc.
 dnl This file is free software, distributed under the terms of the GNU
 dnl General Public License.  As a special exception to the GNU General
 dnl Public License, this file may be distributed as part of a program
diff --git a/m4/signal_h.m4 b/m4/signal_h.m4
index 4c05c627..cdd6812f 100644
--- a/m4/signal_h.m4
+++ b/m4/signal_h.m4
@@ -1,5 +1,5 @@
 # signal_h.m4 serial 22
-dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/signalblocking.m4 b/m4/signalblocking.m4
index b586ef53..81cc91a9 100644
--- a/m4/signalblocking.m4
+++ b/m4/signalblocking.m4
@@ -1,5 +1,5 @@
 # signalblocking.m4 serial 17
-dnl Copyright (C) 2001-2002, 2006-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2002, 2006-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/sigsegv.m4 b/m4/sigsegv.m4
index d758b52b..b576bb01 100644
--- a/m4/sigsegv.m4
+++ b/m4/sigsegv.m4
@@ -1,5 +1,5 @@
-# sigsegv.m4 serial 1
-dnl Copyright (C) 2021-2022 Free Software Foundation, Inc.
+# sigsegv.m4 serial 2
+dnl Copyright (C) 2021-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -9,7 +9,7 @@ dnl From Bruno Haible.
 AC_DEFUN_ONCE([gl_SIGSEGV],
 [
   AC_ARG_WITH([libsigsegv],
-    [AS_HELP_STRING([--with-libsigsegv],
+    [AS_HELP_STRING([[--with-libsigsegv]],
        [use the GNU libsigsegv library, when present, instead of the gnulib module 'sigsegv'])])
   if test "$with_libsigsegv" = yes; then
     gl_LIBSIGSEGV
diff --git a/m4/size_max.m4 b/m4/size_max.m4
index 1d6abaea..0763366d 100644
--- a/m4/size_max.m4
+++ b/m4/size_max.m4
@@ -1,5 +1,5 @@
 # size_max.m4 serial 12
-dnl Copyright (C) 2003, 2005-2006, 2008-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2005-2006, 2008-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/sleep.m4 b/m4/sleep.m4
index e73651f5..269b73b9 100644
--- a/m4/sleep.m4
+++ b/m4/sleep.m4
@@ -1,5 +1,5 @@
-# sleep.m4 serial 11
-dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
+# sleep.m4 serial 12
+dnl Copyright (C) 2007-2023 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.
@@ -50,6 +50,8 @@ handle_alarm (int sig)
          *-gnu* | gnu*) gl_cv_func_sleep_works="guessing yes" ;;
                         # Guess yes on musl systems.
          *-musl*)       gl_cv_func_sleep_works="guessing yes" ;;
+                        # Guess yes on systems that emulate the Linux system calls.
+         midipix*)      gl_cv_func_sleep_works="guessing yes" ;;
                         # Guess no on native Windows.
          mingw*)        gl_cv_func_sleep_works="guessing no" ;;
                         # If we don't know, obey --enable-cross-guesses.
diff --git a/m4/snprintf.m4 b/m4/snprintf.m4
index 7420591c..4b5fbdbf 100644
--- a/m4/snprintf.m4
+++ b/m4/snprintf.m4
@@ -1,5 +1,5 @@
 # snprintf.m4 serial 7
-dnl Copyright (C) 2002-2004, 2007-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2004, 2007-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/socketlib.m4 b/m4/socketlib.m4
index b8bd0afa..a556af1e 100644
--- a/m4/socketlib.m4
+++ b/m4/socketlib.m4
@@ -1,5 +1,5 @@
 # socketlib.m4 serial 3
-dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/sockets.m4 b/m4/sockets.m4
index aa04acc3..ed9cb873 100644
--- a/m4/sockets.m4
+++ b/m4/sockets.m4
@@ -1,5 +1,5 @@
 # sockets.m4 serial 7
-dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/socklen.m4 b/m4/socklen.m4
index 1390ac41..1c63a853 100644
--- a/m4/socklen.m4
+++ b/m4/socklen.m4
@@ -1,5 +1,5 @@
 # socklen.m4 serial 11
-dnl Copyright (C) 2005-2007, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2007, 2009-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/sockpfaf.m4 b/m4/sockpfaf.m4
index b1c4068a..6c6dc2f7 100644
--- a/m4/sockpfaf.m4
+++ b/m4/sockpfaf.m4
@@ -1,5 +1,5 @@
 # sockpfaf.m4 serial 10
-dnl Copyright (C) 2004, 2006, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2004, 2006, 2009-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/ssize_t.m4 b/m4/ssize_t.m4
index 03b2b895..1c12c33e 100644
--- a/m4/ssize_t.m4
+++ b/m4/ssize_t.m4
@@ -1,5 +1,5 @@
 # ssize_t.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2001-2003, 2006, 2010-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2003, 2006, 2010-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/stack-direction.m4 b/m4/stack-direction.m4
index 924c5deb..7378d684 100644
--- a/m4/stack-direction.m4
+++ b/m4/stack-direction.m4
@@ -1,5 +1,5 @@
 # stack-direction.m4 serial 11
-dnl Copyright (C) 2002-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2023 Free Software Foundation, Inc.
 dnl This file is free software, distributed under the terms of the GNU
 dnl General Public License.  As a special exception to the GNU General
 dnl Public License, this file may be distributed as part of a program
diff --git a/m4/stat-time.m4 b/m4/stat-time.m4
index 342857d3..40993d57 100644
--- a/m4/stat-time.m4
+++ b/m4/stat-time.m4
@@ -1,6 +1,6 @@
 # Checks for stat-related time functions.
 
-# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2022 Free Software
+# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2023 Free Software
 # Foundation, Inc.
 
 # This file is free software; the Free Software Foundation
diff --git a/m4/stat.m4 b/m4/stat.m4
index 916eb886..6d1628c2 100644
--- a/m4/stat.m4
+++ b/m4/stat.m4
@@ -1,6 +1,6 @@
-# serial 18
+# serial 19
 
-# Copyright (C) 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2009-2023 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -45,6 +45,8 @@ AC_DEFUN([gl_FUNC_STAT],
            [case "$host_os" in
                                # Guess yes on Linux systems.
               linux-* | linux) gl_cv_func_stat_file_slash="guessing yes" ;;
+                               # Guess yes on systems that emulate the Linux system calls.
+              midipix*)        gl_cv_func_stat_file_slash="guessing yes" ;;
                                # Guess yes on glibc systems.
               *-gnu* | gnu*)   gl_cv_func_stat_file_slash="guessing yes" ;;
                                # If we don't know, obey --enable-cross-guesses.
diff --git a/m4/stdalign.m4 b/m4/stdalign.m4
index 78577cb2..1a236d66 100644
--- a/m4/stdalign.m4
+++ b/m4/stdalign.m4
@@ -1,20 +1,28 @@
-# Check for stdalign.h that conforms to C11.
+# Check for alignas and alignof that conform to C23.
 
-dnl Copyright 2011-2022 Free Software Foundation, Inc.
+dnl Copyright 2011-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
+dnl Written by Paul Eggert and Bruno Haible.
+
 # Prepare for substituting <stdalign.h> if it is not supported.
 
-AC_DEFUN([gl_STDALIGN_H],
+AC_DEFUN([gl_ALIGNASOF],
 [
-  AC_CACHE_CHECK([for working stdalign.h],
+  AC_CACHE_CHECK([for alignas and alignof],
     [gl_cv_header_working_stdalign_h],
-    [AC_COMPILE_IFELSE(
+    [gl_save_CFLAGS=$CFLAGS
+     for gl_working in "yes, keywords" "yes, <stdalign.h> macros"; do
+      AS_CASE([$gl_working],
+        [*stdalign.h*], [CFLAGS="$gl_save_CFLAGS -DINCLUDE_STDALIGN_H"])
+      AC_COMPILE_IFELSE(
        [AC_LANG_PROGRAM(
           [[#include <stdint.h>
-            #include <stdalign.h>
+            #ifdef INCLUDE_STDALIGN_H
+             #include <stdalign.h>
+            #endif
             #include <stddef.h>
 
             /* Test that alignof yields a result consistent with offsetof.
@@ -30,7 +38,7 @@ AC_DEFUN([gl_STDALIGN_H],
             char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
             char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
 
-            /* Test _Alignas only on platforms where gnulib can help.  */
+            /* Test alignas only on platforms where gnulib can help.  */
             #if \
                 ((defined __cplusplus && 201103 <= __cplusplus) \
                  || (__TINYC__ && defined __attribute__) \
@@ -45,12 +53,148 @@ AC_DEFUN([gl_STDALIGN_H],
                                 ? 1 : -1];
             #endif
           ]])],
-       [gl_cv_header_working_stdalign_h=yes],
-       [gl_cv_header_working_stdalign_h=no])])
+       [gl_cv_header_working_stdalign_h=$gl_working],
+       [gl_cv_header_working_stdalign_h=no])
+
+      CFLAGS=$gl_save_CFLAGS
+      test "$gl_cv_header_working_stdalign_h" != no && break
+     done])
+
+  AS_CASE([$gl_cv_header_working_stdalign_h],
+    [yes*keyword*],
+      [AC_DEFINE([HAVE_C_ALIGNASOF], [1],
+         [Define to 1 if the alignas and alignof keywords work.])])
+
+  dnl The "zz" puts this toward config.h's end, to avoid potential
+  dnl collisions with other definitions.
+  AH_VERBATIM([zzalignas],
+[#if !defined HAVE_C_ALIGNASOF && __cplusplus < 201103 && !defined alignof
+# if HAVE_STDALIGN_H
+#  include <stdalign.h>
+# endif
+
+/* ISO C23 alignas and alignof for platforms that lack it.
+
+   References:
+   ISO C23 (latest free draft
+   <http://www.open-std.org/jtc1/sc22/wg14/www/docs/n3047.pdf>)
+   sections 6.5.3.4, 6.7.5, 7.15.
+   C++11 (latest free draft
+   <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf>)
+   section 18.10. */
+
+/* alignof (TYPE), also known as _Alignof (TYPE), yields the alignment
+   requirement of a structure member (i.e., slot or field) that is of
+   type TYPE, as an integer constant expression.
+
+   This differs from GCC's and clang's __alignof__ operator, which can
+   yield a better-performing alignment for an object of that type.  For
+   example, on x86 with GCC and on Linux/x86 with clang,
+   __alignof__ (double) and __alignof__ (long long) are 8, whereas
+   alignof (double) and alignof (long long) are 4 unless the option
+   '-malign-double' is used.
+
+   The result cannot be used as a value for an 'enum' constant, if you
+   want to be portable to HP-UX 10.20 cc and AIX 3.2.5 xlc.  */
+
+/* GCC releases before GCC 4.9 had a bug in _Alignof.  See GCC bug 52023
+   <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>.
+   clang versions < 8.0.0 have the same bug.  */
+#  if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \
+       || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9) \
+           && !defined __clang__) \
+       || (defined __clang__ && __clang_major__ < 8))
+#   undef/**/_Alignof
+#   ifdef __cplusplus
+#    if (201103 <= __cplusplus || defined _MSC_VER)
+#     define _Alignof(type) alignof (type)
+#    else
+      template <class __t> struct __alignof_helper { char __a; __t __b; };
+#     define _Alignof(type) offsetof (__alignof_helper<type>, __b)
+#     define _GL_STDALIGN_NEEDS_STDDEF 1
+#    endif
+#   else
+#    if (defined __GNUC__ && 4 <= __GNUC__) || defined __clang__
+#     define _Alignof(type) __builtin_offsetof (struct { char __a; type __b; }, __b)
+#    else
+#     define _Alignof(type) offsetof (struct { char __a; type __b; }, __b)
+#     define _GL_STDALIGN_NEEDS_STDDEF 1
+#    endif
+#   endif
+#  endif
+#  if ! (defined __cplusplus && (201103 <= __cplusplus || defined _MSC_VER))
+#   undef/**/alignof
+#   define alignof _Alignof
+#  endif
+
+/* alignas (A), also known as _Alignas (A), aligns a variable or type
+   to the alignment A, where A is an integer constant expression.  For
+   example:
+
+      int alignas (8) foo;
+      struct s { int a; int alignas (8) bar; };
 
-  if test $gl_cv_header_working_stdalign_h = yes; then
+   aligns the address of FOO and the offset of BAR to be multiples of 8.
+
+   A should be a power of two that is at least the type's alignment
+   and at most the implementation's alignment limit.  This limit is
+   2**28 on typical GNUish hosts, and 2**13 on MSVC.  To be portable
+   to MSVC through at least version 10.0, A should be an integer
+   constant, as MSVC does not support expressions such as 1 << 3.
+   To be portable to Sun C 5.11, do not align auto variables to
+   anything stricter than their default alignment.
+
+   The following C23 requirements are not supported here:
+
+     - If A is zero, alignas has no effect.
+     - alignas can be used multiple times; the strictest one wins.
+     - alignas (TYPE) is equivalent to alignas (alignof (TYPE)).
+
+   */
+# if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112
+#  if defined __cplusplus && (201103 <= __cplusplus || defined _MSC_VER)
+#   define _Alignas(a) alignas (a)
+#  elif (!defined __attribute__ \
+         && ((defined __APPLE__ && defined __MACH__ \
+              ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
+              : __GNUC__ && !defined __ibmxl__) \
+             || (4 <= __clang_major__) \
+             || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \
+             || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__))
+#   define _Alignas(a) __attribute__ ((__aligned__ (a)))
+#  elif 1300 <= _MSC_VER
+#   define _Alignas(a) __declspec (align (a))
+#  endif
+# endif
+# if !HAVE_STDALIGN_H
+#  if ((defined _Alignas \
+        && !(defined __cplusplus \
+             && (201103 <= __cplusplus || defined _MSC_VER))) \
+       || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__))
+#   define alignas _Alignas
+#  endif
+# endif
+
+# if _GL_STDALIGN_NEEDS_STDDEF
+#  include <stddef.h>
+# endif
+#endif])
+])
+
+AC_DEFUN([gl_STDALIGN_H],
+[
+  AC_REQUIRE([gl_ALIGNASOF])
+  if test "$gl_cv_header_working_stdalign_h" = no; then
+    GL_GENERATE_STDALIGN_H=true
+  else
     GL_GENERATE_STDALIGN_H=false
+  fi
+
+  gl_CHECK_NEXT_HEADERS([stdalign.h])
+  if test $ac_cv_header_stdalign_h = yes; then
+    HAVE_STDALIGN_H=1
   else
-    GL_GENERATE_STDALIGN_H=true
+    HAVE_STDALIGN_H=0
   fi
+  AC_SUBST([HAVE_STDALIGN_H])
 ])
diff --git a/m4/stdarg.m4 b/m4/stdarg.m4
index eafa86cb..94787ccc 100644
--- a/m4/stdarg.m4
+++ b/m4/stdarg.m4
@@ -1,5 +1,5 @@
 # stdarg.m4 serial 8
-dnl Copyright (C) 2006, 2008-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2008-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/stdbool.m4 b/m4/stdbool.m4
deleted file mode 100644
index 3e6c4005..00000000
--- a/m4/stdbool.m4
+++ /dev/null
@@ -1,117 +0,0 @@
-# Check for stdbool.h that conforms to C99.
-
-dnl Copyright (C) 2002-2006, 2009-2022 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.
-
-#serial 9
-
-# Prepare for substituting <stdbool.h> if it is not supported.
-
-AC_DEFUN([gl_STDBOOL_H],
-[
-  AC_REQUIRE([AC_CHECK_HEADER_STDBOOL])
-  AC_REQUIRE([AC_CANONICAL_HOST])
-
-  dnl On some platforms, <stdbool.h> does not exist or does not conform to C99.
-  dnl On Solaris 10 with CC=cc CXX=CC, <stdbool.h> exists but is not usable
-  dnl in C++ mode (and no <cstdbool> exists). In this case, we use our
-  dnl replacement, also in C mode (for binary compatibility between C and C++).
-  if test "$ac_cv_header_stdbool_h" = yes; then
-    case "$host_os" in
-      solaris*)
-        if test -z "$GCC"; then
-          GL_GENERATE_STDBOOL_H=true
-        else
-          GL_GENERATE_STDBOOL_H=false
-        fi
-        ;;
-      *)
-        GL_GENERATE_STDBOOL_H=false
-        ;;
-    esac
-  else
-    GL_GENERATE_STDBOOL_H=true
-  fi
-
-  if test "$ac_cv_type__Bool" = yes; then
-    HAVE__BOOL=1
-  else
-    HAVE__BOOL=0
-  fi
-  AC_SUBST([HAVE__BOOL])
-])
-
-# This version of the macro is needed in autoconf <= 2.68.
-
-AC_DEFUN([AC_CHECK_HEADER_STDBOOL],
-  [AC_CACHE_CHECK([for stdbool.h that conforms to C99],
-     [ac_cv_header_stdbool_h],
-     [AC_COMPILE_IFELSE(
-        [AC_LANG_PROGRAM(
-           [[
-             #include <stdbool.h>
-
-             #ifdef __cplusplus
-              typedef bool Bool;
-             #else
-              typedef _Bool Bool;
-              #ifndef bool
-               "error: bool is not defined"
-              #endif
-              #ifndef false
-               "error: false is not defined"
-              #endif
-              #if false
-               "error: false is not 0"
-              #endif
-              #ifndef true
-               "error: true is not defined"
-              #endif
-              #if true != 1
-               "error: true is not 1"
-              #endif
-             #endif
-
-             #ifndef __bool_true_false_are_defined
-              "error: __bool_true_false_are_defined is not defined"
-             #endif
-
-             struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
-
-             char a[true == 1 ? 1 : -1];
-             char b[false == 0 ? 1 : -1];
-             char c[__bool_true_false_are_defined == 1 ? 1 : -1];
-             char d[(bool) 0.5 == true ? 1 : -1];
-             /* See body of main program for 'e'.  */
-             char f[(Bool) 0.0 == false ? 1 : -1];
-             char g[true];
-             char h[sizeof (Bool)];
-             char i[sizeof s.t];
-             enum { j = false, k = true, l = false * true, m = true * 256 };
-             /* The following fails for
-                HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
-             Bool n[m];
-             char o[sizeof n == m * sizeof n[0] ? 1 : -1];
-             char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
-             /* Catch a bug in an HP-UX C compiler.  See
-                https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
-                https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html
-              */
-             Bool q = true;
-             Bool *pq = &q;
-             bool *qq = &q;
-           ]],
-           [[
-             bool e = &s;
-             *pq |= q; *pq |= ! q;
-             *qq |= q; *qq |= ! q;
-             /* Refer to every declared value, to avoid compiler optimizations.  */
-             return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
-                     + !m + !n + !o + !p + !q + !pq + !qq);
-           ]])],
-        [ac_cv_header_stdbool_h=yes],
-        [ac_cv_header_stdbool_h=no])])
-   AC_CHECK_TYPES([_Bool])
-])
diff --git a/m4/stddef_h.m4 b/m4/stddef_h.m4
index abfd2030..aa012219 100644
--- a/m4/stddef_h.m4
+++ b/m4/stddef_h.m4
@@ -1,5 +1,5 @@
-# stddef_h.m4 serial 12
-dnl Copyright (C) 2009-2022 Free Software Foundation, Inc.
+# stddef_h.m4 serial 14
+dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -22,7 +22,14 @@ AC_DEFUN_ONCE([gl_STDDEF_H],
     [gl_cv_type_max_align_t],
     [AC_COMPILE_IFELSE(
        [AC_LANG_PROGRAM(
-          [[#include <stddef.h>
+          [[/* On FreeBSD 12.0/x86, max_align_t defined by <stddef.h> has
+               the correct alignment with the default (wrong) definition of
+               _Alignof, but a wrong alignment as soon as we activate an
+               ISO C compliant _Alignof definition.  */
+            #if ((defined __GNUC__ && 4 <= __GNUC__) || defined __clang__) && !defined __cplusplus
+             #define _Alignof(type) __builtin_offsetof (struct { char __a; type __b; }, __b)
+            #endif
+            #include <stddef.h>
             unsigned int s = sizeof (max_align_t);
             #if defined __GNUC__ || defined __clang__ || defined __IBM__ALIGNOF__
             int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
@@ -61,6 +68,21 @@ AC_DEFUN_ONCE([gl_STDDEF_H],
     GL_GENERATE_STDDEF_H=true
   fi
 
+  AC_CACHE_CHECK([for unreachable],
+    [gl_cv_func_unreachable],
+    [AC_LINK_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <stddef.h>
+          ]],
+          [[unreachable ();
+          ]])],
+       [gl_cv_func_unreachable=yes],
+       [gl_cv_func_unreachable=no])
+    ])
+  if test $gl_cv_func_unreachable = no; then
+    GL_GENERATE_STDDEF_H=true
+  fi
+
   if $GL_GENERATE_STDDEF_H; then
     gl_NEXT_HEADERS([stddef.h])
   fi
diff --git a/m4/stdint.m4 b/m4/stdint.m4
index c3f08942..d6961b09 100644
--- a/m4/stdint.m4
+++ b/m4/stdint.m4
@@ -1,5 +1,5 @@
 # stdint.m4 serial 61
-dnl Copyright (C) 2001-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/stdint_h.m4 b/m4/stdint_h.m4
index b8684b61..70349f6c 100644
--- a/m4/stdint_h.m4
+++ b/m4/stdint_h.m4
@@ -1,5 +1,5 @@
 # stdint_h.m4 serial 9
-dnl Copyright (C) 1997-2004, 2006, 2008-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 1997-2004, 2006, 2008-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/stdio_h.m4 b/m4/stdio_h.m4
index 42e96071..dbfa0d5d 100644
--- a/m4/stdio_h.m4
+++ b/m4/stdio_h.m4
@@ -1,12 +1,22 @@
-# stdio_h.m4 serial 59
-dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
+# stdio_h.m4 serial 63
+dnl Copyright (C) 2007-2023 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_ONCE([gl_STDIO_H],
+AC_DEFUN([gl_STDIO_H_EARLY],
 [
-  AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+  dnl Defining __USE_MINGW_ANSI_STDIO to 1 must be done early, because
+  dnl the results of several configure tests depend on it: The tests
+  dnl   - checking whether snprintf returns a byte count as in C99...
+  dnl   - checking whether snprintf truncates the result as in C99...
+  dnl   - checking whether printf supports the 'F' directive...
+  dnl   - checking whether printf supports the grouping flag...
+  dnl   - checking whether printf supports the zero flag correctly...
+  dnl   - checking whether printf supports infinite 'double' arguments...
+  dnl   - checking whether printf supports large precisions...
+  dnl report 'yes' if __USE_MINGW_ANSI_STDIO is 1 but 'no' if
+  dnl __USE_MINGW_ANSI_STDIO is not set.
   AH_VERBATIM([MINGW_ANSI_STDIO],
 [/* Use GNU style printf and scanf.  */
 #ifndef __USE_MINGW_ANSI_STDIO
@@ -14,6 +24,11 @@ AC_DEFUN_ONCE([gl_STDIO_H],
 #endif
 ])
   AC_DEFINE([__USE_MINGW_ANSI_STDIO])
+])
+
+AC_DEFUN_ONCE([gl_STDIO_H],
+[
+  AC_REQUIRE([gl_STDIO_H_DEFAULTS])
   gl_NEXT_HEADERS([stdio.h])
 
   dnl Determine whether __USE_MINGW_ANSI_STDIO makes printf and
@@ -40,6 +55,9 @@ AC_DEFUN_ONCE([gl_STDIO_H],
        attribute "__gnu_printf__" instead of "__printf__"])
   fi
 
+  dnl For defining _PRINTF_NAN_LEN_MAX.
+  gl_MUSL_LIBC
+
   dnl This ifdef is an optimization, to avoid performing a configure check whose
   dnl result is not used. But it does not make the test of
   dnl GNULIB_STDIO_H_NONBLOCKING or GNULIB_NONBLOCKING redundant.
@@ -82,6 +100,16 @@ AC_DEFUN_ONCE([gl_STDIO_H],
   if test $ac_cv_have_decl_fcloseall = no; then
     HAVE_DECL_FCLOSEALL=0
   fi
+
+  AC_CHECK_DECLS_ONCE([getw])
+  if test $ac_cv_have_decl_getw = no; then
+    HAVE_DECL_GETW=0
+  fi
+
+  AC_CHECK_DECLS_ONCE([putw])
+  if test $ac_cv_have_decl_putw = no; then
+    HAVE_DECL_PUTW=0
+  fi
 ])
 
 # gl_STDIO_MODULE_INDICATOR([modulename])
@@ -178,7 +206,9 @@ AC_DEFUN([gl_STDIO_H_DEFAULTS],
   HAVE_DECL_FTELLO=1;            AC_SUBST([HAVE_DECL_FTELLO])
   HAVE_DECL_GETDELIM=1;          AC_SUBST([HAVE_DECL_GETDELIM])
   HAVE_DECL_GETLINE=1;           AC_SUBST([HAVE_DECL_GETLINE])
+  HAVE_DECL_GETW=1;              AC_SUBST([HAVE_DECL_GETW])
   HAVE_DECL_OBSTACK_PRINTF=1;    AC_SUBST([HAVE_DECL_OBSTACK_PRINTF])
+  HAVE_DECL_PUTW=1;              AC_SUBST([HAVE_DECL_PUTW])
   HAVE_DECL_SNPRINTF=1;          AC_SUBST([HAVE_DECL_SNPRINTF])
   HAVE_DECL_VSNPRINTF=1;         AC_SUBST([HAVE_DECL_VSNPRINTF])
   HAVE_DPRINTF=1;                AC_SUBST([HAVE_DPRINTF])
diff --git a/m4/stdlib_h.m4 b/m4/stdlib_h.m4
index 9e209697..f47c1eb3 100644
--- a/m4/stdlib_h.m4
+++ b/m4/stdlib_h.m4
@@ -1,5 +1,5 @@
-# stdlib_h.m4 serial 66
-dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
+# stdlib_h.m4 serial 75
+dnl Copyright (C) 2007-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -23,15 +23,58 @@ AC_DEFUN_ONCE([gl_STDLIB_H],
 # include <random.h>
 #endif
     ]], [_Exit aligned_alloc atoll canonicalize_file_name free
-    getloadavg getsubopt grantpt
-    initstate initstate_r mbtowc mkdtemp mkostemp mkostemps mkstemp mkstemps
-    posix_memalign posix_openpt ptsname ptsname_r qsort_r
+    getloadavg getprogname getsubopt grantpt
+    initstate initstate_r mbstowcs mbtowc mkdtemp mkostemp mkostemps mkstemp
+    mkstemps posix_memalign posix_openpt ptsname ptsname_r qsort_r
     random random_r reallocarray realpath rpmatch secure_getenv setenv
     setstate setstate_r srandom srandom_r
     strtod strtol strtold strtoll strtoul strtoull unlockpt unsetenv])
 
   AC_REQUIRE([AC_C_RESTRICT])
 
+  dnl Test whether MB_CUR_MAX needs to be overridden.
+  dnl On Solaris 10, in UTF-8 locales, its value is 3 but needs to be 4.
+  dnl Fortunately, we can do this because on this platform MB_LEN_MAX is 5.
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  AC_REQUIRE([gt_LOCALE_FR_UTF8])
+  AC_CACHE_CHECK([whether MB_CUR_MAX is correct],
+    [gl_cv_macro_MB_CUR_MAX_good],
+    [
+      dnl Initial guess, used when cross-compiling or when no suitable locale
+      dnl is present.
+changequote(,)dnl
+      case "$host_os" in
+                  # Guess no on Solaris.
+        solaris*) gl_cv_macro_MB_CUR_MAX_good="guessing no" ;;
+                  # Guess yes otherwise.
+        *)        gl_cv_macro_MB_CUR_MAX_good="guessing yes" ;;
+      esac
+changequote([,])dnl
+      if test $LOCALE_FR_UTF8 != none; then
+        AC_RUN_IFELSE(
+          [AC_LANG_SOURCE([[
+#include <locale.h>
+#include <stdlib.h>
+int main ()
+{
+  int result = 0;
+  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+    {
+      if (MB_CUR_MAX < 4)
+        result |= 1;
+    }
+  return result;
+}]])],
+          [gl_cv_macro_MB_CUR_MAX_good=yes],
+          [gl_cv_macro_MB_CUR_MAX_good=no],
+          [:])
+      fi
+    ])
+  case "$gl_cv_macro_MB_CUR_MAX_good" in
+    *yes) ;;
+    *) REPLACE_MB_CUR_MAX=1 ;;
+  esac
+
   AC_CHECK_DECLS_ONCE([ecvt])
   if test $ac_cv_have_decl_ecvt = no; then
     HAVE_DECL_ECVT=0
@@ -73,10 +116,12 @@ AC_DEFUN([gl_STDLIB_H_REQUIRE_DEFAULTS],
     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_GETPROGNAME])
     gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETSUBOPT])
     gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GRANTPT])
     gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MALLOC_GNU])
     gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MALLOC_POSIX])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSTOWCS])
     gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBTOWC])
     gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKDTEMP])
     gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKOSTEMP])
@@ -130,6 +175,8 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
   HAVE_DECL_FCVT=1;          AC_SUBST([HAVE_DECL_FCVT])
   HAVE_DECL_GCVT=1;          AC_SUBST([HAVE_DECL_GCVT])
   HAVE_DECL_GETLOADAVG=1;    AC_SUBST([HAVE_DECL_GETLOADAVG])
+  HAVE_DECL_PROGRAM_INVOCATION_NAME=1; AC_SUBST([HAVE_DECL_PROGRAM_INVOCATION_NAME])
+  HAVE_GETPROGNAME=1;        AC_SUBST([HAVE_GETPROGNAME])
   HAVE_GETSUBOPT=1;          AC_SUBST([HAVE_GETSUBOPT])
   HAVE_GRANTPT=1;            AC_SUBST([HAVE_GRANTPT])
   HAVE_INITSTATE=1;          AC_SUBST([HAVE_INITSTATE])
@@ -166,17 +213,26 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
   HAVE_SYS_LOADAVG_H=0;      AC_SUBST([HAVE_SYS_LOADAVG_H])
   HAVE_UNLOCKPT=1;           AC_SUBST([HAVE_UNLOCKPT])
   HAVE_DECL_UNSETENV=1;      AC_SUBST([HAVE_DECL_UNSETENV])
+  REPLACE__EXIT=0;           AC_SUBST([REPLACE__EXIT])
   REPLACE_ALIGNED_ALLOC=0;   AC_SUBST([REPLACE_ALIGNED_ALLOC])
   REPLACE_CALLOC_FOR_CALLOC_GNU=0;    AC_SUBST([REPLACE_CALLOC_FOR_CALLOC_GNU])
   REPLACE_CALLOC_FOR_CALLOC_POSIX=0;  AC_SUBST([REPLACE_CALLOC_FOR_CALLOC_POSIX])
   REPLACE_CANONICALIZE_FILE_NAME=0;  AC_SUBST([REPLACE_CANONICALIZE_FILE_NAME])
   REPLACE_FREE=0;            AC_SUBST([REPLACE_FREE])
+  REPLACE_GETLOADAVG=0;      AC_SUBST([REPLACE_GETLOADAVG])
+  REPLACE_GETPROGNAME=0;     AC_SUBST([REPLACE_GETPROGNAME])
+  REPLACE_GETSUBOPT=0;       AC_SUBST([REPLACE_GETSUBOPT])
   REPLACE_INITSTATE=0;       AC_SUBST([REPLACE_INITSTATE])
   REPLACE_MALLOC_FOR_MALLOC_GNU=0;    AC_SUBST([REPLACE_MALLOC_FOR_MALLOC_GNU])
   REPLACE_MALLOC_FOR_MALLOC_POSIX=0;  AC_SUBST([REPLACE_MALLOC_FOR_MALLOC_POSIX])
+  REPLACE_MB_CUR_MAX=0;      AC_SUBST([REPLACE_MB_CUR_MAX])
+  REPLACE_MBSTOWCS=0;        AC_SUBST([REPLACE_MBSTOWCS])
   REPLACE_MBTOWC=0;          AC_SUBST([REPLACE_MBTOWC])
+  REPLACE_MKOSTEMP=0;        AC_SUBST([REPLACE_MKOSTEMP])
+  REPLACE_MKOSTEMPS=0;       AC_SUBST([REPLACE_MKOSTEMPS])
   REPLACE_MKSTEMP=0;         AC_SUBST([REPLACE_MKSTEMP])
   REPLACE_POSIX_MEMALIGN=0;  AC_SUBST([REPLACE_POSIX_MEMALIGN])
+  REPLACE_POSIX_OPENPT=0;    AC_SUBST([REPLACE_POSIX_OPENPT])
   REPLACE_PTSNAME=0;         AC_SUBST([REPLACE_PTSNAME])
   REPLACE_PTSNAME_R=0;       AC_SUBST([REPLACE_PTSNAME_R])
   REPLACE_PUTENV=0;          AC_SUBST([REPLACE_PUTENV])
diff --git a/m4/stpcpy.m4 b/m4/stpcpy.m4
index 241e68c8..f3acbee7 100644
--- a/m4/stpcpy.m4
+++ b/m4/stpcpy.m4
@@ -1,5 +1,5 @@
-# stpcpy.m4 serial 9
-dnl Copyright (C) 2002, 2007, 2009-2022 Free Software Foundation, Inc.
+# stpcpy.m4 serial 11
+dnl Copyright (C) 2002, 2007, 2009-2023 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.
@@ -13,9 +13,12 @@ AC_DEFUN([gl_FUNC_STPCPY],
   AC_REQUIRE([AC_C_RESTRICT])
 
   AC_REQUIRE([gl_STRING_H_DEFAULTS])
-  AC_CHECK_FUNCS([stpcpy])
+  gl_CHECK_FUNCS_ANDROID([stpcpy], [[#include <string.h>]])
   if test $ac_cv_func_stpcpy = no; then
     HAVE_STPCPY=0
+    case "$gl_cv_onwards_func_stpcpy" in
+      future*) REPLACE_STPCPY=1 ;;
+    esac
   fi
 ])
 
diff --git a/m4/strdup.m4 b/m4/strdup.m4
index da8899d1..ecfcdd01 100644
--- a/m4/strdup.m4
+++ b/m4/strdup.m4
@@ -1,6 +1,6 @@
 # strdup.m4 serial 15
 
-dnl Copyright (C) 2002-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2023 Free Software Foundation, Inc.
 
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
diff --git a/m4/strerror.m4 b/m4/strerror.m4
index 4716649b..9f1dddd5 100644
--- a/m4/strerror.m4
+++ b/m4/strerror.m4
@@ -1,5 +1,5 @@
-# strerror.m4 serial 23
-dnl Copyright (C) 2002, 2007-2022 Free Software Foundation, Inc.
+# strerror.m4 serial 24
+dnl Copyright (C) 2002, 2007-2023 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.
@@ -24,12 +24,12 @@ AC_DEFUN([gl_FUNC_STRERROR],
         [gl_cv_func_working_strerror=yes],
         [gl_cv_func_working_strerror=no],
         [case "$host_os" in
-                          # Guess yes on glibc systems.
-           *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;;
-                          # Guess yes on musl systems.
-           *-musl*)       gl_cv_func_working_strerror="guessing yes" ;;
-                          # If we don't know, obey --enable-cross-guesses.
-           *)             gl_cv_func_working_strerror="$gl_cross_guess_normal" ;;
+                               # Guess yes on glibc systems.
+           *-gnu* | gnu*)      gl_cv_func_working_strerror="guessing yes" ;;
+                               # Guess yes on musl systems.
+           *-musl* | midipix*) gl_cv_func_working_strerror="guessing yes" ;;
+                               # If we don't know, obey --enable-cross-guesses.
+           *)                  gl_cv_func_working_strerror="$gl_cross_guess_normal" ;;
          esac
         ])
     ])
@@ -80,14 +80,14 @@ AC_DEFUN([gl_FUNC_STRERROR_0],
       [gl_cv_func_strerror_0_works=yes],
       [gl_cv_func_strerror_0_works=no],
       [case "$host_os" in
-                        # Guess yes on glibc systems.
-         *-gnu* | gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
-                        # Guess yes on musl systems.
-         *-musl*)       gl_cv_func_strerror_0_works="guessing yes" ;;
-                        # Guess yes on native Windows.
-         mingw*)        gl_cv_func_strerror_0_works="guessing yes" ;;
-                        # If we don't know, obey --enable-cross-guesses.
-         *)             gl_cv_func_strerror_0_works="$gl_cross_guess_normal" ;;
+                             # Guess yes on glibc systems.
+         *-gnu* | gnu*)      gl_cv_func_strerror_0_works="guessing yes" ;;
+                             # Guess yes on musl systems.
+         *-musl* | midipix*) gl_cv_func_strerror_0_works="guessing yes" ;;
+                             # Guess yes on native Windows.
+         mingw*)             gl_cv_func_strerror_0_works="guessing yes" ;;
+                             # If we don't know, obey --enable-cross-guesses.
+         *)                  gl_cv_func_strerror_0_works="$gl_cross_guess_normal" ;;
        esac
       ])
   ])
diff --git a/m4/strerror_r.m4 b/m4/strerror_r.m4
index 23c3b423..d790ba87 100644
--- a/m4/strerror_r.m4
+++ b/m4/strerror_r.m4
@@ -1,5 +1,5 @@
-# strerror_r.m4 serial 24
-dnl Copyright (C) 2002, 2007-2022 Free Software Foundation, Inc.
+# strerror_r.m4 serial 26
+dnl Copyright (C) 2002, 2007-2023 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.
@@ -40,7 +40,7 @@ AC_DEFUN([gl_PREREQ_STRERROR_R], [
   AC_REQUIRE([AC_FUNC_STRERROR_R])
   dnl glibc >= 2.3.4 and cygwin 1.7.9 have a function __xpg_strerror_r.
   AC_CHECK_FUNCS_ONCE([__xpg_strerror_r])
-  AC_CHECK_FUNCS_ONCE([catgets])
+  gl_CHECK_FUNCS_ANDROID([catgets], [[#include <nl_types.h>]])
   AC_CHECK_FUNCS_ONCE([snprintf])
 ])
 
@@ -57,7 +57,7 @@ AC_DEFUN([gl_FUNC_STRERROR_R_WORKS],
 
   AC_REQUIRE([gl_FUNC_STRERROR_0])
 
-  AC_CHECK_FUNCS_ONCE([strerror_r])
+  gl_CHECK_FUNCS_ANDROID([strerror_r], [[#include <string.h>]])
   if test $ac_cv_func_strerror_r = yes; then
     if test "$GL_GENERATE_ERRNO_H:$REPLACE_STRERROR_0" = false:0; then
       dnl The POSIX prototype is:  int strerror_r (int, char *, size_t);
@@ -172,5 +172,9 @@ changequote([,])dnl
         fi
       fi
     fi
+  else
+    case "$gl_cv_onwards_func_strerror_r" in
+      future*) REPLACE_STRERROR_R=1 ;;
+    esac
   fi
 ])
diff --git a/m4/string_h.m4 b/m4/string_h.m4
index 9e09b96e..7f51391c 100644
--- a/m4/string_h.m4
+++ b/m4/string_h.m4
@@ -1,11 +1,11 @@
 # Configure a GNU-like replacement for <string.h>.
 
-# Copyright (C) 2007-2022 Free Software Foundation, Inc.
+# Copyright (C) 2007-2023 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 34
+# serial 37
 
 # Written by Paul Eggert.
 
@@ -21,7 +21,8 @@ AC_DEFUN_ONCE([gl_STRING_H],
   dnl guaranteed by C89.
   gl_WARN_ON_USE_PREPARE([[#include <string.h>
     ]],
-    [ffsl ffsll memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul
+    [explicit_bzero ffsl ffsll memmem mempcpy memrchr memset_explicit
+     rawmemchr stpcpy stpncpy strchrnul
      strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r
      strerror_r strerrorname_np sigabbrev_np sigdescr_np strsignal strverscmp])
 
@@ -54,6 +55,7 @@ AC_DEFUN([gl_STRING_H_REQUIRE_DEFAULTS],
     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_MEMSET_EXPLICIT])
     gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RAWMEMCHR])
     gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STPCPY])
     gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STPNCPY])
@@ -107,6 +109,7 @@ AC_DEFUN([gl_STRING_H_DEFAULTS],
   HAVE_FFSLL=1;                 AC_SUBST([HAVE_FFSLL])
   HAVE_DECL_MEMMEM=1;           AC_SUBST([HAVE_DECL_MEMMEM])
   HAVE_MEMPCPY=1;               AC_SUBST([HAVE_MEMPCPY])
+  HAVE_MEMSET_EXPLICIT=1;       AC_SUBST([HAVE_MEMSET_EXPLICIT])
   HAVE_DECL_MEMRCHR=1;          AC_SUBST([HAVE_DECL_MEMRCHR])
   HAVE_RAWMEMCHR=1;             AC_SUBST([HAVE_RAWMEMCHR])
   HAVE_STPCPY=1;                AC_SUBST([HAVE_STPCPY])
@@ -128,6 +131,8 @@ AC_DEFUN([gl_STRING_H_DEFAULTS],
   REPLACE_FFSLL=0;              AC_SUBST([REPLACE_FFSLL])
   REPLACE_MEMCHR=0;             AC_SUBST([REPLACE_MEMCHR])
   REPLACE_MEMMEM=0;             AC_SUBST([REPLACE_MEMMEM])
+  REPLACE_MEMPCPY=0;            AC_SUBST([REPLACE_MEMPCPY])
+  REPLACE_STPCPY=0;             AC_SUBST([REPLACE_STPCPY])
   REPLACE_STPNCPY=0;            AC_SUBST([REPLACE_STPNCPY])
   REPLACE_STRCHRNUL=0;          AC_SUBST([REPLACE_STRCHRNUL])
   REPLACE_STRDUP=0;             AC_SUBST([REPLACE_STRDUP])
diff --git a/m4/strnlen.m4 b/m4/strnlen.m4
index 0934274d..d2cac59b 100644
--- a/m4/strnlen.m4
+++ b/m4/strnlen.m4
@@ -1,5 +1,5 @@
 # strnlen.m4 serial 14
-dnl Copyright (C) 2002-2003, 2005-2007, 2009-2022 Free Software Foundation,
+dnl Copyright (C) 2002-2003, 2005-2007, 2009-2023 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
diff --git a/m4/strstr.m4 b/m4/strstr.m4
index 6cc20727..7de203a7 100644
--- a/m4/strstr.m4
+++ b/m4/strstr.m4
@@ -1,5 +1,5 @@
 # strstr.m4 serial 24
-dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/strtoimax.m4 b/m4/strtoimax.m4
index 08598936..db5cfb7a 100644
--- a/m4/strtoimax.m4
+++ b/m4/strtoimax.m4
@@ -1,5 +1,5 @@
 # strtoimax.m4 serial 16
-dnl Copyright (C) 2002-2004, 2006, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2004, 2006, 2009-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/strtoll.m4 b/m4/strtoll.m4
index dc37d998..ec09609c 100644
--- a/m4/strtoll.m4
+++ b/m4/strtoll.m4
@@ -1,5 +1,5 @@
-# strtoll.m4 serial 9
-dnl Copyright (C) 2002, 2004, 2006, 2008-2022 Free Software Foundation, Inc.
+# strtoll.m4 serial 10
+dnl Copyright (C) 2002, 2004, 2006, 2008-2023 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.
@@ -24,15 +24,26 @@ AC_DEFUN([gl_FUNC_STRTOLL],
                 if (term != input + 1)
                   result |= 1;
               }
+              /* This test fails on pre-C23 platforms.  */
+              {
+                const char input[] = "0b1";
+                (void) strtoll (input, &term, 2);
+                if (term != input + 3)
+                  result |= 2;
+              }
               return result;
             ]])
          ],
          [gl_cv_func_strtoll_works=yes],
          [gl_cv_func_strtoll_works=no],
          [case "$host_os" in
-                    # Guess no on native Windows.
-            mingw*) gl_cv_func_strtoll_works="guessing no" ;;
-            *)      gl_cv_func_strtoll_works="$gl_cross_guess_normal" ;;
+                                # Guess no on native Windows.
+            mingw*)             gl_cv_func_strtoll_works="guessing no" ;;
+                                # Guess no on glibc systems.
+            *-gnu* | gnu*)      gl_cv_func_strtoll_works="guessing no" ;;
+                                # Guess no on musl systems.
+            *-musl* | midipix*) gl_cv_func_strtoll_works="guessing no" ;;
+            *)                  gl_cv_func_strtoll_works="$gl_cross_guess_normal" ;;
           esac
          ])
     ])
diff --git a/m4/strtoull.m4 b/m4/strtoull.m4
index 8c8e30c6..4f895c76 100644
--- a/m4/strtoull.m4
+++ b/m4/strtoull.m4
@@ -1,5 +1,5 @@
-# strtoull.m4 serial 9
-dnl Copyright (C) 2002, 2004, 2006, 2008-2022 Free Software Foundation, Inc.
+# strtoull.m4 serial 10
+dnl Copyright (C) 2002, 2004, 2006, 2008-2023 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.
@@ -24,15 +24,26 @@ AC_DEFUN([gl_FUNC_STRTOULL],
                 if (term != input + 1)
                   result |= 1;
               }
+              /* This test fails on pre-C23 platforms.  */
+              {
+                const char input[] = "0b1";
+                (void) strtoull (input, &term, 2);
+                if (term != input + 3)
+                  result |= 2;
+              }
               return result;
             ]])
          ],
          [gl_cv_func_strtoull_works=yes],
          [gl_cv_func_strtoull_works=no],
          [case "$host_os" in
-                    # Guess no on native Windows.
-            mingw*) gl_cv_func_strtoull_works="guessing no" ;;
-            *)      gl_cv_func_strtoull_works="$gl_cross_guess_normal" ;;
+                                # Guess no on native Windows.
+            mingw*)             gl_cv_func_strtoull_works="guessing no" ;;
+                                # Guess no on glibc systems.
+            *-gnu* | gnu*)      gl_cv_func_strtoull_works="guessing no" ;;
+                                # Guess no on musl systems.
+            *-musl* | midipix*) gl_cv_func_strtoull_works="guessing no" ;;
+            *)                  gl_cv_func_strtoull_works="$gl_cross_guess_normal" ;;
           esac
          ])
     ])
diff --git a/m4/strtoumax.m4 b/m4/strtoumax.m4
index df314007..ede809ce 100644
--- a/m4/strtoumax.m4
+++ b/m4/strtoumax.m4
@@ -1,5 +1,5 @@
 # strtoumax.m4 serial 13
-dnl Copyright (C) 2002-2004, 2006, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2004, 2006, 2009-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/symlink.m4 b/m4/symlink.m4
index 5be2babb..52d6c115 100644
--- a/m4/symlink.m4
+++ b/m4/symlink.m4
@@ -1,7 +1,7 @@
-# serial 9
+# serial 10
 # See if we need to provide symlink replacement.
 
-dnl Copyright (C) 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2023 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.
@@ -38,6 +38,8 @@ AC_DEFUN([gl_FUNC_SYMLINK],
          [case "$host_os" in
                              # Guess yes on Linux systems.
             linux-* | linux) gl_cv_func_symlink_works="guessing yes" ;;
+                             # Guess yes on systems that emulate the Linux system calls.
+            midipix*)        gl_cv_func_symlink_works="guessing yes" ;;
                              # Guess yes on glibc systems.
             *-gnu* | gnu*)   gl_cv_func_symlink_works="guessing yes" ;;
                              # If we don't know, obey --enable-cross-guesses.
diff --git a/m4/sys_ioctl_h.m4 b/m4/sys_ioctl_h.m4
index be653643..80f0510e 100644
--- a/m4/sys_ioctl_h.m4
+++ b/m4/sys_ioctl_h.m4
@@ -1,5 +1,5 @@
 # sys_ioctl_h.m4 serial 15
-dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/sys_select_h.m4 b/m4/sys_select_h.m4
index 2743cd17..4ec5ed7a 100644
--- a/m4/sys_select_h.m4
+++ b/m4/sys_select_h.m4
@@ -1,5 +1,5 @@
 # sys_select_h.m4 serial 23
-dnl Copyright (C) 2006-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/sys_socket_h.m4 b/m4/sys_socket_h.m4
index ba3ae68e..98a10416 100644
--- a/m4/sys_socket_h.m4
+++ b/m4/sys_socket_h.m4
@@ -1,5 +1,5 @@
 # sys_socket_h.m4 serial 29
-dnl Copyright (C) 2005-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/sys_stat_h.m4 b/m4/sys_stat_h.m4
index 2adbfdee..ca57398a 100644
--- a/m4/sys_stat_h.m4
+++ b/m4/sys_stat_h.m4
@@ -1,5 +1,5 @@
 # sys_stat_h.m4 serial 42   -*- Autoconf -*-
-dnl Copyright (C) 2006-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/sys_time_h.m4 b/m4/sys_time_h.m4
index bc5e2b13..45a1f8b0 100644
--- a/m4/sys_time_h.m4
+++ b/m4/sys_time_h.m4
@@ -1,7 +1,7 @@
 # Configure a replacement for <sys/time.h>.
 # serial 12
 
-# Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2009-2023 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
diff --git a/m4/sys_types_h.m4 b/m4/sys_types_h.m4
index a5bef220..627671fb 100644
--- a/m4/sys_types_h.m4
+++ b/m4/sys_types_h.m4
@@ -1,5 +1,5 @@
 # sys_types_h.m4 serial 13
-dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/sys_uio_h.m4 b/m4/sys_uio_h.m4
index 36f55ead..93a65d26 100644
--- a/m4/sys_uio_h.m4
+++ b/m4/sys_uio_h.m4
@@ -1,5 +1,5 @@
 # sys_uio_h.m4 serial 3
-dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/thread.m4 b/m4/thread.m4
index 1a8e543c..9c63df39 100644
--- a/m4/thread.m4
+++ b/m4/thread.m4
@@ -1,5 +1,5 @@
-# thread.m4 serial 3
-dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
+# thread.m4 serial 4
+dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -11,7 +11,7 @@ AC_DEFUN([gl_THREAD],
   if test $gl_threads_api = posix; then
     gl_save_LIBS="$LIBS"
     LIBS="$LIBS $LIBMULTITHREAD"
-    AC_CHECK_FUNCS([pthread_atfork])
+    gl_CHECK_FUNCS_ANDROID([pthread_atfork], [[#include <pthread.h>]])
     LIBS="$gl_save_LIBS"
   fi
 ])
diff --git a/m4/threadlib.m4 b/m4/threadlib.m4
index ecb4970a..1fc5777e 100644
--- a/m4/threadlib.m4
+++ b/m4/threadlib.m4
@@ -1,5 +1,5 @@
-# threadlib.m4 serial 32
-dnl Copyright (C) 2005-2022 Free Software Foundation, Inc.
+# threadlib.m4 serial 38
+dnl Copyright (C) 2005-2023 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.
@@ -85,10 +85,11 @@ AC_DEFUN([gl_WEAK_SYMBOLS],
   AC_CACHE_CHECK([whether imported symbols can be declared weak],
     [gl_cv_have_weak],
     [case "$host_os" in
-       cygwin*)
-         dnl On Cygwin 3.2.0 with gcc 10.2, the test below would succeed, but
-         dnl programs that use pthread_in_use() with weak symbol references
-         dnl crash miserably at runtime.
+       cygwin* | mingw*)
+         dnl On Cygwin 3.2.0 with gcc 10.2, and likewise on mingw 10.0.0 with
+         dnl gcc 11.3, the test below would succeed, but programs that use
+         dnl pthread_in_use() with weak symbol references crash miserably at
+         dnl runtime.
          gl_cv_have_weak="guessing no"
          ;;
        *)
@@ -174,7 +175,7 @@ dnl Sets the variable LIBPMULTITHREAD, for programs that really need
 dnl multithread functionality. The difference between LIBPTHREAD and
 dnl LIBPMULTITHREAD is that on platforms supporting weak symbols, typically
 dnl LIBPTHREAD is empty whereas LIBPMULTITHREAD is not.
-dnl Sets the variable LIB_SCHED_YIELD to the linker options needed to use the
+dnl Sets the variable SCHED_YIELD_LIB to the linker options needed to use the
 dnl sched_yield() function.
 dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for
 dnl multithread-safe programs.
@@ -261,7 +262,9 @@ AC_DEFUN([gl_PTHREADLIB_BODY],
              # On Solaris 10 or newer, this test is no longer needed, because
              # libc contains the fully functional pthread functions.
              case "$host_os" in
+changequote(,)dnl
                solaris | solaris2.[1-9] | solaris2.[1-9].* | hpux*)
+changequote([,])dnl
                  AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], [1],
                    [Define if the pthread_in_use() detection is hard.])
              esac
@@ -297,13 +300,16 @@ AC_DEFUN([gl_PTHREADLIB_BODY],
       [AC_LANG_PROGRAM(
          [[#include <sched.h>]],
          [[sched_yield ();]])],
-      [LIB_SCHED_YIELD=
+      [SCHED_YIELD_LIB=
       ],
       [dnl Solaris 7...10 has sched_yield in librt, not in libpthread or libc.
-       AC_CHECK_LIB([rt], [sched_yield], [LIB_SCHED_YIELD=-lrt],
+       AC_CHECK_LIB([rt], [sched_yield], [SCHED_YIELD_LIB=-lrt],
          [dnl Solaris 2.5.1, 2.6 has sched_yield in libposix4, not librt.
-          AC_CHECK_LIB([posix4], [sched_yield], [LIB_SCHED_YIELD=-lposix4])])
+          AC_CHECK_LIB([posix4], [sched_yield], [SCHED_YIELD_LIB=-lposix4])])
       ])
+    AC_SUBST([SCHED_YIELD_LIB])
+    dnl For backward compatibility.
+    LIB_SCHED_YIELD="$SCHED_YIELD_LIB"
     AC_SUBST([LIB_SCHED_YIELD])
 
     gl_pthreadlib_body_done=done
@@ -349,7 +355,7 @@ AC_DEFUN([gl_STDTHREADLIB_BODY],
           dnl on libpthread (for the symbol 'pthread_mutexattr_gettype').
           dnl glibc >= 2.34, AIX >= 7.1, and Solaris >= 11.4 have thrd_create in
           dnl libc.
-          AC_CHECK_FUNCS([thrd_create])
+          gl_CHECK_FUNCS_ANDROID([thrd_create], [[#include <threads.h>]])
           if test $ac_cv_func_thrd_create = yes; then
             LIBSTDTHREAD=
           else
@@ -362,7 +368,7 @@ AC_DEFUN([gl_STDTHREADLIB_BODY],
           fi
         else
           dnl Libraries needed by thrd.c, mtx.c, cnd.c, tss.c.
-          LIBSTDTHREAD="$LIBPMULTITHREAD $LIB_SCHED_YIELD"
+          LIBSTDTHREAD="$LIBPMULTITHREAD $SCHED_YIELD_LIB"
         fi
         ;;
     esac
@@ -433,10 +439,12 @@ AC_DEFUN([gl_THREADLIB_EARLY_BODY],
   m4_ifdef([gl_THREADLIB_DEFAULT_NO],
     [m4_divert_text([DEFAULTS], [gl_use_threads_default=no])],
     [m4_divert_text([DEFAULTS], [gl_use_threads_default=])])
-  m4_divert_text([DEFAULTS], [gl_use_winpthreads_default=])
+  dnl gl_use_winpthreads_default defaults to 'no', because in mingw 10, like
+  dnl in mingw 5, the use of libwinpthread still makes test-pthread-tss crash.
+  m4_divert_text([DEFAULTS], [gl_use_winpthreads_default=no])
   AC_ARG_ENABLE([threads],
-AS_HELP_STRING([--enable-threads={isoc|posix|isoc+posix|windows}], [specify multithreading API])m4_ifdef([gl_THREADLIB_DEFAULT_NO], [], [
-AS_HELP_STRING([--disable-threads], [build without multithread safety])]),
+AS_HELP_STRING([[--enable-threads={isoc|posix|isoc+posix|windows}]], [specify multithreading API])m4_ifdef([gl_THREADLIB_DEFAULT_NO], [], [
+AS_HELP_STRING([[--disable-threads]], [build without multithread safety])]),
     [gl_use_threads=$enableval],
     [if test -n "$gl_use_threads_default"; then
        gl_use_threads="$gl_use_threads_default"
@@ -599,7 +607,8 @@ dnl -------------------
 dnl Sets the gl_THREADLIB default so that on mingw, a dependency to the
 dnl libwinpthread DLL (mingw-w64 winpthreads library) is avoided.
 dnl The user can still override it at installation time, by using the
-dnl configure option '--enable-threads'.
+dnl configure option '--enable-threads=posix'.
+dnl As of 2023, this is now the default.
 
 AC_DEFUN([gl_AVOID_WINPTHREAD], [
   m4_divert_text([INIT_PREPARE], [gl_use_winpthreads_default=no])
diff --git a/m4/time.m4 b/m4/time.m4
new file mode 100644
index 00000000..4c4e4117
--- /dev/null
+++ b/m4/time.m4
@@ -0,0 +1,48 @@
+# time.m4 serial 3
+dnl Copyright (C) 2023 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([gl_FUNC_TIME],
+[
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  dnl glibc has the bug https://sourceware.org/bugzilla/show_bug.cgi?id=30200 .
+  AC_CACHE_CHECK([whether time() works],
+    [gl_cv_func_time_works],
+    [dnl Guess that it works except on
+     dnl   - glibc >= 2.31 with Linux. And binaries produced on glibc < 2.31
+     dnl     need to run fine on newer glibc versions as well; therefore ignore
+     dnl     __GLIBC_MINOR__.
+     dnl   - AIX,
+     dnl   - native Windows.
+     case "$host_os" in
+       linux*-gnu*)
+         AC_EGREP_CPP([Unlucky], [
+           #include <features.h>
+           #ifdef __GNU_LIBRARY__
+            #if __GLIBC__ == 2
+             Unlucky GNU user
+            #endif
+           #endif
+           ],
+           [gl_cv_func_time_works="guessing no"],
+           [gl_cv_func_time_works="guessing yes"])
+         ;;
+       aix*)   gl_cv_func_time_works="guessing no";;
+       mingw*) gl_cv_func_time_works="guessing no";;
+       *) gl_cv_func_time_works="guessing yes";;
+     esac
+    ])
+  case "$gl_cv_func_time_works" in
+    *no) REPLACE_TIME=1 ;;
+  esac
+])
+
+# Prerequisites of lib/time.c.
+AC_DEFUN([gl_PREREQ_TIME],
+[
+  :
+])
diff --git a/m4/time_h.m4 b/m4/time_h.m4
index 98d7b6e0..51d553a2 100644
--- a/m4/time_h.m4
+++ b/m4/time_h.m4
@@ -1,8 +1,8 @@
 # Configure a more-standard replacement for <time.h>.
 
-# Copyright (C) 2000-2001, 2003-2007, 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2000-2001, 2003-2007, 2009-2023 Free Software Foundation, Inc.
 
-# serial 19
+# serial 22
 
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -19,6 +19,12 @@ AC_DEFUN_ONCE([gl_TIME_H],
   gl_NEXT_HEADERS([time.h])
   AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC])
 
+  dnl Check for declarations of anything we want to poison if the
+  dnl corresponding gnulib module is not in use.
+  gl_WARN_ON_USE_PREPARE([[
+#include <time.h>
+    ]], [asctime_r ctime_r])
+
   AC_REQUIRE([AC_C_RESTRICT])
 
   AC_CACHE_CHECK([for TIME_UTC in <time.h>],
@@ -131,6 +137,7 @@ AC_DEFUN([gl_TIME_H_REQUIRE_DEFAULTS],
     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_TIME])
     gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIMEGM])
     gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIMESPEC_GET])
     gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIMESPEC_GETRES])
@@ -163,7 +170,9 @@ AC_DEFUN([gl_TIME_H_DEFAULTS],
   REPLACE_MKTIME=GNULIB_PORTCHECK;       AC_SUBST([REPLACE_MKTIME])
   REPLACE_NANOSLEEP=GNULIB_PORTCHECK;    AC_SUBST([REPLACE_NANOSLEEP])
   REPLACE_STRFTIME=GNULIB_PORTCHECK;     AC_SUBST([REPLACE_STRFTIME])
+  REPLACE_TIME=0;                        AC_SUBST([REPLACE_TIME])
   REPLACE_TIMEGM=GNULIB_PORTCHECK;       AC_SUBST([REPLACE_TIMEGM])
+  REPLACE_TIMESPEC_GET=GNULIB_PORTCHECK; AC_SUBST([REPLACE_TIMESPEC_GET])
   REPLACE_TZSET=GNULIB_PORTCHECK;        AC_SUBST([REPLACE_TZSET])
 
   dnl Hack so that the time module doesn't depend on the sys_time module.
diff --git a/m4/unistd-safer.m4 b/m4/unistd-safer.m4
index 33158a48..ced03b01 100644
--- a/m4/unistd-safer.m4
+++ b/m4/unistd-safer.m4
@@ -1,5 +1,5 @@
 #serial 9
-dnl Copyright (C) 2002, 2005-2006, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2005-2006, 2009-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/unistd_h.m4 b/m4/unistd_h.m4
index 4c66ccc0..1c961581 100644
--- a/m4/unistd_h.m4
+++ b/m4/unistd_h.m4
@@ -1,5 +1,5 @@
-# unistd_h.m4 serial 90
-dnl Copyright (C) 2006-2022 Free Software Foundation, Inc.
+# unistd_h.m4 serial 94
+dnl Copyright (C) 2006-2023 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.
@@ -225,6 +225,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
   REPLACE_COPY_FILE_RANGE=0;         AC_SUBST([REPLACE_COPY_FILE_RANGE])
   REPLACE_DUP=0;                     AC_SUBST([REPLACE_DUP])
   REPLACE_DUP2=0;                    AC_SUBST([REPLACE_DUP2])
+  REPLACE_DUP3=0;                    AC_SUBST([REPLACE_DUP3])
   REPLACE_EXECL=0;                   AC_SUBST([REPLACE_EXECL])
   REPLACE_EXECLE=0;                  AC_SUBST([REPLACE_EXECLE])
   REPLACE_EXECLP=0;                  AC_SUBST([REPLACE_EXECLP])
@@ -234,10 +235,12 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
   REPLACE_EXECVPE=0;                 AC_SUBST([REPLACE_EXECVPE])
   REPLACE_FACCESSAT=0;               AC_SUBST([REPLACE_FACCESSAT])
   REPLACE_FCHOWNAT=0;                AC_SUBST([REPLACE_FCHOWNAT])
+  REPLACE_FDATASYNC=0;               AC_SUBST([REPLACE_FDATASYNC])
   REPLACE_FTRUNCATE=0;               AC_SUBST([REPLACE_FTRUNCATE])
   REPLACE_GETCWD=0;                  AC_SUBST([REPLACE_GETCWD])
   REPLACE_GETDOMAINNAME=0;           AC_SUBST([REPLACE_GETDOMAINNAME])
   REPLACE_GETDTABLESIZE=0;           AC_SUBST([REPLACE_GETDTABLESIZE])
+  REPLACE_GETENTROPY=0;              AC_SUBST([REPLACE_GETENTROPY])
   REPLACE_GETLOGIN_R=0;              AC_SUBST([REPLACE_GETLOGIN_R])
   REPLACE_GETGROUPS=0;               AC_SUBST([REPLACE_GETGROUPS])
   REPLACE_GETPAGESIZE=0;             AC_SUBST([REPLACE_GETPAGESIZE])
@@ -248,12 +251,14 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
   REPLACE_LINK=0;                    AC_SUBST([REPLACE_LINK])
   REPLACE_LINKAT=0;                  AC_SUBST([REPLACE_LINKAT])
   REPLACE_LSEEK=0;                   AC_SUBST([REPLACE_LSEEK])
+  REPLACE_PIPE2=0;                   AC_SUBST([REPLACE_PIPE2])
   REPLACE_PREAD=0;                   AC_SUBST([REPLACE_PREAD])
   REPLACE_PWRITE=0;                  AC_SUBST([REPLACE_PWRITE])
   REPLACE_READ=0;                    AC_SUBST([REPLACE_READ])
   REPLACE_READLINK=0;                AC_SUBST([REPLACE_READLINK])
   REPLACE_READLINKAT=0;              AC_SUBST([REPLACE_READLINKAT])
   REPLACE_RMDIR=0;                   AC_SUBST([REPLACE_RMDIR])
+  REPLACE_SETHOSTNAME=0;             AC_SUBST([REPLACE_SETHOSTNAME])
   REPLACE_SLEEP=0;                   AC_SUBST([REPLACE_SLEEP])
   REPLACE_SYMLINK=0;                 AC_SUBST([REPLACE_SYMLINK])
   REPLACE_SYMLINKAT=0;               AC_SUBST([REPLACE_SYMLINKAT])
diff --git a/m4/unlocked-io.m4 b/m4/unlocked-io.m4
index d42c95ce..407c0bac 100644
--- a/m4/unlocked-io.m4
+++ b/m4/unlocked-io.m4
@@ -1,6 +1,6 @@
 # unlocked-io.m4 serial 16
 
-# Copyright (C) 1998-2006, 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 1998-2006, 2009-2023 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
diff --git a/m4/vasnprintf.m4 b/m4/vasnprintf.m4
index afdece71..639b29a1 100644
--- a/m4/vasnprintf.m4
+++ b/m4/vasnprintf.m4
@@ -1,5 +1,5 @@
-# vasnprintf.m4 serial 38
-dnl Copyright (C) 2002-2004, 2006-2022 Free Software Foundation, Inc.
+# vasnprintf.m4 serial 49
+dnl Copyright (C) 2002-2004, 2006-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -29,6 +29,15 @@ AC_DEFUN([gl_REPLACE_VASNPRINTF],
   gl_PREREQ_ASNPRINTF
 ])
 
+AC_DEFUN([gl_FUNC_VASNWPRINTF],
+[
+  AC_LIBOBJ([printf-args])
+  gl_PREREQ_PRINTF_ARGS
+  gl_PREREQ_PRINTF_PARSE
+  gl_PREREQ_VASNWPRINTF
+  gl_PREREQ_ASNPRINTF
+])
+
 # Prerequisites of lib/printf-args.h, lib/printf-args.c.
 AC_DEFUN([gl_PREREQ_PRINTF_ARGS],
 [
@@ -37,6 +46,7 @@ AC_DEFUN([gl_PREREQ_PRINTF_ARGS],
 ])
 
 # Prerequisites of lib/printf-parse.h, lib/printf-parse.c.
+# Prerequisites of lib/wprintf-parse.h, lib/wprintf-parse.c.
 AC_DEFUN([gl_PREREQ_PRINTF_PARSE],
 [
   AC_REQUIRE([gl_FEATURES_H])
@@ -50,19 +60,13 @@ AC_DEFUN([gl_PREREQ_PRINTF_PARSE],
   AC_REQUIRE([gt_AC_TYPE_INTMAX_T])
 ])
 
-# Prerequisites of lib/vasnprintf.c.
+# Prerequisites of lib/vasnprintf.c if !WIDE_CHAR_VERSION.
 AC_DEFUN_ONCE([gl_PREREQ_VASNPRINTF],
 [
-  AC_REQUIRE([AC_FUNC_ALLOCA])
-  AC_REQUIRE([gt_TYPE_WCHAR_T])
-  AC_REQUIRE([gt_TYPE_WINT_T])
-  AC_CHECK_FUNCS([snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb])
+  AC_CHECK_FUNCS([snprintf strnlen wcrtomb])
   dnl Use the _snprintf function only if it is declared (because on NetBSD it
   dnl is defined as a weak alias of snprintf; we prefer to use the latter).
   AC_CHECK_DECLS([_snprintf], , , [[#include <stdio.h>]])
-  dnl Knowing DBL_EXPBIT0_WORD and DBL_EXPBIT0_BIT enables an optimization
-  dnl in the code for NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE.
-  AC_REQUIRE([gl_DOUBLE_EXPONENT_LOCATION])
   dnl We can avoid a lot of code by assuming that snprintf's return value
   dnl conforms to ISO C99. So check that.
   AC_REQUIRE([gl_SNPRINTF_RETVAL_C99])
@@ -84,6 +88,55 @@ AC_DEFUN_ONCE([gl_PREREQ_VASNPRINTF],
          terminated.])
       ;;
   esac
+  gl_PREREQ_VASNXPRINTF
+])
+
+# Prerequisites of lib/vasnwprintf.c.
+AC_DEFUN_ONCE([gl_PREREQ_VASNWPRINTF],
+[
+  AC_CHECK_FUNCS_ONCE([swprintf wcsnlen mbrtowc])
+  AC_CHECK_DECLS([_snwprintf], , , [[#include <stdio.h>]])
+  AC_CHECK_DECLS([wcsnlen], , , [[#include <wchar.h>]])
+  gl_SWPRINTF_WORKS
+  case "$gl_cv_func_swprintf_works" in
+    *yes)
+      AC_DEFINE([HAVE_WORKING_SWPRINTF], [1],
+        [Define if the swprintf function works correctly when it produces output
+         that contains null wide characters.])
+      ;;
+  esac
+  gl_MBRTOWC_C_LOCALE
+  case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in
+    *yes) ;;
+    *)
+      AC_DEFINE([NEED_WPRINTF_DIRECTIVE_C], [1],
+        [Define if the vasnwprintf implementation needs special code for
+         the 'c' directive.])
+      ;;
+  esac
+  gl_SWPRINTF_DIRECTIVE_LA
+  case "$gl_cv_func_swprintf_directive_la" in
+    *yes) ;;
+    *)
+      AC_DEFINE([NEED_WPRINTF_DIRECTIVE_LA], [1],
+        [Define if the vasnwprintf implementation needs special code for
+         the 'a' directive with 'long double' arguments.])
+      ;;
+  esac
+  gl_MUSL_LIBC
+  gl_PREREQ_VASNXPRINTF
+])
+
+# Common prerequisites of lib/vasnprintf.c and lib/vasnwprintf.c.
+AC_DEFUN_ONCE([gl_PREREQ_VASNXPRINTF],
+[
+  AC_REQUIRE([AC_FUNC_ALLOCA])
+  AC_REQUIRE([gt_TYPE_WCHAR_T])
+  AC_REQUIRE([gt_TYPE_WINT_T])
+  AC_CHECK_FUNCS([wcslen])
+  dnl Knowing DBL_EXPBIT0_WORD and DBL_EXPBIT0_BIT enables an optimization
+  dnl in the code for NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE.
+  AC_REQUIRE([gl_DOUBLE_EXPONENT_LOCATION])
 ])
 
 # Extra prerequisites of lib/vasnprintf.c for supporting 'long double'
@@ -152,7 +205,22 @@ AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_A],
       AC_DEFINE([NEED_PRINTF_DIRECTIVE_A], [1],
         [Define if the vasnprintf implementation needs special code for
          the 'a' and 'A' directives.])
-      AC_CHECK_FUNCS([nl_langinfo])
+      gl_CHECK_FUNCS_ANDROID([nl_langinfo], [[#include <langinfo.h>]])
+      ;;
+  esac
+])
+
+# Extra prerequisites of lib/vasnprintf.c for supporting the 'b' directive.
+AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_B],
+[
+  AC_REQUIRE([gl_PRINTF_DIRECTIVE_B])
+  case "$gl_cv_func_printf_directive_b" in
+    *yes)
+      ;;
+    *)
+      AC_DEFINE([NEED_PRINTF_DIRECTIVE_B], [1],
+        [Define if the vasnprintf implementation needs special code for
+         the 'b' directive.])
       ;;
   esac
 ])
@@ -187,6 +255,21 @@ AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_LS],
   esac
 ])
 
+# Extra prerequisites of lib/vasnprintf.c for supporting the 'lc' directive.
+AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_LC],
+[
+  AC_REQUIRE([gl_PRINTF_DIRECTIVE_LC])
+  case "$gl_cv_func_printf_directive_lc" in
+    *yes)
+      ;;
+    *)
+      AC_DEFINE([NEED_PRINTF_DIRECTIVE_LC], [1],
+        [Define if the vasnprintf implementation needs special code for
+         the 'lc' directive.])
+      ;;
+  esac
+])
+
 # Extra prerequisites of lib/vasnprintf.c for supporting the ' flag.
 AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_GROUPING],
 [
@@ -276,15 +359,17 @@ AC_DEFUN([gl_PREREQ_VASNPRINTF_ENOMEM],
 ])
 
 # Prerequisites of lib/vasnprintf.c including all extras for POSIX compliance.
-AC_DEFUN([gl_PREREQ_VASNPRINTF_WITH_EXTRAS],
+AC_DEFUN([gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS],
 [
   AC_REQUIRE([gl_PREREQ_VASNPRINTF])
   gl_PREREQ_VASNPRINTF_LONG_DOUBLE
   gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE
   gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE
   gl_PREREQ_VASNPRINTF_DIRECTIVE_A
+  gl_PREREQ_VASNPRINTF_DIRECTIVE_B
   gl_PREREQ_VASNPRINTF_DIRECTIVE_F
   gl_PREREQ_VASNPRINTF_DIRECTIVE_LS
+  gl_PREREQ_VASNPRINTF_DIRECTIVE_LC
   gl_PREREQ_VASNPRINTF_FLAG_GROUPING
   gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST
   gl_PREREQ_VASNPRINTF_FLAG_ZERO
@@ -292,7 +377,34 @@ AC_DEFUN([gl_PREREQ_VASNPRINTF_WITH_EXTRAS],
   gl_PREREQ_VASNPRINTF_ENOMEM
 ])
 
+# Extra prerequisites of lib/vasnprintf.c for supporting the 'B' directive.
+AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_UPPERCASE_B],
+[
+  AC_REQUIRE([gl_PRINTF_DIRECTIVE_UPPERCASE_B])
+  case "$gl_cv_func_printf_directive_uppercase_b" in
+    *yes)
+      ;;
+    *)
+      AC_DEFINE([NEED_PRINTF_DIRECTIVE_UPPERCASE_B], [1],
+        [Define if the vasnprintf implementation needs special code for
+         the 'B' directive.])
+      ;;
+  esac
+])
+
+# Prerequisites of lib/vasnprintf.c including all extras for POSIX compliance
+# and GNU compatibility.
+AC_DEFUN([gl_PREREQ_VASNPRINTF_WITH_GNU_EXTRAS],
+[
+  gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS
+  AC_DEFINE([SUPPORT_GNU_PRINTF_DIRECTIVES], [1],
+    [Define if the vasnprintf implementation should support GNU compatible
+     printf directives.])
+  gl_PREREQ_VASNPRINTF_DIRECTIVE_UPPERCASE_B
+])
+
 # Prerequisites of lib/asnprintf.c.
+# Prerequisites of lib/asnwprintf.c.
 AC_DEFUN([gl_PREREQ_ASNPRINTF],
 [
 ])
diff --git a/m4/version-etc.m4 b/m4/version-etc.m4
index c1f355bc..a948ef62 100644
--- a/m4/version-etc.m4
+++ b/m4/version-etc.m4
@@ -1,5 +1,5 @@
-# version-etc.m4 serial 1
-# Copyright (C) 2009-2022 Free Software Foundation, Inc.
+# version-etc.m4 serial 2
+# Copyright (C) 2009-2023 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -8,7 +8,7 @@ dnl $1 - configure flag and define name
 dnl $2 - human readable description
 m4_define([gl_VERSION_ETC_FLAG],
 [dnl
-  AC_ARG_WITH([$1], [AS_HELP_STRING([--with-$1], [$2])],
+  AC_ARG_WITH([$1], [AS_HELP_STRING([[--with-]$1], [$2])],
     [dnl
       case $withval in
         yes|no) ;;
diff --git a/m4/visibility.m4 b/m4/visibility.m4
index 4a212a4e..f0468e89 100644
--- a/m4/visibility.m4
+++ b/m4/visibility.m4
@@ -1,5 +1,5 @@
 # visibility.m4 serial 8
-dnl Copyright (C) 2005, 2008, 2010-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2008, 2010-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/warn-on-use.m4 b/m4/warn-on-use.m4
index d43355ab..10649c5c 100644
--- a/m4/warn-on-use.m4
+++ b/m4/warn-on-use.m4
@@ -1,5 +1,5 @@
-# warn-on-use.m4 serial 9
-dnl Copyright (C) 2010-2022 Free Software Foundation, Inc.
+# warn-on-use.m4 serial 10
+dnl Copyright (C) 2010-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -32,17 +32,30 @@ AC_DEFUN([gl_WARN_ON_USE_PREPARE],
           undefining macros.])])dnl
      for gl_func in m4_flatten([$2]); do
        AS_VAR_PUSHDEF([gl_Symbol], [gl_cv_have_raw_decl_$gl_func])dnl
+       dnl As a workaround to implicit built-in function declarations in
+       dnl clang (e.g. strndup), reference ac_compile_for_check_decl instead
+       dnl of ac_compile.  If, for whatever reason, the override of AC_PROG_CC
+       dnl in zzgnulib.m4 is inactive, use the original ac_compile.
+       ac_save_ac_compile="$ac_compile"
+       if test -n "$ac_compile_for_check_decl"; then
+         ac_compile="$ac_compile_for_check_decl"
+       fi
        AC_CACHE_CHECK([whether $gl_func is declared without a macro],
          [gl_Symbol],
          [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$1],
 [[#undef $gl_func
   (void) $gl_func;]])],
            [AS_VAR_SET([gl_Symbol], [yes])], [AS_VAR_SET([gl_Symbol], [no])])])
+       ac_compile="$ac_save_ac_compile"
        AS_VAR_IF([gl_Symbol], [yes],
          [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_RAW_DECL_$gl_func]), [1])
-          dnl shortcut - if the raw declaration exists, then set a cache
-          dnl variable to allow skipping any later AC_CHECK_DECL efforts
-          eval ac_cv_have_decl_$gl_func=yes])
+          dnl Shortcut for an AC_CHECK_DECL invocation that may come later:
+          dnl If the raw declaration exists with the given includes, then
+          dnl AC_CHECK_DECL with its many includes would see it as well.
+          dnl So, set a cache variable to allow skipping any later
+          dnl AC_CHECK_DECL invocation for $gl_func.
+          eval "ac_cv_have_decl_$gl_func=yes"
+         ])
        AS_VAR_POPDEF([gl_Symbol])dnl
      done
     ])
diff --git a/m4/warnings.m4 b/m4/warnings.m4
index 60088f93..063bc5ca 100644
--- a/m4/warnings.m4
+++ b/m4/warnings.m4
@@ -1,5 +1,5 @@
 # warnings.m4 serial 16
-dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/wchar_h.m4 b/m4/wchar_h.m4
index 4baba1af..442932be 100644
--- a/m4/wchar_h.m4
+++ b/m4/wchar_h.m4
@@ -1,13 +1,13 @@
 dnl A placeholder for ISO C99 <wchar.h>, for platforms that have issues.
 
-dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
 dnl Written by Eric Blake.
 
-# wchar_h.m4 serial 55
+# wchar_h.m4 serial 60
 
 AC_DEFUN_ONCE([gl_WCHAR_H],
 [
@@ -253,5 +253,10 @@ AC_DEFUN([gl_WCHAR_H_DEFAULTS],
   REPLACE_WCWIDTH=0;    AC_SUBST([REPLACE_WCWIDTH])
   REPLACE_WCSWIDTH=0;   AC_SUBST([REPLACE_WCSWIDTH])
   REPLACE_WCSFTIME=0;   AC_SUBST([REPLACE_WCSFTIME])
+  REPLACE_WCSCMP=0;     AC_SUBST([REPLACE_WCSCMP])
+  REPLACE_WCSNCMP=0;    AC_SUBST([REPLACE_WCSNCMP])
+  REPLACE_WCSSTR=0;     AC_SUBST([REPLACE_WCSSTR])
   REPLACE_WCSTOK=0;     AC_SUBST([REPLACE_WCSTOK])
+  REPLACE_WMEMCMP=0;    AC_SUBST([REPLACE_WMEMCMP])
+  REPLACE_WMEMPCPY=0;   AC_SUBST([REPLACE_WMEMPCPY])
 ])
diff --git a/m4/wchar_t.m4 b/m4/wchar_t.m4
index 268e3e51..50bde08a 100644
--- a/m4/wchar_t.m4
+++ b/m4/wchar_t.m4
@@ -1,5 +1,5 @@
 # wchar_t.m4 serial 4 (gettext-0.18.2)
-dnl Copyright (C) 2002-2003, 2008-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2008-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/wcrtomb.m4 b/m4/wcrtomb.m4
index fee21d7e..d51b36e1 100644
--- a/m4/wcrtomb.m4
+++ b/m4/wcrtomb.m4
@@ -1,5 +1,5 @@
 # wcrtomb.m4 serial 17
-dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/wctob.m4 b/m4/wctob.m4
index af172cd1..90042a52 100644
--- a/m4/wctob.m4
+++ b/m4/wctob.m4
@@ -1,5 +1,5 @@
 # wctob.m4 serial 13
-dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/wctomb.m4 b/m4/wctomb.m4
index 12329d8e..2e22310a 100644
--- a/m4/wctomb.m4
+++ b/m4/wctomb.m4
@@ -1,5 +1,5 @@
 # wctomb.m4 serial 2
-dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/wctype_h.m4 b/m4/wctype_h.m4
index 702cb39c..6856a735 100644
--- a/m4/wctype_h.m4
+++ b/m4/wctype_h.m4
@@ -2,7 +2,7 @@
 
 dnl A placeholder for ISO C99 <wctype.h>, for platforms that lack it.
 
-dnl Copyright (C) 2006-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/wcwidth.m4 b/m4/wcwidth.m4
index 9dd59579..93a7fa32 100644
--- a/m4/wcwidth.m4
+++ b/m4/wcwidth.m4
@@ -1,5 +1,5 @@
-# wcwidth.m4 serial 34
-dnl Copyright (C) 2006-2022 Free Software Foundation, Inc.
+# wcwidth.m4 serial 35
+dnl Copyright (C) 2006-2023 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.
@@ -86,13 +86,13 @@ int main ()
           [
 changequote(,)dnl
            case "$host_os" in
-                            # Guess yes on glibc systems.
-             *-gnu* | gnu*) gl_cv_func_wcwidth_works="guessing yes";;
-                            # Guess yes on musl systems.
-             *-musl*)       gl_cv_func_wcwidth_works="guessing yes";;
-                            # Guess yes on AIX 7 systems.
-             aix[7-9]*)     gl_cv_func_wcwidth_works="guessing yes";;
-             *)             gl_cv_func_wcwidth_works="$gl_cross_guess_normal";;
+                                 # Guess yes on glibc systems.
+             *-gnu* | gnu*)      gl_cv_func_wcwidth_works="guessing yes";;
+                                 # Guess yes on musl systems.
+             *-musl* | midipix*) gl_cv_func_wcwidth_works="guessing yes";;
+                                 # Guess yes on AIX 7 systems.
+             aix[7-9]*)          gl_cv_func_wcwidth_works="guessing yes";;
+             *)                  gl_cv_func_wcwidth_works="$gl_cross_guess_normal";;
            esac
 changequote([,])dnl
           ])
diff --git a/m4/windows-stat-inodes.m4 b/m4/windows-stat-inodes.m4
index 2f109c96..ac0d1e68 100644
--- a/m4/windows-stat-inodes.m4
+++ b/m4/windows-stat-inodes.m4
@@ -1,5 +1,5 @@
 # windows-stat-inodes.m4 serial 1
-dnl Copyright (C) 2017-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2017-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/wint_t.m4 b/m4/wint_t.m4
index adc58661..dfd743b3 100644
--- a/m4/wint_t.m4
+++ b/m4/wint_t.m4
@@ -1,5 +1,5 @@
 # wint_t.m4 serial 11
-dnl Copyright (C) 2003, 2007-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2007-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/wmemchr.m4 b/m4/wmemchr.m4
index e75b5519..ac414fbc 100644
--- a/m4/wmemchr.m4
+++ b/m4/wmemchr.m4
@@ -1,5 +1,5 @@
 # wmemchr.m4 serial 5
-dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/wmempcpy.m4 b/m4/wmempcpy.m4
index 9765039b..abf1df34 100644
--- a/m4/wmempcpy.m4
+++ b/m4/wmempcpy.m4
@@ -1,5 +1,5 @@
-# wmempcpy.m4 serial 1
-dnl Copyright (C) 2020-2022 Free Software Foundation, Inc.
+# wmempcpy.m4 serial 3
+dnl Copyright (C) 2020-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -14,8 +14,11 @@ AC_DEFUN([gl_FUNC_WMEMPCPY],
   dnl The wmempcpy() declaration in lib/wchar.in.h uses 'restrict'.
   AC_REQUIRE([AC_C_RESTRICT])
 
-  AC_CHECK_FUNCS_ONCE([wmempcpy])
+  gl_CHECK_FUNCS_ANDROID([wmempcpy], [[#include <wchar.h>]])
   if test $ac_cv_func_wmempcpy = no; then
     HAVE_WMEMPCPY=0
+    case "$gl_cv_onwards_func_wmempcpy" in
+      future*) REPLACE_WMEMPCPY=1 ;;
+    esac
   fi
 ])
diff --git a/m4/xalloc.m4 b/m4/xalloc.m4
index 17a9c06d..fc56f59a 100644
--- a/m4/xalloc.m4
+++ b/m4/xalloc.m4
@@ -1,5 +1,5 @@
 # xalloc.m4 serial 18
-dnl Copyright (C) 2002-2006, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/xsize.m4 b/m4/xsize.m4
index 0109049e..649db9c5 100644
--- a/m4/xsize.m4
+++ b/m4/xsize.m4
@@ -1,5 +1,5 @@
 # xsize.m4 serial 5
-dnl Copyright (C) 2003-2004, 2008-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2003-2004, 2008-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/xstrtol.m4 b/m4/xstrtol.m4
index 3793de64..dc412616 100644
--- a/m4/xstrtol.m4
+++ b/m4/xstrtol.m4
@@ -1,5 +1,5 @@
 #serial 11
-dnl Copyright (C) 2002-2007, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2007, 2009-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/year2038.m4 b/m4/year2038.m4
deleted file mode 100644
index 06db589b..00000000
--- a/m4/year2038.m4
+++ /dev/null
@@ -1,124 +0,0 @@
-# year2038.m4 serial 7
-dnl Copyright (C) 2017-2022 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 <time.h>
-  /* 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/m4/zzgnulib.m4 b/m4/zzgnulib.m4
index fd73a201..362102b6 100644
--- a/m4/zzgnulib.m4
+++ b/m4/zzgnulib.m4
@@ -1,5 +1,5 @@
 # zzgnulib.m4 serial 1
-dnl Copyright (C) 2020-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2020-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/maint.mk b/maint.mk
index c1fdf9ca..44f3db9d 100644
--- a/maint.mk
+++ b/maint.mk
@@ -2,7 +2,7 @@
 # This Makefile fragment tries to be general-purpose enough to be
 # used by many projects via the gnulib maintainer-makefile module.
 
-## Copyright (C) 2001-2022 Free Software Foundation, Inc.
+## Copyright (C) 2001-2023 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
@@ -64,10 +64,10 @@ VC_LIST = $(srcdir)/$(_build-aux)/vc-list-files -C $(srcdir)
 
 # You can override this variable in cfg.mk if your gnulib submodule lives
 # in a different location.
-gnulib_dir ?= $(shell if test -f $(srcdir)/gnulib/gnulib-tool; then \
-			echo $(srcdir)/gnulib; \
+gnulib_dir ?= $(shell if test -n "$(GNULIB_SRCDIR)" && test -f "$(GNULIB_SRCDIR)/gnulib-tool"; then \
+			echo "$(GNULIB_SRCDIR)"; \
 		else \
-			echo ${GNULIB_SRCDIR}; \
+			echo $(srcdir)/gnulib; \
 		fi)
 
 # You can override this variable in cfg.mk to set your own regexp
@@ -765,7 +765,7 @@ sc_prohibit_dirent_without_use:
 # Prohibit the inclusion of verify.h without an actual use.
 sc_prohibit_verify_without_use:
 	@h='verify.h'							\
-	re='\<(verify(true|expr)?|assume|static_assert) *\('		\
+	re='\<(verify(_expr)?|assume) *\('				\
 	  $(_sc_header_without_use)
 
 # Don't include xfreopen.h unless you use one of its functions.
@@ -1256,6 +1256,12 @@ sc_makefile_path_separator_check:
 	halt=$(msg)							\
 	  $(_sc_search_regexp)
 
+sc_makefile_DISTCHECK_CONFIGURE_FLAGS:
+	@prohibit='^DISTCHECK_CONFIGURE_FLAGS'				\
+	in_vc_files='akefile|\.mk$$'					\
+	halt="use AM_DISTCHECK_CONFIGURE_FLAGS"				\
+	  $(_sc_search_regexp)
+
 # Check that 'make alpha' will not fail at the end of the process,
 # i.e., when pkg-M.N.tar.xz already exists (either in "." or in ../release)
 # and is read-only.
@@ -1286,7 +1292,7 @@ sc_copyright_check:
 	in_vc_files=$(sample-test)					\
 	halt='out of date copyright in $(sample-test); update it'	\
 	  $(_sc_search_regexp)
-	@require='Copyright @copyright\{\} .*'$$(date +%Y)		\
+	@require='Copyright @copyright\{} .*'$$(date +%Y)		\
 	in_vc_files=$(texi)						\
 	halt='out of date copyright in $(texi); update it'		\
 	  $(_sc_search_regexp)
@@ -1367,6 +1373,10 @@ sc_vulnerable_makefile_CVE-2012-3386:
 	  '  see https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2012-3386 for details') \
 	  $(_sc_search_regexp)
 
+sc_unportable_grep_q:
+	@prohibit='grep -q' halt="unportable 'grep -q', use >/dev/null instead" \
+	  $(_sc_search_regexp)
+
 vc-diff-check:
 	$(AM_V_GEN)(unset CDPATH; cd $(srcdir) && $(VC) diff) > vc-diffs || :
 	$(AM_V_at)if test -s vc-diffs; then			\
@@ -1653,8 +1663,8 @@ indent: # Running indent once is not idempotent, but running it twice is.
 	indent $(indent_args) $(INDENT_SOURCES)
 
 sc_indent:
-	@if ! command -v indent > /dev/null; then			\
-	    echo 1>&2 '$(ME): sc_indent: indent is missing';		\
+	@if ! indent --version 2> /dev/null | grep 'GNU indent' > /dev/null; then \
+	    echo 1>&2 '$(ME): sc_indent: GNU indent is missing';	\
 	else								\
 	  fail=0; files="$(INDENT_SOURCES)";				\
 	  for f in $$files; do						\
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 5e78d611..3acf6d70 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,6 +1,6 @@
 # List of files which containing translatable strings.
 #
-# Copyright 1997-1998, 2005-2022 Free Software Foundation, Inc.
+# Copyright 1997-1998, 2005-2023 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/po/af.po b/po/af.po
index 646d4399..eb5f4de8 100644
--- a/po/af.po
+++ b/po/af.po
@@ -6,7 +6,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: grep 2.5g\n"
 "Report-Msgid-Bugs-To: bug-grep@gnu.org\n"
-"POT-Creation-Date: 2022-09-02 23:52-0700\n"
+"POT-Creation-Date: 2023-05-13 01:14-0700\n"
 "PO-Revision-Date: 2004-03-03 13:33+0200\n"
 "Last-Translator: Petri Jooste <rkwjpj@puk.ac.za>\n"
 "Language-Team: Afrikaans <i18n@af.org.za>\n"
@@ -16,108 +16,108 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "X-Bugs: Report translation errors to the Language-Team address.\n"
 
-#: lib/argmatch.c:147
+#: lib/argmatch.c:145
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr ""
 
-#: lib/argmatch.c:148
+#: lib/argmatch.c:146
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr ""
 
-#: lib/argmatch.c:167 lib/argmatch.h:238
+#: lib/argmatch.c:165 lib/argmatch.h:242
 msgid "Valid arguments are:"
 msgstr ""
 
-#: lib/c-stack.c:187
+#: lib/c-stack.c:186
 msgid "program error"
 msgstr ""
 
-#: lib/c-stack.c:188
+#: lib/c-stack.c:187
 msgid "stack overflow"
 msgstr ""
 
-#: lib/closeout.c:122 src/grep.c:1346
+#: lib/closeout.c:121 src/grep.c:1346
 msgid "write error"
 msgstr ""
 
-#: lib/dfa.c:894
+#: lib/dfa.c:897
 #, fuzzy
 msgid "unbalanced ["
 msgstr "Ongebalanseerde ["
 
-#: lib/dfa.c:1015
+#: lib/dfa.c:1018
 msgid "invalid character class"
 msgstr ""
 
-#: lib/dfa.c:1143
+#: lib/dfa.c:1146
 msgid "character class syntax is [[:space:]], not [:space:]"
 msgstr ""
 
-#: lib/dfa.c:1209
+#: lib/dfa.c:1222
 #, fuzzy
 msgid "unfinished \\ escape"
 msgstr "Onbe�indigde \\-ontsnapstring"
 
-#: lib/dfa.c:1319
+#: lib/dfa.c:1332
 msgid "? at start of expression"
 msgstr ""
 
-#: lib/dfa.c:1331
+#: lib/dfa.c:1344
 msgid "* at start of expression"
 msgstr ""
 
-#: lib/dfa.c:1345
+#: lib/dfa.c:1358
 msgid "+ at start of expression"
 msgstr ""
 
-#: lib/dfa.c:1400
+#: lib/dfa.c:1413
 msgid "{...} at start of expression"
 msgstr ""
 
-#: lib/dfa.c:1403
+#: lib/dfa.c:1416
 #, fuzzy
 msgid "invalid content of \\{\\}"
 msgstr "ongeldige maks-telling"
 
-#: lib/dfa.c:1405
+#: lib/dfa.c:1418
 msgid "regular expression too big"
 msgstr ""
 
-#: lib/dfa.c:1555
+#: lib/dfa.c:1568
 msgid "stray \\ before unprintable character"
 msgstr ""
 
-#: lib/dfa.c:1557
+#: lib/dfa.c:1570
 msgid "stray \\ before white space"
 msgstr ""
 
-#: lib/dfa.c:1561
+#: lib/dfa.c:1574
 #, c-format
 msgid "stray \\ before %lc"
 msgstr ""
 
-#: lib/dfa.c:1562
+#: lib/dfa.c:1575
 msgid "stray \\"
 msgstr ""
 
-#: lib/dfa.c:1917
+#: lib/dfa.c:1925
 #, fuzzy
 msgid "unbalanced ("
 msgstr "Ongebalanseerde ("
 
-#: lib/dfa.c:2034
+#: lib/dfa.c:2042
 #, fuzzy
 msgid "no syntax specified"
 msgstr "Geen sintaks gespesifiseer"
 
-#: lib/dfa.c:2045
+#: lib/dfa.c:2053
 #, fuzzy
 msgid "unbalanced )"
 msgstr "Ongebalanseerde )"
 
-#: lib/error.c:195
+#: lib/error.c:193
 msgid "Unknown system error"
 msgstr "Onbekende stelselfout"
 
@@ -172,7 +172,7 @@ msgstr ""
 msgid "failed to return to initial working directory"
 msgstr ""
 
-#: lib/xbinary-io.c:37
+#: lib/xbinary-io.c:36
 #, c-format
 msgid "failed to set file descriptor text/binary mode"
 msgstr ""
@@ -210,11 +210,11 @@ msgstr ""
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:355
+#: lib/quotearg.c:354
 msgid "`"
 msgstr "'"
 
-#: lib/quotearg.c:356
+#: lib/quotearg.c:355
 msgid "'"
 msgstr "'"
 
@@ -687,63 +687,69 @@ msgstr "onbekende bin
 #: src/grep.c:2831
 msgid ""
 "Written by Mike Haertel and others; see\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 msgstr ""
 
-#: src/grep.c:2934
+#: src/grep.c:2937
 #, c-format
 msgid "warning: GREP_COLOR='%s' is deprecated; use GREP_COLORS='mt=%s'"
 msgstr ""
 
-#: src/pcresearch.c:148
+#: src/pcresearch.c:92
+#, c-format
+msgid ""
+"\n"
+"grep -P uses PCRE2 %s\n"
+msgstr ""
+
+#: src/pcresearch.c:169
+msgid "-P supports only unibyte locales on this platform"
+msgstr ""
+
+#: src/pcresearch.c:171
 msgid "-P supports only unibyte and UTF-8 locales"
 msgstr ""
 
-#: src/pcresearch.c:162
+#: src/pcresearch.c:194
 #, fuzzy
 msgid "the -P option only supports a single pattern"
 msgstr "Die -P opsie word nie ondersteun nie"
 
-#: src/pcresearch.c:215
-#, c-format
-msgid "JIT internal error: %d"
-msgstr ""
-
-#: src/pcresearch.c:252
+#: src/pcresearch.c:290
 msgid "exceeded PCRE's line length limit"
 msgstr ""
 
-#: src/pcresearch.c:330
+#: src/pcresearch.c:368
 #, fuzzy, c-format
 msgid "%s: memory exhausted"
 msgstr "geheue uitgeput"
 
-#: src/pcresearch.c:333
+#: src/pcresearch.c:371
 #, c-format
 msgid "%s: exhausted PCRE JIT stack"
 msgstr ""
 
-#: src/pcresearch.c:337
+#: src/pcresearch.c:375
 #, c-format
 msgid "%s: exceeded PCRE's backtracking limit"
 msgstr ""
 
-#: src/pcresearch.c:342
+#: src/pcresearch.c:380
 #, c-format
 msgid "%s: exceeded PCRE's nested backtracking limit"
 msgstr ""
 
-#: src/pcresearch.c:346
+#: src/pcresearch.c:384
 #, c-format
 msgid "%s: PCRE detected recurse loop"
 msgstr ""
 
-#: src/pcresearch.c:351
+#: src/pcresearch.c:389
 #, c-format
 msgid "%s: exceeded PCRE's heap limit"
 msgstr ""
 
-#: src/pcresearch.c:360
+#: src/pcresearch.c:398
 #, c-format
 msgid "%s: internal PCRE error: %d"
 msgstr ""
diff --git a/po/be.gmo b/po/be.gmo
index 7f1c3aad..1e73a400 100644
Binary files a/po/be.gmo and b/po/be.gmo differ
diff --git a/po/be.po b/po/be.po
index 2b9ddedc..ee0b93a8 100644
--- a/po/be.po
+++ b/po/be.po
@@ -1,15 +1,16 @@
 # Belarusian messages for GNU grep.
-# Copyright (C) 2001, 2002, 2003, 2022 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2022, 2023 Free Software Foundation, Inc.
 # This file is distributed under the same license as the grep package.
 #
 # Ales Nyakhaychyk <nab@mail.by>, 2001-2003.
-# Viachaslau Khalikin <viachaslau.vinegret@outlook.com>, 2022.
+# Viachaslau Khalikin <viachaslau.vinegret@outlook.com>, 2022, 2023.
+#
 msgid ""
 msgstr ""
-"Project-Id-Version: grep-3.7.98\n"
+"Project-Id-Version: GNU grep 3.10.12\n"
 "Report-Msgid-Bugs-To: bug-grep@gnu.org\n"
-"POT-Creation-Date: 2022-09-02 23:52-0700\n"
-"PO-Revision-Date: 2022-08-01 21:57+0300\n"
+"POT-Creation-Date: 2023-05-13 01:14-0700\n"
+"PO-Revision-Date: 2023-05-13 03:04+0300\n"
 "Last-Translator: Viachaslau Khalikin <viachaslau.vinegret@outlook.com>\n"
 "Language-Team: Belarusian <debian-l10n-belarusian@lists.debian.org>\n"
 "Language: be\n"
@@ -17,104 +18,104 @@ msgstr ""
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "X-Bugs: Report translation errors to the Language-Team address.\n"
-"X-Generator: Emacs 28.1, po mode 2.27\n"
+"X-Generator: Emacs 28.2, po mode 2.27\n"
 
-#: lib/argmatch.c:147
+#: lib/argmatch.c:145
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "няправільны аргумэнт %s для %s"
 
-#: lib/argmatch.c:148
+#: lib/argmatch.c:146
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "неадназначны аргумэнт %s для %s"
 
-#: lib/argmatch.c:167 lib/argmatch.h:238
+#: lib/argmatch.c:165 lib/argmatch.h:242
 msgid "Valid arguments are:"
 msgstr "Сапраўдныя аргумэнты:"
 
-#: lib/c-stack.c:187
+#: lib/c-stack.c:186
 msgid "program error"
 msgstr "праграмная памылка"
 
-#: lib/c-stack.c:188
+#: lib/c-stack.c:187
 msgid "stack overflow"
 msgstr "перапаўненьне стэка"
 
-#: lib/closeout.c:122 src/grep.c:1346
+#: lib/closeout.c:121 src/grep.c:1346
 msgid "write error"
 msgstr "памылка запісу"
 
-#: lib/dfa.c:894
+#: lib/dfa.c:897
 msgid "unbalanced ["
 msgstr "неўраўнаважаная ["
 
-#: lib/dfa.c:1015
+#: lib/dfa.c:1018
 msgid "invalid character class"
 msgstr "няправільная кляса сымбаляў"
 
-#: lib/dfa.c:1143
+#: lib/dfa.c:1146
 msgid "character class syntax is [[:space:]], not [:space:]"
 msgstr "сынтаксіс клясы сымбаляў [[:space:]], а не [:space:]"
 
-#: lib/dfa.c:1209
+#: lib/dfa.c:1222
 msgid "unfinished \\ escape"
 msgstr "незавершаная \\ экраніруючая пасьлядоўнасьць"
 
-#: lib/dfa.c:1319
+#: lib/dfa.c:1332
 msgid "? at start of expression"
 msgstr "? у пачатку выразу"
 
-#: lib/dfa.c:1331
+#: lib/dfa.c:1344
 msgid "* at start of expression"
 msgstr "* у пачатку выразу"
 
-#: lib/dfa.c:1345
+#: lib/dfa.c:1358
 msgid "+ at start of expression"
 msgstr "+ у пачатку выразу"
 
-#: lib/dfa.c:1400
+#: lib/dfa.c:1413
 msgid "{...} at start of expression"
 msgstr "{...} у пачатку выразу"
 
-#: lib/dfa.c:1403
+#: lib/dfa.c:1416
 msgid "invalid content of \\{\\}"
 msgstr "няправільнае зьмесьціва ў \\{\\}"
 
-#: lib/dfa.c:1405
+#: lib/dfa.c:1418
 msgid "regular expression too big"
 msgstr "занадта вялікі рэгулярны выраз"
 
-#: lib/dfa.c:1555
+#: lib/dfa.c:1568
 msgid "stray \\ before unprintable character"
 msgstr "залішні \\ перад недрукаваным сымбалем"
 
-#: lib/dfa.c:1557
+#: lib/dfa.c:1570
 msgid "stray \\ before white space"
-msgstr "залішні \\ перад прабелам"
+msgstr "залішні \\ перад прагалам"
 
-#: lib/dfa.c:1561
+#: lib/dfa.c:1574
 #, c-format
 msgid "stray \\ before %lc"
 msgstr "залішні \\ перад %lc"
 
-#: lib/dfa.c:1562
+#: lib/dfa.c:1575
 msgid "stray \\"
 msgstr "залішні \\"
 
-#: lib/dfa.c:1917
+#: lib/dfa.c:1925
 msgid "unbalanced ("
 msgstr "неўраўнаважаная ("
 
-#: lib/dfa.c:2034
+#: lib/dfa.c:2042
 msgid "no syntax specified"
 msgstr "сынтаксіс нявызначаны"
 
-#: lib/dfa.c:2045
+#: lib/dfa.c:2053
 msgid "unbalanced )"
 msgstr "неўраўнаважаная )"
 
-#: lib/error.c:195
+#: lib/error.c:193
 msgid "Unknown system error"
 msgstr "Невядомая сыстэмная памылка"
 
@@ -167,7 +168,7 @@ msgstr "нельга захаваць бягучы рабочы каталёг"
 msgid "failed to return to initial working directory"
 msgstr "не атрымалася вярнуцца ў пачатковы рабочы каталёг"
 
-#: lib/xbinary-io.c:37
+#: lib/xbinary-io.c:36
 #, c-format
 msgid "failed to set file descriptor text/binary mode"
 msgstr "не атрымалася задаць тэкставы або двайковы рэжым дэскрыптара файла"
@@ -193,17 +194,17 @@ msgstr "не атрымалася задаць тэкставы або двай
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:355
+#: lib/quotearg.c:354
 msgid "`"
 msgstr "«"
 
-#: lib/quotearg.c:356
+#: lib/quotearg.c:355
 msgid "'"
 msgstr "»"
 
 #: lib/regcomp.c:122
 msgid "Success"
-msgstr "Поспех"
+msgstr "Посьпех"
 
 #: lib/regcomp.c:125
 msgid "No match"
@@ -223,7 +224,7 @@ msgstr "Няправільная назва клясы сымбаляў"
 
 #: lib/regcomp.c:137
 msgid "Trailing backslash"
-msgstr "Канчатковы зваротны слэш"
+msgstr "Канчатковая адваротная косая рыска"
 
 #: lib/regcomp.c:140
 msgid "Invalid back reference"
@@ -276,12 +277,12 @@ msgstr "Няма папярэдняга рэгулярнага выраза"
 #: lib/version-etc.c:73
 #, c-format
 msgid "Packaged by %s (%s)\n"
-msgstr "Упакоўшчык: %s (%s)\n"
+msgstr "Пакавальнік: %s (%s)\n"
 
 #: lib/version-etc.c:76
 #, c-format
 msgid "Packaged by %s\n"
-msgstr "Упакоўшчык: %s\n"
+msgstr "Пакавальнік: %s\n"
 
 #. TRANSLATORS: Translate "(C)" to the copyright symbol
 #. (C-in-a-circle), if this symbol is available in the user's
@@ -299,7 +300,7 @@ msgid ""
 "There is NO WARRANTY, to the extent permitted by law.\n"
 msgstr ""
 "Ліцэнзія GPLv3+: GNU GPL вэрсіі 3 або навей <%s>.\n"
-"Гэта свабоднае праграмнае забесьпячэньне: вы можаце вольна зьмяняць і\n"
+"Гэта свабоднае праграмнае забесьпячэньне: вы можаце вольна зьмяняць і "
 "распаўсюджваць яго.\n"
 "Няма НІЯКІХ ГАРАНТЫЙ у межах дзеючага заканадаўства.\n"
 
@@ -355,7 +356,7 @@ msgid ""
 "%s, %s, and %s.\n"
 msgstr ""
 "Аўтары: %s, %s, %s,\n"
-"%s, %s  і %s.\n"
+"%s, %s і %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
@@ -418,7 +419,10 @@ msgstr ""
 #: lib/version-etc.c:249
 #, c-format
 msgid "Report bugs to: %s\n"
-msgstr "Паведамляйце пра памылкі на: %s\n"
+msgstr ""
+"Паведамляйце пра памылкі на: %s\n"
+"Паведамляйце пра памылкі перакладу на: debian-l10n-belarusian@lists.debian."
+"org\n"
 
 #: lib/version-etc.c:251
 #, c-format
@@ -451,7 +455,7 @@ msgstr "памылковы аргумэнт даўжыні кантэксту"
 
 #: src/grep.c:902
 msgid "input is too large to count"
-msgstr "увод занадта вялікі для падліку"
+msgstr "увод занадта вялікі да падліку"
 
 #: src/grep.c:1651
 #, c-format
@@ -492,10 +496,9 @@ msgid ""
 "Pattern selection and interpretation:\n"
 msgstr ""
 "Прыклад: %s -i 'hello world' menu.h main.c\n"
-"Запіс УЗОРЫ можа зьмяшчаць некалькі ўзораў, падзеленых сымбалямі новага "
-"радка.\n"
+"УЗОРЫ могуць зьмяшчаць некалькі ўзораў, падзеленых сымбалямі новага радка.\n"
 "\n"
-"Выбар узору і інтэрпрэтацыя:\n"
+"Выбар узору й інтэрпрэтацыя:\n"
 
 #: src/grep.c:1985
 #, c-format
@@ -505,10 +508,10 @@ msgid ""
 "  -G, --basic-regexp        PATTERNS are basic regular expressions\n"
 "  -P, --perl-regexp         PATTERNS are Perl regular expressions\n"
 msgstr ""
-"  -E, --extended-regexp     УЗОРЫ ёсьць пашыраныя рэгулярныя выразы\n"
-"  -F, --fixed-strings       УЗОРЫ ёсьць звычайныя радкі\n"
-"  -G, --basic-regexp        УЗОРЫ ёсьць базавыя рэгулярныя выразы\n"
-"  -P, --perl-regexp         УЗОРЫ ёсьць рэгулярныя выразы Perl\n"
+"  -E, --extended-regexp     УЗОРЫ — пашыраныя рэгулярныя выразы\n"
+"  -F, --fixed-strings       УЗОРЫ — звычайныя радкі\n"
+"  -G, --basic-regexp        УЗОРЫ — базавыя рэгулярныя выразы\n"
+"  -P, --perl-regexp         УЗОРЫ — рэгулярныя выразы Perl\n"
 
 #: src/grep.c:1991
 #, c-format
@@ -523,12 +526,12 @@ msgid ""
 msgstr ""
 "  -e, --regexp=УЗОРЫ        выкарыстоўваць УЗОРЫ для супастаўленьня\n"
 "  -f, --file=ФАЙЛ           прымаць УЗОРЫ з ФАЙЛа\n"
-"  -i, --ignore-case         ігнараваць рэгістар літар ва ўзорах і дадзеных\n"
+"  -i, --ignore-case         ігнараваць рэгістар літар ва ўзорах і даных\n"
 "      --no-ignore-case      не ігнараваць рэгістар літар (прадвызначана)\n"
 "  -w, --word-regexp         супастаўляць цэламу слову\n"
 "  -x, --line-regexp         супастаўляць цэламу радку\n"
-"  -z, --null-data           радок дадзеных падзелены нулявым байтам,\n"
-"                            а не сымбалем пераводу радка\n"
+"  -z, --null-data           радок даных падзелены нулявым байтам,\n"
+"                            а ня сымбалем пераводу радка\n"
 
 #: src/grep.c:1999
 #, c-format
@@ -542,10 +545,10 @@ msgid ""
 msgstr ""
 "\n"
 "Разнастайныя:\n"
-"  -s, --no-messages         падаўляць паведамленьні пра памылкі\n"
-"  -v, --invert-match        выбіраць не супастаўныя радкі\n"
-"  -V, --version             адлюстраваць зьвесткі пра вэрсію і выйсьці\n"
-"      --help                адлюстраваць гэтую даведку і выйсьці\n"
+"  -s, --no-messages         заглушаць паведамленьні аб памылках\n"
+"  -v, --invert-match        выбіраць несупастаўныя радкі\n"
+"  -V, --version             адлюстраваць зьвесткі аб вэрсіі ды выйсьці\n"
+"      --help                адлюстраваць гэтую даведку ды выйсьці\n"
 
 #: src/grep.c:2006
 #, c-format
@@ -563,12 +566,12 @@ msgid ""
 msgstr ""
 "\n"
 "Кіраваньне вывадам:\n"
-"  -m, --max-count=НУМ       спыніцца пасьля НУМ радкоў\n"
+"  -m, --max-count=ЛІК       спыніцца пасьля ЛІК радкоў\n"
 "  -b, --byte-offset         друкаваць байтавае зрушэньне з радкамі вываду\n"
 "  -n, --line-number         друкаваць нумар радка з радкамі вываду\n"
-"      --line-buffered       ачысьціць буфэр пасьля кожнага радка\n"
+"      --line-buffered       скідваць буфэр пасьля кожнага радка\n"
 "  -H, --with-filename       друкаваць назву файла разам з радкамі вываду\n"
-"  -h, --no-filename         падаўляць назвы файлаў на вывадзе\n"
+"  -h, --no-filename         заглушаць назвы файлаў на вывадзе\n"
 "      --label=МЕТКА         выкарыстоўваць МЕТКА ў якасьці назвы файла для\n"
 "                            стандартнага ўводу\n"
 
@@ -583,7 +586,7 @@ msgid ""
 msgstr ""
 "  -o, --only-matching       паказваць толькі адпаведныя непустыя часткі "
 "радкоў\n"
-"  -q, --quiet, --silent     падавіць увесь звычайны вывад\n"
+"  -q, --quiet, --silent     заглушаць увесь звычайны вывад\n"
 "      --binary-files=ТЫП    лічыць, што двайковыя файлы маюць ТЫП;\n"
 "                            ТЫП можа быць «binary», «text» ці «without-"
 "match»\n"
@@ -603,12 +606,12 @@ msgstr ""
 "  -I                        раўназначна --binary-files=without-match\n"
 "  -d, --directories=ДЗЕЯНЬНЕ  як апрацоўваць каталёгі;\n"
 "                              ДЗЕЯНЬНЕ можа быць  «read» (чытаць),\n"
-"                              «recurse» (рэкурсыўна абходзіць)\n"
+"                              «recurse» (рэкурсіўна абходзіць)\n"
 "                              ці  «skip» (абмінаць)\n"
-"  -D, --devices=ДЗЕЯНЬНЕ    як апрацоўваць файлы прылад, FIFO і сокеты;\n"
+"  -D, --devices=ДЗЕЯНЬНЕ    як апрацоўваць файлы прылад, FIFO й сокеты;\n"
 "                            ДЗЕЯНЬНЕ можа быць  «read» (чытаць)\n"
 "                            ці  «skip» (абмінаць)\n"
-"  -r, --recursive           тое ж, што і --directories=recurse\n"
+"  -r, --recursive           тое ж, што й --directories=recurse\n"
 "  -R, --dereference-recursive  гэтак жа, але з пераходам па ўсім "
 "сымбалічным\n"
 "                               спасылкам\n"
@@ -647,7 +650,7 @@ msgstr ""
 "  -c, --count               надрукаваць толькі колькасьць выбраных радкоў\n"
 "                            да ФАЙЛа\n"
 "  -T, --initial-tab         выраўнаваць табуляцыяй (калі патрэбна)\n"
-"  -Z, --null                друкаваць байт 0 пасьля назвы ФАЙЛа\n"
+"  -Z, --null                друкаваць байт «0» пасьля назвы ФАЙЛа\n"
 
 #: src/grep.c:2046
 #, c-format
@@ -660,9 +663,9 @@ msgid ""
 msgstr ""
 "\n"
 "Кіраваньне кантэкстам:\n"
-"  -B, --before-context=НУМ  надрукаваць НУМ радкоў папярэдняга кантэксту\n"
-"  -A, --after-context=НУМ   надрукаваць НУМ радкоў наступнага кантэксту\n"
-"  -C, --context=НУМ         надрукаваць НУМ выходнага кантэксту\n"
+"  -B, --before-context=ЛІК  надрукаваць ЛІК радкоў папярэдняга кантэксту\n"
+"  -A, --after-context=ЛІК   надрукаваць ЛІК радкоў наступнага кантэксту\n"
+"  -C, --context=ЛІК         надрукаваць ЛІК выходнага кантэксту\n"
 
 #: src/grep.c:2053
 #, c-format
@@ -677,14 +680,13 @@ msgid ""
 "Windows)\n"
 "\n"
 msgstr ""
-"  -НУМАР                    тое ж, што і --context=НУМ\n"
+"  -NUM                      тое ж, што й --context=ЛІК\n"
 "      --group-separator=РАЗ  надрукаваць РАЗ у радку паміж супадзеньнямі\n"
 "                             з кантэкстам\n"
 "      --no-group-separator  не друкаваць разьдзяляльнік паміж\n"
 "                            супадзеньнямі з кантэкстам\n"
 "      --color[=КАЛІ],\n"
-"      --colour[=КАЛІ]       выкарыстоўваць маркеры для падсьветкі "
-"адпаведных\n"
+"      --colour[=КАЛІ]       выкарыстоўваць маркеры да падсьветкі адпаведных\n"
 "                            радкоў;\n"
 "                            КАЛІ можа быць «always» (заўсёды),\n"
 "                            «never» (ніколі) ці «auto» (аўтаматычна)\n"
@@ -701,11 +703,11 @@ msgid ""
 "if any error occurs and -q is not given, the exit status is 2.\n"
 msgstr ""
 "Калі ў якасьці ФАЙЛа пазначаны сымбаль «-», тады чытаецца стандартны ўвод.\n"
-"Калі ФАЙЛ не вызначаны, то чытаецца «.» у рэкурсіўным рэжыме, інакш «-». \n"
-"Калі вызначаны менш чым два ФАЙЛа, тады мяркуецца -h.\n"
+"Калі ФАЙЛ ня вызначаны, то чытаецца «.» у рэкурсіўным рэжыме, інакш «-». \n"
+"Калі вызначана менш чым два ФАЙЛы, тады мяркуецца -h.\n"
 "Код завяршэньня 0 — калі знойдзены супадзеньні любога радка, 1 - калі іх "
 "няма,\n"
-"2 - калі адбылася памылка і не выкарыстоўвалася опцыя -q .\n"
+"2 - калі адбылася памылка й не выкарыстоўвалася опцыя -q .\n"
 
 #: src/grep.c:2104
 msgid "conflicting matchers specified"
@@ -741,70 +743,88 @@ msgstr "невядомы тып двайковых файлаў"
 #: src/grep.c:2831
 msgid ""
 "Written by Mike Haertel and others; see\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 msgstr ""
 "Аўтары праграмы: Mike Haertel і іншыя; глядзіце\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 
-#: src/grep.c:2934
+#: src/grep.c:2937
 #, c-format
 msgid "warning: GREP_COLOR='%s' is deprecated; use GREP_COLORS='mt=%s'"
 msgstr ""
 "папярэджаньне: GREP_COLOR=«%s» састарэла;\n"
-"               карыстайцеся GREP_COLORS=«mt=%s»"
+"               выкарыстоўвайце GREP_COLORS=«mt=%s»"
 
-#: src/pcresearch.c:148
+#: src/pcresearch.c:92
+#, c-format
+msgid ""
+"\n"
+"grep -P uses PCRE2 %s\n"
+msgstr ""
+"\n"
+"grep -P ужывае PCRE2 %s\n"
+
+#: src/pcresearch.c:169
+msgid "-P supports only unibyte locales on this platform"
+msgstr "-P падтрымлівае толькі аднабайтавыя лякалі на гэтай плятформе"
+
+#: src/pcresearch.c:171
 msgid "-P supports only unibyte and UTF-8 locales"
-msgstr "опцыя -P падтрымлівае толькі аднабайтавыя лакалі і UTF-8"
+msgstr "-P падтрымлівае толькі аднабайтавыя ды UTF-8 лякалі"
 
-#: src/pcresearch.c:162
+#: src/pcresearch.c:194
 msgid "the -P option only supports a single pattern"
 msgstr "опцыя -P падтрымлівае толькі адзін узор"
 
-#: src/pcresearch.c:215
-#, c-format
-msgid "JIT internal error: %d"
-msgstr "Унутраная памылка JIT: %d"
-
-#: src/pcresearch.c:252
+#: src/pcresearch.c:290
 msgid "exceeded PCRE's line length limit"
 msgstr "перавышана абмежаваньне даўжыні радка PCRE"
 
-#: src/pcresearch.c:330
+#: src/pcresearch.c:368
 #, c-format
 msgid "%s: memory exhausted"
 msgstr "%s: памяць вычарпана"
 
-#: src/pcresearch.c:333
+#: src/pcresearch.c:371
 #, c-format
 msgid "%s: exhausted PCRE JIT stack"
 msgstr "%s: вычарпаны стэк JIT PCRE"
 
-#: src/pcresearch.c:337
+#: src/pcresearch.c:375
 #, c-format
 msgid "%s: exceeded PCRE's backtracking limit"
-msgstr "%s: перавышаны ліміт пошуку з вяртаньнем у PCRE"
+msgstr "%s: перавышаны ліміт пошуку зь вяртаньнем у PCRE"
 
-#: src/pcresearch.c:342
+#: src/pcresearch.c:380
 #, c-format
 msgid "%s: exceeded PCRE's nested backtracking limit"
-msgstr "%s: перавышаны ліміт укладзенага пошуку з вяртаньнем у PCRE"
+msgstr "%s: перавышаны ліміт укладзенага пошуку зь вяртаньнем у PCRE"
 
-#: src/pcresearch.c:346
+#: src/pcresearch.c:384
 #, c-format
 msgid "%s: PCRE detected recurse loop"
 msgstr "%s: выяўлены рэкурсіўны цыкл у PCRE"
 
-#: src/pcresearch.c:351
+#: src/pcresearch.c:389
 #, c-format
 msgid "%s: exceeded PCRE's heap limit"
 msgstr "%s: перавышаны ліміт кучы ў PCRE"
 
-#: src/pcresearch.c:360
+#: src/pcresearch.c:398
 #, c-format
 msgid "%s: internal PCRE error: %d"
 msgstr "%s: унутраная памылка PCRE: %d"
 
+#~ msgid ""
+#~ "\n"
+#~ "Built with PCRE "
+#~ msgstr ""
+#~ "\n"
+#~ "Сабраны з PCRE "
+
+#~ msgid "JIT internal error: %d"
+#~ msgstr "Унутраная памылка JIT: %d"
+
 #~ msgid "unfinished repeat count"
 #~ msgstr "незавершаная колькасьць паўтарэньняў"
 
diff --git a/po/bg.gmo b/po/bg.gmo
index 37900612..3798606e 100644
Binary files a/po/bg.gmo and b/po/bg.gmo differ
diff --git a/po/bg.po b/po/bg.po
index 04aace84..3e6895d6 100644
--- a/po/bg.po
+++ b/po/bg.po
@@ -1,15 +1,15 @@
 # Bulgarian translation of GNU grep po-file.
-# Copyright (C) 2002, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 Free Software Foundation, Inc.
 # This file is distributed under the same license as the grep package.
 # Pavel Mihaylov <avatarbg@bulgaria.com>, 2002.
-# Alexander Shopov <ash@kambanaria.org>, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022.
+# Alexander Shopov <ash@kambanaria.org>, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: grep 3.7.98\n"
+"Project-Id-Version: grep 3.10.12\n"
 "Report-Msgid-Bugs-To: bug-grep@gnu.org\n"
-"POT-Creation-Date: 2022-09-02 23:52-0700\n"
-"PO-Revision-Date: 2022-07-03 19:28+0200\n"
+"POT-Creation-Date: 2023-05-13 01:14-0700\n"
+"PO-Revision-Date: 2023-04-21 17:10+0300\n"
 "Last-Translator: Alexander Shopov <ash@kambanaria.org>\n"
 "Language-Team: Bulgarian <dict@ludost.net>\n"
 "Language: bg\n"
@@ -19,102 +19,102 @@ msgstr ""
 "X-Bugs: Report translation errors to the Language-Team address.\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
-#: lib/argmatch.c:147
+#: lib/argmatch.c:145
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "аргументът „%s“ на опцията „%s“ е неправилен"
 
-#: lib/argmatch.c:148
+#: lib/argmatch.c:146
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "аргументът „%s“ на опцията „%s“ не е еднозначен"
 
-#: lib/argmatch.c:167 lib/argmatch.h:238
+#: lib/argmatch.c:165 lib/argmatch.h:242
 msgid "Valid arguments are:"
 msgstr "Възможните аргументи са:"
 
-#: lib/c-stack.c:187
+#: lib/c-stack.c:186
 msgid "program error"
 msgstr "програмна грешка"
 
-#: lib/c-stack.c:188
+#: lib/c-stack.c:187
 msgid "stack overflow"
 msgstr "препълване на стека"
 
-#: lib/closeout.c:122 src/grep.c:1346
+#: lib/closeout.c:121 src/grep.c:1346
 msgid "write error"
 msgstr "грешка при запис"
 
-#: lib/dfa.c:894
+#: lib/dfa.c:897
 msgid "unbalanced ["
 msgstr "„[“ без еш"
 
-#: lib/dfa.c:1015
+#: lib/dfa.c:1018
 msgid "invalid character class"
 msgstr "неправилен клас знаци"
 
-#: lib/dfa.c:1143
+#: lib/dfa.c:1146
 msgid "character class syntax is [[:space:]], not [:space:]"
 msgstr "клас знаци се указва чрез „[[:ИМЕ:]]“, а не „[:ИМЕ:]“"
 
-#: lib/dfa.c:1209
+#: lib/dfa.c:1222
 msgid "unfinished \\ escape"
 msgstr "незавършена екранираща последователност чрез „\\“"
 
-#: lib/dfa.c:1319
+#: lib/dfa.c:1332
 msgid "? at start of expression"
 msgstr "„?“ в начало на израз"
 
-#: lib/dfa.c:1331
+#: lib/dfa.c:1344
 msgid "* at start of expression"
 msgstr "„*“ в начало на израз"
 
-#: lib/dfa.c:1345
+#: lib/dfa.c:1358
 msgid "+ at start of expression"
 msgstr "„+“ в начало на израз"
 
-#: lib/dfa.c:1400
+#: lib/dfa.c:1413
 msgid "{...} at start of expression"
 msgstr "„{…}“ начало на израз"
 
-#: lib/dfa.c:1403
+#: lib/dfa.c:1416
 msgid "invalid content of \\{\\}"
 msgstr "неправилно съдържание в „\\{\\}“"
 
-#: lib/dfa.c:1405
+#: lib/dfa.c:1418
 msgid "regular expression too big"
 msgstr "прекалено голям регулярен израз"
 
-#: lib/dfa.c:1555
+#: lib/dfa.c:1568
 msgid "stray \\ before unprintable character"
 msgstr "излишен знак „\\“ пред непечатим знак"
 
-#: lib/dfa.c:1557
+#: lib/dfa.c:1570
 msgid "stray \\ before white space"
 msgstr "излишен знак „\\“ пред празен знак"
 
-#: lib/dfa.c:1561
+#: lib/dfa.c:1574
 #, c-format
 msgid "stray \\ before %lc"
 msgstr "излишен знак „\\“ пред „%lc“"
 
-#: lib/dfa.c:1562
+#: lib/dfa.c:1575
 msgid "stray \\"
 msgstr "излишен знак „\\“"
 
-#: lib/dfa.c:1917
+#: lib/dfa.c:1925
 msgid "unbalanced ("
 msgstr "„(“ без еш"
 
-#: lib/dfa.c:2034
+#: lib/dfa.c:2042
 msgid "no syntax specified"
 msgstr "не е зададен синтаксис"
 
-#: lib/dfa.c:2045
+#: lib/dfa.c:2053
 msgid "unbalanced )"
 msgstr "„)“ без еш"
 
-#: lib/error.c:195
+#: lib/error.c:193
 msgid "Unknown system error"
 msgstr "Неизвестна системна грешка"
 
@@ -167,7 +167,7 @@ msgstr "не може да се запише коя е текущата рабо
 msgid "failed to return to initial working directory"
 msgstr "не може да се върне към първоначалната работна директория"
 
-#: lib/xbinary-io.c:37
+#: lib/xbinary-io.c:36
 #, c-format
 msgid "failed to set file descriptor text/binary mode"
 msgstr "неуспешно задаване на вид на файла като текстов/двоичен"
@@ -193,11 +193,11 @@ msgstr "неуспешно задаване на вид на файла като
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:355
+#: lib/quotearg.c:354
 msgid "`"
 msgstr "„"
 
-#: lib/quotearg.c:356
+#: lib/quotearg.c:355
 msgid "'"
 msgstr "“"
 
@@ -756,67 +756,76 @@ msgstr "непознат вид двоичен файл"
 #: src/grep.c:2831
 msgid ""
 "Written by Mike Haertel and others; see\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 msgstr ""
 "Създадено от Mike Haertel и др., вижте\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 
-#: src/grep.c:2934
+#: src/grep.c:2937
 #, c-format
 msgid "warning: GREP_COLOR='%s' is deprecated; use GREP_COLORS='mt=%s'"
 msgstr ""
 "ПРЕДУПРЕЖДЕНИЕ: вариантът „GREP_COLOR='%s'“ е остарял, вместо него ползвайте "
 "„GREP_COLORS='mt=%s'“"
 
-#: src/pcresearch.c:148
+#: src/pcresearch.c:92
+#, c-format
+msgid ""
+"\n"
+"grep -P uses PCRE2 %s\n"
+msgstr ""
+"\n"
+"„grep -P“ ползва „PCRE %s“\n"
+
+#: src/pcresearch.c:169
+msgid "-P supports only unibyte locales on this platform"
+msgstr ""
+"опцията „-P“ изисква локалът да е с еднобайтово кодиране на тази платформа"
+
+#: src/pcresearch.c:171
 msgid "-P supports only unibyte and UTF-8 locales"
 msgstr "опцията „-P“ изисква локалът да е с еднобайтово кодиране или UTF-8"
 
-#: src/pcresearch.c:162
+#: src/pcresearch.c:194
 msgid "the -P option only supports a single pattern"
 msgstr "опцията „-P“ поддържа само един шаблон"
 
-#: src/pcresearch.c:215
-#, c-format
-msgid "JIT internal error: %d"
-msgstr "вътрешна грешка на „JIT“: %d"
-
-#: src/pcresearch.c:252
+#: src/pcresearch.c:290
 msgid "exceeded PCRE's line length limit"
 msgstr "максималният размер на реда за „PCRE“ е превишен"
 
-#: src/pcresearch.c:330
+#: src/pcresearch.c:368
 #, c-format
 msgid "%s: memory exhausted"
 msgstr "%s: паметта е изчерпана"
 
-#: src/pcresearch.c:333
+#: src/pcresearch.c:371
 #, c-format
 msgid "%s: exhausted PCRE JIT stack"
 msgstr "%s: паметта за стека за изпълнение на шаблоните за „PCRE“ свърши"
 
-#: src/pcresearch.c:337
+#: src/pcresearch.c:375
 #, c-format
 msgid "%s: exceeded PCRE's backtracking limit"
 msgstr "%s: максималният брой връщания при рекурсия на „PCRE“ е превишен"
 
-#: src/pcresearch.c:342
+#: src/pcresearch.c:380
 #, c-format
 msgid "%s: exceeded PCRE's nested backtracking limit"
 msgstr ""
 "%s: максималният брой вложени връщания при рекурсия на „PCRE“ е превишен"
 
-#: src/pcresearch.c:346
+#: src/pcresearch.c:384
 #, c-format
 msgid "%s: PCRE detected recurse loop"
 msgstr "%s: „PCRE“ засече цикъл в рекурсията"
 
-#: src/pcresearch.c:351
+#: src/pcresearch.c:389
 #, c-format
 msgid "%s: exceeded PCRE's heap limit"
 msgstr "%s: превишен е максимумът на паметта за „PCRE“"
 
-#: src/pcresearch.c:360
+#: src/pcresearch.c:398
 #, c-format
 msgid "%s: internal PCRE error: %d"
 msgstr "%s: вътрешна грешка на „PCRE“: %d"
diff --git a/po/ca.po b/po/ca.po
index be2f7ccc..a44e1d84 100644
--- a/po/ca.po
+++ b/po/ca.po
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: GNU grep-3.1.48\n"
 "Report-Msgid-Bugs-To: bug-grep@gnu.org\n"
-"POT-Creation-Date: 2022-09-02 23:52-0700\n"
+"POT-Creation-Date: 2023-05-13 01:14-0700\n"
 "PO-Revision-Date: 2019-07-18 22:11+0200\n"
 "Last-Translator: Àngel Mompó <mecatxis@mecatxis.cat>\n"
 "Language-Team: Catalan <ca@dodds.net>\n"
@@ -20,105 +20,105 @@ msgstr ""
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 "X-Generator: Gtranslator 2.91.7\n"
 
-#: lib/argmatch.c:147
+#: lib/argmatch.c:145
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "l'argument %s no és vàlid per %s"
 
-#: lib/argmatch.c:148
+#: lib/argmatch.c:146
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "l'argument %s és ambigu per %s"
 
-#: lib/argmatch.c:167 lib/argmatch.h:238
+#: lib/argmatch.c:165 lib/argmatch.h:242
 msgid "Valid arguments are:"
 msgstr "Els arguments vàlids són:"
 
-#: lib/c-stack.c:187
+#: lib/c-stack.c:186
 msgid "program error"
 msgstr "error del programa"
 
-#: lib/c-stack.c:188
+#: lib/c-stack.c:187
 msgid "stack overflow"
 msgstr "desbordament de la pila"
 
-#: lib/closeout.c:122 src/grep.c:1346
+#: lib/closeout.c:121 src/grep.c:1346
 msgid "write error"
 msgstr "error d'escriptura"
 
-#: lib/dfa.c:894
+#: lib/dfa.c:897
 msgid "unbalanced ["
 msgstr "[ desaparellat"
 
-#: lib/dfa.c:1015
+#: lib/dfa.c:1018
 msgid "invalid character class"
 msgstr "La classe de caràcter no és vàlida"
 
-#: lib/dfa.c:1143
+#: lib/dfa.c:1146
 msgid "character class syntax is [[:space:]], not [:space:]"
 msgstr "La sintaxi de la classe de caràcter és [[:espai:]], no [:espai:]"
 
-#: lib/dfa.c:1209
+#: lib/dfa.c:1222
 msgid "unfinished \\ escape"
 msgstr "Codi d'escapada \\ inacabat"
 
-#: lib/dfa.c:1319
+#: lib/dfa.c:1332
 #, fuzzy
 msgid "? at start of expression"
 msgstr "L'expressió regular no és vàlida"
 
-#: lib/dfa.c:1331
+#: lib/dfa.c:1344
 #, fuzzy
 msgid "* at start of expression"
 msgstr "L'expressió regular no és vàlida"
 
-#: lib/dfa.c:1345
+#: lib/dfa.c:1358
 #, fuzzy
 msgid "+ at start of expression"
 msgstr "L'expressió regular no és vàlida"
 
-#: lib/dfa.c:1400
+#: lib/dfa.c:1413
 msgid "{...} at start of expression"
 msgstr ""
 
-#: lib/dfa.c:1403
+#: lib/dfa.c:1416
 msgid "invalid content of \\{\\}"
 msgstr "el context de \\{\\} no és vàlid"
 
-#: lib/dfa.c:1405
+#: lib/dfa.c:1418
 msgid "regular expression too big"
 msgstr "l'expressió regular és massa gran"
 
-#: lib/dfa.c:1555
+#: lib/dfa.c:1568
 msgid "stray \\ before unprintable character"
 msgstr ""
 
-#: lib/dfa.c:1557
+#: lib/dfa.c:1570
 msgid "stray \\ before white space"
 msgstr ""
 
-#: lib/dfa.c:1561
+#: lib/dfa.c:1574
 #, c-format
 msgid "stray \\ before %lc"
 msgstr ""
 
-#: lib/dfa.c:1562
+#: lib/dfa.c:1575
 msgid "stray \\"
 msgstr ""
 
-#: lib/dfa.c:1917
+#: lib/dfa.c:1925
 msgid "unbalanced ("
 msgstr "( desaparellat"
 
-#: lib/dfa.c:2034
+#: lib/dfa.c:2042
 msgid "no syntax specified"
 msgstr "no s'ha especificat cap sintaxi"
 
-#: lib/dfa.c:2045
+#: lib/dfa.c:2053
 msgid "unbalanced )"
 msgstr ") desaparellat"
 
-#: lib/error.c:195
+#: lib/error.c:193
 msgid "Unknown system error"
 msgstr "Error desconegut del sistema"
 
@@ -171,7 +171,7 @@ msgstr "no es pot enregistrar el directori de treball actual"
 msgid "failed to return to initial working directory"
 msgstr "no s'ha pogut tornar al directori de treball inicial"
 
-#: lib/xbinary-io.c:37
+#: lib/xbinary-io.c:36
 #, c-format
 msgid "failed to set file descriptor text/binary mode"
 msgstr "No s'ha pogut establir el mode del descriptor de fitxers text/binari"
@@ -197,11 +197,11 @@ msgstr "No s'ha pogut establir el mode del descriptor de fitxers text/binari"
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:355
+#: lib/quotearg.c:354
 msgid "`"
 msgstr "«"
 
-#: lib/quotearg.c:356
+#: lib/quotearg.c:355
 msgid "'"
 msgstr "»"
 
@@ -753,70 +753,81 @@ msgstr "el tipus de fitxer binari és desconegut"
 #, fuzzy
 msgid ""
 "Written by Mike Haertel and others; see\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 msgstr "la resta, vegeu <https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>"
 
-#: src/grep.c:2934
+#: src/grep.c:2937
 #, c-format
 msgid "warning: GREP_COLOR='%s' is deprecated; use GREP_COLORS='mt=%s'"
 msgstr ""
 
-#: src/pcresearch.c:148
+#: src/pcresearch.c:92
+#, c-format
+msgid ""
+"\n"
+"grep -P uses PCRE2 %s\n"
+msgstr ""
+
+#: src/pcresearch.c:169
+#, fuzzy
+msgid "-P supports only unibyte locales on this platform"
+msgstr "-P només permet la configuració local en unibyte i en UTF-8"
+
+#: src/pcresearch.c:171
 msgid "-P supports only unibyte and UTF-8 locales"
 msgstr "-P només permet la configuració local en unibyte i en UTF-8"
 
-#: src/pcresearch.c:162
+#: src/pcresearch.c:194
 msgid "the -P option only supports a single pattern"
 msgstr "l'opció -P només suporta un sol patró"
 
-#: src/pcresearch.c:215
-#, fuzzy, c-format
-msgid "JIT internal error: %d"
-msgstr "error intern"
-
 # PCRE is 'Perl Compatible Regular Expression'
-#: src/pcresearch.c:252
+#: src/pcresearch.c:290
 msgid "exceeded PCRE's line length limit"
 msgstr "s'ha superat el límit de longitud de línia del PCRE"
 
-#: src/pcresearch.c:330
+#: src/pcresearch.c:368
 #, fuzzy, c-format
 msgid "%s: memory exhausted"
 msgstr "memòria exhaurida"
 
-#: src/pcresearch.c:333
+#: src/pcresearch.c:371
 #, fuzzy, c-format
 msgid "%s: exhausted PCRE JIT stack"
 msgstr "S'ha acabat la pila del PCRE JIT"
 
 # PCRE is 'Perl Compatible Regular Expression'
-#: src/pcresearch.c:337
+#: src/pcresearch.c:375
 #, fuzzy, c-format
 msgid "%s: exceeded PCRE's backtracking limit"
 msgstr "s'ha superat el límit de l'estratègia «tornada enrere» del PCRE"
 
 # PCRE is 'Perl Compatible Regular Expression'
-#: src/pcresearch.c:342
+#: src/pcresearch.c:380
 #, fuzzy, c-format
 msgid "%s: exceeded PCRE's nested backtracking limit"
 msgstr "s'ha superat el límit de l'estratègia «tornada enrere» del PCRE"
 
-#: src/pcresearch.c:346
+#: src/pcresearch.c:384
 #, c-format
 msgid "%s: PCRE detected recurse loop"
 msgstr ""
 
 # PCRE is 'Perl Compatible Regular Expression'
-#: src/pcresearch.c:351
+#: src/pcresearch.c:389
 #, fuzzy, c-format
 msgid "%s: exceeded PCRE's heap limit"
 msgstr "s'ha superat el límit de l'estratègia «tornada enrere» del PCRE"
 
-#: src/pcresearch.c:360
+#: src/pcresearch.c:398
 #, fuzzy, c-format
 msgid "%s: internal PCRE error: %d"
 msgstr "error intern del PCRE: %d"
 
+#, fuzzy, c-format
+#~ msgid "JIT internal error: %d"
+#~ msgstr "error intern"
+
 #~ msgid "failed to allocate memory for the PCRE JIT stack"
 #~ msgstr "no s'ha pogut assignar memòria per la pila JIT del PCRE"
 
diff --git a/po/cs.gmo b/po/cs.gmo
index e83afb4d..1f3209c1 100644
Binary files a/po/cs.gmo and b/po/cs.gmo differ
diff --git a/po/cs.po b/po/cs.po
index 242282c4..dc158887 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -4,15 +4,15 @@
 # Vladimir Michl <Vladimir.Michl@seznam.cz>, 1998.
 # Petr Pisar <petr.pisar@atlas.cz>, 2008, 2009, 2010, 2011, 2012, 2013.
 # Petr Pisar <petr.pisar@atlas.cz>, 2014, 2015, 2016, 2018, 2020, 2021.
-# Petr Pisar <petr.pisar@atlas.cz>, 2022.
+# Petr Pisar <petr.pisar@atlas.cz>, 2022, 2023.
 #
 # Thanks to Stanislav Brabec <utx@k332.feld.cvut.cz>.
 msgid ""
 msgstr ""
-"Project-Id-Version: grep 3.7.98\n"
+"Project-Id-Version: grep 3.10.12\n"
 "Report-Msgid-Bugs-To: bug-grep@gnu.org\n"
-"POT-Creation-Date: 2022-09-02 23:52-0700\n"
-"PO-Revision-Date: 2022-07-04 19:28+02:00\n"
+"POT-Creation-Date: 2023-05-13 01:14-0700\n"
+"PO-Revision-Date: 2023-04-21 20:48+02:00\n"
 "Last-Translator: Petr Pisar <petr.pisar@atlas.cz>\n"
 "Language-Team: Czech <translation-team-cs@lists.sourceforge.net>\n"
 "Language: cs\n"
@@ -21,103 +21,103 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "X-Bugs: Report translation errors to the Language-Team address.\n"
 
-#: lib/argmatch.c:147
+#: lib/argmatch.c:145
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "neplatný argument %s u %s"
 
-#: lib/argmatch.c:148
+#: lib/argmatch.c:146
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "nejednoznačný argument %s u %s"
 
-#: lib/argmatch.c:167 lib/argmatch.h:238
+#: lib/argmatch.c:165 lib/argmatch.h:242
 msgid "Valid arguments are:"
 msgstr "Platné argumenty jsou:"
 
-#: lib/c-stack.c:187
+#: lib/c-stack.c:186
 msgid "program error"
 msgstr "chyba programu"
 
-#: lib/c-stack.c:188
+#: lib/c-stack.c:187
 msgid "stack overflow"
 msgstr "přetečení zásobníku"
 
-#: lib/closeout.c:122 src/grep.c:1346
+#: lib/closeout.c:121 src/grep.c:1346
 msgid "write error"
 msgstr "chyba při zápisu"
 
-#: lib/dfa.c:894
+#: lib/dfa.c:897
 msgid "unbalanced ["
 msgstr "nevyvážená ["
 
-#: lib/dfa.c:1015
+#: lib/dfa.c:1018
 msgid "invalid character class"
 msgstr "neplatný třída znaků"
 
-#: lib/dfa.c:1143
+#: lib/dfa.c:1146
 msgid "character class syntax is [[:space:]], not [:space:]"
 msgstr "zápis třídy znaků je [[:space:]], ne [:space:]"
 
-#: lib/dfa.c:1209
+#: lib/dfa.c:1222
 msgid "unfinished \\ escape"
 msgstr "neukončená escape sekvence \\"
 
-#: lib/dfa.c:1319
+#: lib/dfa.c:1332
 msgid "? at start of expression"
 msgstr "? na začátku výrazu"
 
-#: lib/dfa.c:1331
+#: lib/dfa.c:1344
 msgid "* at start of expression"
 msgstr "* na začátku výrazu"
 
-#: lib/dfa.c:1345
+#: lib/dfa.c:1358
 msgid "+ at start of expression"
 msgstr "+ na začátku výrazu"
 
-#: lib/dfa.c:1400
+#: lib/dfa.c:1413
 msgid "{...} at start of expression"
 msgstr "{…} na začátku výrazu"
 
-#: lib/dfa.c:1403
+#: lib/dfa.c:1416
 msgid "invalid content of \\{\\}"
 msgstr "neplatný obsah \\{\\}"
 
-#: lib/dfa.c:1405
+#: lib/dfa.c:1418
 msgid "regular expression too big"
 msgstr "regulární výraz je příliš velký"
 
-#: lib/dfa.c:1555
+#: lib/dfa.c:1568
 msgid "stray \\ before unprintable character"
 msgstr "přebývající \\ před netisknutelným znakem"
 
-#: lib/dfa.c:1557
+#: lib/dfa.c:1570
 msgid "stray \\ before white space"
 msgstr "přebývající \\ před bílým místem"
 
-#: lib/dfa.c:1561
+#: lib/dfa.c:1574
 #, c-format
 msgid "stray \\ before %lc"
 msgstr "přebývající \\ před %lc"
 
-#: lib/dfa.c:1562
+#: lib/dfa.c:1575
 msgid "stray \\"
 msgstr "přebývající \\"
 
-#: lib/dfa.c:1917
+#: lib/dfa.c:1925
 msgid "unbalanced ("
 msgstr "nevyvážená ("
 
 # ? Není zadaná syntaxe
-#: lib/dfa.c:2034
+#: lib/dfa.c:2042
 msgid "no syntax specified"
 msgstr "syntaxe není určena"
 
-#: lib/dfa.c:2045
+#: lib/dfa.c:2053
 msgid "unbalanced )"
 msgstr "nevyvážená )"
 
-#: lib/error.c:195
+#: lib/error.c:193
 msgid "Unknown system error"
 msgstr "Neznámá systémová chyba"
 
@@ -170,7 +170,7 @@ msgstr "nelze zaznamenat aktuální pracovní adresář"
 msgid "failed to return to initial working directory"
 msgstr "návrat do prvotního pracovního adresáře se nezdařil"
 
-#: lib/xbinary-io.c:37
+#: lib/xbinary-io.c:36
 #, c-format
 msgid "failed to set file descriptor text/binary mode"
 msgstr "nastavení textového/binárního režimu deskriptoru souboru selhalo"
@@ -196,11 +196,11 @@ msgstr "nastavení textového/binárního režimu deskriptoru souboru selhalo"
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:355
+#: lib/quotearg.c:354
 msgid "`"
 msgstr "„"
 
-#: lib/quotearg.c:356
+#: lib/quotearg.c:355
 msgid "'"
 msgstr "“"
 
@@ -749,73 +749,91 @@ msgstr "neznámý typ binárního souboru"
 #: src/grep.c:2831
 msgid ""
 "Written by Mike Haertel and others; see\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 msgstr ""
 "Napsal Mike Haertel a další, vizte\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 
-#: src/grep.c:2934
+#: src/grep.c:2937
 #, c-format
 msgid "warning: GREP_COLOR='%s' is deprecated; use GREP_COLORS='mt=%s'"
 msgstr "pozor: GREP_COLOR='%s' je zastaralé, použijte GREP_COLORS='mt=%s'"
 
-#: src/pcresearch.c:148
+#: src/pcresearch.c:92
+#, c-format
+msgid ""
+"\n"
+"grep -P uses PCRE2 %s\n"
+msgstr ""
+"\n"
+"grep -P používá PCRE2 %s\n"
+
+#: src/pcresearch.c:169
+msgid "-P supports only unibyte locales on this platform"
+msgstr "-P podporuje na této platformě pouze jednobajtová národní prostředí"
+
+#: src/pcresearch.c:171
 msgid "-P supports only unibyte and UTF-8 locales"
 msgstr "-P podporuje pouze jednobajtová a UTF-8 národní prostředí"
 
-#: src/pcresearch.c:162
+#: src/pcresearch.c:194
 msgid "the -P option only supports a single pattern"
 msgstr "přepínač -P lze být použít pouze s jedním vzorkem"
 
-#: src/pcresearch.c:215
-#, c-format
-msgid "JIT internal error: %d"
-msgstr "vnitřní chyba JIT: %d"
-
-#: src/pcresearch.c:252
+#: src/pcresearch.c:290
 msgid "exceeded PCRE's line length limit"
 msgstr "překročeno omezení PCRE na délku řádku"
 
-#: src/pcresearch.c:330
+#: src/pcresearch.c:368
 #, c-format
 msgid "%s: memory exhausted"
 msgstr "%s: paměť vyčerpána"
 
 # It corresponds to PCRE2_ERROR_JIT_STACKLIMIT error.
-#: src/pcresearch.c:333
+#: src/pcresearch.c:371
 #, c-format
 msgid "%s: exhausted PCRE JIT stack"
 msgstr "%s: JIT zásobník knihovny PCRE vyčerpán"
 
 # It corresponds to PCRE2_ERROR_MATCHLIMIT error.
-#: src/pcresearch.c:337
+#: src/pcresearch.c:375
 #, c-format
 msgid "%s: exceeded PCRE's backtracking limit"
 msgstr "%s: překročeno omezení PCRE na délku návratu"
 
 # It corresponds to PCRE2_ERROR_DEPTHLIMIT error.
-#: src/pcresearch.c:342
+#: src/pcresearch.c:380
 #, c-format
 msgid "%s: exceeded PCRE's nested backtracking limit"
 msgstr "%s: překročeno omezení PCRE na hloubku návratu ze zanoření"
 
 # It corresponds to PCRE2_ERROR_RECURSELOOP error.
-#: src/pcresearch.c:346
+#: src/pcresearch.c:384
 #, c-format
 msgid "%s: PCRE detected recurse loop"
 msgstr "%s: PCRE objevilo smyčku v zanoření"
 
 # It corresponds to PCRE2_ERROR_HEAPLIMIT error.
-#: src/pcresearch.c:351
+#: src/pcresearch.c:389
 #, c-format
 msgid "%s: exceeded PCRE's heap limit"
 msgstr "%s: překročeno omezení PCRE na velikost haldy"
 
-#: src/pcresearch.c:360
+#: src/pcresearch.c:398
 #, c-format
 msgid "%s: internal PCRE error: %d"
 msgstr "%s: vnitřní chyba PCRE: %d"
 
+#~ msgid ""
+#~ "\n"
+#~ "Built with PCRE "
+#~ msgstr ""
+#~ "\n"
+#~ "Sestaveno s PCRE "
+
+#~ msgid "JIT internal error: %d"
+#~ msgstr "vnitřní chyba JIT: %d"
+
 #~ msgid "failed to allocate memory for the PCRE JIT stack"
 #~ msgstr "alokace paměti pro JIT zásobník PCRE selhala"
 
diff --git a/po/da.gmo b/po/da.gmo
index 97d59385..e1910282 100644
Binary files a/po/da.gmo and b/po/da.gmo differ
diff --git a/po/da.po b/po/da.po
index 51bd5e72..8ad6b90a 100644
--- a/po/da.po
+++ b/po/da.po
@@ -27,7 +27,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: grep-3.6.27\n"
 "Report-Msgid-Bugs-To: bug-grep@gnu.org\n"
-"POT-Creation-Date: 2022-09-02 23:52-0700\n"
+"POT-Creation-Date: 2023-05-13 01:14-0700\n"
 "PO-Revision-Date: 2022-04-13 22:25+0200\n"
 "Last-Translator: Ask Hjorth Larsen <asklarsen@gmail.com>\n"
 "Language-Team: Danish <dansk@dansk-gruppen.dk>\n"
@@ -37,105 +37,105 @@ msgstr ""
 "Content-Transfer-Encoding: 8-bit\n"
 "X-Bugs: Report translation errors to the Language-Team address.\n"
 
-#: lib/argmatch.c:147
+#: lib/argmatch.c:145
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "ugyldigt argument %s til %s"
 
-#: lib/argmatch.c:148
+#: lib/argmatch.c:146
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "flertydigt argument %s til %s"
 
-#: lib/argmatch.c:167 lib/argmatch.h:238
+#: lib/argmatch.c:165 lib/argmatch.h:242
 msgid "Valid arguments are:"
 msgstr "Gyldige argumenter er:"
 
-#: lib/c-stack.c:187
+#: lib/c-stack.c:186
 msgid "program error"
 msgstr "programfejl"
 
-#: lib/c-stack.c:188
+#: lib/c-stack.c:187
 msgid "stack overflow"
 msgstr "stakoverløb"
 
-#: lib/closeout.c:122 src/grep.c:1346
+#: lib/closeout.c:121 src/grep.c:1346
 msgid "write error"
 msgstr "skrivefejl"
 
-#: lib/dfa.c:894
+#: lib/dfa.c:897
 msgid "unbalanced ["
 msgstr "ubalanceret ["
 
-#: lib/dfa.c:1015
+#: lib/dfa.c:1018
 msgid "invalid character class"
 msgstr "ugyldig tegnklasse"
 
-#: lib/dfa.c:1143
+#: lib/dfa.c:1146
 msgid "character class syntax is [[:space:]], not [:space:]"
 msgstr "syntaksen for tegnklasser er [[:space:]], ikke [:space:]"
 
-#: lib/dfa.c:1209
+#: lib/dfa.c:1222
 msgid "unfinished \\ escape"
 msgstr "ufærdig \\-undvigesekvens"
 
-#: lib/dfa.c:1319
+#: lib/dfa.c:1332
 #, fuzzy
 msgid "? at start of expression"
 msgstr "Ugyldigt regulært udtryk"
 
-#: lib/dfa.c:1331
+#: lib/dfa.c:1344
 #, fuzzy
 msgid "* at start of expression"
 msgstr "Ugyldigt regulært udtryk"
 
-#: lib/dfa.c:1345
+#: lib/dfa.c:1358
 #, fuzzy
 msgid "+ at start of expression"
 msgstr "Ugyldigt regulært udtryk"
 
-#: lib/dfa.c:1400
+#: lib/dfa.c:1413
 msgid "{...} at start of expression"
 msgstr ""
 
-#: lib/dfa.c:1403
+#: lib/dfa.c:1416
 msgid "invalid content of \\{\\}"
 msgstr "ugyldigt indhold af \\{\\}"
 
-#: lib/dfa.c:1405
+#: lib/dfa.c:1418
 msgid "regular expression too big"
 msgstr "regulært udtryk er for stort"
 
-#: lib/dfa.c:1555
+#: lib/dfa.c:1568
 msgid "stray \\ before unprintable character"
 msgstr ""
 
-#: lib/dfa.c:1557
+#: lib/dfa.c:1570
 msgid "stray \\ before white space"
 msgstr ""
 
-#: lib/dfa.c:1561
+#: lib/dfa.c:1574
 #, c-format
 msgid "stray \\ before %lc"
 msgstr ""
 
-#: lib/dfa.c:1562
+#: lib/dfa.c:1575
 msgid "stray \\"
 msgstr ""
 
-#: lib/dfa.c:1917
+#: lib/dfa.c:1925
 msgid "unbalanced ("
 msgstr "ubalanceret ("
 
-#: lib/dfa.c:2034
+#: lib/dfa.c:2042
 msgid "no syntax specified"
 msgstr "ingen syntaks angivet"
 
-#: lib/dfa.c:2045
+#: lib/dfa.c:2053
 msgid "unbalanced )"
 msgstr "ubalanceret )"
 
-#: lib/error.c:195
+#: lib/error.c:193
 msgid "Unknown system error"
 msgstr "Ukendt systemfejl"
 
@@ -188,7 +188,7 @@ msgstr "kan ikke gemme nuværende arbejdskatalog"
 msgid "failed to return to initial working directory"
 msgstr "kunne ikke vende tilbage til det oprindelige arbejdskatalog"
 
-#: lib/xbinary-io.c:37
+#: lib/xbinary-io.c:36
 #, c-format
 msgid "failed to set file descriptor text/binary mode"
 msgstr "kunne ikke angive tekst-/binærtilstand for fildeskriptor"
@@ -214,11 +214,11 @@ msgstr "kunne ikke angive tekst-/binærtilstand for fildeskriptor"
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:355
+#: lib/quotearg.c:354
 msgid "`"
 msgstr "\""
 
-#: lib/quotearg.c:356
+#: lib/quotearg.c:355
 msgid "'"
 msgstr "\""
 
@@ -747,70 +747,82 @@ msgid "unknown binary-files type"
 msgstr "ukendt binær filtype"
 
 #: src/grep.c:2831
+#, fuzzy
 msgid ""
 "Written by Mike Haertel and others; see\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 msgstr ""
 "Skrevet af Mike Haertel med flere; se\n"
 "<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
 
-#: src/grep.c:2934
+#: src/grep.c:2937
 #, c-format
 msgid "warning: GREP_COLOR='%s' is deprecated; use GREP_COLORS='mt=%s'"
 msgstr ""
 
-#: src/pcresearch.c:148
+#: src/pcresearch.c:92
+#, c-format
+msgid ""
+"\n"
+"grep -P uses PCRE2 %s\n"
+msgstr ""
+
+#: src/pcresearch.c:169
+#, fuzzy
+msgid "-P supports only unibyte locales on this platform"
+msgstr "-P understøtter kun unibyte- og UTF-8-sprogindstillinger"
+
+#: src/pcresearch.c:171
 msgid "-P supports only unibyte and UTF-8 locales"
 msgstr "-P understøtter kun unibyte- og UTF-8-sprogindstillinger"
 
-#: src/pcresearch.c:162
+#: src/pcresearch.c:194
 msgid "the -P option only supports a single pattern"
 msgstr "flaget -P understøtter kun et enkelt mønster"
 
-#: src/pcresearch.c:215
-#, fuzzy, c-format
-msgid "JIT internal error: %d"
-msgstr "intern fejl"
-
-#: src/pcresearch.c:252
+#: src/pcresearch.c:290
 msgid "exceeded PCRE's line length limit"
 msgstr "overskred maksimal linjelængde for PCRE"
 
-#: src/pcresearch.c:330
+#: src/pcresearch.c:368
 #, c-format
 msgid "%s: memory exhausted"
 msgstr "%s: hukommelse opbrugt"
 
-#: src/pcresearch.c:333
+#: src/pcresearch.c:371
 #, c-format
 msgid "%s: exhausted PCRE JIT stack"
 msgstr "%s: PCRE JIT-stak opbrugt"
 
-#: src/pcresearch.c:337
+#: src/pcresearch.c:375
 #, c-format
 msgid "%s: exceeded PCRE's backtracking limit"
 msgstr "%s: overskred PCRE's grænse for tilbagesøgning"
 
-#: src/pcresearch.c:342
+#: src/pcresearch.c:380
 #, fuzzy, c-format
 msgid "%s: exceeded PCRE's nested backtracking limit"
 msgstr "%s: overskred PCRE's grænse for tilbagesøgning"
 
-#: src/pcresearch.c:346
+#: src/pcresearch.c:384
 #, c-format
 msgid "%s: PCRE detected recurse loop"
 msgstr ""
 
-#: src/pcresearch.c:351
+#: src/pcresearch.c:389
 #, fuzzy, c-format
 msgid "%s: exceeded PCRE's heap limit"
 msgstr "%s: overskred PCRE's rekursionsgrænse"
 
-#: src/pcresearch.c:360
+#: src/pcresearch.c:398
 #, c-format
 msgid "%s: internal PCRE error: %d"
 msgstr "%s: intern PCRE-fejl: %d"
 
+#, fuzzy, c-format
+#~ msgid "JIT internal error: %d"
+#~ msgstr "intern fejl"
+
 #~ msgid "failed to allocate memory for the PCRE JIT stack"
 #~ msgstr "kunne ikke allokere hukommelse til PCRE JIT-stakken"
 
diff --git a/po/de.gmo b/po/de.gmo
index 48df6544..6383e3bb 100644
Binary files a/po/de.gmo and b/po/de.gmo differ
diff --git a/po/de.po b/po/de.po
index 9bd23d25..f97ef531 100644
--- a/po/de.po
+++ b/po/de.po
@@ -4,13 +4,13 @@
 # Martin von Löwis <martin@mira.isdn.cs.tu-berlin.de>, 1997-99, 2000-2002.
 # Philipp Thomas <pth@suse.de>, 2012-2013, 2015-2016.
 # Mario Blättermann <mario.blaettermann@gmail.com>, 2014, 2019-2021.
-# Roland Illig <roland.illig@gmx.de>, 2021-2022.
+# Roland Illig <roland.illig@gmx.de>, 2021-2023.
 msgid ""
 msgstr ""
-"Project-Id-Version: GNU grep 3.7.98\n"
+"Project-Id-Version: GNU grep 3.10.12\n"
 "Report-Msgid-Bugs-To: bug-grep@gnu.org\n"
-"POT-Creation-Date: 2022-09-02 23:52-0700\n"
-"PO-Revision-Date: 2022-07-04 00:10+0200\n"
+"POT-Creation-Date: 2023-05-13 01:14-0700\n"
+"PO-Revision-Date: 2023-04-21 17:11+0200\n"
 "Last-Translator: Roland Illig <roland.illig@gmx.de>\n"
 "Language-Team: German <translation-team-de@lists.sourceforge.net>\n"
 "Language: de\n"
@@ -19,106 +19,106 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 "X-Bugs: Report translation errors to the Language-Team address.\n"
-"X-Generator: Poedit 3.1\n"
+"X-Generator: Poedit 3.2.2\n"
 
-#: lib/argmatch.c:147
+#: lib/argmatch.c:145
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "ungültiges Argument %s für %s"
 
-#: lib/argmatch.c:148
+#: lib/argmatch.c:146
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "mehrdeutiges Argument %s für %s"
 
-#: lib/argmatch.c:167 lib/argmatch.h:238
+#: lib/argmatch.c:165 lib/argmatch.h:242
 msgid "Valid arguments are:"
 msgstr "Gültige Argumente sind:"
 
-#: lib/c-stack.c:187
+#: lib/c-stack.c:186
 msgid "program error"
 msgstr "Programmfehler"
 
-#: lib/c-stack.c:188
+#: lib/c-stack.c:187
 msgid "stack overflow"
 msgstr "Stack-Überlauf"
 
-#: lib/closeout.c:122 src/grep.c:1346
+#: lib/closeout.c:121 src/grep.c:1346
 msgid "write error"
 msgstr "Schreibfehler"
 
 # Is this message used only for [ without matching ],
 # or for ] without [ as well?
-#: lib/dfa.c:894
+#: lib/dfa.c:897
 msgid "unbalanced ["
 msgstr "[ ohne schließendes Gegenstück"
 
-#: lib/dfa.c:1015
+#: lib/dfa.c:1018
 msgid "invalid character class"
 msgstr "Ungültige Zeichenklasse"
 
-#: lib/dfa.c:1143
+#: lib/dfa.c:1146
 msgid "character class syntax is [[:space:]], not [:space:]"
 msgstr "die Syntax für Zeichenklassen ist [[:space:]], nicht [:space:]"
 
-#: lib/dfa.c:1209
+#: lib/dfa.c:1222
 msgid "unfinished \\ escape"
 msgstr "unbeendete \\-Escape-Sequenz"
 
-#: lib/dfa.c:1319
+#: lib/dfa.c:1332
 msgid "? at start of expression"
 msgstr "? am Anfang des Ausdrucks"
 
-#: lib/dfa.c:1331
+#: lib/dfa.c:1344
 msgid "* at start of expression"
 msgstr "* am Anfang des Ausdrucks"
 
-#: lib/dfa.c:1345
+#: lib/dfa.c:1358
 msgid "+ at start of expression"
 msgstr "+ am Anfang des Ausdrucks"
 
-#: lib/dfa.c:1400
+#: lib/dfa.c:1413
 msgid "{...} at start of expression"
 msgstr "{...} am Anfang des Ausdrucks"
 
-#: lib/dfa.c:1403
+#: lib/dfa.c:1416
 msgid "invalid content of \\{\\}"
 msgstr "Ungültiger Inhalt von \\{\\}"
 
-#: lib/dfa.c:1405
+#: lib/dfa.c:1418
 msgid "regular expression too big"
 msgstr "Der reguläre Ausdruck ist zu groß"
 
-#: lib/dfa.c:1555
+#: lib/dfa.c:1568
 msgid "stray \\ before unprintable character"
 msgstr "überzähliges \\ vor einem nicht druckbaren Zeichen"
 
-#: lib/dfa.c:1557
+#: lib/dfa.c:1570
 msgid "stray \\ before white space"
 msgstr "überzähliges \\ vor einem Leerzeichen"
 
-#: lib/dfa.c:1561
+#: lib/dfa.c:1574
 #, c-format
 msgid "stray \\ before %lc"
 msgstr "überzähliges \\ vor %lc"
 
-#: lib/dfa.c:1562
+#: lib/dfa.c:1575
 msgid "stray \\"
 msgstr "überzähliges \\"
 
-#: lib/dfa.c:1917
+#: lib/dfa.c:1925
 msgid "unbalanced ("
 msgstr "( ohne schließendes Gegenstück"
 
-#: lib/dfa.c:2034
+#: lib/dfa.c:2042
 msgid "no syntax specified"
 msgstr "es wurde keine Syntax angegeben"
 
-#: lib/dfa.c:2045
+#: lib/dfa.c:2053
 msgid "unbalanced )"
 msgstr "Schließende ) ohne öffnendes Gegenstück"
 
-#: lib/error.c:195
+#: lib/error.c:193
 msgid "Unknown system error"
 msgstr "Unbekannter Systemfehler"
 
@@ -171,7 +171,7 @@ msgstr "das aktuelle Verzeichnis kann nicht aufgezeichnet werden"
 msgid "failed to return to initial working directory"
 msgstr "die Rückkehr in das ursprüngliche Arbeitsverzeichnis war nicht möglich"
 
-#: lib/xbinary-io.c:37
+#: lib/xbinary-io.c:36
 #, c-format
 msgid "failed to set file descriptor text/binary mode"
 msgstr "Text-/Binärmodus des Dateideskriptors konnte nicht gesetzt werden"
@@ -197,11 +197,11 @@ msgstr "Text-/Binärmodus des Dateideskriptors konnte nicht gesetzt werden"
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:355
+#: lib/quotearg.c:354
 msgid "`"
 msgstr "„"
 
-#: lib/quotearg.c:356
+#: lib/quotearg.c:355
 msgid "'"
 msgstr "“"
 
@@ -750,69 +750,87 @@ msgstr "unbekannter Typ für Binärdateien"
 #: src/grep.c:2831
 msgid ""
 "Written by Mike Haertel and others; see\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 msgstr ""
 "Geschrieben von Mike Haertel und anderen; siehe\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 
-#: src/grep.c:2934
+#: src/grep.c:2937
 #, c-format
 msgid "warning: GREP_COLOR='%s' is deprecated; use GREP_COLORS='mt=%s'"
 msgstr ""
 "Warnung: GREP_COLOR=»%s« ist veraltet; verwenden Sie GREP_COLORS=»mt=%s«"
 
-#: src/pcresearch.c:148
+#: src/pcresearch.c:92
+#, c-format
+msgid ""
+"\n"
+"grep -P uses PCRE2 %s\n"
+msgstr ""
+"\n"
+"grep -P verwendet PCRE2 %s\n"
+
+#: src/pcresearch.c:169
+msgid "-P supports only unibyte locales on this platform"
+msgstr "-P unterstützt auf dieser Plattform nur Unibyte-Locales"
+
+#: src/pcresearch.c:171
 msgid "-P supports only unibyte and UTF-8 locales"
 msgstr "-P unterstützt nur Unibyte- oder UTF-8-Locales"
 
-#: src/pcresearch.c:162
+#: src/pcresearch.c:194
 msgid "the -P option only supports a single pattern"
 msgstr "Die Option -P unterstützt nur ein einzelnes Suchmuster"
 
-#: src/pcresearch.c:215
-#, c-format
-msgid "JIT internal error: %d"
-msgstr "interner JIT-Fehler: %d"
-
-#: src/pcresearch.c:252
+#: src/pcresearch.c:290
 msgid "exceeded PCRE's line length limit"
 msgstr "Überschreitung der zulässigen Zeilenlänge von PCREs"
 
-#: src/pcresearch.c:330
+#: src/pcresearch.c:368
 #, c-format
 msgid "%s: memory exhausted"
 msgstr "%s: Speicher ausgeschöpft"
 
-#: src/pcresearch.c:333
+#: src/pcresearch.c:371
 #, c-format
 msgid "%s: exhausted PCRE JIT stack"
 msgstr "%s: Kellerspeicher für PCRE JIT ist erschöpft"
 
-#: src/pcresearch.c:337
+#: src/pcresearch.c:375
 #, c-format
 msgid "%s: exceeded PCRE's backtracking limit"
 msgstr "%s: Überschreitung der Zurückverfolgungsbeschränkung des PCREs"
 
-#: src/pcresearch.c:342
+#: src/pcresearch.c:380
 #, c-format
 msgid "%s: exceeded PCRE's nested backtracking limit"
 msgstr "%s: Zurückverfolgungsbeschränkung der PCREs überschritten"
 
-#: src/pcresearch.c:346
+#: src/pcresearch.c:384
 #, c-format
 msgid "%s: PCRE detected recurse loop"
 msgstr "%s: Rekursionsschleife in PCRE entdeckt"
 
-#: src/pcresearch.c:351
+#: src/pcresearch.c:389
 #, c-format
 msgid "%s: exceeded PCRE's heap limit"
 msgstr "%s: Speicherverbrauch der PCRE überschritten"
 
-#: src/pcresearch.c:360
+#: src/pcresearch.c:398
 #, c-format
 msgid "%s: internal PCRE error: %d"
 msgstr "%s: interner PCRE-Fehler: %d"
 
+#~ msgid ""
+#~ "\n"
+#~ "Built with PCRE "
+#~ msgstr ""
+#~ "\n"
+#~ "Mit PCRE gebaut "
+
+#~ msgid "JIT internal error: %d"
+#~ msgstr "interner JIT-Fehler: %d"
+
 #~ msgid "failed to allocate memory for the PCRE JIT stack"
 #~ msgstr "es konnte kein Speicher für den PCRE-JIT-Stack reserviert werden"
 
diff --git a/po/el.po b/po/el.po
index 3fb321a9..dc09afae 100644
--- a/po/el.po
+++ b/po/el.po
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: grep 2.11.11-pre1\n"
 "Report-Msgid-Bugs-To: bug-grep@gnu.org\n"
-"POT-Creation-Date: 2022-09-02 23:52-0700\n"
+"POT-Creation-Date: 2023-05-13 01:14-0700\n"
 "PO-Revision-Date: 2012-05-05 23:23+0100\n"
 "Last-Translator: Savvas Radevic <vicedar@gmail.com>\n"
 "Language-Team: Greek <team@lists.gnome.gr>\n"
@@ -20,29 +20,29 @@ msgstr ""
 "X-Poedit-Language: Greek\n"
 "X-Poedit-Country: GREECE\n"
 
-#: lib/argmatch.c:147
+#: lib/argmatch.c:145
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "άκυρη επιλογή %s για %s"
 
-#: lib/argmatch.c:148
+#: lib/argmatch.c:146
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "διφορούμενη επιλογή %s για %s"
 
-#: lib/argmatch.c:167 lib/argmatch.h:238
+#: lib/argmatch.c:165 lib/argmatch.h:242
 msgid "Valid arguments are:"
 msgstr "Έγκυρες επιλογές είναι οι εξής:"
 
-#: lib/c-stack.c:187
+#: lib/c-stack.c:186
 msgid "program error"
 msgstr ""
 
-#: lib/c-stack.c:188
+#: lib/c-stack.c:187
 msgid "stack overflow"
 msgstr ""
 
-#: lib/closeout.c:122 src/grep.c:1346
+#: lib/closeout.c:121 src/grep.c:1346
 msgid "write error"
 msgstr "σφάλμα εγγραφής"
 
@@ -50,96 +50,96 @@ msgstr "σφάλμα εγγραφής"
 # src/dfa.c:690 src/dfa.c:703 src/dfa.c:704
 # src/dfa.c:660 src/dfa.c:663 src/dfa.c:690 src/dfa.c:694 src/dfa.c:695
 # src/dfa.c:698 src/dfa.c:711 src/dfa.c:712
-#: lib/dfa.c:894
+#: lib/dfa.c:897
 #, fuzzy
 msgid "unbalanced ["
 msgstr "Μη ισορροπημένο ["
 
-#: lib/dfa.c:1015
+#: lib/dfa.c:1018
 msgid "invalid character class"
 msgstr "άκυρη κατηγορία χαρακτήρων"
 
-#: lib/dfa.c:1143
+#: lib/dfa.c:1146
 msgid "character class syntax is [[:space:]], not [:space:]"
 msgstr "η σύνταξη κατηγορίας χαρακτήρων είναι [[:space:]], όχι [:space:]"
 
 # src/dfa.c:444
 # src/dfa.c:452
-#: lib/dfa.c:1209
+#: lib/dfa.c:1222
 #, fuzzy
 msgid "unfinished \\ escape"
 msgstr "Μη τερματισμένος χαρακτήρας διαφυγής \\"
 
-#: lib/dfa.c:1319
+#: lib/dfa.c:1332
 #, fuzzy
 msgid "? at start of expression"
 msgstr "Άκυρη κανονική έκφραση"
 
-#: lib/dfa.c:1331
+#: lib/dfa.c:1344
 #, fuzzy
 msgid "* at start of expression"
 msgstr "Άκυρη κανονική έκφραση"
 
-#: lib/dfa.c:1345
+#: lib/dfa.c:1358
 #, fuzzy
 msgid "+ at start of expression"
 msgstr "Άκυρη κανονική έκφραση"
 
-#: lib/dfa.c:1400
+#: lib/dfa.c:1413
 msgid "{...} at start of expression"
 msgstr ""
 
 # src/dfa.c:556 src/dfa.c:562 src/dfa.c:573 src/dfa.c:584
 # src/dfa.c:564 src/dfa.c:570 src/dfa.c:581 src/dfa.c:592
-#: lib/dfa.c:1403
+#: lib/dfa.c:1416
 #, fuzzy
 msgid "invalid content of \\{\\}"
 msgstr "μη έγκυρος μέγιστος μετρητής"
 
-#: lib/dfa.c:1405
+#: lib/dfa.c:1418
 #, fuzzy
 msgid "regular expression too big"
 msgstr "Υπερβολικά μεγάλη η κανονική έκφραση"
 
-#: lib/dfa.c:1555
+#: lib/dfa.c:1568
 msgid "stray \\ before unprintable character"
 msgstr ""
 
-#: lib/dfa.c:1557
+#: lib/dfa.c:1570
 msgid "stray \\ before white space"
 msgstr ""
 
-#: lib/dfa.c:1561
+#: lib/dfa.c:1574
 #, c-format
 msgid "stray \\ before %lc"
 msgstr ""
 
-#: lib/dfa.c:1562
+#: lib/dfa.c:1575
 msgid "stray \\"
 msgstr ""
 
 # src/dfa.c:841
 # src/dfa.c:849
-#: lib/dfa.c:1917
+#: lib/dfa.c:1925
 #, fuzzy
 msgid "unbalanced ("
 msgstr "Μη ισορροπημένο ("
 
 # src/dfa.c:962
 # src/dfa.c:970
-#: lib/dfa.c:2034
+#: lib/dfa.c:2042
 #, fuzzy
 msgid "no syntax specified"
 msgstr "Δεν ορίστηκε συντακτικό"
 
 # src/dfa.c:970
 # src/dfa.c:978
-#: lib/dfa.c:2045
+#: lib/dfa.c:2053
 #, fuzzy
 msgid "unbalanced )"
 msgstr "Μη ισορροπημένο )"
 
-#: lib/error.c:195
+#: lib/error.c:193
 msgid "Unknown system error"
 msgstr "Άγνωστο λάθος συστήματος"
 
@@ -210,7 +210,7 @@ msgstr "δεν είναι δυνατή η καταγραφή του τρέχον
 msgid "failed to return to initial working directory"
 msgstr "αποτυχία επιστροφής στον αρχικό φάκελο εργασίας"
 
-#: lib/xbinary-io.c:37
+#: lib/xbinary-io.c:36
 #, c-format
 msgid "failed to set file descriptor text/binary mode"
 msgstr ""
@@ -236,11 +236,11 @@ msgstr ""
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:355
+#: lib/quotearg.c:354
 msgid "`"
 msgstr "«"
 
-#: lib/quotearg.c:356
+#: lib/quotearg.c:355
 msgid "'"
 msgstr "»"
 
@@ -774,30 +774,36 @@ msgstr "άγνωστο είδος δυαδικών αρχείων"
 #, fuzzy
 msgid ""
 "Written by Mike Haertel and others; see\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 msgstr ""
 "άλλοι, κοιτάξτε τον σύνδεσμο <http://git.sv.gnu.org/cgit/grep.git/tree/"
 "AUTHORS>"
 
-#: src/grep.c:2934
+#: src/grep.c:2937
 #, c-format
 msgid "warning: GREP_COLOR='%s' is deprecated; use GREP_COLORS='mt=%s'"
 msgstr ""
 
-#: src/pcresearch.c:148
+#: src/pcresearch.c:92
+#, c-format
+msgid ""
+"\n"
+"grep -P uses PCRE2 %s\n"
+msgstr ""
+
+#: src/pcresearch.c:169
+msgid "-P supports only unibyte locales on this platform"
+msgstr ""
+
+#: src/pcresearch.c:171
 msgid "-P supports only unibyte and UTF-8 locales"
 msgstr ""
 
-#: src/pcresearch.c:162
+#: src/pcresearch.c:194
 msgid "the -P option only supports a single pattern"
 msgstr "Η επιλογή -P υποστηρίζει μόνο ένα υπόδειγμα"
 
-#: src/pcresearch.c:215
-#, fuzzy, c-format
-msgid "JIT internal error: %d"
-msgstr "εσωτερικό σφάλμα"
-
-#: src/pcresearch.c:252
+#: src/pcresearch.c:290
 msgid "exceeded PCRE's line length limit"
 msgstr ""
 
@@ -805,41 +811,45 @@ msgstr ""
 # src/kwset.c:190
 # src/grep.c:164 src/grep.c:181 src/grep.c:283 src/grep.c:338 src/kwset.c:184
 # src/kwset.c:190
-#: src/pcresearch.c:330
+#: src/pcresearch.c:368
 #, fuzzy, c-format
 msgid "%s: memory exhausted"
 msgstr "η μνήμη εξαντλήθηκε"
 
-#: src/pcresearch.c:333
+#: src/pcresearch.c:371
 #, c-format
 msgid "%s: exhausted PCRE JIT stack"
 msgstr ""
 
-#: src/pcresearch.c:337
+#: src/pcresearch.c:375
 #, c-format
 msgid "%s: exceeded PCRE's backtracking limit"
 msgstr ""
 
-#: src/pcresearch.c:342
+#: src/pcresearch.c:380
 #, c-format
 msgid "%s: exceeded PCRE's nested backtracking limit"
 msgstr ""
 
-#: src/pcresearch.c:346
+#: src/pcresearch.c:384
 #, c-format
 msgid "%s: PCRE detected recurse loop"
 msgstr ""
 
-#: src/pcresearch.c:351
+#: src/pcresearch.c:389
 #, c-format
 msgid "%s: exceeded PCRE's heap limit"
 msgstr ""
 
-#: src/pcresearch.c:360
+#: src/pcresearch.c:398
 #, fuzzy, c-format
 msgid "%s: internal PCRE error: %d"
 msgstr "εσωτερικό σφάλμα"
 
+#, fuzzy, c-format
+#~ msgid "JIT internal error: %d"
+#~ msgstr "εσωτερικό σφάλμα"
+
 #~ msgid "invalid %s%s argument '%s'"
 #~ msgstr "άκυρη %s%s επιλογή «%s»"
 
diff --git a/po/eo.gmo b/po/eo.gmo
index 4a85af57..4b2a0719 100644
Binary files a/po/eo.gmo and b/po/eo.gmo differ
diff --git a/po/eo.po b/po/eo.po
index a7450a42..1299b0f6 100644
--- a/po/eo.po
+++ b/po/eo.po
@@ -1,5 +1,5 @@
 # Esperanto translations for GNU grep.
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2013, 2014, 2015, 2016, 2018, 2020, 2021 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2013, 2014, 2015, 2016, 2018, 2020, 2021, 2023 Free Software Foundation, Inc.
 # This file is distributed under the same license as the grep package.
 #
 # “Jeder ist seines Glückes Schmied,
@@ -8,13 +8,13 @@
 # D. Dale Gulledge <dsplat@rochester.rr.com>, 1999.
 # Edmund GRIMLEY EVANS <edmundo@rano.org>, 2000-2009.
 # Benno Schulenberg <benno@vertaalt.nl>, 2013, 2014, 2015, 2016, 2018, 2020.
-# Felipe CASTRO <fefcas@gmail.com>, 2021.
+# Felipe CASTRO <fefcas@gmail.com>, 2021, 2023.
 msgid ""
 msgstr ""
-"Project-Id-Version: GNU grep 3.6.27\n"
+"Project-Id-Version: GNU grep 3.7.98\n"
 "Report-Msgid-Bugs-To: bug-grep@gnu.org\n"
-"POT-Creation-Date: 2022-09-02 23:52-0700\n"
-"PO-Revision-Date: 2021-08-10 21:36-0300\n"
+"POT-Creation-Date: 2023-05-13 01:14-0700\n"
+"PO-Revision-Date: 2023-01-08 15:22-0300\n"
 "Last-Translator: Felipe Castro <fefcas@gmail.com>\n"
 "Language-Team: Esperanto <translation-team-eo@lists.sourceforge.net>\n"
 "Language: eo\n"
@@ -25,105 +25,102 @@ msgstr ""
 "Plural-Forms: nplurals=2; plural=n != 1;\n"
 "X-Generator: Poedit 2.4.2\n"
 
-#: lib/argmatch.c:147
+#: lib/argmatch.c:145
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "nevalida argumento %s por %s"
 
-#: lib/argmatch.c:148
+#: lib/argmatch.c:146
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "ambigua argumento %s por %s"
 
-#: lib/argmatch.c:167 lib/argmatch.h:238
+#: lib/argmatch.c:165 lib/argmatch.h:242
 msgid "Valid arguments are:"
 msgstr "Validaj argumentoj estas:"
 
-#: lib/c-stack.c:187
+#: lib/c-stack.c:186
 msgid "program error"
 msgstr "programeraro"
 
-#: lib/c-stack.c:188
+#: lib/c-stack.c:187
 msgid "stack overflow"
 msgstr "staktroo"
 
-#: lib/closeout.c:122 src/grep.c:1346
+#: lib/closeout.c:121 src/grep.c:1346
 msgid "write error"
 msgstr "skrib-eraro"
 
-#: lib/dfa.c:894
+#: lib/dfa.c:897
 msgid "unbalanced ["
 msgstr "senpara ["
 
-#: lib/dfa.c:1015
+#: lib/dfa.c:1018
 msgid "invalid character class"
 msgstr "nevalida signoklaso"
 
-#: lib/dfa.c:1143
+#: lib/dfa.c:1146
 msgid "character class syntax is [[:space:]], not [:space:]"
 msgstr "sintakso de signoklaso estas ekzemple [[:spaco:]], ne [:spaco:]"
 
-#: lib/dfa.c:1209
+#: lib/dfa.c:1222
 msgid "unfinished \\ escape"
 msgstr "nefinita \\-eskapo"
 
-#: lib/dfa.c:1319
-#, fuzzy
+#: lib/dfa.c:1332
 msgid "? at start of expression"
-msgstr "Nevalida regulesprimo"
+msgstr "? ĉe komenco de esprimo"
 
-#: lib/dfa.c:1331
-#, fuzzy
+#: lib/dfa.c:1344
 msgid "* at start of expression"
-msgstr "Nevalida regulesprimo"
+msgstr "* ĉe komenco de esprimo"
 
-#: lib/dfa.c:1345
-#, fuzzy
+#: lib/dfa.c:1358
 msgid "+ at start of expression"
-msgstr "Nevalida regulesprimo"
+msgstr "+ ĉe komenco de esprimo"
 
-#: lib/dfa.c:1400
+#: lib/dfa.c:1413
 msgid "{...} at start of expression"
-msgstr ""
+msgstr "{...} ĉe komenco de esprimo"
 
-#: lib/dfa.c:1403
+#: lib/dfa.c:1416
 msgid "invalid content of \\{\\}"
 msgstr "nevalida enhavo de \\{\\}"
 
-#: lib/dfa.c:1405
+#: lib/dfa.c:1418
 msgid "regular expression too big"
 msgstr "regulesprimo tro grandas"
 
-#: lib/dfa.c:1555
+#: lib/dfa.c:1568
 msgid "stray \\ before unprintable character"
-msgstr ""
+msgstr "perdita \\ antaŭ neprintebla signo"
 
-#: lib/dfa.c:1557
+#: lib/dfa.c:1570
 msgid "stray \\ before white space"
-msgstr ""
+msgstr "perdita \\ before blankspaco"
 
-#: lib/dfa.c:1561
+#: lib/dfa.c:1574
 #, c-format
 msgid "stray \\ before %lc"
-msgstr ""
+msgstr "perdita \\ antaŭ ol %lc"
 
-#: lib/dfa.c:1562
+#: lib/dfa.c:1575
 msgid "stray \\"
-msgstr ""
+msgstr "perdita \\"
 
-#: lib/dfa.c:1917
+#: lib/dfa.c:1925
 msgid "unbalanced ("
 msgstr "senpara ("
 
-#: lib/dfa.c:2034
+#: lib/dfa.c:2042
 msgid "no syntax specified"
 msgstr "neniu sintakso indikatas"
 
-#: lib/dfa.c:2045
+#: lib/dfa.c:2053
 msgid "unbalanced )"
 msgstr "senpara )"
 
-#: lib/error.c:195
+#: lib/error.c:193
 msgid "Unknown system error"
 msgstr "Nekonata sistemeraro"
 
@@ -176,7 +173,7 @@ msgstr "ne eblas registri aktualan labordosierujon"
 msgid "failed to return to initial working directory"
 msgstr "malsukcesis reveni al komenca labordosierujo"
 
-#: lib/xbinary-io.c:37
+#: lib/xbinary-io.c:36
 #, c-format
 msgid "failed to set file descriptor text/binary mode"
 msgstr "malsukcesis agordi tekstan/duuman moduson de dosierpriaĵo"
@@ -202,11 +199,11 @@ msgstr "malsukcesis agordi tekstan/duuman moduson de dosierpriaĵo"
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:355
+#: lib/quotearg.c:354
 msgid "`"
 msgstr "«"
 
-#: lib/quotearg.c:356
+#: lib/quotearg.c:355
 msgid "'"
 msgstr "»"
 
@@ -447,9 +444,9 @@ msgid "General help using GNU software: <%s>\n"
 msgstr "Ĝenerala helpo por uzi GNU-programojn: <%s>\n"
 
 #: src/dfasearch.c:59
-#, fuzzy, c-format
+#, c-format
 msgid "warning: %s"
-msgstr "averto: %s: %s"
+msgstr "averto: %s"
 
 #: src/grep.c:656
 msgid "(standard input)"
@@ -741,70 +738,82 @@ msgid "unknown binary-files type"
 msgstr "nekonata ago por duumaj dosieroj"
 
 #: src/grep.c:2831
+#, fuzzy
 msgid ""
 "Written by Mike Haertel and others; see\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 msgstr ""
 "Verkita de Majk HERTEL (Mike Haertel) kaj aliuloj; vidu\n"
 "<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
 
-#: src/grep.c:2934
+#: src/grep.c:2937
 #, c-format
 msgid "warning: GREP_COLOR='%s' is deprecated; use GREP_COLORS='mt=%s'"
+msgstr "averto: GREP_COLOR='%s' estas evitinda; uzu GREP_COLORS='mt=%s'"
+
+#: src/pcresearch.c:92
+#, c-format
+msgid ""
+"\n"
+"grep -P uses PCRE2 %s\n"
 msgstr ""
 
-#: src/pcresearch.c:148
+#: src/pcresearch.c:169
+#, fuzzy
+msgid "-P supports only unibyte locales on this platform"
+msgstr "opcio «-P» subtenas nur unubajtajn kaj UTF-8-ajn lokaĵojn"
+
+#: src/pcresearch.c:171
 msgid "-P supports only unibyte and UTF-8 locales"
 msgstr "opcio «-P» subtenas nur unubajtajn kaj UTF-8-ajn lokaĵojn"
 
-#: src/pcresearch.c:162
+#: src/pcresearch.c:194
 msgid "the -P option only supports a single pattern"
 msgstr "opcio «-P» akceptas nur unuopan ŝablonon"
 
-#: src/pcresearch.c:215
-#, fuzzy, c-format
-msgid "JIT internal error: %d"
-msgstr "%s: interna eraro en PCRE: %d"
-
-#: src/pcresearch.c:252
+#: src/pcresearch.c:290
 msgid "exceeded PCRE's line length limit"
 msgstr "transpasiĝis linilongecan limon de PCRE"
 
-#: src/pcresearch.c:330
+#: src/pcresearch.c:368
 #, c-format
 msgid "%s: memory exhausted"
 msgstr "%s: mankas sufiĉa memoro"
 
-#: src/pcresearch.c:333
+#: src/pcresearch.c:371
 #, c-format
 msgid "%s: exhausted PCRE JIT stack"
 msgstr "%s: la PCRE-JIT-stako tute pleniĝis"
 
-#: src/pcresearch.c:337
+#: src/pcresearch.c:375
 #, c-format
 msgid "%s: exceeded PCRE's backtracking limit"
 msgstr "%s: transpasiĝis retroreferencan limon de PCRE"
 
-#: src/pcresearch.c:342
-#, fuzzy, c-format
+#: src/pcresearch.c:380
+#, c-format
 msgid "%s: exceeded PCRE's nested backtracking limit"
-msgstr "%s: transpasiĝis retroreferencan limon de PCRE"
+msgstr "%s: transpasiĝis nestita retroreferenca limo de PCRE"
 
-#: src/pcresearch.c:346
+#: src/pcresearch.c:384
 #, c-format
 msgid "%s: PCRE detected recurse loop"
-msgstr ""
+msgstr "%s: PCRE detektis rikuran iteracion"
 
-#: src/pcresearch.c:351
-#, fuzzy, c-format
+#: src/pcresearch.c:389
+#, c-format
 msgid "%s: exceeded PCRE's heap limit"
-msgstr "%s: transpasiĝis rikuran limon de PCRE"
+msgstr "%s: transpasiĝis memorarea limo de PCRE"
 
-#: src/pcresearch.c:360
+#: src/pcresearch.c:398
 #, c-format
 msgid "%s: internal PCRE error: %d"
 msgstr "%s: interna eraro en PCRE: %d"
 
+#, c-format
+#~ msgid "JIT internal error: %d"
+#~ msgstr "JIT interna eraro: %d"
+
 #~ msgid "failed to allocate memory for the PCRE JIT stack"
 #~ msgstr "mankas sufiĉa memoro por la PCRE-JIT-stako"
 
diff --git a/po/es.gmo b/po/es.gmo
index 8292cb23..09902fd7 100644
Binary files a/po/es.gmo and b/po/es.gmo differ
diff --git a/po/es.po b/po/es.po
index 983ee90b..d46ebfd2 100644
--- a/po/es.po
+++ b/po/es.po
@@ -9,7 +9,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: GNU grep 3.6.27\n"
 "Report-Msgid-Bugs-To: bug-grep@gnu.org\n"
-"POT-Creation-Date: 2022-09-02 23:52-0700\n"
+"POT-Creation-Date: 2023-05-13 01:14-0700\n"
 "PO-Revision-Date: 2022-04-07 09:00-0600\n"
 "Last-Translator: Alejandro Cendejas Tena <alex.cendejas@gmail.com>\n"
 "Language-Team: Spanish <es@tp.org.es>\n"
@@ -19,105 +19,105 @@ msgstr ""
 "Content-Transfer-Encoding: 8-bit\n"
 "X-Bugs: Report translation errors to the Language-Team address.\n"
 
-#: lib/argmatch.c:147
+#: lib/argmatch.c:145
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "argumento %s inválido %s"
 
-#: lib/argmatch.c:148
+#: lib/argmatch.c:146
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "argumento %s ambiguo para %s"
 
-#: lib/argmatch.c:167 lib/argmatch.h:238
+#: lib/argmatch.c:165 lib/argmatch.h:242
 msgid "Valid arguments are:"
 msgstr "Los argumentos válidos son:"
 
-#: lib/c-stack.c:187
+#: lib/c-stack.c:186
 msgid "program error"
 msgstr "error de programa"
 
-#: lib/c-stack.c:188
+#: lib/c-stack.c:187
 msgid "stack overflow"
 msgstr "desbordamiento de pila"
 
-#: lib/closeout.c:122 src/grep.c:1346
+#: lib/closeout.c:121 src/grep.c:1346
 msgid "write error"
 msgstr "error de escritura"
 
-#: lib/dfa.c:894
+#: lib/dfa.c:897
 msgid "unbalanced ["
 msgstr "[ desemparejado"
 
-#: lib/dfa.c:1015
+#: lib/dfa.c:1018
 msgid "invalid character class"
 msgstr "clase de caracteres inválida"
 
-#: lib/dfa.c:1143
+#: lib/dfa.c:1146
 msgid "character class syntax is [[:space:]], not [:space:]"
 msgstr "la sintaxis de la clase de caracteres es [[:space:]], no [:space:]"
 
-#: lib/dfa.c:1209
+#: lib/dfa.c:1222
 msgid "unfinished \\ escape"
 msgstr "secuencia de escape \\ sin terminar"
 
-#: lib/dfa.c:1319
+#: lib/dfa.c:1332
 #, fuzzy
 msgid "? at start of expression"
 msgstr "Expresión regular inválida"
 
-#: lib/dfa.c:1331
+#: lib/dfa.c:1344
 #, fuzzy
 msgid "* at start of expression"
 msgstr "Expresión regular inválida"
 
-#: lib/dfa.c:1345
+#: lib/dfa.c:1358
 #, fuzzy
 msgid "+ at start of expression"
 msgstr "Expresión regular inválida"
 
-#: lib/dfa.c:1400
+#: lib/dfa.c:1413
 msgid "{...} at start of expression"
 msgstr ""
 
-#: lib/dfa.c:1403
+#: lib/dfa.c:1416
 msgid "invalid content of \\{\\}"
 msgstr "contenido inválido de \\{\\}"
 
-#: lib/dfa.c:1405
+#: lib/dfa.c:1418
 msgid "regular expression too big"
 msgstr "la expresión regular es demasiado grande"
 
-#: lib/dfa.c:1555
+#: lib/dfa.c:1568
 msgid "stray \\ before unprintable character"
 msgstr ""
 
-#: lib/dfa.c:1557
+#: lib/dfa.c:1570
 msgid "stray \\ before white space"
 msgstr ""
 
-#: lib/dfa.c:1561
+#: lib/dfa.c:1574
 #, c-format
 msgid "stray \\ before %lc"
 msgstr ""
 
-#: lib/dfa.c:1562
+#: lib/dfa.c:1575
 msgid "stray \\"
 msgstr ""
 
-#: lib/dfa.c:1917
+#: lib/dfa.c:1925
 msgid "unbalanced ("
 msgstr "( desemparejado"
 
-#: lib/dfa.c:2034
+#: lib/dfa.c:2042
 msgid "no syntax specified"
 msgstr "no se ha especificado ninguna sintaxis"
 
-#: lib/dfa.c:2045
+#: lib/dfa.c:2053
 msgid "unbalanced )"
 msgstr ") desemparejado"
 
-#: lib/error.c:195
+#: lib/error.c:193
 msgid "Unknown system error"
 msgstr "Error del sistema desconocido"
 
@@ -170,7 +170,7 @@ msgstr "no se puede registrar el directorio de trabajo actual"
 msgid "failed to return to initial working directory"
 msgstr "fallo al volver al directorio de trabajo inicial"
 
-#: lib/xbinary-io.c:37
+#: lib/xbinary-io.c:36
 #, c-format
 msgid "failed to set file descriptor text/binary mode"
 msgstr "fallo al establecer el modo texto/binario en el descriptor de fichero"
@@ -196,11 +196,11 @@ msgstr "fallo al establecer el modo texto/binario en el descriptor de fichero"
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:355
+#: lib/quotearg.c:354
 msgid "`"
 msgstr "«"
 
-#: lib/quotearg.c:356
+#: lib/quotearg.c:355
 msgid "'"
 msgstr "»"
 
@@ -750,70 +750,82 @@ msgid "unknown binary-files type"
 msgstr "tipo binary-files desconocido"
 
 #: src/grep.c:2831
+#, fuzzy
 msgid ""
 "Written by Mike Haertel and others; see\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 msgstr ""
 "Escrito por Mike Haertel y otros; véase\n"
 "<http://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
 
-#: src/grep.c:2934
+#: src/grep.c:2937
 #, c-format
 msgid "warning: GREP_COLOR='%s' is deprecated; use GREP_COLORS='mt=%s'"
 msgstr ""
 
-#: src/pcresearch.c:148
+#: src/pcresearch.c:92
+#, c-format
+msgid ""
+"\n"
+"grep -P uses PCRE2 %s\n"
+msgstr ""
+
+#: src/pcresearch.c:169
+#, fuzzy
+msgid "-P supports only unibyte locales on this platform"
+msgstr "-P solo admite locales unibyte y UTF-8"
+
+#: src/pcresearch.c:171
 msgid "-P supports only unibyte and UTF-8 locales"
 msgstr "-P solo admite locales unibyte y UTF-8"
 
-#: src/pcresearch.c:162
+#: src/pcresearch.c:194
 msgid "the -P option only supports a single pattern"
 msgstr "la opción -P solamente admite un patrón"
 
-#: src/pcresearch.c:215
-#, fuzzy, c-format
-msgid "JIT internal error: %d"
-msgstr "error interno"
-
-#: src/pcresearch.c:252
+#: src/pcresearch.c:290
 msgid "exceeded PCRE's line length limit"
 msgstr "se ha excedido el límite de longitud de línea de las PCREs"
 
-#: src/pcresearch.c:330
+#: src/pcresearch.c:368
 #, c-format
 msgid "%s: memory exhausted"
 msgstr "%s: memoria agotada"
 
-#: src/pcresearch.c:333
+#: src/pcresearch.c:371
 #, c-format
 msgid "%s: exhausted PCRE JIT stack"
 msgstr "%s: se agotó la pila PCRE JIT"
 
-#: src/pcresearch.c:337
+#: src/pcresearch.c:375
 #, c-format
 msgid "%s: exceeded PCRE's backtracking limit"
 msgstr "%s: se ha excedido el límite de vuelta atrás de las PCREs"
 
-#: src/pcresearch.c:342
+#: src/pcresearch.c:380
 #, fuzzy, c-format
 msgid "%s: exceeded PCRE's nested backtracking limit"
 msgstr "%s: se ha excedido el límite de vuelta atrás de las PCREs"
 
-#: src/pcresearch.c:346
+#: src/pcresearch.c:384
 #, c-format
 msgid "%s: PCRE detected recurse loop"
 msgstr ""
 
-#: src/pcresearch.c:351
+#: src/pcresearch.c:389
 #, fuzzy, c-format
 msgid "%s: exceeded PCRE's heap limit"
 msgstr "%s: se ha excedido el límite de recursión de las PCREs"
 
-#: src/pcresearch.c:360
+#: src/pcresearch.c:398
 #, c-format
 msgid "%s: internal PCRE error: %d"
 msgstr "%s: error interno de PCRE: %d"
 
+#, fuzzy, c-format
+#~ msgid "JIT internal error: %d"
+#~ msgstr "error interno"
+
 #~ msgid "failed to allocate memory for the PCRE JIT stack"
 #~ msgstr "fallo al asignar memoria para la pila JIT de PCRE"
 
diff --git a/po/et.gmo b/po/et.gmo
index 52f7d002..f8323598 100644
Binary files a/po/et.gmo and b/po/et.gmo differ
diff --git a/po/et.po b/po/et.po
index f0a90162..0d778e03 100644
--- a/po/et.po
+++ b/po/et.po
@@ -1,14 +1,14 @@
 # This file is distributed under the same license as the grep package.
 # Estonian translations for grep
 # Copyright (C) 2000 Free Software Foundation, Inc.
-# Toomas Soome <tsoome@me.com>, 2022.
+# Toomas Soome <tsoome@me.com>, 2023.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: grep 3.7.98\n"
+"Project-Id-Version: grep 3.10.12\n"
 "Report-Msgid-Bugs-To: bug-grep@gnu.org\n"
-"POT-Creation-Date: 2022-09-02 23:52-0700\n"
-"PO-Revision-Date: 2022-07-03 20:27+0300\n"
+"POT-Creation-Date: 2023-05-13 01:14-0700\n"
+"PO-Revision-Date: 2023-04-21 18:13+0300\n"
 "Last-Translator: Toomas Soome <tsoome@me.com>\n"
 "Language-Team: Estonian <linux-ee@lists.eenet.ee>\n"
 "Language: et\n"
@@ -17,102 +17,102 @@ msgstr ""
 "Content-Transfer-Encoding: 8-bit\n"
 "X-Bugs: Report translation errors to the Language-Team address.\n"
 
-#: lib/argmatch.c:147
+#: lib/argmatch.c:145
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "vigane argument %s võtmele %s"
 
-#: lib/argmatch.c:148
+#: lib/argmatch.c:146
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "segane argument %s võtmele %s"
 
-#: lib/argmatch.c:167 lib/argmatch.h:238
+#: lib/argmatch.c:165 lib/argmatch.h:242
 msgid "Valid arguments are:"
 msgstr "Lubatud argumendid on:"
 
-#: lib/c-stack.c:187
+#: lib/c-stack.c:186
 msgid "program error"
 msgstr "programmi viga"
 
-#: lib/c-stack.c:188
+#: lib/c-stack.c:187
 msgid "stack overflow"
 msgstr "pinu ületäitumine"
 
-#: lib/closeout.c:122 src/grep.c:1346
+#: lib/closeout.c:121 src/grep.c:1346
 msgid "write error"
 msgstr "viga kirjutamisel"
 
-#: lib/dfa.c:894
+#: lib/dfa.c:897
 msgid "unbalanced ["
 msgstr "balanseerimata ["
 
-#: lib/dfa.c:1015
+#: lib/dfa.c:1018
 msgid "invalid character class"
 msgstr "vigane sümboliklass"
 
-#: lib/dfa.c:1143
+#: lib/dfa.c:1146
 msgid "character class syntax is [[:space:]], not [:space:]"
 msgstr "sümbolklassi süntaks on [[:space:]], mitte [:space:]"
 
-#: lib/dfa.c:1209
+#: lib/dfa.c:1222
 msgid "unfinished \\ escape"
 msgstr "lõpetamata \\ paojada"
 
-#: lib/dfa.c:1319
+#: lib/dfa.c:1332
 msgid "? at start of expression"
 msgstr "? avaldise alguses"
 
-#: lib/dfa.c:1331
+#: lib/dfa.c:1344
 msgid "* at start of expression"
 msgstr "* avaldise alguses"
 
-#: lib/dfa.c:1345
+#: lib/dfa.c:1358
 msgid "+ at start of expression"
 msgstr "+ avaldise alguses"
 
-#: lib/dfa.c:1400
+#: lib/dfa.c:1413
 msgid "{...} at start of expression"
 msgstr "{...} avaldise alguses"
 
-#: lib/dfa.c:1403
+#: lib/dfa.c:1416
 msgid "invalid content of \\{\\}"
 msgstr "vigane \\{\\} sisu"
 
-#: lib/dfa.c:1405
+#: lib/dfa.c:1418
 msgid "regular expression too big"
 msgstr "regulaaravaldis on liiga suur"
 
-#: lib/dfa.c:1555
+#: lib/dfa.c:1568
 msgid "stray \\ before unprintable character"
 msgstr "üksik \\ mitteprinditava sümboli ees"
 
-#: lib/dfa.c:1557
+#: lib/dfa.c:1570
 msgid "stray \\ before white space"
 msgstr "üksik \\ tühemiku ees"
 
-#: lib/dfa.c:1561
+#: lib/dfa.c:1574
 #, c-format
 msgid "stray \\ before %lc"
 msgstr "üksik \\ %lc ees"
 
-#: lib/dfa.c:1562
+#: lib/dfa.c:1575
 msgid "stray \\"
 msgstr "üksik \\"
 
-#: lib/dfa.c:1917
+#: lib/dfa.c:1925
 msgid "unbalanced ("
 msgstr "balanseerimata ("
 
-#: lib/dfa.c:2034
+#: lib/dfa.c:2042
 msgid "no syntax specified"
 msgstr "süntaksit pole määratud"
 
-#: lib/dfa.c:2045
+#: lib/dfa.c:2053
 msgid "unbalanced )"
 msgstr "balanseerimata )"
 
-#: lib/error.c:195
+#: lib/error.c:193
 msgid "Unknown system error"
 msgstr "Tundmatu süsteemi viga"
 
@@ -165,7 +165,7 @@ msgstr "ei õnnestu salvestada jooksvat töökataloogi"
 msgid "failed to return to initial working directory"
 msgstr "algsesse töökataloogi ei saa tagasi minna"
 
-#: lib/xbinary-io.c:37
+#: lib/xbinary-io.c:36
 #, c-format
 msgid "failed to set file descriptor text/binary mode"
 msgstr "failipideme tekst/binaar moodi muutmine ebaõnnestus"
@@ -191,11 +191,11 @@ msgstr "failipideme tekst/binaar moodi muutmine ebaõnnestus"
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:355
+#: lib/quotearg.c:354
 msgid "`"
 msgstr "`"
 
-#: lib/quotearg.c:356
+#: lib/quotearg.c:355
 msgid "'"
 msgstr "'"
 
@@ -722,64 +722,72 @@ msgstr "tundmatu kahendfailide tüüp"
 #: src/grep.c:2831
 msgid ""
 "Written by Mike Haertel and others; see\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 msgstr ""
 "Kirjutanud Mike Haertel ja teised; vaadake\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 
-#: src/grep.c:2934
+#: src/grep.c:2937
 #, c-format
 msgid "warning: GREP_COLOR='%s' is deprecated; use GREP_COLORS='mt=%s'"
 msgstr "hoiatus: GREP_COLOR='%s' on ebasoovitav; kasutage GREP_COLORS='mt=%s'"
 
-#: src/pcresearch.c:148
+#: src/pcresearch.c:92
+#, c-format
+msgid ""
+"\n"
+"grep -P uses PCRE2 %s\n"
+msgstr ""
+"\n"
+"grep -P kasutab PCRE2 %s\n"
+
+#: src/pcresearch.c:169
+msgid "-P supports only unibyte locales on this platform"
+msgstr "-P toetab ainult ühebaidilisi lokaate sellel platvormil"
+
+#: src/pcresearch.c:171
 msgid "-P supports only unibyte and UTF-8 locales"
 msgstr "-P toetab ainult ühebaidilisi ja UTF-8 lokaate"
 
-#: src/pcresearch.c:162
+#: src/pcresearch.c:194
 msgid "the -P option only supports a single pattern"
 msgstr "võti -P toetab ainult ühte mustrit"
 
-#: src/pcresearch.c:215
-#, c-format
-msgid "JIT internal error: %d"
-msgstr "JIT sisemine viga: %d"
-
-#: src/pcresearch.c:252
+#: src/pcresearch.c:290
 msgid "exceeded PCRE's line length limit"
 msgstr "PCRE rea pikkuse piirang on ületatud"
 
-#: src/pcresearch.c:330
+#: src/pcresearch.c:368
 #, c-format
 msgid "%s: memory exhausted"
 msgstr "%s: mälu on otsas"
 
-#: src/pcresearch.c:333
+#: src/pcresearch.c:371
 #, c-format
 msgid "%s: exhausted PCRE JIT stack"
 msgstr "%s: PCRE JIT pinu sai täis"
 
-#: src/pcresearch.c:337
+#: src/pcresearch.c:375
 #, c-format
 msgid "%s: exceeded PCRE's backtracking limit"
 msgstr "%s: PCRE tagasivaate piirang on ületatud"
 
-#: src/pcresearch.c:342
+#: src/pcresearch.c:380
 #, c-format
 msgid "%s: exceeded PCRE's nested backtracking limit"
 msgstr "%s: PCRE pesitsi tagasivaate piirang on ületatud"
 
-#: src/pcresearch.c:346
+#: src/pcresearch.c:384
 #, c-format
 msgid "%s: PCRE detected recurse loop"
 msgstr "%s: PCRE tuvastas rekursiooni tsükli"
 
-#: src/pcresearch.c:351
+#: src/pcresearch.c:389
 #, c-format
 msgid "%s: exceeded PCRE's heap limit"
 msgstr "%s: PCRE mälu piirang on ületatud"
 
-#: src/pcresearch.c:360
+#: src/pcresearch.c:398
 #, c-format
 msgid "%s: internal PCRE error: %d"
 msgstr "%s: sisemine PCRE viga: %d"
diff --git a/po/eu.po b/po/eu.po
index 38615b1d..90ee5448 100644
--- a/po/eu.po
+++ b/po/eu.po
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: grep 2.5.1a\n"
 "Report-Msgid-Bugs-To: bug-grep@gnu.org\n"
-"POT-Creation-Date: 2022-09-02 23:52-0700\n"
+"POT-Creation-Date: 2023-05-13 01:14-0700\n"
 "PO-Revision-Date: 2005-03-03 21:40+0100\n"
 "Last-Translator: Mikel Olasagasti <hey_neken@mundurat.net>\n"
 "Language-Team: Basque <translation-team-eu@lists.sourceforge.net>\n"
@@ -19,108 +19,108 @@ msgstr ""
 "X-Bugs: Report translation errors to the Language-Team address.\n"
 "Plural-Forms: nplurals=2; plural=(n == 1)\n"
 
-#: lib/argmatch.c:147
+#: lib/argmatch.c:145
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr ""
 
-#: lib/argmatch.c:148
+#: lib/argmatch.c:146
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr ""
 
-#: lib/argmatch.c:167 lib/argmatch.h:238
+#: lib/argmatch.c:165 lib/argmatch.h:242
 msgid "Valid arguments are:"
 msgstr ""
 
-#: lib/c-stack.c:187
+#: lib/c-stack.c:186
 msgid "program error"
 msgstr ""
 
-#: lib/c-stack.c:188
+#: lib/c-stack.c:187
 msgid "stack overflow"
 msgstr ""
 
-#: lib/closeout.c:122 src/grep.c:1346
+#: lib/closeout.c:121 src/grep.c:1346
 msgid "write error"
 msgstr ""
 
-#: lib/dfa.c:894
+#: lib/dfa.c:897
 #, fuzzy
 msgid "unbalanced ["
 msgstr "Parekatu gabeko ["
 
-#: lib/dfa.c:1015
+#: lib/dfa.c:1018
 msgid "invalid character class"
 msgstr ""
 
-#: lib/dfa.c:1143
+#: lib/dfa.c:1146
 msgid "character class syntax is [[:space:]], not [:space:]"
 msgstr ""
 
-#: lib/dfa.c:1209
+#: lib/dfa.c:1222
 #, fuzzy
 msgid "unfinished \\ escape"
 msgstr "Amaitu gabeko \\ eskapea"
 
-#: lib/dfa.c:1319
+#: lib/dfa.c:1332
 msgid "? at start of expression"
 msgstr ""
 
-#: lib/dfa.c:1331
+#: lib/dfa.c:1344
 msgid "* at start of expression"
 msgstr ""
 
-#: lib/dfa.c:1345
+#: lib/dfa.c:1358
 msgid "+ at start of expression"
 msgstr ""
 
-#: lib/dfa.c:1400
+#: lib/dfa.c:1413
 msgid "{...} at start of expression"
 msgstr ""
 
-#: lib/dfa.c:1403
+#: lib/dfa.c:1416
 #, fuzzy
 msgid "invalid content of \\{\\}"
 msgstr "baliogabeko gehienezko zenbaketa"
 
-#: lib/dfa.c:1405
+#: lib/dfa.c:1418
 msgid "regular expression too big"
 msgstr ""
 
-#: lib/dfa.c:1555
+#: lib/dfa.c:1568
 msgid "stray \\ before unprintable character"
 msgstr ""
 
-#: lib/dfa.c:1557
+#: lib/dfa.c:1570
 msgid "stray \\ before white space"
 msgstr ""
 
-#: lib/dfa.c:1561
+#: lib/dfa.c:1574
 #, c-format
 msgid "stray \\ before %lc"
 msgstr ""
 
-#: lib/dfa.c:1562
+#: lib/dfa.c:1575
 msgid "stray \\"
 msgstr ""
 
-#: lib/dfa.c:1917
+#: lib/dfa.c:1925
 #, fuzzy
 msgid "unbalanced ("
 msgstr "Parekatu gabeko ("
 
-#: lib/dfa.c:2034
+#: lib/dfa.c:2042
 #, fuzzy
 msgid "no syntax specified"
 msgstr "Ez da sintaxirik zehaztu"
 
-#: lib/dfa.c:2045
+#: lib/dfa.c:2053
 #, fuzzy
 msgid "unbalanced )"
 msgstr "Parekatu gabeko )"
 
-#: lib/error.c:195
+#: lib/error.c:193
 msgid "Unknown system error"
 msgstr "Sistemaren errore ezezaguna"
 
@@ -173,7 +173,7 @@ msgstr ""
 msgid "failed to return to initial working directory"
 msgstr ""
 
-#: lib/xbinary-io.c:37
+#: lib/xbinary-io.c:36
 #, c-format
 msgid "failed to set file descriptor text/binary mode"
 msgstr ""
@@ -199,11 +199,11 @@ msgstr ""
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:355
+#: lib/quotearg.c:354
 msgid "`"
 msgstr "`"
 
-#: lib/quotearg.c:356
+#: lib/quotearg.c:355
 msgid "'"
 msgstr "'"
 
@@ -682,63 +682,69 @@ msgstr "fitxategi-binario moeta ezezaguna"
 #: src/grep.c:2831
 msgid ""
 "Written by Mike Haertel and others; see\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 msgstr ""
 
-#: src/grep.c:2934
+#: src/grep.c:2937
 #, c-format
 msgid "warning: GREP_COLOR='%s' is deprecated; use GREP_COLORS='mt=%s'"
 msgstr ""
 
-#: src/pcresearch.c:148
+#: src/pcresearch.c:92
+#, c-format
+msgid ""
+"\n"
+"grep -P uses PCRE2 %s\n"
+msgstr ""
+
+#: src/pcresearch.c:169
+msgid "-P supports only unibyte locales on this platform"
+msgstr ""
+
+#: src/pcresearch.c:171
 msgid "-P supports only unibyte and UTF-8 locales"
 msgstr ""
 
-#: src/pcresearch.c:162
+#: src/pcresearch.c:194
 #, fuzzy
 msgid "the -P option only supports a single pattern"
 msgstr "-P aukerak ez du euskarririk"
 
-#: src/pcresearch.c:215
-#, c-format
-msgid "JIT internal error: %d"
-msgstr ""
-
-#: src/pcresearch.c:252
+#: src/pcresearch.c:290
 msgid "exceeded PCRE's line length limit"
 msgstr ""
 
-#: src/pcresearch.c:330
+#: src/pcresearch.c:368
 #, fuzzy, c-format
 msgid "%s: memory exhausted"
 msgstr "memoria agortuta"
 
-#: src/pcresearch.c:333
+#: src/pcresearch.c:371
 #, c-format
 msgid "%s: exhausted PCRE JIT stack"
 msgstr ""
 
-#: src/pcresearch.c:337
+#: src/pcresearch.c:375
 #, c-format
 msgid "%s: exceeded PCRE's backtracking limit"
 msgstr ""
 
-#: src/pcresearch.c:342
+#: src/pcresearch.c:380
 #, c-format
 msgid "%s: exceeded PCRE's nested backtracking limit"
 msgstr ""
 
-#: src/pcresearch.c:346
+#: src/pcresearch.c:384
 #, c-format
 msgid "%s: PCRE detected recurse loop"
 msgstr ""
 
-#: src/pcresearch.c:351
+#: src/pcresearch.c:389
 #, c-format
 msgid "%s: exceeded PCRE's heap limit"
 msgstr ""
 
-#: src/pcresearch.c:360
+#: src/pcresearch.c:398
 #, c-format
 msgid "%s: internal PCRE error: %d"
 msgstr ""
diff --git a/po/fi.gmo b/po/fi.gmo
index 0320e1b4..0b9f089d 100644
Binary files a/po/fi.gmo and b/po/fi.gmo differ
diff --git a/po/fi.po b/po/fi.po
index 24c6540e..74268799 100644
--- a/po/fi.po
+++ b/po/fi.po
@@ -9,7 +9,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: grep 3.7.98\n"
 "Report-Msgid-Bugs-To: bug-grep@gnu.org\n"
-"POT-Creation-Date: 2022-09-02 23:52-0700\n"
+"POT-Creation-Date: 2023-05-13 01:14-0700\n"
 "PO-Revision-Date: 2022-07-03 21:37+0300\n"
 "Last-Translator: Lauri Nurmi <lanurmi@iki.fi>\n"
 "Language-Team: Finnish <translation-team-fi@lists.sourceforge.net>\n"
@@ -21,102 +21,102 @@ msgstr ""
 "X-Bugs: Report translation errors to the Language-Team address.\n"
 "X-Generator: Poedit 3.0.1\n"
 
-#: lib/argmatch.c:147
+#: lib/argmatch.c:145
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "virheellinen argumentti %s kohteelle %s"
 
-#: lib/argmatch.c:148
+#: lib/argmatch.c:146
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "monimerkityksellinen argumentti %s kohteelle %s"
 
-#: lib/argmatch.c:167 lib/argmatch.h:238
+#: lib/argmatch.c:165 lib/argmatch.h:242
 msgid "Valid arguments are:"
 msgstr "Kelvolliset argumentit ovat:"
 
-#: lib/c-stack.c:187
+#: lib/c-stack.c:186
 msgid "program error"
 msgstr "ohjelmavirhe"
 
-#: lib/c-stack.c:188
+#: lib/c-stack.c:187
 msgid "stack overflow"
 msgstr "pinon ylivuoto"
 
-#: lib/closeout.c:122 src/grep.c:1346
+#: lib/closeout.c:121 src/grep.c:1346
 msgid "write error"
 msgstr "kirjoitusvirhe"
 
-#: lib/dfa.c:894
+#: lib/dfa.c:897
 msgid "unbalanced ["
 msgstr "pariton ["
 
-#: lib/dfa.c:1015
+#: lib/dfa.c:1018
 msgid "invalid character class"
 msgstr "virheellinen merkkiluokka"
 
-#: lib/dfa.c:1143
+#: lib/dfa.c:1146
 msgid "character class syntax is [[:space:]], not [:space:]"
 msgstr "merkkiluokkasyntaksi on [[:space:]], ei [:space:]"
 
-#: lib/dfa.c:1209
+#: lib/dfa.c:1222
 msgid "unfinished \\ escape"
 msgstr "keskeneräinen \\-ohjaussarja"
 
-#: lib/dfa.c:1319
+#: lib/dfa.c:1332
 msgid "? at start of expression"
 msgstr "? lausekkeen alussa"
 
-#: lib/dfa.c:1331
+#: lib/dfa.c:1344
 msgid "* at start of expression"
 msgstr "* lausekkeen alussa"
 
-#: lib/dfa.c:1345
+#: lib/dfa.c:1358
 msgid "+ at start of expression"
 msgstr "+ lausekkeen alussa"
 
-#: lib/dfa.c:1400
+#: lib/dfa.c:1413
 msgid "{...} at start of expression"
 msgstr "? lausekkeen alussa"
 
-#: lib/dfa.c:1403
+#: lib/dfa.c:1416
 msgid "invalid content of \\{\\}"
 msgstr "virheellinen \\{\\}:n sisältö"
 
-#: lib/dfa.c:1405
+#: lib/dfa.c:1418
 msgid "regular expression too big"
 msgstr "säännöllinen lauseke on liian suuri"
 
-#: lib/dfa.c:1555
+#: lib/dfa.c:1568
 msgid "stray \\ before unprintable character"
 msgstr "harhautunut \\ ennen ei-tulostuvaa merkkiä"
 
-#: lib/dfa.c:1557
+#: lib/dfa.c:1570
 msgid "stray \\ before white space"
 msgstr "harhautunut \\ ennen tyhjettä"
 
-#: lib/dfa.c:1561
+#: lib/dfa.c:1574
 #, c-format
 msgid "stray \\ before %lc"
 msgstr "harhautunut \\ ennen merkkiä %lc"
 
-#: lib/dfa.c:1562
+#: lib/dfa.c:1575
 msgid "stray \\"
 msgstr "harhautunut \\"
 
-#: lib/dfa.c:1917
+#: lib/dfa.c:1925
 msgid "unbalanced ("
 msgstr "pariton ("
 
-#: lib/dfa.c:2034
+#: lib/dfa.c:2042
 msgid "no syntax specified"
 msgstr "syntaksia ei ole määritelty"
 
-#: lib/dfa.c:2045
+#: lib/dfa.c:2053
 msgid "unbalanced )"
 msgstr "pariton )"
 
-#: lib/error.c:195
+#: lib/error.c:193
 msgid "Unknown system error"
 msgstr "Tuntematon järjestelmävirhe"
 
@@ -169,7 +169,7 @@ msgstr "nykyisen työhakemiston kirjaaminen ei onnistu"
 msgid "failed to return to initial working directory"
 msgstr "palaaminen alkuperäiseen työhakemistoon epäonnistui"
 
-#: lib/xbinary-io.c:37
+#: lib/xbinary-io.c:36
 #, c-format
 msgid "failed to set file descriptor text/binary mode"
 msgstr "tiedostokahvan teksti-/binääritilan asettaminen epäonnistui"
@@ -195,11 +195,11 @@ msgstr "tiedostokahvan teksti-/binääritilan asettaminen epäonnistui"
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:355
+#: lib/quotearg.c:354
 msgid "`"
 msgstr "”"
 
-#: lib/quotearg.c:356
+#: lib/quotearg.c:355
 msgid "'"
 msgstr "”"
 
@@ -730,70 +730,82 @@ msgid "unknown binary-files type"
 msgstr "tuntematon binääritiedostojen tyyppi"
 
 #: src/grep.c:2831
+#, fuzzy
 msgid ""
 "Written by Mike Haertel and others; see\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 msgstr ""
 "Kirjoittaneet Mike Haertel ja muut; ks.\n"
 "<http://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
 
-#: src/grep.c:2934
+#: src/grep.c:2937
 #, c-format
 msgid "warning: GREP_COLOR='%s' is deprecated; use GREP_COLORS='mt=%s'"
 msgstr "varoitus: GREP_COLOR='%s' on vanhentunut; käytä GREP_COLORS='mt=%s'"
 
-#: src/pcresearch.c:148
+#: src/pcresearch.c:92
+#, c-format
+msgid ""
+"\n"
+"grep -P uses PCRE2 %s\n"
+msgstr ""
+
+#: src/pcresearch.c:169
+#, fuzzy
+msgid "-P supports only unibyte locales on this platform"
+msgstr "-P tukee vain yksitavu- ja UTF-8-maa-asetustoja"
+
+#: src/pcresearch.c:171
 msgid "-P supports only unibyte and UTF-8 locales"
 msgstr "-P tukee vain yksitavu- ja UTF-8-maa-asetustoja"
 
-#: src/pcresearch.c:162
+#: src/pcresearch.c:194
 msgid "the -P option only supports a single pattern"
 msgstr "valitsin -P tukee vain yhtä hahmoa"
 
-#: src/pcresearch.c:215
-#, c-format
-msgid "JIT internal error: %d"
-msgstr "JIT:n sisäinen virhe: %d"
-
-#: src/pcresearch.c:252
+#: src/pcresearch.c:290
 msgid "exceeded PCRE's line length limit"
 msgstr "ylitettiin PCRE:n rivipituusraja"
 
-#: src/pcresearch.c:330
+#: src/pcresearch.c:368
 #, c-format
 msgid "%s: memory exhausted"
 msgstr "%s: muisti loppui"
 
-#: src/pcresearch.c:333
+#: src/pcresearch.c:371
 #, c-format
 msgid "%s: exhausted PCRE JIT stack"
 msgstr "%s: PCRE JIT -pino täyttyi"
 
-#: src/pcresearch.c:337
+#: src/pcresearch.c:375
 #, c-format
 msgid "%s: exceeded PCRE's backtracking limit"
 msgstr "%s: ylitettiin PCRE:n paluujäljitysraja"
 
-#: src/pcresearch.c:342
+#: src/pcresearch.c:380
 #, c-format
 msgid "%s: exceeded PCRE's nested backtracking limit"
 msgstr "%s: ylitettiin PCRE:n sisäkkäinen paluujäljitysraja"
 
-#: src/pcresearch.c:346
+#: src/pcresearch.c:384
 #, c-format
 msgid "%s: PCRE detected recurse loop"
 msgstr "%s: PCRE havaitsi rekursiosilmukan"
 
-#: src/pcresearch.c:351
+#: src/pcresearch.c:389
 #, c-format
 msgid "%s: exceeded PCRE's heap limit"
 msgstr "%s: ylitettiin PCRE:n kekoraja"
 
-#: src/pcresearch.c:360
+#: src/pcresearch.c:398
 #, c-format
 msgid "%s: internal PCRE error: %d"
 msgstr "%s: sisäinen PCRE-virhe: %d"
 
+#, c-format
+#~ msgid "JIT internal error: %d"
+#~ msgstr "JIT:n sisäinen virhe: %d"
+
 #~ msgid "failed to allocate memory for the PCRE JIT stack"
 #~ msgstr "muistin varaaminen PCRE JIT -pinolle epäonnistui"
 
diff --git a/po/fr.gmo b/po/fr.gmo
index 56ab961f..5cbe121b 100644
Binary files a/po/fr.gmo and b/po/fr.gmo differ
diff --git a/po/fr.po b/po/fr.po
index e89c2218..907255d4 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -12,7 +12,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: GNU grep 3.7.98\n"
 "Report-Msgid-Bugs-To: bug-grep@gnu.org\n"
-"POT-Creation-Date: 2022-09-02 23:52-0700\n"
+"POT-Creation-Date: 2023-05-13 01:14-0700\n"
 "PO-Revision-Date: 2022-07-05 00:28+0200\n"
 "Last-Translator: Stéphane Aulery <lkppo@free.fr>\n"
 "Language-Team: French <traduc@traduc.org>\n"
@@ -24,102 +24,102 @@ msgstr ""
 "Plural-Forms: nplurals=2; plural=(n > 1);\n"
 "X-Generator: Poedit 2.4.2\n"
 
-#: lib/argmatch.c:147
+#: lib/argmatch.c:145
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "argument %s incorrect pour %s"
 
-#: lib/argmatch.c:148
+#: lib/argmatch.c:146
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "argument %s ambigu pour %s"
 
-#: lib/argmatch.c:167 lib/argmatch.h:238
+#: lib/argmatch.c:165 lib/argmatch.h:242
 msgid "Valid arguments are:"
 msgstr "Les arguments valables sont :"
 
-#: lib/c-stack.c:187
+#: lib/c-stack.c:186
 msgid "program error"
 msgstr "erreur du programme"
 
-#: lib/c-stack.c:188
+#: lib/c-stack.c:187
 msgid "stack overflow"
 msgstr "débordement de pile"
 
-#: lib/closeout.c:122 src/grep.c:1346
+#: lib/closeout.c:121 src/grep.c:1346
 msgid "write error"
 msgstr "erreur d'écriture"
 
-#: lib/dfa.c:894
+#: lib/dfa.c:897
 msgid "unbalanced ["
 msgstr "[ non apparié"
 
-#: lib/dfa.c:1015
+#: lib/dfa.c:1018
 msgid "invalid character class"
 msgstr "classe de caractères incorrecte"
 
-#: lib/dfa.c:1143
+#: lib/dfa.c:1146
 msgid "character class syntax is [[:space:]], not [:space:]"
 msgstr "la syntaxe d'une classe de caractères est [[:space:]], pas [:space:]"
 
-#: lib/dfa.c:1209
+#: lib/dfa.c:1222
 msgid "unfinished \\ escape"
 msgstr "séquence d'échappement \\ non terminée"
 
-#: lib/dfa.c:1319
+#: lib/dfa.c:1332
 msgid "? at start of expression"
 msgstr "? au début de l'expression"
 
-#: lib/dfa.c:1331
+#: lib/dfa.c:1344
 msgid "* at start of expression"
 msgstr "* au début de l'expression"
 
-#: lib/dfa.c:1345
+#: lib/dfa.c:1358
 msgid "+ at start of expression"
 msgstr "+ au début de l'expression"
 
-#: lib/dfa.c:1400
+#: lib/dfa.c:1413
 msgid "{...} at start of expression"
 msgstr "{...} au début de l'expression"
 
-#: lib/dfa.c:1403
+#: lib/dfa.c:1416
 msgid "invalid content of \\{\\}"
 msgstr "contenu de \\{\\} incorrect"
 
-#: lib/dfa.c:1405
+#: lib/dfa.c:1418
 msgid "regular expression too big"
 msgstr "expression rationnelle trop grande"
 
-#: lib/dfa.c:1555
+#: lib/dfa.c:1568
 msgid "stray \\ before unprintable character"
 msgstr "\\ surnuméraire avant un caractère non imprimable"
 
-#: lib/dfa.c:1557
+#: lib/dfa.c:1570
 msgid "stray \\ before white space"
 msgstr "\\ surnuméraire avant un espace"
 
-#: lib/dfa.c:1561
+#: lib/dfa.c:1574
 #, c-format
 msgid "stray \\ before %lc"
 msgstr "\\ surnuméraire avant %lc"
 
-#: lib/dfa.c:1562
+#: lib/dfa.c:1575
 msgid "stray \\"
 msgstr "\\ surnuméraire"
 
-#: lib/dfa.c:1917
+#: lib/dfa.c:1925
 msgid "unbalanced ("
 msgstr "( non appariée"
 
-#: lib/dfa.c:2034
+#: lib/dfa.c:2042
 msgid "no syntax specified"
 msgstr "aucune syntaxe indiquée"
 
-#: lib/dfa.c:2045
+#: lib/dfa.c:2053
 msgid "unbalanced )"
 msgstr ") non appariée"
 
-#: lib/error.c:195
+#: lib/error.c:193
 msgid "Unknown system error"
 msgstr "Erreur système inconnue"
 
@@ -172,7 +172,7 @@ msgstr "impossible d'enregistrer le répertoire de travail actuel"
 msgid "failed to return to initial working directory"
 msgstr "échec de retour au répertoire initial de travail"
 
-#: lib/xbinary-io.c:37
+#: lib/xbinary-io.c:36
 #, c-format
 msgid "failed to set file descriptor text/binary mode"
 msgstr ""
@@ -199,11 +199,11 @@ msgstr ""
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:355
+#: lib/quotearg.c:354
 msgid "`"
 msgstr "« "
 
-#: lib/quotearg.c:356
+#: lib/quotearg.c:355
 msgid "'"
 msgstr " »"
 
@@ -744,71 +744,83 @@ msgid "unknown binary-files type"
 msgstr "type de fichier binaire inconnu"
 
 #: src/grep.c:2831
+#, fuzzy
 msgid ""
 "Written by Mike Haertel and others; see\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 msgstr ""
 "Écrit par Mike Haertel et d'autres ; voir\n"
 "<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
 
-#: src/grep.c:2934
+#: src/grep.c:2937
 #, c-format
 msgid "warning: GREP_COLOR='%s' is deprecated; use GREP_COLORS='mt=%s'"
 msgstr ""
 "attention : GREP_COLOR='%s' est obsolète ; utiliser GREP_COLORS='mt=%s'"
 
-#: src/pcresearch.c:148
+#: src/pcresearch.c:92
+#, c-format
+msgid ""
+"\n"
+"grep -P uses PCRE2 %s\n"
+msgstr ""
+
+#: src/pcresearch.c:169
+#, fuzzy
+msgid "-P supports only unibyte locales on this platform"
+msgstr "-P ne fonctionne qu’avec des paramètres régionaux monooctets ou UTF-8"
+
+#: src/pcresearch.c:171
 msgid "-P supports only unibyte and UTF-8 locales"
 msgstr "-P ne fonctionne qu’avec des paramètres régionaux monooctets ou UTF-8"
 
-#: src/pcresearch.c:162
+#: src/pcresearch.c:194
 msgid "the -P option only supports a single pattern"
 msgstr "l'option -P ne permet d'utiliser qu'un seul motif"
 
-#: src/pcresearch.c:215
-#, c-format
-msgid "JIT internal error: %d"
-msgstr "erreur JIT interne : %d"
-
-#: src/pcresearch.c:252
+#: src/pcresearch.c:290
 msgid "exceeded PCRE's line length limit"
 msgstr "limite de longueur de ligne des PCRE dépassée"
 
-#: src/pcresearch.c:330
+#: src/pcresearch.c:368
 #, c-format
 msgid "%s: memory exhausted"
 msgstr "%s : mémoire épuisée"
 
-#: src/pcresearch.c:333
+#: src/pcresearch.c:371
 #, c-format
 msgid "%s: exhausted PCRE JIT stack"
 msgstr "%s : pile PCRE JIT épuisée"
 
-#: src/pcresearch.c:337
+#: src/pcresearch.c:375
 #, c-format
 msgid "%s: exceeded PCRE's backtracking limit"
 msgstr "%s : limite de retour arrière des PCRE dépassée"
 
-#: src/pcresearch.c:342
+#: src/pcresearch.c:380
 #, c-format
 msgid "%s: exceeded PCRE's nested backtracking limit"
 msgstr "%s : limite de retour arrière imbriqués des PCRE dépassée"
 
-#: src/pcresearch.c:346
+#: src/pcresearch.c:384
 #, c-format
 msgid "%s: PCRE detected recurse loop"
 msgstr "%s : PCRE a détecté une boucle de récursion"
 
-#: src/pcresearch.c:351
+#: src/pcresearch.c:389
 #, c-format
 msgid "%s: exceeded PCRE's heap limit"
 msgstr "%s : limite du tas PCRE dépassée"
 
-#: src/pcresearch.c:360
+#: src/pcresearch.c:398
 #, c-format
 msgid "%s: internal PCRE error: %d"
 msgstr "%s : erreur PCRE interne : %d"
 
+#, c-format
+#~ msgid "JIT internal error: %d"
+#~ msgstr "erreur JIT interne : %d"
+
 #~ msgid "failed to allocate memory for the PCRE JIT stack"
 #~ msgstr "échec d’allocation mémoire pour la pile JIT PCRE"
 
diff --git a/po/ga.po b/po/ga.po
index 1e7d406f..2b0add5a 100644
--- a/po/ga.po
+++ b/po/ga.po
@@ -6,7 +6,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: grep 3.0.23-b00\n"
 "Report-Msgid-Bugs-To: bug-grep@gnu.org\n"
-"POT-Creation-Date: 2022-09-02 23:52-0700\n"
+"POT-Creation-Date: 2023-05-13 01:14-0700\n"
 "PO-Revision-Date: 2017-06-25 05:18-0600\n"
 "Last-Translator: Kevin Scannell <kscanne@gmail.com>\n"
 "Language-Team: Irish <gaeilge-gnulinux@lists.sourceforge.net>\n"
@@ -16,106 +16,106 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "X-Bugs: Report translation errors to the Language-Team address.\n"
 
-#: lib/argmatch.c:147
+#: lib/argmatch.c:145
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "argóint neamhbhailí %s le haghaidh %s"
 
-#: lib/argmatch.c:148
+#: lib/argmatch.c:146
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "argóint dhébhríoch %s le haghaidh %s"
 
-#: lib/argmatch.c:167 lib/argmatch.h:238
+#: lib/argmatch.c:165 lib/argmatch.h:242
 msgid "Valid arguments are:"
 msgstr "Na hargóintí bailí:"
 
-#: lib/c-stack.c:187
+#: lib/c-stack.c:186
 msgid "program error"
 msgstr ""
 
-#: lib/c-stack.c:188
+#: lib/c-stack.c:187
 msgid "stack overflow"
 msgstr ""
 
-#: lib/closeout.c:122 src/grep.c:1346
+#: lib/closeout.c:121 src/grep.c:1346
 msgid "write error"
 msgstr "earráid sa scríobh"
 
-#: lib/dfa.c:894
+#: lib/dfa.c:897
 msgid "unbalanced ["
 msgstr "[ corr"
 
-#: lib/dfa.c:1015
+#: lib/dfa.c:1018
 msgid "invalid character class"
 msgstr "Aicme charachtar neamhbhailí"
 
-#: lib/dfa.c:1143
+#: lib/dfa.c:1146
 msgid "character class syntax is [[:space:]], not [:space:]"
 msgstr ""
 "Is é [[:space:]] an chomhréir cheart in aicme carachtar, in ionad [:space:]"
 
-#: lib/dfa.c:1209
+#: lib/dfa.c:1222
 msgid "unfinished \\ escape"
 msgstr "Seicheamh éalúcháin \\ gan chríochnú"
 
-#: lib/dfa.c:1319
+#: lib/dfa.c:1332
 #, fuzzy
 msgid "? at start of expression"
 msgstr "Slonn ionadaíochta neamhbhailí"
 
-#: lib/dfa.c:1331
+#: lib/dfa.c:1344
 #, fuzzy
 msgid "* at start of expression"
 msgstr "Slonn ionadaíochta neamhbhailí"
 
-#: lib/dfa.c:1345
+#: lib/dfa.c:1358
 #, fuzzy
 msgid "+ at start of expression"
 msgstr "Slonn ionadaíochta neamhbhailí"
 
-#: lib/dfa.c:1400
+#: lib/dfa.c:1413
 msgid "{...} at start of expression"
 msgstr ""
 
-#: lib/dfa.c:1403
+#: lib/dfa.c:1416
 msgid "invalid content of \\{\\}"
 msgstr "ábhar neamhbhailí laistigh de \\{\\}"
 
-#: lib/dfa.c:1405
+#: lib/dfa.c:1418
 msgid "regular expression too big"
 msgstr "slonn ionadaíochta rómhór"
 
-#: lib/dfa.c:1555
+#: lib/dfa.c:1568
 msgid "stray \\ before unprintable character"
 msgstr ""
 
-#: lib/dfa.c:1557
+#: lib/dfa.c:1570
 msgid "stray \\ before white space"
 msgstr ""
 
-#: lib/dfa.c:1561
+#: lib/dfa.c:1574
 #, c-format
 msgid "stray \\ before %lc"
 msgstr ""
 
-#: lib/dfa.c:1562
+#: lib/dfa.c:1575
 msgid "stray \\"
 msgstr ""
 
-#: lib/dfa.c:1917
+#: lib/dfa.c:1925
 msgid "unbalanced ("
 msgstr "( corr"
 
-#: lib/dfa.c:2034
+#: lib/dfa.c:2042
 msgid "no syntax specified"
 msgstr "níor sonraíodh aon chomhréir"
 
-#: lib/dfa.c:2045
+#: lib/dfa.c:2053
 msgid "unbalanced )"
 msgstr ") corr"
 
-#: lib/error.c:195
+#: lib/error.c:193
 msgid "Unknown system error"
 msgstr "Earráid anaithnid chórais"
 
@@ -168,7 +168,7 @@ msgstr "ní féidir an chomhadlann oibre a fháil"
 msgid "failed to return to initial working directory"
 msgstr "níorbh fhéidir filleadh ar an mbunchomhadlann oibre"
 
-#: lib/xbinary-io.c:37
+#: lib/xbinary-io.c:36
 #, c-format
 msgid "failed to set file descriptor text/binary mode"
 msgstr "níorbh fhéidir mód téacs/dénártha an tuairisceora comhaid a shocrú"
@@ -194,11 +194,11 @@ msgstr "níorbh fhéidir mód téacs/dénártha an tuairisceora comhaid a shocr
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:355
+#: lib/quotearg.c:354
 msgid "`"
 msgstr "`"
 
-#: lib/quotearg.c:356
+#: lib/quotearg.c:355
 msgid "'"
 msgstr "'"
 
@@ -728,67 +728,78 @@ msgstr "cineál anaithnid de chomhad dénártha"
 #, fuzzy
 msgid ""
 "Written by Mike Haertel and others; see\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 msgstr ""
 "agus daoine eile, féach ar <http://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>"
 
-#: src/grep.c:2934
+#: src/grep.c:2937
 #, c-format
 msgid "warning: GREP_COLOR='%s' is deprecated; use GREP_COLORS='mt=%s'"
 msgstr ""
 
-#: src/pcresearch.c:148
+#: src/pcresearch.c:92
+#, c-format
+msgid ""
+"\n"
+"grep -P uses PCRE2 %s\n"
+msgstr ""
+
+#: src/pcresearch.c:169
+#, fuzzy
+msgid "-P supports only unibyte locales on this platform"
+msgstr "Tacaíonn an rogha -P logchaighdeáin aonbhearta agus UTF-8 amháin"
+
+#: src/pcresearch.c:171
 msgid "-P supports only unibyte and UTF-8 locales"
 msgstr "Tacaíonn an rogha -P logchaighdeáin aonbhearta agus UTF-8 amháin"
 
-#: src/pcresearch.c:162
+#: src/pcresearch.c:194
 msgid "the -P option only supports a single pattern"
 msgstr "Ní thacaíonn rogha -P ach le patrún amháin"
 
-#: src/pcresearch.c:215
-#, fuzzy, c-format
-msgid "JIT internal error: %d"
-msgstr "earráid inmheánach"
-
-#: src/pcresearch.c:252
+#: src/pcresearch.c:290
 msgid "exceeded PCRE's line length limit"
 msgstr "sáraíodh uasfhad líne PCRE"
 
-#: src/pcresearch.c:330
+#: src/pcresearch.c:368
 #, fuzzy, c-format
 msgid "%s: memory exhausted"
 msgstr "cuimhne ídithe"
 
-#: src/pcresearch.c:333
+#: src/pcresearch.c:371
 #, fuzzy, c-format
 msgid "%s: exhausted PCRE JIT stack"
 msgstr "cruach PCRE JIT líonta"
 
-#: src/pcresearch.c:337
+#: src/pcresearch.c:375
 #, fuzzy, c-format
 msgid "%s: exceeded PCRE's backtracking limit"
 msgstr "sáraíodh teorainn PCRE ar chúlú"
 
-#: src/pcresearch.c:342
+#: src/pcresearch.c:380
 #, fuzzy, c-format
 msgid "%s: exceeded PCRE's nested backtracking limit"
 msgstr "sáraíodh teorainn PCRE ar chúlú"
 
-#: src/pcresearch.c:346
+#: src/pcresearch.c:384
 #, c-format
 msgid "%s: PCRE detected recurse loop"
 msgstr ""
 
-#: src/pcresearch.c:351
+#: src/pcresearch.c:389
 #, fuzzy, c-format
 msgid "%s: exceeded PCRE's heap limit"
 msgstr "sáraíodh teorainn PCRE ar chúlú"
 
-#: src/pcresearch.c:360
+#: src/pcresearch.c:398
 #, fuzzy, c-format
 msgid "%s: internal PCRE error: %d"
 msgstr "earráid inmheánach PCRE: %d"
 
+#, fuzzy, c-format
+#~ msgid "JIT internal error: %d"
+#~ msgstr "earráid inmheánach"
+
 #~ msgid "failed to allocate memory for the PCRE JIT stack"
 #~ msgstr "níorbh fhéidir cuimhne a dháil le haghaidh na cruaiche PCRE JIT"
 
diff --git a/po/gl.gmo b/po/gl.gmo
index 4c5e2f6c..8b061edc 100644
Binary files a/po/gl.gmo and b/po/gl.gmo differ
diff --git a/po/gl.po b/po/gl.po
index 974c16e3..0a9226ea 100644
--- a/po/gl.po
+++ b/po/gl.po
@@ -12,7 +12,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: grep 3.5.16\n"
 "Report-Msgid-Bugs-To: bug-grep@gnu.org\n"
-"POT-Creation-Date: 2022-09-02 23:52-0700\n"
+"POT-Creation-Date: 2023-05-13 01:14-0700\n"
 "PO-Revision-Date: 2020-11-09 12:44+0100\n"
 "Last-Translator: Francisco Javier Tsao Santín <tsao@members.fsf.org>\n"
 "Language-Team: Galician <proxecto@trasno.gal>\n"
@@ -24,105 +24,105 @@ msgstr ""
 "X-Generator: Virtaal 0.7.1\n"
 "X-Bugs: Report translation errors to the Language-Team address.\n"
 
-#: lib/argmatch.c:147
+#: lib/argmatch.c:145
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "o argumento %s para %s é incorrecto"
 
-#: lib/argmatch.c:148
+#: lib/argmatch.c:146
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "o argumento %s para %s é ambiguo"
 
-#: lib/argmatch.c:167 lib/argmatch.h:238
+#: lib/argmatch.c:165 lib/argmatch.h:242
 msgid "Valid arguments are:"
 msgstr "Os argumentos correctos son:"
 
-#: lib/c-stack.c:187
+#: lib/c-stack.c:186
 msgid "program error"
 msgstr "erro de programa"
 
-#: lib/c-stack.c:188
+#: lib/c-stack.c:187
 msgid "stack overflow"
 msgstr "desbordamento de pila"
 
-#: lib/closeout.c:122 src/grep.c:1346
+#: lib/closeout.c:121 src/grep.c:1346
 msgid "write error"
 msgstr "erro de escritura"
 
-#: lib/dfa.c:894
+#: lib/dfa.c:897
 msgid "unbalanced ["
 msgstr "[ desemparellado"
 
-#: lib/dfa.c:1015
+#: lib/dfa.c:1018
 msgid "invalid character class"
 msgstr "clase de caracteres incorrecta"
 
-#: lib/dfa.c:1143
+#: lib/dfa.c:1146
 msgid "character class syntax is [[:space:]], not [:space:]"
 msgstr "a sintaxe da clase de caracteres é [[:space:]], non [:space:]"
 
-#: lib/dfa.c:1209
+#: lib/dfa.c:1222
 msgid "unfinished \\ escape"
 msgstr "secuencia de escape \\ sen rematar"
 
-#: lib/dfa.c:1319
+#: lib/dfa.c:1332
 #, fuzzy
 msgid "? at start of expression"
 msgstr "Expresión regular incorrecta"
 
-#: lib/dfa.c:1331
+#: lib/dfa.c:1344
 #, fuzzy
 msgid "* at start of expression"
 msgstr "Expresión regular incorrecta"
 
-#: lib/dfa.c:1345
+#: lib/dfa.c:1358
 #, fuzzy
 msgid "+ at start of expression"
 msgstr "Expresión regular incorrecta"
 
-#: lib/dfa.c:1400
+#: lib/dfa.c:1413
 msgid "{...} at start of expression"
 msgstr ""
 
-#: lib/dfa.c:1403
+#: lib/dfa.c:1416
 msgid "invalid content of \\{\\}"
 msgstr "contido incorrecto de \\{\\}"
 
-#: lib/dfa.c:1405
+#: lib/dfa.c:1418
 msgid "regular expression too big"
 msgstr "expresión regular demasiado grande"
 
-#: lib/dfa.c:1555
+#: lib/dfa.c:1568
 msgid "stray \\ before unprintable character"
 msgstr ""
 
-#: lib/dfa.c:1557
+#: lib/dfa.c:1570
 msgid "stray \\ before white space"
 msgstr ""
 
-#: lib/dfa.c:1561
+#: lib/dfa.c:1574
 #, c-format
 msgid "stray \\ before %lc"
 msgstr ""
 
-#: lib/dfa.c:1562
+#: lib/dfa.c:1575
 msgid "stray \\"
 msgstr ""
 
-#: lib/dfa.c:1917
+#: lib/dfa.c:1925
 msgid "unbalanced ("
 msgstr "( desemparellado"
 
-#: lib/dfa.c:2034
+#: lib/dfa.c:2042
 msgid "no syntax specified"
 msgstr "no se especificou ningunha sintaxe"
 
-#: lib/dfa.c:2045
+#: lib/dfa.c:2053
 msgid "unbalanced )"
 msgstr ") desemparellado"
 
-#: lib/error.c:195
+#: lib/error.c:193
 msgid "Unknown system error"
 msgstr "Erro do sistema descoñecido"
 
@@ -175,7 +175,7 @@ msgstr "non se puido rexistrar o cartafol de traballo activo"
 msgid "failed to return to initial working directory"
 msgstr "produciuse un fallo ao volver ao cartafol de traballo inicial"
 
-#: lib/xbinary-io.c:37
+#: lib/xbinary-io.c:36
 #, c-format
 msgid "failed to set file descriptor text/binary mode"
 msgstr "produciuse un fallo ao configurar o modo do descritor texto/binario"
@@ -201,11 +201,11 @@ msgstr "produciuse un fallo ao configurar o modo do descritor texto/binario"
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:355
+#: lib/quotearg.c:354
 msgid "`"
 msgstr "«"
 
-#: lib/quotearg.c:356
+#: lib/quotearg.c:355
 msgid "'"
 msgstr "»"
 
@@ -738,70 +738,82 @@ msgid "unknown binary-files type"
 msgstr "tipo binary-files descoñecido"
 
 #: src/grep.c:2831
+#, fuzzy
 msgid ""
 "Written by Mike Haertel and others; see\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 msgstr ""
 "Escrito por Mike Haertel e outros, véxase\n"
 "<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>"
 
-#: src/grep.c:2934
+#: src/grep.c:2937
 #, c-format
 msgid "warning: GREP_COLOR='%s' is deprecated; use GREP_COLORS='mt=%s'"
 msgstr ""
 
-#: src/pcresearch.c:148
+#: src/pcresearch.c:92
+#, c-format
+msgid ""
+"\n"
+"grep -P uses PCRE2 %s\n"
+msgstr ""
+
+#: src/pcresearch.c:169
+#, fuzzy
+msgid "-P supports only unibyte locales on this platform"
+msgstr "-P admite só locales unibyte e UTF-8"
+
+#: src/pcresearch.c:171
 msgid "-P supports only unibyte and UTF-8 locales"
 msgstr "-P admite só locales unibyte e UTF-8"
 
-#: src/pcresearch.c:162
+#: src/pcresearch.c:194
 msgid "the -P option only supports a single pattern"
 msgstr "a opción -P admite só un patrón"
 
-#: src/pcresearch.c:215
-#, fuzzy, c-format
-msgid "JIT internal error: %d"
-msgstr "erro interno"
-
-#: src/pcresearch.c:252
+#: src/pcresearch.c:290
 msgid "exceeded PCRE's line length limit"
 msgstr "excedeuse o tamaño límite das liñas PCRE"
 
-#: src/pcresearch.c:330
+#: src/pcresearch.c:368
 #, c-format
 msgid "%s: memory exhausted"
 msgstr "%s: memoria esgotada"
 
-#: src/pcresearch.c:333
+#: src/pcresearch.c:371
 #, c-format
 msgid "%s: exhausted PCRE JIT stack"
 msgstr "%s: esgotouse a pila PCRE JIT"
 
-#: src/pcresearch.c:337
+#: src/pcresearch.c:375
 #, c-format
 msgid "%s: exceeded PCRE's backtracking limit"
 msgstr "%s: excedeuse o límite de volta atrás das PCREs"
 
-#: src/pcresearch.c:342
+#: src/pcresearch.c:380
 #, fuzzy, c-format
 msgid "%s: exceeded PCRE's nested backtracking limit"
 msgstr "%s: excedeuse o límite de volta atrás das PCREs"
 
-#: src/pcresearch.c:346
+#: src/pcresearch.c:384
 #, c-format
 msgid "%s: PCRE detected recurse loop"
 msgstr ""
 
-#: src/pcresearch.c:351
+#: src/pcresearch.c:389
 #, fuzzy, c-format
 msgid "%s: exceeded PCRE's heap limit"
 msgstr "%s: excedeuse o límite de recursividade das PCREs"
 
-#: src/pcresearch.c:360
+#: src/pcresearch.c:398
 #, c-format
 msgid "%s: internal PCRE error: %d"
 msgstr "%s: erro interno de PCRE: %d"
 
+#, fuzzy, c-format
+#~ msgid "JIT internal error: %d"
+#~ msgstr "erro interno"
+
 #~ msgid "failed to allocate memory for the PCRE JIT stack"
 #~ msgstr ""
 #~ "ao tentar dispoñer de memoria produciuse un erro para a pila PCRE JIT"
diff --git a/po/grep.pot b/po/grep.pot
index ee879e67..f4610e15 100644
--- a/po/grep.pot
+++ b/po/grep.pot
@@ -6,9 +6,9 @@
 #, fuzzy
 msgid ""
 msgstr ""
-"Project-Id-Version: GNU grep 3.8\n"
+"Project-Id-Version: GNU grep 3.11\n"
 "Report-Msgid-Bugs-To: bug-grep@gnu.org\n"
-"POT-Creation-Date: 2022-09-02 23:52-0700\n"
+"POT-Creation-Date: 2023-05-13 01:14-0700\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -17,102 +17,102 @@ msgstr ""
 "Content-Type: text/plain; charset=CHARSET\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: lib/argmatch.c:147
+#: lib/argmatch.c:145
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr ""
 
-#: lib/argmatch.c:148
+#: lib/argmatch.c:146
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr ""
 
-#: lib/argmatch.c:167 lib/argmatch.h:238
+#: lib/argmatch.c:165 lib/argmatch.h:242
 msgid "Valid arguments are:"
 msgstr ""
 
-#: lib/c-stack.c:187
+#: lib/c-stack.c:186
 msgid "program error"
 msgstr ""
 
-#: lib/c-stack.c:188
+#: lib/c-stack.c:187
 msgid "stack overflow"
 msgstr ""
 
-#: lib/closeout.c:122 src/grep.c:1346
+#: lib/closeout.c:121 src/grep.c:1346
 msgid "write error"
 msgstr ""
 
-#: lib/dfa.c:894
+#: lib/dfa.c:897
 msgid "unbalanced ["
 msgstr ""
 
-#: lib/dfa.c:1015
+#: lib/dfa.c:1018
 msgid "invalid character class"
 msgstr ""
 
-#: lib/dfa.c:1143
+#: lib/dfa.c:1146
 msgid "character class syntax is [[:space:]], not [:space:]"
 msgstr ""
 
-#: lib/dfa.c:1209
+#: lib/dfa.c:1222
 msgid "unfinished \\ escape"
 msgstr ""
 
-#: lib/dfa.c:1319
+#: lib/dfa.c:1332
 msgid "? at start of expression"
 msgstr ""
 
-#: lib/dfa.c:1331
+#: lib/dfa.c:1344
 msgid "* at start of expression"
 msgstr ""
 
-#: lib/dfa.c:1345
+#: lib/dfa.c:1358
 msgid "+ at start of expression"
 msgstr ""
 
-#: lib/dfa.c:1400
+#: lib/dfa.c:1413
 msgid "{...} at start of expression"
 msgstr ""
 
-#: lib/dfa.c:1403
+#: lib/dfa.c:1416
 msgid "invalid content of \\{\\}"
 msgstr ""
 
-#: lib/dfa.c:1405
+#: lib/dfa.c:1418
 msgid "regular expression too big"
 msgstr ""
 
-#: lib/dfa.c:1555
+#: lib/dfa.c:1568
 msgid "stray \\ before unprintable character"
 msgstr ""
 
-#: lib/dfa.c:1557
+#: lib/dfa.c:1570
 msgid "stray \\ before white space"
 msgstr ""
 
-#: lib/dfa.c:1561
+#: lib/dfa.c:1574
 #, c-format
 msgid "stray \\ before %lc"
 msgstr ""
 
-#: lib/dfa.c:1562
+#: lib/dfa.c:1575
 msgid "stray \\"
 msgstr ""
 
-#: lib/dfa.c:1917
+#: lib/dfa.c:1925
 msgid "unbalanced ("
 msgstr ""
 
-#: lib/dfa.c:2034
+#: lib/dfa.c:2042
 msgid "no syntax specified"
 msgstr ""
 
-#: lib/dfa.c:2045
+#: lib/dfa.c:2053
 msgid "unbalanced )"
 msgstr ""
 
-#: lib/error.c:195
+#: lib/error.c:193
 msgid "Unknown system error"
 msgstr ""
 
@@ -165,7 +165,7 @@ msgstr ""
 msgid "failed to return to initial working directory"
 msgstr ""
 
-#: lib/xbinary-io.c:37
+#: lib/xbinary-io.c:36
 #, c-format
 msgid "failed to set file descriptor text/binary mode"
 msgstr ""
@@ -191,11 +191,11 @@ msgstr ""
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:355
+#: lib/quotearg.c:354
 msgid "`"
 msgstr ""
 
-#: lib/quotearg.c:356
+#: lib/quotearg.c:355
 msgid "'"
 msgstr ""
 
@@ -625,62 +625,68 @@ msgstr ""
 #: src/grep.c:2831
 msgid ""
 "Written by Mike Haertel and others; see\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 msgstr ""
 
-#: src/grep.c:2934
+#: src/grep.c:2937
 #, c-format
 msgid "warning: GREP_COLOR='%s' is deprecated; use GREP_COLORS='mt=%s'"
 msgstr ""
 
-#: src/pcresearch.c:148
-msgid "-P supports only unibyte and UTF-8 locales"
+#: src/pcresearch.c:92
+#, c-format
+msgid ""
+"\n"
+"grep -P uses PCRE2 %s\n"
 msgstr ""
 
-#: src/pcresearch.c:162
-msgid "the -P option only supports a single pattern"
+#: src/pcresearch.c:169
+msgid "-P supports only unibyte locales on this platform"
 msgstr ""
 
-#: src/pcresearch.c:215
-#, c-format
-msgid "JIT internal error: %d"
+#: src/pcresearch.c:171
+msgid "-P supports only unibyte and UTF-8 locales"
+msgstr ""
+
+#: src/pcresearch.c:194
+msgid "the -P option only supports a single pattern"
 msgstr ""
 
-#: src/pcresearch.c:252
+#: src/pcresearch.c:290
 msgid "exceeded PCRE's line length limit"
 msgstr ""
 
-#: src/pcresearch.c:330
+#: src/pcresearch.c:368
 #, c-format
 msgid "%s: memory exhausted"
 msgstr ""
 
-#: src/pcresearch.c:333
+#: src/pcresearch.c:371
 #, c-format
 msgid "%s: exhausted PCRE JIT stack"
 msgstr ""
 
-#: src/pcresearch.c:337
+#: src/pcresearch.c:375
 #, c-format
 msgid "%s: exceeded PCRE's backtracking limit"
 msgstr ""
 
-#: src/pcresearch.c:342
+#: src/pcresearch.c:380
 #, c-format
 msgid "%s: exceeded PCRE's nested backtracking limit"
 msgstr ""
 
-#: src/pcresearch.c:346
+#: src/pcresearch.c:384
 #, c-format
 msgid "%s: PCRE detected recurse loop"
 msgstr ""
 
-#: src/pcresearch.c:351
+#: src/pcresearch.c:389
 #, c-format
 msgid "%s: exceeded PCRE's heap limit"
 msgstr ""
 
-#: src/pcresearch.c:360
+#: src/pcresearch.c:398
 #, c-format
 msgid "%s: internal PCRE error: %d"
 msgstr ""
diff --git a/po/he.po b/po/he.po
index 8cb08c8b..38c06fa1 100644
--- a/po/he.po
+++ b/po/he.po
@@ -6,7 +6,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: grep 2.5.1a\n"
 "Report-Msgid-Bugs-To: bug-grep@gnu.org\n"
-"POT-Creation-Date: 2022-09-02 23:52-0700\n"
+"POT-Creation-Date: 2023-05-13 01:14-0700\n"
 "PO-Revision-Date: 2005-03-04 14:55+0200\n"
 "Last-Translator: Eli Zaretskii <eliz@gnu.org>\n"
 "Language-Team: Hebrew <eliz@gnu.org>\n"
@@ -16,108 +16,108 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "X-Bugs: Report translation errors to the Language-Team address.\n"
 
-#: lib/argmatch.c:147
+#: lib/argmatch.c:145
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr ""
 
-#: lib/argmatch.c:148
+#: lib/argmatch.c:146
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr ""
 
-#: lib/argmatch.c:167 lib/argmatch.h:238
+#: lib/argmatch.c:165 lib/argmatch.h:242
 msgid "Valid arguments are:"
 msgstr ""
 
-#: lib/c-stack.c:187
+#: lib/c-stack.c:186
 msgid "program error"
 msgstr ""
 
-#: lib/c-stack.c:188
+#: lib/c-stack.c:187
 msgid "stack overflow"
 msgstr ""
 
-#: lib/closeout.c:122 src/grep.c:1346
+#: lib/closeout.c:121 src/grep.c:1346
 msgid "write error"
 msgstr ""
 
-#: lib/dfa.c:894
+#: lib/dfa.c:897
 #, fuzzy
 msgid "unbalanced ["
 msgstr "���-�� �� ���� ["
 
-#: lib/dfa.c:1015
+#: lib/dfa.c:1018
 msgid "invalid character class"
 msgstr ""
 
-#: lib/dfa.c:1143
+#: lib/dfa.c:1146
 msgid "character class syntax is [[:space:]], not [:space:]"
 msgstr ""
 
-#: lib/dfa.c:1209
+#: lib/dfa.c:1222
 #, fuzzy
 msgid "unfinished \\ escape"
 msgstr "�����-���� \\ ���� ����"
 
-#: lib/dfa.c:1319
+#: lib/dfa.c:1332
 msgid "? at start of expression"
 msgstr ""
 
-#: lib/dfa.c:1331
+#: lib/dfa.c:1344
 msgid "* at start of expression"
 msgstr ""
 
-#: lib/dfa.c:1345
+#: lib/dfa.c:1358
 msgid "+ at start of expression"
 msgstr ""
 
-#: lib/dfa.c:1400
+#: lib/dfa.c:1413
 msgid "{...} at start of expression"
 msgstr ""
 
-#: lib/dfa.c:1403
+#: lib/dfa.c:1416
 #, fuzzy
 msgid "invalid content of \\{\\}"
 msgstr "���� ����� ����"
 
-#: lib/dfa.c:1405
+#: lib/dfa.c:1418
 msgid "regular expression too big"
 msgstr ""
 
-#: lib/dfa.c:1555
+#: lib/dfa.c:1568
 msgid "stray \\ before unprintable character"
 msgstr ""
 
-#: lib/dfa.c:1557
+#: lib/dfa.c:1570
 msgid "stray \\ before white space"
 msgstr ""
 
-#: lib/dfa.c:1561
+#: lib/dfa.c:1574
 #, c-format
 msgid "stray \\ before %lc"
 msgstr ""
 
-#: lib/dfa.c:1562
+#: lib/dfa.c:1575
 msgid "stray \\"
 msgstr ""
 
-#: lib/dfa.c:1917
+#: lib/dfa.c:1925
 #, fuzzy
 msgid "unbalanced ("
 msgstr "���-�� �� ���� ("
 
-#: lib/dfa.c:2034
+#: lib/dfa.c:2042
 #, fuzzy
 msgid "no syntax specified"
 msgstr "����� ����� ���"
 
-#: lib/dfa.c:2045
+#: lib/dfa.c:2053
 #, fuzzy
 msgid "unbalanced )"
 msgstr "���-�� �� ���� )"
 
-#: lib/error.c:195
+#: lib/error.c:193
 msgid "Unknown system error"
 msgstr "�����-���� ����� ����"
 
@@ -170,7 +170,7 @@ msgstr ""
 msgid "failed to return to initial working directory"
 msgstr ""
 
-#: lib/xbinary-io.c:37
+#: lib/xbinary-io.c:36
 #, c-format
 msgid "failed to set file descriptor text/binary mode"
 msgstr ""
@@ -196,11 +196,11 @@ msgstr ""
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:355
+#: lib/quotearg.c:354
 msgid "`"
 msgstr "`"
 
-#: lib/quotearg.c:356
+#: lib/quotearg.c:355
 msgid "'"
 msgstr "'"
 
@@ -669,63 +669,69 @@ msgstr "
 #: src/grep.c:2831
 msgid ""
 "Written by Mike Haertel and others; see\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 msgstr ""
 
-#: src/grep.c:2934
+#: src/grep.c:2937
 #, c-format
 msgid "warning: GREP_COLOR='%s' is deprecated; use GREP_COLORS='mt=%s'"
 msgstr ""
 
-#: src/pcresearch.c:148
+#: src/pcresearch.c:92
+#, c-format
+msgid ""
+"\n"
+"grep -P uses PCRE2 %s\n"
+msgstr ""
+
+#: src/pcresearch.c:169
+msgid "-P supports only unibyte locales on this platform"
+msgstr ""
+
+#: src/pcresearch.c:171
 msgid "-P supports only unibyte and UTF-8 locales"
 msgstr ""
 
-#: src/pcresearch.c:162
+#: src/pcresearch.c:194
 #, fuzzy
 msgid "the -P option only supports a single pattern"
 msgstr "-P ������� ����� ���"
 
-#: src/pcresearch.c:215
-#, c-format
-msgid "JIT internal error: %d"
-msgstr ""
-
-#: src/pcresearch.c:252
+#: src/pcresearch.c:290
 msgid "exceeded PCRE's line length limit"
 msgstr ""
 
-#: src/pcresearch.c:330
+#: src/pcresearch.c:368
 #, fuzzy, c-format
 msgid "%s: memory exhausted"
 msgstr "������ ����"
 
-#: src/pcresearch.c:333
+#: src/pcresearch.c:371
 #, c-format
 msgid "%s: exhausted PCRE JIT stack"
 msgstr ""
 
-#: src/pcresearch.c:337
+#: src/pcresearch.c:375
 #, c-format
 msgid "%s: exceeded PCRE's backtracking limit"
 msgstr ""
 
-#: src/pcresearch.c:342
+#: src/pcresearch.c:380
 #, c-format
 msgid "%s: exceeded PCRE's nested backtracking limit"
 msgstr ""
 
-#: src/pcresearch.c:346
+#: src/pcresearch.c:384
 #, c-format
 msgid "%s: PCRE detected recurse loop"
 msgstr ""
 
-#: src/pcresearch.c:351
+#: src/pcresearch.c:389
 #, c-format
 msgid "%s: exceeded PCRE's heap limit"
 msgstr ""
 
-#: src/pcresearch.c:360
+#: src/pcresearch.c:398
 #, c-format
 msgid "%s: internal PCRE error: %d"
 msgstr ""
diff --git a/po/hr.gmo b/po/hr.gmo
index 7cb395a3..4146fdb2 100644
Binary files a/po/hr.gmo and b/po/hr.gmo differ
diff --git a/po/hr.po b/po/hr.po
index a1d724e1..c0099577 100644
--- a/po/hr.po
+++ b/po/hr.po
@@ -12,122 +12,122 @@
 # Matej Vela <mvela@public.srce.hr>, 1999.
 # Hrvoje Niksic <hniksic@xemacs.org>, 2002.
 # Tomislav Krznar <tomislav.krznar@gmail.com>, 2012.
-# Božidar Putanec <bozidarp@yahoo.com>, 2016-2019, 2021, 2022.
+# Božidar Putanec <bozidarp@yahoo.com>, 2016-2019, 2021, 2022, 2023.
 # bp, 2016-04-03.
 msgid ""
 msgstr ""
-"Project-Id-Version: grep-3.7.98\n"
+"Project-Id-Version: grep-3.10.12\n"
 "Report-Msgid-Bugs-To: bug-grep@gnu.org\n"
-"POT-Creation-Date: 2022-09-02 23:52-0700\n"
-"PO-Revision-Date: 2022-07-09 07:27+0200\n"
+"POT-Creation-Date: 2023-05-13 01:14-0700\n"
+"PO-Revision-Date: 2023-05-01 12:00-0700\n"
 "Last-Translator: Božidar Putanec <bozidarp@yahoo.com>\n"
 "Language-Team: Croatian <lokalizacija@linux.hr>\n"
 "Language: hr\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"X-Bugs: Report translation errors to the Language-Team address.\n"
 "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
 "n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
-"X-Bugs: Report translation errors to the Language-Team address.\n"
-"X-Generator: Poedit 3.1.1\n"
+"X-Generator: Poedit 3.2.2\n"
 
-#: lib/argmatch.c:147
+#: lib/argmatch.c:145
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "nevaljani argument %s za %s"
 
-#: lib/argmatch.c:148
+#: lib/argmatch.c:146
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "višeznačni argument %s za %s"
 
-#: lib/argmatch.c:167 lib/argmatch.h:238
+#: lib/argmatch.c:165 lib/argmatch.h:242
 msgid "Valid arguments are:"
 msgstr "Valjani argumenti su:"
 
-#: lib/c-stack.c:187
+#: lib/c-stack.c:186
 msgid "program error"
 msgstr "greška u programu"
 
-#: lib/c-stack.c:188
+#: lib/c-stack.c:187
 msgid "stack overflow"
-msgstr "prelijevanje stȏga"
+msgstr "prekoračenje stȏga"
 
-#: lib/closeout.c:122 src/grep.c:1346
+#: lib/closeout.c:121 src/grep.c:1346
 msgid "write error"
 msgstr "greška pri pisanju"
 
-#: lib/dfa.c:894
+#: lib/dfa.c:897
 msgid "unbalanced ["
 msgstr "[ nema odgovarajući par"
 
-#: lib/dfa.c:1015
+#: lib/dfa.c:1018
 msgid "invalid character class"
 msgstr "nevaljana znakovna klasa"
 
-#: lib/dfa.c:1143
+#: lib/dfa.c:1146
 msgid "character class syntax is [[:space:]], not [:space:]"
 msgstr "sintaksa znakovne klase je [[:space]], ne [:space:]"
 
-#: lib/dfa.c:1209
+#: lib/dfa.c:1222
 msgid "unfinished \\ escape"
 msgstr "nedovršena \\ escape sekvencija"
 
-#: lib/dfa.c:1319
+#: lib/dfa.c:1332
 msgid "? at start of expression"
 msgstr "? na početku izraza"
 
-#: lib/dfa.c:1331
+#: lib/dfa.c:1344
 msgid "* at start of expression"
 msgstr "* na početku izraza"
 
-#: lib/dfa.c:1345
+#: lib/dfa.c:1358
 msgid "+ at start of expression"
 msgstr "+ na kraju izraza"
 
-#: lib/dfa.c:1400
+#: lib/dfa.c:1413
 msgid "{...} at start of expression"
 msgstr "{...} na startu izraza"
 
-#: lib/dfa.c:1403
+#: lib/dfa.c:1416
 msgid "invalid content of \\{\\}"
 msgstr "nevaljani sadržaj u \\{\\}"
 
-#: lib/dfa.c:1405
+#: lib/dfa.c:1418
 msgid "regular expression too big"
 msgstr "preveliki regularni izraz"
 
-#: lib/dfa.c:1555
+#: lib/dfa.c:1568
 msgid "stray \\ before unprintable character"
 msgstr "zalutali \\ ispred neispisivog znaka"
 
-#: lib/dfa.c:1557
+#: lib/dfa.c:1570
 msgid "stray \\ before white space"
 msgstr "zalutali \\ ispred bijeline"
 
-#: lib/dfa.c:1561
+#: lib/dfa.c:1574
 #, c-format
 msgid "stray \\ before %lc"
 msgstr "zalutali \\ ispred %lc"
 
-#: lib/dfa.c:1562
+#: lib/dfa.c:1575
 msgid "stray \\"
 msgstr "zalutali \\"
 
-#: lib/dfa.c:1917
+#: lib/dfa.c:1925
 msgid "unbalanced ("
 msgstr "( nema odgovarajući par"
 
 # „zadano“ je često „default“, pa radije „navedena“ ili „imenovana“
-#: lib/dfa.c:2034
+#: lib/dfa.c:2042
 msgid "no syntax specified"
 msgstr "sintaksa nije navedena"
 
-#: lib/dfa.c:2045
+#: lib/dfa.c:2053
 msgid "unbalanced )"
 msgstr ") nema odgovarajući par"
 
-#: lib/error.c:195
+#: lib/error.c:193
 msgid "Unknown system error"
 msgstr "Nepoznata greška sustava"
 
@@ -181,7 +181,7 @@ msgstr "nije moguće registrirati trenutni radni direktorij"
 msgid "failed to return to initial working directory"
 msgstr "nije se uspjelo vratiti u početni radni direktorij"
 
-#: lib/xbinary-io.c:37
+#: lib/xbinary-io.c:36
 #, c-format
 msgid "failed to set file descriptor text/binary mode"
 msgstr "nije uspjelo postaviti deskriptor datoteke u tekst/binarni način"
@@ -207,11 +207,11 @@ msgstr "nije uspjelo postaviti deskriptor datoteke u tekst/binarni način"
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:355
+#: lib/quotearg.c:354
 msgid "`"
 msgstr "„"
 
-#: lib/quotearg.c:356
+#: lib/quotearg.c:355
 msgid "'"
 msgstr "“"
 
@@ -246,8 +246,6 @@ msgstr "Zaostala obratna kosa crta"
 msgid "Invalid back reference"
 msgstr "Nevaljana povratna referencija"
 
-# bp: fuzzy > popravljen
-# razmotri: nema para za [, [^, [:, [., ili [=
 #: lib/regcomp.c:143
 msgid "Unmatched [, [^, [:, [., or [="
 msgstr "[, [^, [:, [., ili [= nema odgovarajući par"
@@ -632,7 +630,8 @@ msgstr ""
 "  -D, --devices=AKCIJA      kako rukovati uređajima, FIFO uređajima\n"
 "                              i utičnicama;  AKCIJA je „read“ ili „skip“\n"
 "  -r, --recursive           isto kao --directories=recurse\n"
-"  -R, --dereference-recursive  jednako, ali slijedi svaku simboličku vezu\n"
+"  -R, --dereference-recursive  jednako, ali slijedi svaku simboličku "
+"poveznicu\n"
 
 # http://hjp.znanje.hr/index.php?show=kosi_oblici&id=eVxhWxI%3D
 # podudaran > koji je sukladan s čim, koji se poklapa s kim/čim
@@ -703,9 +702,9 @@ msgstr ""
 "      --group-separator=SEP  ispiše SEP(arator) u retku između\n"
 "                               podudaranja s kontekstom\n"
 "      --no-group-separator  ne ispiše separator za podudaranja s kontektsom\n"
-"      --color[=KADA],\n"
-"      --colour[=KADA]       bojama istakne nađene stringove i markere;\n"
-"                            KADA može biti „always“ ili „never“ ili „auto“\n"
+"      --color[=KAD],\n"
+"      --colour[=KAD]       bojama istakne nađene stringove i markere;\n"
+"                            KAD može biti „always“ ili „never“ ili „auto“\n"
 "  -U, --binary              ne uklanja CqR znakove na EOL (MSDOS/Windows)\n"
 "\n"
 
@@ -758,71 +757,89 @@ msgstr "nepoznata vrsta binarnih datoteka"
 #: src/grep.c:2831
 msgid ""
 "Written by Mike Haertel and others; see\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 msgstr ""
-"Napisali Mike Haertel i ostali; vidi\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"Napisali Mike Haertel and others; see\n"
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 
-#: src/grep.c:2934
+#: src/grep.c:2937
 #, c-format
 msgid "warning: GREP_COLOR='%s' is deprecated; use GREP_COLORS='mt=%s'"
 msgstr ""
 "upozorenje: GREP_COLOR=‘%s’ je zastarjelo; koristite GREP_COLORS=‘mt=%s’"
 
+#: src/pcresearch.c:92
+#, c-format
+msgid ""
+"\n"
+"grep -P uses PCRE2 %s\n"
+msgstr ""
+"\n"
+"grep -P koristi PCRE2 %s\n"
+
+# bp: novi msgid
+#: src/pcresearch.c:169
+msgid "-P supports only unibyte locales on this platform"
+msgstr "-P podržava samo unibyte locales na ovoj platformi"
+
 # bp: novi msgid
-#: src/pcresearch.c:148
+#: src/pcresearch.c:171
 msgid "-P supports only unibyte and UTF-8 locales"
 msgstr "-P podržava samo unibyte i UTF-8 locale"
 
-#: src/pcresearch.c:162
+#: src/pcresearch.c:194
 msgid "the -P option only supports a single pattern"
 msgstr "opcija -P podržava samo jedan uzorak"
 
-#: src/pcresearch.c:215
-#, c-format
-msgid "JIT internal error: %d"
-msgstr "JIT interna greška: %d"
-
-#: src/pcresearch.c:252
+#: src/pcresearch.c:290
 msgid "exceeded PCRE's line length limit"
 msgstr "prekoračeno je ograničenje duljine retka PCRE-a"
 
-#: src/pcresearch.c:330
+#: src/pcresearch.c:368
 #, c-format
 msgid "%s: memory exhausted"
 msgstr "%s: nema dovoljno memorije"
 
-#: src/pcresearch.c:333
+#: src/pcresearch.c:371
 #, c-format
 msgid "%s: exhausted PCRE JIT stack"
 msgstr "%s: PCRE JIT stȏg je iscrpljen"
 
-#: src/pcresearch.c:337
+#: src/pcresearch.c:375
 #, c-format
 msgid "%s: exceeded PCRE's backtracking limit"
 msgstr "%s: je premašio PCRE granicu broja pokušaja"
 
-#: src/pcresearch.c:342
+#: src/pcresearch.c:380
 #, c-format
 msgid "%s: exceeded PCRE's nested backtracking limit"
 msgstr "%s: je premašio PCRE granicu broja ugniježdenih pokušaja"
 
-#: src/pcresearch.c:346
+#: src/pcresearch.c:384
 #, c-format
 msgid "%s: PCRE detected recurse loop"
 msgstr "%s: PCRE je otkrio/naišao na rekurzivnu petlju"
 
-#: src/pcresearch.c:351
+#: src/pcresearch.c:389
 #, c-format
 msgid "%s: exceeded PCRE's heap limit"
 msgstr "%s: je premašio PCRE granicu za hrpe (heap)"
 
-# bp:fuzzy popravljen
-#: src/pcresearch.c:360
+#: src/pcresearch.c:398
 #, c-format
 msgid "%s: internal PCRE error: %d"
 msgstr "%s: interna PCRE greška: %d"
 
+#~ msgid ""
+#~ "\n"
+#~ "Built with PCRE "
+#~ msgstr ""
+#~ "\n"
+#~ "Izgrađen (sastavljen) s PCRE "
+
+#~ msgid "JIT internal error: %d"
+#~ msgstr "JIT interna greška: %d"
+
 # bp: novi msgid
 #~ msgid "failed to allocate memory for the PCRE JIT stack"
 #~ msgstr "dodjela memorije za PCRE JIT stȏg nije uspjela"
diff --git a/po/hu.gmo b/po/hu.gmo
index 98066bfe..1a92c284 100644
Binary files a/po/hu.gmo and b/po/hu.gmo differ
diff --git a/po/hu.po b/po/hu.po
index 0264412c..99804d2e 100644
--- a/po/hu.po
+++ b/po/hu.po
@@ -1,16 +1,16 @@
 # Hungarian translation for grep.
-# Copyright (C) 2002, 2009, 2010, 2014, 2015, 2016, 2017, 2019 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2009, 2010, 2014, 2015, 2016, 2017, 2019, 2022, 2023 Free Software Foundation, Inc.
 # This file is distributed under the same license as the grep package.
 #
 # Emese Kovács <emese@instantweb.hu>, 2002, 2010.
 # Gabor Kelemen <kelemeng@gnome.hu>, 2009, 2010, 2014, 2016, 2017.
-# Balázs Úr <ur.balazs@fsf.hu>, 2014, 2015, 2019.
+# Balázs Úr <ur.balazs@fsf.hu>, 2014, 2015, 2019, 2022, 2023.
 msgid ""
 msgstr ""
-"Project-Id-Version: grep 3.1.48\n"
+"Project-Id-Version: grep 3.10.7\n"
 "Report-Msgid-Bugs-To: bug-grep@gnu.org\n"
-"POT-Creation-Date: 2022-09-02 23:52-0700\n"
-"PO-Revision-Date: 2019-11-23 22:33+0100\n"
+"POT-Creation-Date: 2023-05-13 01:14-0700\n"
+"PO-Revision-Date: 2023-04-18 19:59+0200\n"
 "Last-Translator: Balázs Úr <ur.balazs@fsf.hu>\n"
 "Language-Team: Hungarian <translation-team-hu@lists.sourceforge.net>\n"
 "Language: hu\n"
@@ -18,108 +18,105 @@ msgstr ""
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "X-Bugs: Report translation errors to the Language-Team address.\n"
-"X-Generator: Lokalize 19.04.3\n"
+"X-Generator: Lokalize 22.08.2\n"
 "Plural-Forms:  nplurals=2; plural=(n != 1);\n"
 
-#: lib/argmatch.c:147
+#: lib/argmatch.c:145
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "a(z) %s argumentum érvénytelen a következőhöz: %s"
 
-#: lib/argmatch.c:148
+#: lib/argmatch.c:146
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "a(z) „%s” argumentum nem egyértelmű a következőhöz: „%s”"
 
-#: lib/argmatch.c:167 lib/argmatch.h:238
+#: lib/argmatch.c:165 lib/argmatch.h:242
 msgid "Valid arguments are:"
 msgstr "Az érvényes argumentumok a következők:"
 
-#: lib/c-stack.c:187
+#: lib/c-stack.c:186
 msgid "program error"
 msgstr "programhiba"
 
-#: lib/c-stack.c:188
+#: lib/c-stack.c:187
 msgid "stack overflow"
 msgstr "verem túlcsordulás"
 
-#: lib/closeout.c:122 src/grep.c:1346
+#: lib/closeout.c:121 src/grep.c:1346
 msgid "write error"
 msgstr "íráshiba"
 
-#: lib/dfa.c:894
+#: lib/dfa.c:897
 msgid "unbalanced ["
 msgstr "kiegyensúlyozatlan ["
 
-#: lib/dfa.c:1015
+#: lib/dfa.c:1018
 msgid "invalid character class"
 msgstr "érvénytelen karakterosztály"
 
-#: lib/dfa.c:1143
+#: lib/dfa.c:1146
 msgid "character class syntax is [[:space:]], not [:space:]"
 msgstr "a karakterosztály szintaxisa [[:space:]], nem [:space:]"
 
-#: lib/dfa.c:1209
+#: lib/dfa.c:1222
 msgid "unfinished \\ escape"
 msgstr "befejezetlen \\ escape"
 
-#: lib/dfa.c:1319
-#, fuzzy
+#: lib/dfa.c:1332
 msgid "? at start of expression"
-msgstr "Érvénytelen reguláris kifejezés"
+msgstr "? a kifejezés kezdetén"
 
-#: lib/dfa.c:1331
-#, fuzzy
+#: lib/dfa.c:1344
 msgid "* at start of expression"
-msgstr "Érvénytelen reguláris kifejezés"
+msgstr "* a kifejezés kezdetén"
 
-#: lib/dfa.c:1345
-#, fuzzy
+#: lib/dfa.c:1358
 msgid "+ at start of expression"
-msgstr "Érvénytelen reguláris kifejezés"
+msgstr "+ a kifejezés kezdetén"
 
-#: lib/dfa.c:1400
+#: lib/dfa.c:1413
 msgid "{...} at start of expression"
-msgstr ""
+msgstr "{...} a kifejezés kezdetén"
 
-#: lib/dfa.c:1403
+#: lib/dfa.c:1416
 msgid "invalid content of \\{\\}"
 msgstr "a \\{\\} tartalma érvénytelen"
 
-#: lib/dfa.c:1405
+#: lib/dfa.c:1418
 msgid "regular expression too big"
 msgstr "a reguláris kifejezés túl nagy"
 
-#: lib/dfa.c:1555
+#: lib/dfa.c:1568
 msgid "stray \\ before unprintable character"
-msgstr ""
+msgstr "felesleges \\ egy nem nyomtatható karakter előtt"
 
-#: lib/dfa.c:1557
+#: lib/dfa.c:1570
 msgid "stray \\ before white space"
-msgstr ""
+msgstr "felesleges \\ egy üres karakter előtt"
 
-#: lib/dfa.c:1561
+#: lib/dfa.c:1574
 #, c-format
 msgid "stray \\ before %lc"
-msgstr ""
+msgstr "felesleges \\ egy %lc karakter előtt"
 
-#: lib/dfa.c:1562
+#: lib/dfa.c:1575
 msgid "stray \\"
-msgstr ""
+msgstr "felesleges \\"
 
-#: lib/dfa.c:1917
+#: lib/dfa.c:1925
 msgid "unbalanced ("
 msgstr "kiegyensúlyozatlan ("
 
-#: lib/dfa.c:2034
+#: lib/dfa.c:2042
 msgid "no syntax specified"
 msgstr "nincs szintaxis megadva"
 
-#: lib/dfa.c:2045
+#: lib/dfa.c:2053
 msgid "unbalanced )"
 msgstr "kiegyensúlyozatlan )"
 
-#: lib/error.c:195
+#: lib/error.c:193
 msgid "Unknown system error"
 msgstr "Ismeretlen rendszerhiba"
 
@@ -172,7 +169,7 @@ msgstr "az aktuális munkakönyvtár feljegyzése meghiúsult"
 msgid "failed to return to initial working directory"
 msgstr "a visszatérés meghiúsult a kiinduló munkakönyvtárba"
 
-#: lib/xbinary-io.c:37
+#: lib/xbinary-io.c:36
 #, c-format
 msgid "failed to set file descriptor text/binary mode"
 msgstr "nem sikerült beállítani a fájlleíró szöveges/bináris módját"
@@ -198,11 +195,11 @@ msgstr "nem sikerült beállítani a fájlleíró szöveges/bináris módját"
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:355
+#: lib/quotearg.c:354
 msgid "`"
 msgstr "„"
 
-#: lib/quotearg.c:356
+#: lib/quotearg.c:355
 msgid "'"
 msgstr "”"
 
@@ -297,18 +294,15 @@ msgstr "©"
 
 #. TRANSLATORS: The %s placeholder is the web address of the GPL license.
 #: lib/version-etc.c:88
-#, fuzzy, c-format
+#, c-format
 msgid ""
 "License GPLv3+: GNU GPL version 3 or later <%s>.\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"
 msgstr ""
-"\n"
-"A licenc GPLv3+: a GNU GPL 3. vagy újabb változata <https://gnu.org/licenses/"
-"gpl.html>\n"
+"Licenc GPLv3+: a GNU GPL 3. vagy újabb változata <%s>\n"
 "Ez egy szabad szoftver, terjesztheti és/vagy módosíthatja.\n"
 "NINCS GARANCIA, a törvény által engedélyezett mértékig.\n"
-"\n"
 
 #. TRANSLATORS: %s denotes an author name.
 #: lib/version-etc.c:105
@@ -423,11 +417,9 @@ msgstr ""
 #. "Report translation bugs to <...>\n" with the address for translation
 #. bugs (typically your translation team's web or email address).
 #: lib/version-etc.c:249
-#, fuzzy, c-format
+#, c-format
 msgid "Report bugs to: %s\n"
-msgstr ""
-"\n"
-"A hibák a(z) %s címen jelenthetők.\n"
+msgstr "A hibák a(z) %s címen jelenthetők.\n"
 
 #: lib/version-etc.c:251
 #, c-format
@@ -440,16 +432,14 @@ msgid "%s home page: <%s>\n"
 msgstr "A(z) %s honlapja: <%s>\n"
 
 #: lib/version-etc.c:260
-#, fuzzy, c-format
+#, c-format
 msgid "General help using GNU software: <%s>\n"
-msgstr ""
-"Általános segítség a GNU szoftverek használatához: <https://www.gnu.org/"
-"gethelp/>\n"
+msgstr "Általános segítség a GNU szoftverek használatához: <%s>\n"
 
 #: src/dfasearch.c:59
-#, fuzzy, c-format
+#, c-format
 msgid "warning: %s"
-msgstr "figyelmeztetés: %s: %s"
+msgstr "figyelmeztetés: %s"
 
 #: src/grep.c:656
 msgid "(standard input)"
@@ -464,19 +454,19 @@ msgid "input is too large to count"
 msgstr "a bemenet túl nagy a megszámláláshoz"
 
 #: src/grep.c:1651
-#, fuzzy, c-format
+#, c-format
 msgid "%s: binary file matches"
-msgstr "%s bináris fájl illeszkedik\n"
+msgstr "%s: bináris fájl illeszkedik"
 
 #: src/grep.c:1689
-#, fuzzy, c-format
+#, c-format
 msgid "%s: warning: recursive directory loop"
-msgstr "rekurzív könyvtárhurok"
+msgstr "%s: figyelmeztetés: rekurzív könyvtárhurok"
 
 #: src/grep.c:1909
-#, fuzzy, c-format
+#, c-format
 msgid "%s: input file is also the output"
-msgstr "%s bemeneti fájl a kimenet is"
+msgstr "%s: a bemeneti fájl a kimenet is"
 
 #: src/grep.c:1971 src/grep.c:1978
 #, c-format
@@ -520,7 +510,7 @@ msgstr ""
 "  -P, --perl-regexp         a MINTÁK Perl reguláris kifejezések\n"
 
 #: src/grep.c:1991
-#, fuzzy, c-format
+#, c-format
 msgid ""
 "  -e, --regexp=PATTERNS     use PATTERNS for matching\n"
 "  -f, --file=FILE           take PATTERNS from FILE\n"
@@ -532,7 +522,10 @@ msgid ""
 msgstr ""
 "  -e, --regexp=MINTÁK       a MINTÁK használata illesztésre\n"
 "  -f, --file=FÁJL           a MINTÁK beolvasása a FÁJLBÓL\n"
-"  -i, --ignore-case         a kis- és nagybetűk megegyeznek\n"
+"  -i, --ignore-case         kis- és nagybetűk megkülönböztetésének "
+"mellőzése\n"
+"                              a mintákban és az adatokban\n"
+"      --no-ignore-case      kis- és nagybetűk különböznek (alapértelmezés)\n"
 "  -w, --word-regexp         csak egész szavakra illesztés\n"
 "  -x, --line-regexp         csak egész sorokra illesztés\n"
 "  -z, --null-data           az adat sorai 0 bájtra végződnek, nem újsorra\n"
@@ -620,7 +613,7 @@ msgstr ""
 "  -R, --dereference-recursive hasonló, de követi az összes szimlinket\n"
 
 #: src/grep.c:2033
-#, fuzzy, c-format
+#, c-format
 msgid ""
 "      --include=GLOB        search only files that match GLOB (a file "
 "pattern)\n"
@@ -631,9 +624,9 @@ msgid ""
 msgstr ""
 "      --include=GLOB        csak a GLOBRA (fájlmintára) illeszkedő fájlok\n"
 "                              keresése\n"
-"      --exclude=GLOB        a GLOBRA (fájlmintára) illeszkedő fájlok és\n"
-"                              könyvtárak kihagyása\n"
-"      --exclude-from=FÁJL   a FÁJLBAN található fájlmintákra illeszkedő\n"
+"      --exclude=GLOB        a GLOBRA (fájlmintára) illeszkedő fájlok "
+"kihagyása\n"
+"      --exclude-from=FÁJL   a FÁJLBAN lévő bármilyen fájlmintára illeszkedő\n"
 "                              fájlok kihagyása\n"
 "      --exclude-dir=GLOB    a GLOBRA (fájlmintára) illeszkedő könyvtárak\n"
 "                              kihagyása\n"
@@ -676,7 +669,7 @@ msgstr ""
 "  -C, -- context=SZÁM       SZÁM darab sor kiírása a környezetből\n"
 
 #: src/grep.c:2053
-#, fuzzy, c-format
+#, c-format
 msgid ""
 "  -NUM                      same as --context=NUM\n"
 "      --group-separator=SEP  print SEP on line between matches with context\n"
@@ -689,6 +682,11 @@ msgid ""
 "\n"
 msgstr ""
 "  -SZÁM                     ugyanaz, mint a --context=SZÁM\n"
+"      --group-separator=ELV  ELV (elválasztó) írása a környezettel "
+"rendelkező\n"
+"                              találatok sorai közé\n"
+"      --no-group-separator  ne írjon elválasztót a környezettel rendelkező\n"
+"                              találatokhoz\n"
 "      --color[=EKKOR],\n"
 "      --colour[=EKKOR]      az illeszkedő karakterláncot beszínezi\n"
 "                              az EKKOR lehet „always”, „never” vagy „auto”\n"
@@ -697,7 +695,7 @@ msgstr ""
 "\n"
 
 #: src/grep.c:2062
-#, fuzzy, c-format
+#, c-format
 msgid ""
 "When FILE is '-', read standard input.  With no FILE, read '.' if\n"
 "recursive, '-' otherwise.  With fewer than two FILEs, assume -h.\n"
@@ -706,22 +704,20 @@ msgid ""
 msgstr ""
 "Ha a FÁJL a „-”, akkor a szabványos bemenetről olvas. Ha nincs megadva "
 "FÁJL,\n"
-"rekurzív működéskor a „.” egyébként a „-” olvasása. Kettőnél kevesebb FÁJL\n"
+"rekurzív működéskor a „.”, egyébként a „-” olvasása. Kettőnél kevesebb FÁJL\n"
 "megadásakor a -h kapcsolót feltételezi. A kilépési állapot 0, ha bármely "
 "sor\n"
-"(vagy fájl a -L kapcsolónál) kiválasztásra kerül, egyébként 1. Ha hiba\n"
-"történt és a -q nincs megadva, akkor a kilépési állapot 2.\n"
+"kiválasztásra kerül, egyébként 1. Ha hiba történt és a -q nincs megadva,\n"
+"akkor a kilépési állapot 2.\n"
 
 #: src/grep.c:2104
 msgid "conflicting matchers specified"
 msgstr "ütköző illesztők lettek megadva"
 
 #: src/grep.c:2111
-#, fuzzy
 msgid "Perl matching not supported in a --disable-perl-regexp build"
 msgstr ""
-"a -P kapcsoló támogatása nincs belefordítva ebbe a --disable-perl-regexp "
-"binárisba"
+"a Perl illesztés nem támogatott egy --disable-perl-regexp összeállításban"
 
 #: src/grep.c:2113
 #, c-format
@@ -735,7 +731,7 @@ msgstr "ismeretlen eszközmódszer"
 #: src/grep.c:2576
 #, c-format
 msgid "warning: --unix-byte-offsets (-u) is obsolete"
-msgstr ""
+msgstr "figyelmeztetés: a --unix-byte-offsets (-u) kapcsoló elavult"
 
 #: src/grep.c:2688
 msgid "invalid max count"
@@ -746,145 +742,84 @@ msgid "unknown binary-files type"
 msgstr "ismeretlen bináris fájl típus"
 
 #: src/grep.c:2831
-#, fuzzy
 msgid ""
 "Written by Mike Haertel and others; see\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
-msgstr "mások, lásd: <https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>"
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
+msgstr ""
+"Írta: Mike Haertel és mások, lásd:\n"
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 
-#: src/grep.c:2934
+#: src/grep.c:2937
 #, c-format
 msgid "warning: GREP_COLOR='%s' is deprecated; use GREP_COLORS='mt=%s'"
 msgstr ""
+"figyelmeztetés: a GREP_COLOR='%s' elavult, használja ezt: GREP_COLORS='mt=%s'"
+
+#: src/pcresearch.c:92
+#, c-format
+msgid ""
+"\n"
+"grep -P uses PCRE2 %s\n"
+msgstr ""
+
+#: src/pcresearch.c:169
+msgid "-P supports only unibyte locales on this platform"
+msgstr "a -P csak unibyte területi beállításokat támogat ezen a platformon"
 
-#: src/pcresearch.c:148
+#: src/pcresearch.c:171
 msgid "-P supports only unibyte and UTF-8 locales"
 msgstr "a -P csak unibyte és UTF-8 területi beállításokat támogat"
 
-#: src/pcresearch.c:162
+#: src/pcresearch.c:194
 msgid "the -P option only supports a single pattern"
 msgstr "a -P kapcsoló csak egy mintát támogat"
 
-#: src/pcresearch.c:215
-#, fuzzy, c-format
-msgid "JIT internal error: %d"
-msgstr "belső hiba"
-
-#: src/pcresearch.c:252
+#: src/pcresearch.c:290
 msgid "exceeded PCRE's line length limit"
 msgstr "a PCRE sorhossza túllépve"
 
-#: src/pcresearch.c:330
-#, fuzzy, c-format
+#: src/pcresearch.c:368
+#, c-format
 msgid "%s: memory exhausted"
-msgstr "elfogyott a memória"
+msgstr "%s: elfogyott a memória"
 
-#: src/pcresearch.c:333
-#, fuzzy, c-format
+#: src/pcresearch.c:371
+#, c-format
 msgid "%s: exhausted PCRE JIT stack"
-msgstr "kifogyott a PCRE JIT verem"
+msgstr "%s: kifogyott a PCRE JIT verem"
 
-#: src/pcresearch.c:337
-#, fuzzy, c-format
+#: src/pcresearch.c:375
+#, c-format
 msgid "%s: exceeded PCRE's backtracking limit"
-msgstr "a PCRE visszakövetési korlátja túllépve"
+msgstr "%s: a PCRE visszakövetési korlátja túllépve"
 
-#: src/pcresearch.c:342
-#, fuzzy, c-format
+#: src/pcresearch.c:380
+#, c-format
 msgid "%s: exceeded PCRE's nested backtracking limit"
-msgstr "a PCRE visszakövetési korlátja túllépve"
+msgstr "%s: a PCRE egymásba ágyazott visszakövetési korlátja túllépve"
 
-#: src/pcresearch.c:346
+#: src/pcresearch.c:384
 #, c-format
 msgid "%s: PCRE detected recurse loop"
-msgstr ""
+msgstr "%s: a PCRE rekurzív hurkot észlelt"
 
-#: src/pcresearch.c:351
-#, fuzzy, c-format
+#: src/pcresearch.c:389
+#, c-format
 msgid "%s: exceeded PCRE's heap limit"
-msgstr "a PCRE visszakövetési korlátja túllépve"
-
-#: src/pcresearch.c:360
-#, fuzzy, c-format
-msgid "%s: internal PCRE error: %d"
-msgstr "belső PCRE hiba: %d"
-
-#~ msgid "failed to allocate memory for the PCRE JIT stack"
-#~ msgstr "nem sikerült memóriát foglalni a PCRE JIT veremnek"
-
-#~ msgid "internal error (should never happen)"
-#~ msgstr "belső hiba (soha nem szabadna előfordulnia)"
+msgstr "%s: a PCRE memóriakupac korlátja túllépve"
 
+#: src/pcresearch.c:398
 #, c-format
-#~ msgid "warning: GREP_OPTIONS is deprecated; please use an alias or script"
-#~ msgstr ""
-#~ "figyelem: a GREP_OPTIONS elavult; használjon álnevet vagy parancsfájlt"
-
-#~ msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
-#~ msgstr "A %s honlapja: <https://www.gnu.org/software/%s/>\n"
-
-#~ msgid "invalid %s%s argument '%s'"
-#~ msgstr "érvénytelen %s%s argumentum: „%s”"
-
-#~ msgid "invalid suffix in %s%s argument '%s'"
-#~ msgstr "érvénytelen utótag a(z) %s%s argumentumban: „%s”"
-
-#~ msgid "%s%s argument '%s' too large"
-#~ msgstr "%s%s: a(z) „%s” argumentum túl nagy"
-
-#~ msgid "Mike Haertel"
-#~ msgstr "Mike Haertel"
-
-#~ msgid "%s: option '--%s' doesn't allow an argument\n"
-#~ msgstr "%s: a(z) „--%s” kapcsoló nem enged meg argumentumot\n"
-
-#~ msgid "%s: unrecognized option '--%s'\n"
-#~ msgstr "%s: a(z) „--%s” kapcsoló ismeretlen\n"
-
-#~ msgid "%s: option '-W %s' is ambiguous\n"
-#~ msgstr "%s: a „-W %s” kapcsoló nem egyértelmű\n"
-
-#~ msgid "%s: option '-W %s' doesn't allow an argument\n"
-#~ msgstr "%s: a „-W %s” kapcsoló nem enged meg argumentumot\n"
-
-#~ msgid "%s: option '-W %s' requires an argument\n"
-#~ msgstr "%s: a(z) „-W%s” kapcsolóhoz argumentum szükséges\n"
-
-#~ msgid "lseek failed"
-#~ msgstr "az lseek meghiúsult"
-
-#~ msgid "PATTERN is, by default, a basic regular expression (BRE).\n"
-#~ msgstr "A MINTA egy alapszintű reguláris kifejezés (BRE).\n"
+msgid "%s: internal PCRE error: %d"
+msgstr "%s: belső PCRE hiba: %d"
 
 #~ msgid ""
-#~ "'egrep' means 'grep -E'.  'fgrep' means 'grep -F'.\n"
-#~ "Direct invocation as either 'egrep' or 'fgrep' is deprecated.\n"
-#~ msgstr ""
-#~ "Az „egrep” jelentése „grep -E”. Az „fgrep” jelentése „grep -F”.\n"
-#~ "A közvetlen hívás „egrep” vagy „fgrep” formában elavult.\n"
-
-#~ msgid "unescaped ^ or $ not supported with -Pz"
-#~ msgstr "a nem escapelt ^ vagy $ nem támogatott a -Pz kapcsolóval"
-
-#~ msgid "GNU Grep home page: <%s>\n"
-#~ msgstr "A GNU Grep honlapja: <%s>\n"
-
-#~ msgid "invalid UTF-8 byte sequence in input"
-#~ msgstr "érvénytelen UTF-8 bájtsorozat a bemenetben"
-
-#~ msgid "PATTERN is an extended regular expression (ERE).\n"
-#~ msgstr "A MINTA egy bővített reguláris kifejezés (ERE).\n"
-
-#~ msgid "Invocation as 'egrep' is deprecated; use 'grep -E' instead.\n"
+#~ "\n"
+#~ "Built with PCRE "
 #~ msgstr ""
-#~ "A hívás „egrep” formában elavult, használja helyette a „grep -E” alakot.\n"
+#~ "\n"
+#~ "Összeállítva ezzel: PCRE "
 
-#~ msgid "PATTERN is a set of newline-separated fixed strings.\n"
-#~ msgstr "A MINTA egy újsorokkal elválasztott rögzített karakterlánc.\n"
-
-#~ msgid "Invocation as 'fgrep' is deprecated; use 'grep -F' instead.\n"
-#~ msgstr ""
-#~ "A hívás „fgrep” formában elavult, használja helyette a „grep -F” alakot.\n"
-
-#~ msgid "%s can only use the %s pattern syntax"
-#~ msgstr "a(z) %s csak a(z) %s mintaszintaxist tudja használni"
+#, c-format
+#~ msgid "JIT internal error: %d"
+#~ msgstr "JIT belső hiba: %d"
diff --git a/po/id.gmo b/po/id.gmo
index 8c14d992..e7ba1d8c 100644
Binary files a/po/id.gmo and b/po/id.gmo differ
diff --git a/po/id.po b/po/id.po
index d8c0134f..67463f55 100644
--- a/po/id.po
+++ b/po/id.po
@@ -3,119 +3,120 @@
 # This file is distributed under the same license as the grep package.
 # Tedi Heriyanto <tedi_h@gmx.net>, 1999-2002.
 # Arif E. Nugroho <arif_endro@yahoo.com>, 2008-2014.
-# Andika Triwidada <andika@gmail.com>, 2018, 2020-2022.
+# Andika Triwidada <andika@gmail.com>, 2018, 2020-2023.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: grep 3.7.98\n"
+"Project-Id-Version: grep 3.10.12\n"
 "Report-Msgid-Bugs-To: bug-grep@gnu.org\n"
-"POT-Creation-Date: 2022-09-02 23:52-0700\n"
-"PO-Revision-Date: 2022-07-04 00:03+0700\n"
+"POT-Creation-Date: 2023-05-13 01:14-0700\n"
+"PO-Revision-Date: 2023-04-27 14:13+0700\n"
 "Last-Translator: Andika Triwidada <andika@gmail.com>\n"
 "Language-Team: Indonesian <translation-team-id@lists.sourceforge.net>\n"
 "Language: id\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=ISO-8859-1\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
 "X-Bugs: Report translation errors to the Language-Team address.\n"
-"X-Generator: Poedit 3.0.1\n"
+"X-Generator: Poedit 3.2.2\n"
 
-#: lib/argmatch.c:147
+#: lib/argmatch.c:145
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "argumen %s yang tidak valid untuk %s"
 
-#: lib/argmatch.c:148
+#: lib/argmatch.c:146
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "argumen %s ambigu untuk %s"
 
-#: lib/argmatch.c:167 lib/argmatch.h:238
+#: lib/argmatch.c:165 lib/argmatch.h:242
 msgid "Valid arguments are:"
 msgstr "Argumen yang valid adalah:"
 
-#: lib/c-stack.c:187
+#: lib/c-stack.c:186
 msgid "program error"
 msgstr "kesalahan program"
 
-#: lib/c-stack.c:188
+#: lib/c-stack.c:187
 msgid "stack overflow"
 msgstr "stack overflow"
 
-#: lib/closeout.c:122 src/grep.c:1346
+#: lib/closeout.c:121 src/grep.c:1346
 msgid "write error"
 msgstr "kesalahan tulis"
 
-#: lib/dfa.c:894
+#: lib/dfa.c:897
 msgid "unbalanced ["
 msgstr "[ tidak seimbang"
 
-#: lib/dfa.c:1015
+#: lib/dfa.c:1018
 msgid "invalid character class"
 msgstr "kelas karakter tidak valid"
 
-#: lib/dfa.c:1143
+#: lib/dfa.c:1146
 msgid "character class syntax is [[:space:]], not [:space:]"
 msgstr "sintaks kelas karakter adalah [[:space:]], bukan [:space:]"
 
-#: lib/dfa.c:1209
+#: lib/dfa.c:1222
 msgid "unfinished \\ escape"
 msgstr "escape \\ tidak selesai"
 
-#: lib/dfa.c:1319
+#: lib/dfa.c:1332
 msgid "? at start of expression"
 msgstr "? di awal ekspresi"
 
-#: lib/dfa.c:1331
+#: lib/dfa.c:1344
 msgid "* at start of expression"
 msgstr "* di awal ekspresi"
 
-#: lib/dfa.c:1345
+#: lib/dfa.c:1358
 msgid "+ at start of expression"
 msgstr "+ di awal ekspresi"
 
-#: lib/dfa.c:1400
+#: lib/dfa.c:1413
 msgid "{...} at start of expression"
 msgstr "{...} di awal ekspresi"
 
-#: lib/dfa.c:1403
+#: lib/dfa.c:1416
 msgid "invalid content of \\{\\}"
 msgstr "isi dari \\{\\} tidak valid"
 
-#: lib/dfa.c:1405
+#: lib/dfa.c:1418
 msgid "regular expression too big"
 msgstr "ekspresi reguler terlalu besar"
 
-#: lib/dfa.c:1555
+#: lib/dfa.c:1568
 msgid "stray \\ before unprintable character"
 msgstr "\\ tercecer sebelum karakter yang tidak dapat dicetak"
 
-#: lib/dfa.c:1557
+#: lib/dfa.c:1570
 msgid "stray \\ before white space"
 msgstr "\\ tercecer sebelum keluarga spasi"
 
-#: lib/dfa.c:1561
+#: lib/dfa.c:1574
 #, c-format
 msgid "stray \\ before %lc"
 msgstr "\\ tercecer sebelum %lc"
 
-#: lib/dfa.c:1562
+#: lib/dfa.c:1575
 msgid "stray \\"
 msgstr "\\ tercecer"
 
-#: lib/dfa.c:1917
+#: lib/dfa.c:1925
 msgid "unbalanced ("
 msgstr "( tidak seimbang"
 
-#: lib/dfa.c:2034
+#: lib/dfa.c:2042
 msgid "no syntax specified"
 msgstr "tidak ada sintaks yang dinyatakan"
 
-#: lib/dfa.c:2045
+#: lib/dfa.c:2053
 msgid "unbalanced )"
 msgstr ") tidak seimbang"
 
-#: lib/error.c:195
+#: lib/error.c:193
 msgid "Unknown system error"
 msgstr "Kesalahan sistem tidak dikenal"
 
@@ -168,7 +169,7 @@ msgstr "tidak bisa merekam direktori kerja sekarang"
 msgid "failed to return to initial working directory"
 msgstr "gagal kembali ke direktori kerja sekarang"
 
-#: lib/xbinary-io.c:37
+#: lib/xbinary-io.c:36
 #, c-format
 msgid "failed to set file descriptor text/binary mode"
 msgstr "gagal menata mode teks/biner descriptor berkas"
@@ -194,11 +195,11 @@ msgstr "gagal menata mode teks/biner descriptor berkas"
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:355
+#: lib/quotearg.c:354
 msgid "`"
 msgstr "'"
 
-#: lib/quotearg.c:356
+#: lib/quotearg.c:355
 msgid "'"
 msgstr "'"
 
@@ -731,69 +732,77 @@ msgstr "cacah maks tidak valid"
 
 #: src/grep.c:2746
 msgid "unknown binary-files type"
-msgstr "tipe berkas biner tidak dikenal"
+msgstr "tipe berkas biner yang tidak dikenal"
 
 #: src/grep.c:2831
 msgid ""
 "Written by Mike Haertel and others; see\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 msgstr ""
 "Ditulis oleh Mike Haertel dan lainnya, lihat\n"
-"<http://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 
-#: src/grep.c:2934
+#: src/grep.c:2937
 #, c-format
 msgid "warning: GREP_COLOR='%s' is deprecated; use GREP_COLORS='mt=%s'"
 msgstr "peringatan: GREP_COLOR= '%s' usang; gunakan GREP_COLORS='mt=%s'"
 
-#: src/pcresearch.c:148
+#: src/pcresearch.c:92
+#, c-format
+msgid ""
+"\n"
+"grep -P uses PCRE2 %s\n"
+msgstr ""
+"\n"
+"grep -P memakai PCRE2 %s\n"
+
+#: src/pcresearch.c:169
+msgid "-P supports only unibyte locales on this platform"
+msgstr "-P hanya mendukung locale unibyte pada platform ini"
+
+#: src/pcresearch.c:171
 msgid "-P supports only unibyte and UTF-8 locales"
 msgstr "-P hanya mendukung unibyte dan locale UTF-8"
 
-#: src/pcresearch.c:162
+#: src/pcresearch.c:194
 msgid "the -P option only supports a single pattern"
 msgstr "opsi -P hanya mendukung sebuah pola tunggal"
 
-#: src/pcresearch.c:215
-#, c-format
-msgid "JIT internal error: %d"
-msgstr "Kesalahan internal JIT: %d"
-
-#: src/pcresearch.c:252
+#: src/pcresearch.c:290
 msgid "exceeded PCRE's line length limit"
 msgstr "melampaui batas panjang baris PCRE"
 
-#: src/pcresearch.c:330
+#: src/pcresearch.c:368
 #, c-format
 msgid "%s: memory exhausted"
 msgstr "%s: kehabisan memori"
 
-#: src/pcresearch.c:333
+#: src/pcresearch.c:371
 #, c-format
 msgid "%s: exhausted PCRE JIT stack"
 msgstr "%s: stack JIT PCRE habis"
 
-#: src/pcresearch.c:337
+#: src/pcresearch.c:375
 #, c-format
 msgid "%s: exceeded PCRE's backtracking limit"
 msgstr "%s: melampaui batas backtrack PCRE"
 
-#: src/pcresearch.c:342
+#: src/pcresearch.c:380
 #, c-format
 msgid "%s: exceeded PCRE's nested backtracking limit"
 msgstr "%s: melampaui batas backtrack bersarang PCRE"
 
-#: src/pcresearch.c:346
+#: src/pcresearch.c:384
 #, c-format
 msgid "%s: PCRE detected recurse loop"
 msgstr "%s: PCRE mendeteksi pengulangan rekursi"
 
-#: src/pcresearch.c:351
+#: src/pcresearch.c:389
 #, c-format
 msgid "%s: exceeded PCRE's heap limit"
 msgstr "%s: melampaui batas heap PCRE"
 
-#: src/pcresearch.c:360
+#: src/pcresearch.c:398
 #, c-format
 msgid "%s: internal PCRE error: %d"
 msgstr "%s: kesalahan PCRE internal: %d"
diff --git a/po/it.gmo b/po/it.gmo
index 3acb5647..f8ebe423 100644
Binary files a/po/it.gmo and b/po/it.gmo differ
diff --git a/po/it.po b/po/it.po
index 9bb6bf72..b61b63e1 100644
--- a/po/it.po
+++ b/po/it.po
@@ -10,7 +10,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: grep-3.6.27\n"
 "Report-Msgid-Bugs-To: bug-grep@gnu.org\n"
-"POT-Creation-Date: 2022-09-02 23:52-0700\n"
+"POT-Creation-Date: 2023-05-13 01:14-0700\n"
 "PO-Revision-Date: 2021-08-19 10:56+0200\n"
 "Last-Translator: Milo Casagrande <milo@milo.name>\n"
 "Language-Team: Italian <tp@lists.linux.it>\n"
@@ -23,105 +23,105 @@ msgstr ""
 "X-Generator: Poedit 2.4.2\n"
 "X-Poedit-SourceCharset: UTF-8\n"
 
-#: lib/argmatch.c:147
+#: lib/argmatch.c:145
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "argomento %s per %s non valido"
 
-#: lib/argmatch.c:148
+#: lib/argmatch.c:146
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "argomento %s ambiguo per %s"
 
-#: lib/argmatch.c:167 lib/argmatch.h:238
+#: lib/argmatch.c:165 lib/argmatch.h:242
 msgid "Valid arguments are:"
 msgstr "Gli argomenti validi sono:"
 
-#: lib/c-stack.c:187
+#: lib/c-stack.c:186
 msgid "program error"
 msgstr "errore del programma"
 
-#: lib/c-stack.c:188
+#: lib/c-stack.c:187
 msgid "stack overflow"
 msgstr "overflow dello stack"
 
-#: lib/closeout.c:122 src/grep.c:1346
+#: lib/closeout.c:121 src/grep.c:1346
 msgid "write error"
 msgstr "errore di scrittura"
 
-#: lib/dfa.c:894
+#: lib/dfa.c:897
 msgid "unbalanced ["
 msgstr "[ non bilanciata"
 
-#: lib/dfa.c:1015
+#: lib/dfa.c:1018
 msgid "invalid character class"
 msgstr "Classe del carattere non valido"
 
-#: lib/dfa.c:1143
+#: lib/dfa.c:1146
 msgid "character class syntax is [[:space:]], not [:space:]"
 msgstr "La sintassi per la classe di caratteri è [[:space:]], non [:space:]"
 
-#: lib/dfa.c:1209
+#: lib/dfa.c:1222
 msgid "unfinished \\ escape"
 msgstr "Escape \\ incompleto"
 
-#: lib/dfa.c:1319
+#: lib/dfa.c:1332
 #, fuzzy
 msgid "? at start of expression"
 msgstr "Espressione regolare non valida"
 
-#: lib/dfa.c:1331
+#: lib/dfa.c:1344
 #, fuzzy
 msgid "* at start of expression"
 msgstr "Espressione regolare non valida"
 
-#: lib/dfa.c:1345
+#: lib/dfa.c:1358
 #, fuzzy
 msgid "+ at start of expression"
 msgstr "Espressione regolare non valida"
 
-#: lib/dfa.c:1400
+#: lib/dfa.c:1413
 msgid "{...} at start of expression"
 msgstr ""
 
-#: lib/dfa.c:1403
+#: lib/dfa.c:1416
 msgid "invalid content of \\{\\}"
 msgstr "Contenuto di \\{\\} non valido"
 
-#: lib/dfa.c:1405
+#: lib/dfa.c:1418
 msgid "regular expression too big"
 msgstr "Espressione regolare troppo grande"
 
-#: lib/dfa.c:1555
+#: lib/dfa.c:1568
 msgid "stray \\ before unprintable character"
 msgstr ""
 
-#: lib/dfa.c:1557
+#: lib/dfa.c:1570
 msgid "stray \\ before white space"
 msgstr ""
 
-#: lib/dfa.c:1561
+#: lib/dfa.c:1574
 #, c-format
 msgid "stray \\ before %lc"
 msgstr ""
 
-#: lib/dfa.c:1562
+#: lib/dfa.c:1575
 msgid "stray \\"
 msgstr ""
 
-#: lib/dfa.c:1917
+#: lib/dfa.c:1925
 msgid "unbalanced ("
 msgstr "( non bilanciata"
 
-#: lib/dfa.c:2034
+#: lib/dfa.c:2042
 msgid "no syntax specified"
 msgstr "Nessuna sintassi specificata"
 
-#: lib/dfa.c:2045
+#: lib/dfa.c:2053
 msgid "unbalanced )"
 msgstr ") non bilanciata"
 
-#: lib/error.c:195
+#: lib/error.c:193
 msgid "Unknown system error"
 msgstr "Errore di sistema sconosciuto"
 
@@ -174,7 +174,7 @@ msgstr "impossibile registrare la directory di lavoro attuale"
 msgid "failed to return to initial working directory"
 msgstr "errore nel restituire la directory di lavoro iniziale"
 
-#: lib/xbinary-io.c:37
+#: lib/xbinary-io.c:36
 #, c-format
 msgid "failed to set file descriptor text/binary mode"
 msgstr ""
@@ -201,11 +201,11 @@ msgstr ""
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:355
+#: lib/quotearg.c:354
 msgid "`"
 msgstr "\""
 
-#: lib/quotearg.c:356
+#: lib/quotearg.c:355
 msgid "'"
 msgstr "\""
 
@@ -749,70 +749,82 @@ msgid "unknown binary-files type"
 msgstr "tipo di file binario sconosciuto"
 
 #: src/grep.c:2831
+#, fuzzy
 msgid ""
 "Written by Mike Haertel and others; see\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 msgstr ""
 "Creato da Mike Haertel e altri; consultare\n"
 "<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
 
-#: src/grep.c:2934
+#: src/grep.c:2937
 #, c-format
 msgid "warning: GREP_COLOR='%s' is deprecated; use GREP_COLORS='mt=%s'"
 msgstr ""
 
-#: src/pcresearch.c:148
+#: src/pcresearch.c:92
+#, c-format
+msgid ""
+"\n"
+"grep -P uses PCRE2 %s\n"
+msgstr ""
+
+#: src/pcresearch.c:169
+#, fuzzy
+msgid "-P supports only unibyte locales on this platform"
+msgstr "-P supporta solamente lingue unibyte e UTF-8"
+
+#: src/pcresearch.c:171
 msgid "-P supports only unibyte and UTF-8 locales"
 msgstr "-P supporta solamente lingue unibyte e UTF-8"
 
-#: src/pcresearch.c:162
+#: src/pcresearch.c:194
 msgid "the -P option only supports a single pattern"
 msgstr "l'opzione -P supporta un solo modello"
 
-#: src/pcresearch.c:215
-#, fuzzy, c-format
-msgid "JIT internal error: %d"
-msgstr "%s: errore interno PCRE: %d"
-
-#: src/pcresearch.c:252
+#: src/pcresearch.c:290
 msgid "exceeded PCRE's line length limit"
 msgstr "limite di lunghezza riga PCRE raggiunto"
 
-#: src/pcresearch.c:330
+#: src/pcresearch.c:368
 #, c-format
 msgid "%s: memory exhausted"
 msgstr "%s: memoria esaurita"
 
-#: src/pcresearch.c:333
+#: src/pcresearch.c:371
 #, c-format
 msgid "%s: exhausted PCRE JIT stack"
 msgstr "%s: stack JIT PCRE esaurito"
 
-#: src/pcresearch.c:337
+#: src/pcresearch.c:375
 #, c-format
 msgid "%s: exceeded PCRE's backtracking limit"
 msgstr "%s: limite di backtrack PCRE raggiunto"
 
-#: src/pcresearch.c:342
+#: src/pcresearch.c:380
 #, fuzzy, c-format
 msgid "%s: exceeded PCRE's nested backtracking limit"
 msgstr "%s: limite di backtrack PCRE raggiunto"
 
-#: src/pcresearch.c:346
+#: src/pcresearch.c:384
 #, c-format
 msgid "%s: PCRE detected recurse loop"
 msgstr ""
 
-#: src/pcresearch.c:351
+#: src/pcresearch.c:389
 #, fuzzy, c-format
 msgid "%s: exceeded PCRE's heap limit"
 msgstr "%s: limite di ricorsione PCRE superato"
 
-#: src/pcresearch.c:360
+#: src/pcresearch.c:398
 #, c-format
 msgid "%s: internal PCRE error: %d"
 msgstr "%s: errore interno PCRE: %d"
 
+#, fuzzy, c-format
+#~ msgid "JIT internal error: %d"
+#~ msgstr "%s: errore interno PCRE: %d"
+
 #~ msgid "failed to allocate memory for the PCRE JIT stack"
 #~ msgstr "impossibile allocare memoria per lo stack PCRE JIT"
 
diff --git a/po/ja.po b/po/ja.po
index f0fd1cb2..136cad47 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -16,7 +16,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: GNU grep 3.0.23-b00\n"
 "Report-Msgid-Bugs-To: bug-grep@gnu.org\n"
-"POT-Creation-Date: 2022-09-02 23:52-0700\n"
+"POT-Creation-Date: 2023-05-13 01:14-0700\n"
 "PO-Revision-Date: 2017-06-25 20:16+0900\n"
 "Last-Translator: Yasuaki Taniguchi <yasuakit@gmail.com>\n"
 "Language-Team: Japanese <translation-team-ja@lists.sourceforge.net>\n"
@@ -28,105 +28,105 @@ msgstr ""
 "Plural-Forms: nplurals=1; plural=0;\n"
 "X-Generator: Poedit 2.0.2\n"
 
-#: lib/argmatch.c:147
+#: lib/argmatch.c:145
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "%2$s に対する引数 %1$s が間違っています"
 
-#: lib/argmatch.c:148
+#: lib/argmatch.c:146
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "%2$s に対する引数 %1$s が曖昧です"
 
-#: lib/argmatch.c:167 lib/argmatch.h:238
+#: lib/argmatch.c:165 lib/argmatch.h:242
 msgid "Valid arguments are:"
 msgstr "有効な引数:"
 
-#: lib/c-stack.c:187
+#: lib/c-stack.c:186
 msgid "program error"
 msgstr "プログラムエラー"
 
-#: lib/c-stack.c:188
+#: lib/c-stack.c:187
 msgid "stack overflow"
 msgstr "スタックオーバーフロー"
 
-#: lib/closeout.c:122 src/grep.c:1346
+#: lib/closeout.c:121 src/grep.c:1346
 msgid "write error"
 msgstr "書き込みエラー"
 
-#: lib/dfa.c:894
+#: lib/dfa.c:897
 msgid "unbalanced ["
 msgstr "対応がとれていない [ です"
 
-#: lib/dfa.c:1015
+#: lib/dfa.c:1018
 msgid "invalid character class"
 msgstr "無効な文字クラス名です"
 
-#: lib/dfa.c:1143
+#: lib/dfa.c:1146
 msgid "character class syntax is [[:space:]], not [:space:]"
 msgstr "文字クラスの構文は [[:space:]] です。 [:space:] ではありません"
 
-#: lib/dfa.c:1209
+#: lib/dfa.c:1222
 msgid "unfinished \\ escape"
 msgstr "\\ エスケープが終了していません"
 
-#: lib/dfa.c:1319
+#: lib/dfa.c:1332
 #, fuzzy
 msgid "? at start of expression"
 msgstr "無効な正規表現です"
 
-#: lib/dfa.c:1331
+#: lib/dfa.c:1344
 #, fuzzy
 msgid "* at start of expression"
 msgstr "無効な正規表現です"
 
-#: lib/dfa.c:1345
+#: lib/dfa.c:1358
 #, fuzzy
 msgid "+ at start of expression"
 msgstr "無効な正規表現です"
 
-#: lib/dfa.c:1400
+#: lib/dfa.c:1413
 msgid "{...} at start of expression"
 msgstr ""
 
-#: lib/dfa.c:1403
+#: lib/dfa.c:1416
 msgid "invalid content of \\{\\}"
 msgstr "\\{\\} の中身が無効です"
 
-#: lib/dfa.c:1405
+#: lib/dfa.c:1418
 msgid "regular expression too big"
 msgstr "正規表現が大きすぎます"
 
-#: lib/dfa.c:1555
+#: lib/dfa.c:1568
 msgid "stray \\ before unprintable character"
 msgstr ""
 
-#: lib/dfa.c:1557
+#: lib/dfa.c:1570
 msgid "stray \\ before white space"
 msgstr ""
 
-#: lib/dfa.c:1561
+#: lib/dfa.c:1574
 #, c-format
 msgid "stray \\ before %lc"
 msgstr ""
 
-#: lib/dfa.c:1562
+#: lib/dfa.c:1575
 msgid "stray \\"
 msgstr ""
 
-#: lib/dfa.c:1917
+#: lib/dfa.c:1925
 msgid "unbalanced ("
 msgstr "対応がとれていない ( です"
 
-#: lib/dfa.c:2034
+#: lib/dfa.c:2042
 msgid "no syntax specified"
 msgstr "構文が指定されていません"
 
-#: lib/dfa.c:2045
+#: lib/dfa.c:2053
 msgid "unbalanced )"
 msgstr "対応がとれていない ) です"
 
-#: lib/error.c:195
+#: lib/error.c:193
 msgid "Unknown system error"
 msgstr "不明なシステムエラー"
 
@@ -179,7 +179,7 @@ msgstr "現在の作業ディレクトリーを記録することができませ
 msgid "failed to return to initial working directory"
 msgstr "初期作業ディレクトリーに戻るのに失敗しました"
 
-#: lib/xbinary-io.c:37
+#: lib/xbinary-io.c:36
 #, c-format
 msgid "failed to set file descriptor text/binary mode"
 msgstr "ファイル記述子をテキスト/バイナリモードに設定できませんでした"
@@ -205,11 +205,11 @@ msgstr "ファイル記述子をテキスト/バイナリモードに設定で
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:355
+#: lib/quotearg.c:354
 msgid "`"
 msgstr "`"
 
-#: lib/quotearg.c:356
+#: lib/quotearg.c:355
 msgid "'"
 msgstr "'"
 
@@ -746,68 +746,79 @@ msgstr "不明なバイナリファイルの形式です"
 #, fuzzy
 msgid ""
 "Written by Mike Haertel and others; see\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 msgstr ""
 "その他の方々は <http://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS> を参照して"
 "ください"
 
-#: src/grep.c:2934
+#: src/grep.c:2937
 #, c-format
 msgid "warning: GREP_COLOR='%s' is deprecated; use GREP_COLORS='mt=%s'"
 msgstr ""
 
-#: src/pcresearch.c:148
+#: src/pcresearch.c:92
+#, c-format
+msgid ""
+"\n"
+"grep -P uses PCRE2 %s\n"
+msgstr ""
+
+#: src/pcresearch.c:169
+#, fuzzy
+msgid "-P supports only unibyte locales on this platform"
+msgstr "-P は1バイトの UTF-8 ロケールのみサポートします"
+
+#: src/pcresearch.c:171
 msgid "-P supports only unibyte and UTF-8 locales"
 msgstr "-P は1バイトの UTF-8 ロケールのみサポートします"
 
-#: src/pcresearch.c:162
+#: src/pcresearch.c:194
 msgid "the -P option only supports a single pattern"
 msgstr "-P オプションは単一のパターンしかサポートしません"
 
-#: src/pcresearch.c:215
-#, fuzzy, c-format
-msgid "JIT internal error: %d"
-msgstr "内部エラー"
-
-#: src/pcresearch.c:252
+#: src/pcresearch.c:290
 msgid "exceeded PCRE's line length limit"
 msgstr "PCRE の行長制限を超過しました"
 
-#: src/pcresearch.c:330
+#: src/pcresearch.c:368
 #, fuzzy, c-format
 msgid "%s: memory exhausted"
 msgstr "メモリを使い果たしました"
 
-#: src/pcresearch.c:333
+#: src/pcresearch.c:371
 #, fuzzy, c-format
 msgid "%s: exhausted PCRE JIT stack"
 msgstr "PCRE JIT スタックを使い果たしました"
 
-#: src/pcresearch.c:337
+#: src/pcresearch.c:375
 #, fuzzy, c-format
 msgid "%s: exceeded PCRE's backtracking limit"
 msgstr "PCRE のバックスラッシュ制限を超過しました"
 
-#: src/pcresearch.c:342
+#: src/pcresearch.c:380
 #, fuzzy, c-format
 msgid "%s: exceeded PCRE's nested backtracking limit"
 msgstr "PCRE のバックスラッシュ制限を超過しました"
 
-#: src/pcresearch.c:346
+#: src/pcresearch.c:384
 #, c-format
 msgid "%s: PCRE detected recurse loop"
 msgstr ""
 
-#: src/pcresearch.c:351
+#: src/pcresearch.c:389
 #, fuzzy, c-format
 msgid "%s: exceeded PCRE's heap limit"
 msgstr "PCRE のバックスラッシュ制限を超過しました"
 
-#: src/pcresearch.c:360
+#: src/pcresearch.c:398
 #, fuzzy, c-format
 msgid "%s: internal PCRE error: %d"
 msgstr "PCRE 内部エラー: %d"
 
+#, fuzzy, c-format
+#~ msgid "JIT internal error: %d"
+#~ msgstr "内部エラー"
+
 #~ msgid "failed to allocate memory for the PCRE JIT stack"
 #~ msgstr "PCRE JIT スタックへのメモリ割り当てに失敗しました"
 
diff --git a/po/ka.gmo b/po/ka.gmo
index 0161d3f0..cfe631e7 100644
Binary files a/po/ka.gmo and b/po/ka.gmo differ
diff --git a/po/ka.po b/po/ka.po
index fbce69fb..40e71319 100644
--- a/po/ka.po
+++ b/po/ka.po
@@ -1,123 +1,120 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) 2022 Free Software Foundation, Inc.
+# Georgian translation for grep
+# Copyright (C) 2023 Free Software Foundation, Inc.
 # This file is distributed under the same license as the grep package.
-# Temuri Doghonadze <temuri.doghonadze@gmail.com>, 2022
+# Temuri Doghonadze <temuri.doghonadze@gmail.com>, 2023
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: GNU grep 3.7.62\n"
+"Project-Id-Version: grep 3.10.12\n"
 "Report-Msgid-Bugs-To: bug-grep@gnu.org\n"
-"POT-Creation-Date: 2022-09-02 23:52-0700\n"
-"PO-Revision-Date: 2022-04-27 08:41+0200\n"
+"POT-Creation-Date: 2023-05-13 01:14-0700\n"
+"PO-Revision-Date: 2023-04-21 16:25+0200\n"
 "Last-Translator: Temuri Doghonadze <temuri.doghonadze@gmail.com>\n"
 "Language-Team: Georgian <(nothing)>\n"
 "Language: ka\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
 "X-Bugs: Report translation errors to the Language-Team address.\n"
-"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Poedit 3.0.1\n"
+"X-Generator: Poedit 3.2.2\n"
 
-#: lib/argmatch.c:147
+#: lib/argmatch.c:145
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "%s არასწორი არგუმენტია %s-თვის"
 
-#: lib/argmatch.c:148
+#: lib/argmatch.c:146
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "%s გაურკვეველი არგუმენტია %s-თვის"
 
-#: lib/argmatch.c:167 lib/argmatch.h:238
+#: lib/argmatch.c:165 lib/argmatch.h:242
 msgid "Valid arguments are:"
 msgstr "სწორი არგუმენტებია:"
 
-#: lib/c-stack.c:187
+#: lib/c-stack.c:186
 msgid "program error"
 msgstr "პროგრამის შეცდომა"
 
-#: lib/c-stack.c:188
+#: lib/c-stack.c:187
 msgid "stack overflow"
 msgstr "სტეკის გადავსება"
 
-#: lib/closeout.c:122 src/grep.c:1346
+#: lib/closeout.c:121 src/grep.c:1346
 msgid "write error"
 msgstr "ჩაწერის შეცდომა"
 
-#: lib/dfa.c:894
+#: lib/dfa.c:897
 msgid "unbalanced ["
 msgstr "დაუბალანსებელი ["
 
-#: lib/dfa.c:1015
+#: lib/dfa.c:1018
 msgid "invalid character class"
 msgstr "სიმბოლოების არასწორი კლასი"
 
-#: lib/dfa.c:1143
+#: lib/dfa.c:1146
 msgid "character class syntax is [[:space:]], not [:space:]"
 msgstr "სიმბოლოების კლასის სწორი სინტაქსია [[:space:]] და არა [:space:]"
 
-#: lib/dfa.c:1209
+#: lib/dfa.c:1222
 msgid "unfinished \\ escape"
 msgstr "დაუსრულებელი დასრულების სიმბოლო \\"
 
-#: lib/dfa.c:1319
-#, fuzzy
+#: lib/dfa.c:1332
 msgid "? at start of expression"
-msgstr "არასწორი რეგულარული გამოსახულება"
+msgstr "? გამოსახულების დასაწყისში"
 
-#: lib/dfa.c:1331
-#, fuzzy
+#: lib/dfa.c:1344
 msgid "* at start of expression"
-msgstr "არასწორი რეგულარული გამოსახულება"
+msgstr "* გამოსახულების დასაწყისში"
 
-#: lib/dfa.c:1345
-#, fuzzy
+#: lib/dfa.c:1358
 msgid "+ at start of expression"
-msgstr "არასწორი რეგულარული გამოსახულება"
+msgstr "+ გამოსახულების დასაწყისში"
 
-#: lib/dfa.c:1400
+#: lib/dfa.c:1413
 msgid "{...} at start of expression"
-msgstr ""
+msgstr "{...} გამოსახულების დასაწყისში"
 
-#: lib/dfa.c:1403
+#: lib/dfa.c:1416
 msgid "invalid content of \\{\\}"
 msgstr "\\{\\}-ის არასწორი შემცველობა"
 
-#: lib/dfa.c:1405
+#: lib/dfa.c:1418
 msgid "regular expression too big"
 msgstr "რეგულარული გამოსახულება ძალიან დიდია"
 
-#: lib/dfa.c:1555
+#: lib/dfa.c:1568
 msgid "stray \\ before unprintable character"
-msgstr ""
+msgstr "უცხო \\ დაუბეჭდავად  სიმბოლომდე"
 
-#: lib/dfa.c:1557
+#: lib/dfa.c:1570
 msgid "stray \\ before white space"
-msgstr ""
+msgstr "უცხო \\ თეთრ გამოტოვებამდე"
 
-#: lib/dfa.c:1561
+#: lib/dfa.c:1574
 #, c-format
 msgid "stray \\ before %lc"
-msgstr ""
+msgstr "უცხო \\ %lc-მდე"
 
-#: lib/dfa.c:1562
+#: lib/dfa.c:1575
 msgid "stray \\"
-msgstr ""
+msgstr "უცხო \\"
 
-#: lib/dfa.c:1917
+#: lib/dfa.c:1925
 msgid "unbalanced ("
 msgstr "დაუბალანსებელი ("
 
-#: lib/dfa.c:2034
+#: lib/dfa.c:2042
 msgid "no syntax specified"
 msgstr "სინტაქსი მითითებული არაა"
 
-#: lib/dfa.c:2045
+#: lib/dfa.c:2053
 msgid "unbalanced )"
 msgstr "დაუბალანსებელი )"
 
-#: lib/error.c:195
+#: lib/error.c:193
 msgid "Unknown system error"
 msgstr "სისტემის უცნობი შეცდომა"
 
@@ -139,12 +136,12 @@ msgstr "%s: უცნობი პარამეტრი '%s'%s'\n"
 #: lib/getopt.c:345
 #, c-format
 msgid "%s: option '%s%s' doesn't allow an argument\n"
-msgstr "%s: პარამეტრს '%s%s' არგუმენტი არ მიეთითება\n"
+msgstr "%s: პარამეტრს \"%s%s' არგუმენტი არ სჭირდება\n"
 
 #: lib/getopt.c:360
 #, c-format
 msgid "%s: option '%s%s' requires an argument\n"
-msgstr "%s: პარამეტრს '%s%s' არგუმენტი სჭირდება\n"
+msgstr "%s: პარამეტრს \"%s%s\" არგუმენტი ესაჭიროება\n"
 
 #: lib/getopt.c:621
 #, c-format
@@ -170,7 +167,7 @@ msgstr "მიმდინარე საქაღალდის ჩაწე
 msgid "failed to return to initial working directory"
 msgstr "საწყისი საქაღალდის დაბრუნების შეცდომა"
 
-#: lib/xbinary-io.c:37
+#: lib/xbinary-io.c:36
 #, c-format
 msgid "failed to set file descriptor text/binary mode"
 msgstr "ფაილის დესკრიპტორის ტექსტური/ბინარული რეჟიმის დაყენების შეცდომა"
@@ -196,11 +193,11 @@ msgstr "ფაილის დესკრიპტორის ტექსტ
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:355
+#: lib/quotearg.c:354
 msgid "`"
 msgstr "`"
 
-#: lib/quotearg.c:356
+#: lib/quotearg.c:355
 msgid "'"
 msgstr "'"
 
@@ -210,7 +207,7 @@ msgstr "წარმატება"
 
 #: lib/regcomp.c:125
 msgid "No match"
-msgstr "დამთხვევის გარეშე"
+msgstr "არ ემთხვევა"
 
 #: lib/regcomp.c:128
 msgid "Invalid regular expression"
@@ -440,7 +437,7 @@ msgstr "GNU-ის პროგრამული უზრუნველყო
 #: src/dfasearch.c:59
 #, c-format
 msgid "warning: %s"
-msgstr ""
+msgstr "გაფრთხილება: %s"
 
 #: src/grep.c:656
 msgid "(standard input)"
@@ -652,14 +649,11 @@ msgid ""
 msgstr ""
 "  -L, --files-without-match     იმ ფაილების, რომლებიც არ შეიცავენ მითითებულ "
 "სტრიქონს, მხოლოდ სახელების გამოტანა\n"
-"  -l,  --files-with-matches       იმ ფაილების, როლებიც შეიცავენ მითითებულ "
+"  -l, --files-with-matches     იმ ფაილების, როლებიც შეიცავენ მითითებულ "
 "სტრიქონს, მხოლოდ სახელების გამოტანა\n"
-"  -c, --count                            თითოეული ფაილიდან მხოლოდ მითითებული "
-"რაოდენობის ხაზების გამოტანა\n"
-"  -T, --initial-tab                     საჭიროების შემთხვევაში სტრიქონების "
-"ჰარეებით შევსება\n"
-"  -Z, --null                              ფაილის სახელის შემდეგ ნულოვანი "
-"ბაიტის დასმა\n"
+"  -c, --count     ფაილებიდან მხოლოდ მითითებული რაოდენობის ხაზების გამოტანა\n"
+"  -T, --initial-tab  საჭიროების შემთხვევაში სტრიქონების ჰარეებით შევსება\n"
+"  -Z, --null      ფაილის სახელის შემდეგ ნულოვანი ბაიტის დასმა\n"
 
 #: src/grep.c:2046
 #, c-format
@@ -758,70 +752,83 @@ msgstr "მანქანური ფაილის არასწორი
 #: src/grep.c:2831
 msgid ""
 "Written by Mike Haertel and others; see\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 msgstr ""
 "დაწერილია მაიკ ჰენთელისა და სხვების მიერ; იხ:\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 
-#: src/grep.c:2934
+#: src/grep.c:2937
 #, c-format
 msgid "warning: GREP_COLOR='%s' is deprecated; use GREP_COLORS='mt=%s'"
 msgstr ""
+"გაფრთხილება: GREP_COLOR='%s' მოძველებულია; გამოიყენეთ GREP_COLORS='mt=%s'"
 
-#: src/pcresearch.c:148
+#: src/pcresearch.c:92
+#, c-format
+msgid ""
+"\n"
+"grep -P uses PCRE2 %s\n"
+msgstr ""
+"\n"
+"grep -P იყენებს PCRE2 %s\n"
+
+#: src/pcresearch.c:169
+msgid "-P supports only unibyte locales on this platform"
+msgstr "-P -ს ამ პლატფორმაზე მხოლოდ ერთბაიტიანი ენების მხარდაჭერა გააჩნია"
+
+#: src/pcresearch.c:171
 msgid "-P supports only unibyte and UTF-8 locales"
 msgstr "-P -ს მხოლოდ ერთბაიტიანი და UTF-8 ენების მხარდაჭერა გააჩნია"
 
-#: src/pcresearch.c:162
+#: src/pcresearch.c:194
 msgid "the -P option only supports a single pattern"
 msgstr "-P-ს მხოლოდ ერთი შაბლონის მხარდაჭერა გააჩნია"
 
-#: src/pcresearch.c:215
-#, c-format
-msgid "JIT internal error: %d"
-msgstr "JIT-ის შიდა შეცდომა: %d"
-
-#: src/pcresearch.c:252
+#: src/pcresearch.c:290
 msgid "exceeded PCRE's line length limit"
 msgstr "გადაჭარბებულია PCRE-ის ხაზის სიგრძის ლიმიტი"
 
-#: src/pcresearch.c:330
+#: src/pcresearch.c:368
 #, c-format
 msgid "%s: memory exhausted"
 msgstr "%s: მეხსიერება გადავსებულია"
 
-#: src/pcresearch.c:333
+#: src/pcresearch.c:371
 #, c-format
 msgid "%s: exhausted PCRE JIT stack"
 msgstr "%s: PCRE JIT stack-ი გახარჯულია"
 
-#: src/pcresearch.c:337
+#: src/pcresearch.c:375
 #, c-format
 msgid "%s: exceeded PCRE's backtracking limit"
 msgstr "%s: PCRE-ის უკუდევნების ლიმიტი გადაჭარბებულია"
 
-#: src/pcresearch.c:342
+#: src/pcresearch.c:380
 #, c-format
 msgid "%s: exceeded PCRE's nested backtracking limit"
 msgstr "%s: PCRE-ის ჩალაგებული უკუდევნების ლიმიტი გადაჭარბებულია"
 
-#: src/pcresearch.c:346
+#: src/pcresearch.c:384
 #, c-format
 msgid "%s: PCRE detected recurse loop"
 msgstr "%s : PCRE-მ რეკურსიული მარყუჟი აღმოაჩინა"
 
-#: src/pcresearch.c:351
+#: src/pcresearch.c:389
 #, c-format
 msgid "%s: exceeded PCRE's heap limit"
 msgstr "%s: PCRE-ის გამოყოფილი მეხსიერების ლიმიტი გადაჭარბებულია"
 
-#: src/pcresearch.c:360
+#: src/pcresearch.c:398
 #, c-format
 msgid "%s: internal PCRE error: %d"
 msgstr "%s: PCRE-ის შიდა შეცდომა: %d"
 
-#~ msgid "failed to allocate memory for the PCRE JIT stack"
-#~ msgstr "pCRE JIT Stack-ის მეხსიერების გამოყოფის პრობლემა"
+#~ msgid ""
+#~ "\n"
+#~ "Built with PCRE "
+#~ msgstr ""
+#~ "\n"
+#~ "აგებულია PCRE-ით "
 
-#~ msgid "internal error (should never happen)"
-#~ msgstr "შიდა შეცდომა (არასოდეს ხდება)"
+#~ msgid "JIT internal error: %d"
+#~ msgstr "JIT-ის შიდა შეცდომა: %d"
diff --git a/po/ko.gmo b/po/ko.gmo
index 067b25d1..3d84fccf 100644
Binary files a/po/ko.gmo and b/po/ko.gmo differ
diff --git a/po/ko.po b/po/ko.po
index 3b50b708..940cb335 100644
--- a/po/ko.po
+++ b/po/ko.po
@@ -2,14 +2,14 @@
 # This file is distributed under the same license as the grep package.
 # Copyright (C) 1996, 1997, 2019 Free Software Foundation, Inc.
 # Bang Jun-Young <bangjy@geocities.com>, 1996-1997.
-# Seong-ho Cho <darkcircle.0426@gmail.com>, 2019-2022.
+# Seong-ho Cho <darkcircle.0426@gmail.com>, 2019-2023.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: GNU grep 3.7.98\n"
+"Project-Id-Version: GNU grep 3.10.12\n"
 "Report-Msgid-Bugs-To: bug-grep@gnu.org\n"
-"POT-Creation-Date: 2022-09-02 23:52-0700\n"
-"PO-Revision-Date: 2022-07-04 03:56+0900\n"
+"POT-Creation-Date: 2023-05-13 01:14-0700\n"
+"PO-Revision-Date: 2023-04-22 16:05+0900\n"
 "Last-Translator: Seong-ho Cho <darkcircle.0426@gmail.com>\n"
 "Language-Team: Korean <translation-team-ko@googlegroups.com>\n"
 "Language: ko\n"
@@ -19,102 +19,102 @@ msgstr ""
 "X-Bugs: Report translation errors to the Language-Team address.\n"
 "X-Generator: Poedit 2.3.1\n"
 
-#: lib/argmatch.c:147
+#: lib/argmatch.c:145
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "%2$s 대상 잘못된 인자 %1$s"
 
-#: lib/argmatch.c:148
+#: lib/argmatch.c:146
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "%2$s 대상 모호한 인자 %1$s"
 
-#: lib/argmatch.c:167 lib/argmatch.h:238
+#: lib/argmatch.c:165 lib/argmatch.h:242
 msgid "Valid arguments are:"
 msgstr "유효한 인자는 다음과 같습니다:"
 
-#: lib/c-stack.c:187
+#: lib/c-stack.c:186
 msgid "program error"
 msgstr "프로그램 오류"
 
-#: lib/c-stack.c:188
+#: lib/c-stack.c:187
 msgid "stack overflow"
 msgstr "스택 오버플로우"
 
-#: lib/closeout.c:122 src/grep.c:1346
+#: lib/closeout.c:121 src/grep.c:1346
 msgid "write error"
 msgstr "기록 오류"
 
-#: lib/dfa.c:894
+#: lib/dfa.c:897
 msgid "unbalanced ["
 msgstr "짝이 맞지 않는 [ 괄호"
 
-#: lib/dfa.c:1015
+#: lib/dfa.c:1018
 msgid "invalid character class"
 msgstr "잘못된 문자 클래스"
 
-#: lib/dfa.c:1143
+#: lib/dfa.c:1146
 msgid "character class syntax is [[:space:]], not [:space:]"
 msgstr "문자 클래스 표기 방식은 [:space:]가 아닌 [[:space:]]입니다"
 
-#: lib/dfa.c:1209
+#: lib/dfa.c:1222
 msgid "unfinished \\ escape"
 msgstr "끝나지 않은 \\ 이스케이프 문자"
 
-#: lib/dfa.c:1319
+#: lib/dfa.c:1332
 msgid "? at start of expression"
 msgstr "정규 표현식 시작 부분에 ? 연산자"
 
-#: lib/dfa.c:1331
+#: lib/dfa.c:1344
 msgid "* at start of expression"
 msgstr "정규 표현식 시작 부분에 * 연산자"
 
-#: lib/dfa.c:1345
+#: lib/dfa.c:1358
 msgid "+ at start of expression"
 msgstr "정규 표현식 시작 부분에 + 연산자"
 
-#: lib/dfa.c:1400
+#: lib/dfa.c:1413
 msgid "{...} at start of expression"
 msgstr "정규 표현식 시작 부분에 {..}"
 
-#: lib/dfa.c:1403
+#: lib/dfa.c:1416
 msgid "invalid content of \\{\\}"
 msgstr "잘못된 \\{\\} 내용"
 
-#: lib/dfa.c:1405
+#: lib/dfa.c:1418
 msgid "regular expression too big"
 msgstr "정규 표현식이 너무 깁니다"
 
-#: lib/dfa.c:1555
+#: lib/dfa.c:1568
 msgid "stray \\ before unprintable character"
 msgstr "출력할 수 없는 문자 이전 위치를 벗어난 \\ 문자"
 
-#: lib/dfa.c:1557
+#: lib/dfa.c:1570
 msgid "stray \\ before white space"
 msgstr "공백 문자 이전 위치를 벗어난 \\ 문자"
 
-#: lib/dfa.c:1561
+#: lib/dfa.c:1574
 #, c-format
 msgid "stray \\ before %lc"
 msgstr "%lc 전 위치를 벗어난 \\ 문자"
 
-#: lib/dfa.c:1562
+#: lib/dfa.c:1575
 msgid "stray \\"
 msgstr "위치를 벗어난 \\ 문자"
 
-#: lib/dfa.c:1917
+#: lib/dfa.c:1925
 msgid "unbalanced ("
 msgstr "짝이 맞지 않는 ( 괄호"
 
-#: lib/dfa.c:2034
+#: lib/dfa.c:2042
 msgid "no syntax specified"
 msgstr "문법을 지정하지 않았습니다"
 
-#: lib/dfa.c:2045
+#: lib/dfa.c:2053
 msgid "unbalanced )"
 msgstr "짝이 맞지 않는 ) 괄호"
 
-#: lib/error.c:195
+#: lib/error.c:193
 msgid "Unknown system error"
 msgstr "알 수 없는 시스템 오류"
 
@@ -167,7 +167,7 @@ msgstr "현재 작업 디렉터리를 기록할 수 없습니다"
 msgid "failed to return to initial working directory"
 msgstr "초기 작업 디렉터리 반환에 실패했습니다"
 
-#: lib/xbinary-io.c:37
+#: lib/xbinary-io.c:36
 #, c-format
 msgid "failed to set file descriptor text/binary mode"
 msgstr "텍스트/바이너리 모드 파일 서술자 설정에 실패했습니다"
@@ -193,11 +193,11 @@ msgstr "텍스트/바이너리 모드 파일 서술자 설정에 실패했습니
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:355
+#: lib/quotearg.c:354
 msgid "`"
 msgstr "`"
 
-#: lib/quotearg.c:356
+#: lib/quotearg.c:355
 msgid "'"
 msgstr "'"
 
@@ -736,70 +736,89 @@ msgstr "알 수 없는 바이너리 파일 형식"
 #: src/grep.c:2831
 msgid ""
 "Written by Mike Haertel and others; see\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 msgstr ""
 "Mike Haertel 등이 작성함. 기타 작성자 정보는\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS> 링크를 참고하십시오."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS> 링크를 참고하십시"
+"오."
 
-#: src/grep.c:2934
+#: src/grep.c:2937
 #, c-format
 msgid "warning: GREP_COLOR='%s' is deprecated; use GREP_COLORS='mt=%s'"
 msgstr ""
 "경고: GREP_COLOR='%s' 환경 변수는 더 이상 사용하지 않습니다. "
 "GREP_COLORS='mt=%s' 변수를 사용하십시오."
 
-#: src/pcresearch.c:148
+#: src/pcresearch.c:92
+#, c-format
+msgid ""
+"\n"
+"grep -P uses PCRE2 %s\n"
+msgstr ""
+"\n"
+"grep -P 옵션은 PCRE2 %s을(를) 활용합니다\n"
+
+#: src/pcresearch.c:169
+msgid "-P supports only unibyte locales on this platform"
+msgstr "-P 옵션은 이 플랫폼에서 유니바이트 로캘만 지원합니다"
+
+#: src/pcresearch.c:171
 msgid "-P supports only unibyte and UTF-8 locales"
 msgstr "-P 유니바이트, UTF-8 로캘만 지원합니다"
 
-#: src/pcresearch.c:162
+#: src/pcresearch.c:194
 msgid "the -P option only supports a single pattern"
 msgstr "-P 옵션은 단일 패턴만 지원합니다"
 
-#: src/pcresearch.c:215
-#, c-format
-msgid "JIT internal error: %d"
-msgstr "JIT 내부 오류: %d"
-
-#: src/pcresearch.c:252
+#: src/pcresearch.c:290
 msgid "exceeded PCRE's line length limit"
 msgstr "PCRE 행 길이 한계 초과"
 
-#: src/pcresearch.c:330
+#: src/pcresearch.c:368
 #, c-format
 msgid "%s: memory exhausted"
 msgstr "%s: 메모리가 바닥남"
 
-#: src/pcresearch.c:333
+#: src/pcresearch.c:371
 #, c-format
 msgid "%s: exhausted PCRE JIT stack"
 msgstr "%s: PCRE JIT 스택 가득 참"
 
-#: src/pcresearch.c:337
+#: src/pcresearch.c:375
 #, c-format
 msgid "%s: exceeded PCRE's backtracking limit"
 msgstr "%s: PCRE 후위 추적 한계 초과"
 
-#: src/pcresearch.c:342
+#: src/pcresearch.c:380
 #, c-format
 msgid "%s: exceeded PCRE's nested backtracking limit"
 msgstr "%s: PCRE 중첩 후위 추적 한계 초과"
 
-#: src/pcresearch.c:346
+#: src/pcresearch.c:384
 #, c-format
 msgid "%s: PCRE detected recurse loop"
 msgstr "%s: PCRE에서 재귀 순환 발견"
 
-#: src/pcresearch.c:351
+#: src/pcresearch.c:389
 #, c-format
 msgid "%s: exceeded PCRE's heap limit"
 msgstr "%s: PCRE 힙 영역 한계 초과"
 
-#: src/pcresearch.c:360
+#: src/pcresearch.c:398
 #, c-format
 msgid "%s: internal PCRE error: %d"
 msgstr "%s: 내부 PCRE 오류: %d"
 
+#~ msgid ""
+#~ "\n"
+#~ "Built with PCRE "
+#~ msgstr ""
+#~ "\n"
+#~ "PCRE를 함께 빌드함 "
+
+#~ msgid "JIT internal error: %d"
+#~ msgstr "JIT 내부 오류: %d"
+
 #~ msgid "failed to allocate memory for the PCRE JIT stack"
 #~ msgstr "PCRE JIT 스택의 메모리 할당에 실패했습니다"
 
diff --git a/po/ky.po b/po/ky.po
index c1fed232..289361dd 100644
--- a/po/ky.po
+++ b/po/ky.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: grep 2.5.3\n"
 "Report-Msgid-Bugs-To: bug-grep@gnu.org\n"
-"POT-Creation-Date: 2022-09-02 23:52-0700\n"
+"POT-Creation-Date: 2023-05-13 01:14-0700\n"
 "PO-Revision-Date: 2007-09-01 17:27+0100\n"
 "Last-Translator: Azilet Beishenaliev <aziletb@gmail.com>\n"
 "Language-Team: Kirghiz <i18n-team-ky-kyrgyz@lists.sourceforge.net>\n"
@@ -20,110 +20,110 @@ msgstr ""
 "X-Poedit-Language: Kyrgyz\n"
 "X-Poedit-Country: KYRGYZSTAN\n"
 
-#: lib/argmatch.c:147
+#: lib/argmatch.c:145
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr ""
 
-#: lib/argmatch.c:148
+#: lib/argmatch.c:146
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr ""
 
-#: lib/argmatch.c:167 lib/argmatch.h:238
+#: lib/argmatch.c:165 lib/argmatch.h:242
 msgid "Valid arguments are:"
 msgstr ""
 
-#: lib/c-stack.c:187
+#: lib/c-stack.c:186
 msgid "program error"
 msgstr ""
 
-#: lib/c-stack.c:188
+#: lib/c-stack.c:187
 msgid "stack overflow"
 msgstr ""
 
-#: lib/closeout.c:122 src/grep.c:1346
+#: lib/closeout.c:121 src/grep.c:1346
 msgid "write error"
 msgstr ""
 
-#: lib/dfa.c:894
+#: lib/dfa.c:897
 #, fuzzy
 msgid "unbalanced ["
 msgstr "[ - мунун уйкашы жок"
 
-#: lib/dfa.c:1015
+#: lib/dfa.c:1018
 msgid "invalid character class"
 msgstr ""
 
-#: lib/dfa.c:1143
+#: lib/dfa.c:1146
 msgid "character class syntax is [[:space:]], not [:space:]"
 msgstr ""
 
 # escape - кыргызча???
-#: lib/dfa.c:1209
+#: lib/dfa.c:1222
 #, fuzzy
 msgid "unfinished \\ escape"
 msgstr "Бүтпөй калган эскейп \\"
 
-#: lib/dfa.c:1319
+#: lib/dfa.c:1332
 msgid "? at start of expression"
 msgstr ""
 
-#: lib/dfa.c:1331
+#: lib/dfa.c:1344
 msgid "* at start of expression"
 msgstr ""
 
-#: lib/dfa.c:1345
+#: lib/dfa.c:1358
 msgid "+ at start of expression"
 msgstr ""
 
-#: lib/dfa.c:1400
+#: lib/dfa.c:1413
 msgid "{...} at start of expression"
 msgstr ""
 
-#: lib/dfa.c:1403
+#: lib/dfa.c:1416
 #, fuzzy
 msgid "invalid content of \\{\\}"
 msgstr "максимум сан жарабайт"
 
-#: lib/dfa.c:1405
+#: lib/dfa.c:1418
 msgid "regular expression too big"
 msgstr ""
 
-#: lib/dfa.c:1555
+#: lib/dfa.c:1568
 msgid "stray \\ before unprintable character"
 msgstr ""
 
-#: lib/dfa.c:1557
+#: lib/dfa.c:1570
 msgid "stray \\ before white space"
 msgstr ""
 
-#: lib/dfa.c:1561
+#: lib/dfa.c:1574
 #, c-format
 msgid "stray \\ before %lc"
 msgstr ""
 
-#: lib/dfa.c:1562
+#: lib/dfa.c:1575
 msgid "stray \\"
 msgstr ""
 
-#: lib/dfa.c:1917
+#: lib/dfa.c:1925
 #, fuzzy
 msgid "unbalanced ("
 msgstr "( - мунун уйкашы жок"
 
 # кайсы синтаксис? грептин шаблонубу?
-#: lib/dfa.c:2034
+#: lib/dfa.c:2042
 #, fuzzy
 msgid "no syntax specified"
 msgstr "Синтаксис аталган жок"
 
-#: lib/dfa.c:2045
+#: lib/dfa.c:2053
 #, fuzzy
 msgid "unbalanced )"
 msgstr ") - мунун уйкашы жок"
 
-#: lib/error.c:195
+#: lib/error.c:193
 msgid "Unknown system error"
 msgstr "Белгисиз система катасы"
 
@@ -177,7 +177,7 @@ msgstr ""
 msgid "failed to return to initial working directory"
 msgstr ""
 
-#: lib/xbinary-io.c:37
+#: lib/xbinary-io.c:36
 #, c-format
 msgid "failed to set file descriptor text/binary mode"
 msgstr ""
@@ -203,11 +203,11 @@ msgstr ""
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:355
+#: lib/quotearg.c:354
 msgid "`"
 msgstr "\""
 
-#: lib/quotearg.c:356
+#: lib/quotearg.c:355
 msgid "'"
 msgstr "\""
 
@@ -687,64 +687,70 @@ msgstr "белгисиз файл түрү"
 #: src/grep.c:2831
 msgid ""
 "Written by Mike Haertel and others; see\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 msgstr ""
 
-#: src/grep.c:2934
+#: src/grep.c:2937
 #, c-format
 msgid "warning: GREP_COLOR='%s' is deprecated; use GREP_COLORS='mt=%s'"
 msgstr ""
 
-#: src/pcresearch.c:148
+#: src/pcresearch.c:92
+#, c-format
+msgid ""
+"\n"
+"grep -P uses PCRE2 %s\n"
+msgstr ""
+
+#: src/pcresearch.c:169
+msgid "-P supports only unibyte locales on this platform"
+msgstr ""
+
+#: src/pcresearch.c:171
 msgid "-P supports only unibyte and UTF-8 locales"
 msgstr ""
 
-#: src/pcresearch.c:162
+#: src/pcresearch.c:194
 #, fuzzy
 msgid "the -P option only supports a single pattern"
 msgstr "-P опциясы бир гана шаблон ала алат"
 
-#: src/pcresearch.c:215
-#, c-format
-msgid "JIT internal error: %d"
-msgstr ""
-
-#: src/pcresearch.c:252
+#: src/pcresearch.c:290
 msgid "exceeded PCRE's line length limit"
 msgstr ""
 
 # Памятты эмне дейбиз яя? ;)
-#: src/pcresearch.c:330
+#: src/pcresearch.c:368
 #, fuzzy, c-format
 msgid "%s: memory exhausted"
 msgstr "память жетпей калды"
 
-#: src/pcresearch.c:333
+#: src/pcresearch.c:371
 #, c-format
 msgid "%s: exhausted PCRE JIT stack"
 msgstr ""
 
-#: src/pcresearch.c:337
+#: src/pcresearch.c:375
 #, c-format
 msgid "%s: exceeded PCRE's backtracking limit"
 msgstr ""
 
-#: src/pcresearch.c:342
+#: src/pcresearch.c:380
 #, c-format
 msgid "%s: exceeded PCRE's nested backtracking limit"
 msgstr ""
 
-#: src/pcresearch.c:346
+#: src/pcresearch.c:384
 #, c-format
 msgid "%s: PCRE detected recurse loop"
 msgstr ""
 
-#: src/pcresearch.c:351
+#: src/pcresearch.c:389
 #, c-format
 msgid "%s: exceeded PCRE's heap limit"
 msgstr ""
 
-#: src/pcresearch.c:360
+#: src/pcresearch.c:398
 #, c-format
 msgid "%s: internal PCRE error: %d"
 msgstr ""
diff --git a/po/lt.po b/po/lt.po
index a3be6591..578e58bd 100644
--- a/po/lt.po
+++ b/po/lt.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: grep-2.5.4-pre3\n"
 "Report-Msgid-Bugs-To: bug-grep@gnu.org\n"
-"POT-Creation-Date: 2022-09-02 23:52-0700\n"
+"POT-Creation-Date: 2023-05-13 01:14-0700\n"
 "PO-Revision-Date: 2008-07-09 13:28+0300\n"
 "Last-Translator: Gintautas Miliauskas <gintas@akl.lt>\n"
 "Language-Team: Lithuanian <komp_lt@konferencijos.lt>\n"
@@ -20,108 +20,108 @@ msgstr ""
 "Plural-Forms:  nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
 "(n%100<10 || n%100>=20) ? 1 : 2);\n"
 
-#: lib/argmatch.c:147
+#: lib/argmatch.c:145
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr ""
 
-#: lib/argmatch.c:148
+#: lib/argmatch.c:146
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr ""
 
-#: lib/argmatch.c:167 lib/argmatch.h:238
+#: lib/argmatch.c:165 lib/argmatch.h:242
 msgid "Valid arguments are:"
 msgstr ""
 
-#: lib/c-stack.c:187
+#: lib/c-stack.c:186
 msgid "program error"
 msgstr ""
 
-#: lib/c-stack.c:188
+#: lib/c-stack.c:187
 msgid "stack overflow"
 msgstr ""
 
-#: lib/closeout.c:122 src/grep.c:1346
+#: lib/closeout.c:121 src/grep.c:1346
 msgid "write error"
 msgstr ""
 
-#: lib/dfa.c:894
+#: lib/dfa.c:897
 #, fuzzy
 msgid "unbalanced ["
 msgstr "Nesubalansuotas ["
 
-#: lib/dfa.c:1015
+#: lib/dfa.c:1018
 msgid "invalid character class"
 msgstr ""
 
-#: lib/dfa.c:1143
+#: lib/dfa.c:1146
 msgid "character class syntax is [[:space:]], not [:space:]"
 msgstr ""
 
-#: lib/dfa.c:1209
+#: lib/dfa.c:1222
 #, fuzzy
 msgid "unfinished \\ escape"
 msgstr "Nebaigta \\ kaitos seka"
 
-#: lib/dfa.c:1319
+#: lib/dfa.c:1332
 msgid "? at start of expression"
 msgstr ""
 
-#: lib/dfa.c:1331
+#: lib/dfa.c:1344
 msgid "* at start of expression"
 msgstr ""
 
-#: lib/dfa.c:1345
+#: lib/dfa.c:1358
 msgid "+ at start of expression"
 msgstr ""
 
-#: lib/dfa.c:1400
+#: lib/dfa.c:1413
 msgid "{...} at start of expression"
 msgstr ""
 
-#: lib/dfa.c:1403
+#: lib/dfa.c:1416
 #, fuzzy
 msgid "invalid content of \\{\\}"
 msgstr "netaisyklingas maksimalus skaičius"
 
-#: lib/dfa.c:1405
+#: lib/dfa.c:1418
 msgid "regular expression too big"
 msgstr ""
 
-#: lib/dfa.c:1555
+#: lib/dfa.c:1568
 msgid "stray \\ before unprintable character"
 msgstr ""
 
-#: lib/dfa.c:1557
+#: lib/dfa.c:1570
 msgid "stray \\ before white space"
 msgstr ""
 
-#: lib/dfa.c:1561
+#: lib/dfa.c:1574
 #, c-format
 msgid "stray \\ before %lc"
 msgstr ""
 
-#: lib/dfa.c:1562
+#: lib/dfa.c:1575
 msgid "stray \\"
 msgstr ""
 
-#: lib/dfa.c:1917
+#: lib/dfa.c:1925
 #, fuzzy
 msgid "unbalanced ("
 msgstr "Nesubalansuotas ("
 
-#: lib/dfa.c:2034
+#: lib/dfa.c:2042
 #, fuzzy
 msgid "no syntax specified"
 msgstr "Nenurodyta sintaksė"
 
-#: lib/dfa.c:2045
+#: lib/dfa.c:2053
 #, fuzzy
 msgid "unbalanced )"
 msgstr "Nesubalansuotas )"
 
-#: lib/error.c:195
+#: lib/error.c:193
 msgid "Unknown system error"
 msgstr "Nežinoma sistemos klaida"
 
@@ -174,7 +174,7 @@ msgstr ""
 msgid "failed to return to initial working directory"
 msgstr ""
 
-#: lib/xbinary-io.c:37
+#: lib/xbinary-io.c:36
 #, c-format
 msgid "failed to set file descriptor text/binary mode"
 msgstr ""
@@ -200,11 +200,11 @@ msgstr ""
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:355
+#: lib/quotearg.c:354
 msgid "`"
 msgstr "„"
 
-#: lib/quotearg.c:356
+#: lib/quotearg.c:355
 msgid "'"
 msgstr "“"
 
@@ -684,63 +684,69 @@ msgstr "nežinomas dvejetainių failų tipas"
 #: src/grep.c:2831
 msgid ""
 "Written by Mike Haertel and others; see\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 msgstr ""
 
-#: src/grep.c:2934
+#: src/grep.c:2937
 #, c-format
 msgid "warning: GREP_COLOR='%s' is deprecated; use GREP_COLORS='mt=%s'"
 msgstr ""
 
-#: src/pcresearch.c:148
+#: src/pcresearch.c:92
+#, c-format
+msgid ""
+"\n"
+"grep -P uses PCRE2 %s\n"
+msgstr ""
+
+#: src/pcresearch.c:169
+msgid "-P supports only unibyte locales on this platform"
+msgstr ""
+
+#: src/pcresearch.c:171
 msgid "-P supports only unibyte and UTF-8 locales"
 msgstr ""
 
-#: src/pcresearch.c:162
+#: src/pcresearch.c:194
 #, fuzzy
 msgid "the -P option only supports a single pattern"
 msgstr "Parametras -P leidžia tik vieną šabloną"
 
-#: src/pcresearch.c:215
-#, c-format
-msgid "JIT internal error: %d"
-msgstr ""
-
-#: src/pcresearch.c:252
+#: src/pcresearch.c:290
 msgid "exceeded PCRE's line length limit"
 msgstr ""
 
-#: src/pcresearch.c:330
+#: src/pcresearch.c:368
 #, fuzzy, c-format
 msgid "%s: memory exhausted"
 msgstr "baigėsi atmintis"
 
-#: src/pcresearch.c:333
+#: src/pcresearch.c:371
 #, c-format
 msgid "%s: exhausted PCRE JIT stack"
 msgstr ""
 
-#: src/pcresearch.c:337
+#: src/pcresearch.c:375
 #, c-format
 msgid "%s: exceeded PCRE's backtracking limit"
 msgstr ""
 
-#: src/pcresearch.c:342
+#: src/pcresearch.c:380
 #, c-format
 msgid "%s: exceeded PCRE's nested backtracking limit"
 msgstr ""
 
-#: src/pcresearch.c:346
+#: src/pcresearch.c:384
 #, c-format
 msgid "%s: PCRE detected recurse loop"
 msgstr ""
 
-#: src/pcresearch.c:351
+#: src/pcresearch.c:389
 #, c-format
 msgid "%s: exceeded PCRE's heap limit"
 msgstr ""
 
-#: src/pcresearch.c:360
+#: src/pcresearch.c:398
 #, c-format
 msgid "%s: internal PCRE error: %d"
 msgstr ""
diff --git a/po/nb.gmo b/po/nb.gmo
index 03be2996..8e9f4d0a 100644
Binary files a/po/nb.gmo and b/po/nb.gmo differ
diff --git a/po/nb.po b/po/nb.po
index 658f1c5c..46e4a53b 100644
--- a/po/nb.po
+++ b/po/nb.po
@@ -1,17 +1,17 @@
 # Norwegian bokmål translation of GNU Grep
 # Copyright (C) 2022 Free Software Foundation, Inc.
 # This file is distributed under the same license as the grep package.
-# Johnny A. Solbu <johnny@solbu.net>, 2020-2022
+# Johnny A. Solbu <johnny@solbu.net>, 2020-2023
 # Åka Sikrom <a4@hush.com>, 2014-2020
 # Eivind Tagseth <eivindt@multinet.no>, 1997, 2004
 # Karl Anders Øygard <karl.oygard@fou.telenor.no>, 1996.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: grep-3.7.98\n"
+"Project-Id-Version: grep-3.10.12\n"
 "Report-Msgid-Bugs-To: bug-grep@gnu.org\n"
-"POT-Creation-Date: 2022-09-02 23:52-0700\n"
-"PO-Revision-Date: 2022-07-03 18:10+0200\n"
+"POT-Creation-Date: 2023-05-13 01:14-0700\n"
+"PO-Revision-Date: 2023-04-26 23:08+0200\n"
 "Last-Translator: Johnny A. Solbu <johnny@solbu.net>\n"
 "Language-Team: Norwegian Bokmaal <l10n-no@lister.huftis.org>\n"
 "Language: nb\n"
@@ -19,104 +19,104 @@ msgstr ""
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "X-Bugs: Report translation errors to the Language-Team address.\n"
-"X-Generator: Poedit 2.2.3\n"
+"X-Generator: Poedit 2.4.2\n"
 
-#: lib/argmatch.c:147
+#: lib/argmatch.c:145
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "«%s» er et ugyldig argument for %s"
 
-#: lib/argmatch.c:148
+#: lib/argmatch.c:146
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "«%s» er et tvetydig argument for %s"
 
-#: lib/argmatch.c:167 lib/argmatch.h:238
+#: lib/argmatch.c:165 lib/argmatch.h:242
 msgid "Valid arguments are:"
 msgstr "Følgende argumenter er gyldige:"
 
-#: lib/c-stack.c:187
+#: lib/c-stack.c:186
 msgid "program error"
 msgstr "programfeil"
 
-#: lib/c-stack.c:188
+#: lib/c-stack.c:187
 msgid "stack overflow"
-msgstr "stabel er full"
+msgstr "stabel er overfylt"
 
-#: lib/closeout.c:122 src/grep.c:1346
+#: lib/closeout.c:121 src/grep.c:1346
 msgid "write error"
 msgstr "skrivefeil"
 
-#: lib/dfa.c:894
+#: lib/dfa.c:897
 msgid "unbalanced ["
 msgstr "ubalansert ["
 
-#: lib/dfa.c:1015
+#: lib/dfa.c:1018
 msgid "invalid character class"
 msgstr "ugyldig tegnklasse"
 
-#: lib/dfa.c:1143
+#: lib/dfa.c:1146
 msgid "character class syntax is [[:space:]], not [:space:]"
 msgstr "gjeldende tegnklasse-syntaks er [[:space:]], ikke [:space:]"
 
-#: lib/dfa.c:1209
+#: lib/dfa.c:1222
 msgid "unfinished \\ escape"
 msgstr "ufullstendig \\-skiftetegn"
 
-#: lib/dfa.c:1319
+#: lib/dfa.c:1332
 msgid "? at start of expression"
 msgstr "? ved starten av regulært uttrykk"
 
-#: lib/dfa.c:1331
+#: lib/dfa.c:1344
 msgid "* at start of expression"
 msgstr "* ved starten av regulært uttrykk"
 
-#: lib/dfa.c:1345
+#: lib/dfa.c:1358
 msgid "+ at start of expression"
 msgstr "+ ved starten av regulært uttrykk"
 
-#: lib/dfa.c:1400
+#: lib/dfa.c:1413
 msgid "{...} at start of expression"
 msgstr "{...} ved starten av regulært uttrykk"
 
-#: lib/dfa.c:1403
+#: lib/dfa.c:1416
 msgid "invalid content of \\{\\}"
 msgstr "ugyldig innhold i \\{\\}"
 
-#: lib/dfa.c:1405
+#: lib/dfa.c:1418
 msgid "regular expression too big"
 msgstr "regulært uttrykk er for stort"
 
-#: lib/dfa.c:1555
+#: lib/dfa.c:1568
 msgid "stray \\ before unprintable character"
 msgstr "løs \\ før uskrivbare tegn"
 
-#: lib/dfa.c:1557
+#: lib/dfa.c:1570
 msgid "stray \\ before white space"
 msgstr "løs \\ før mellomrom"
 
-#: lib/dfa.c:1561
+#: lib/dfa.c:1574
 #, c-format
 msgid "stray \\ before %lc"
 msgstr "løs \\ før %lc"
 
-#: lib/dfa.c:1562
+#: lib/dfa.c:1575
 msgid "stray \\"
 msgstr "løs \\"
 
-#: lib/dfa.c:1917
+#: lib/dfa.c:1925
 msgid "unbalanced ("
 msgstr "ubalansert ("
 
-#: lib/dfa.c:2034
+#: lib/dfa.c:2042
 msgid "no syntax specified"
 msgstr "ingen syntaks er valgt"
 
-#: lib/dfa.c:2045
+#: lib/dfa.c:2053
 msgid "unbalanced )"
 msgstr "ubalansert «)»"
 
-#: lib/error.c:195
+#: lib/error.c:193
 msgid "Unknown system error"
 msgstr "Ukjent systemfeil"
 
@@ -169,7 +169,7 @@ msgstr "klarte ikke å hente gjeldende arbeidsmappe"
 msgid "failed to return to initial working directory"
 msgstr "klarte ikke å gå tilbake til opprinnelig arbeidsmappe"
 
-#: lib/xbinary-io.c:37
+#: lib/xbinary-io.c:36
 #, c-format
 msgid "failed to set file descriptor text/binary mode"
 msgstr "klarte ikke å endre fildeskriptor for tekst-/binærmodus"
@@ -195,11 +195,11 @@ msgstr "klarte ikke å endre fildeskriptor for tekst-/binærmodus"
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:355
+#: lib/quotearg.c:354
 msgid "`"
 msgstr "«"
 
-#: lib/quotearg.c:356
+#: lib/quotearg.c:355
 msgid "'"
 msgstr "»"
 
@@ -290,7 +290,7 @@ msgstr "Pakket av %s\n"
 #. locale.  Otherwise, do not translate "(C)"; leave it as-is.
 #: lib/version-etc.c:83
 msgid "(C)"
-msgstr "(C)"
+msgstr "©"
 
 #. TRANSLATORS: The %s placeholder is the web address of the GPL license.
 #: lib/version-etc.c:88
@@ -734,68 +734,86 @@ msgstr "ukjent binærfiltype"
 #: src/grep.c:2831
 msgid ""
 "Written by Mike Haertel and others; see\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 msgstr ""
 "Skrevet av Mike Haertel og andre. Se\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 
-#: src/grep.c:2934
+#: src/grep.c:2937
 #, c-format
 msgid "warning: GREP_COLOR='%s' is deprecated; use GREP_COLORS='mt=%s'"
 msgstr "advarsel: GREP_COLOR=«%s» er utdatert; bruk GREP_COLORS=«mt=%s»"
 
-#: src/pcresearch.c:148
+#: src/pcresearch.c:92
+#, c-format
+msgid ""
+"\n"
+"grep -P uses PCRE2 %s\n"
+msgstr ""
+"\n"
+"grep -P bruker PCRE2 %s\n"
+
+#: src/pcresearch.c:169
+msgid "-P supports only unibyte locales on this platform"
+msgstr "-P støtter bare lokaltilpassing i unibyte på denne plattformen"
+
+#: src/pcresearch.c:171
 msgid "-P supports only unibyte and UTF-8 locales"
 msgstr "-P støtter bare regioner i unibyte- og UTF-8"
 
-#: src/pcresearch.c:162
+#: src/pcresearch.c:194
 msgid "the -P option only supports a single pattern"
 msgstr "valget «-P» støtter bare ett mønster"
 
-#: src/pcresearch.c:215
-#, c-format
-msgid "JIT internal error: %d"
-msgstr "JIT intern feil: %d"
-
-#: src/pcresearch.c:252
+#: src/pcresearch.c:290
 msgid "exceeded PCRE's line length limit"
 msgstr "grensa for PCRE-linjelengde er overskredet"
 
-#: src/pcresearch.c:330
+#: src/pcresearch.c:368
 #, c-format
 msgid "%s: memory exhausted"
 msgstr "%s: minnet er oppbrukt"
 
-#: src/pcresearch.c:333
+#: src/pcresearch.c:371
 #, c-format
 msgid "%s: exhausted PCRE JIT stack"
 msgstr "%s: PCRE JIT-stabel er oppbrukt"
 
-#: src/pcresearch.c:337
+#: src/pcresearch.c:375
 #, c-format
 msgid "%s: exceeded PCRE's backtracking limit"
 msgstr "%s: grensa for PCRE-tilbakegang er overskredet"
 
-#: src/pcresearch.c:342
+#: src/pcresearch.c:380
 #, c-format
 msgid "%s: exceeded PCRE's nested backtracking limit"
 msgstr "%s: grensa for innkapslet PCRE-tilbakegang er overskredet"
 
-#: src/pcresearch.c:346
+#: src/pcresearch.c:384
 #, c-format
 msgid "%s: PCRE detected recurse loop"
 msgstr "%s: PCRE oppdaget rekurs-løkke"
 
-#: src/pcresearch.c:351
+#: src/pcresearch.c:389
 #, c-format
 msgid "%s: exceeded PCRE's heap limit"
 msgstr "%s: PCREs heap-grense er overskredet"
 
-#: src/pcresearch.c:360
+#: src/pcresearch.c:398
 #, c-format
 msgid "%s: internal PCRE error: %d"
 msgstr "%s: intern PCRE-feil: %d"
 
+#~ msgid ""
+#~ "\n"
+#~ "Built with PCRE "
+#~ msgstr ""
+#~ "\n"
+#~ "Bygget med PCRE "
+
+#~ msgid "JIT internal error: %d"
+#~ msgstr "JIT intern feil: %d"
+
 #~ msgid "failed to allocate memory for the PCRE JIT stack"
 #~ msgstr "klarte ikke å tildele minne til PCRE JIT-stabelen"
 
diff --git a/po/nl.gmo b/po/nl.gmo
index 843b44b9..05d872c3 100644
Binary files a/po/nl.gmo and b/po/nl.gmo differ
diff --git a/po/nl.po b/po/nl.po
index 6f9bd007..a8c2b9e0 100644
--- a/po/nl.po
+++ b/po/nl.po
@@ -1,21 +1,21 @@
 # Dutch translations for GNU grep.
-# Copyright (C) 2022 Free Software Foundation, Inc.
+# Copyright (C) 2023 Free Software Foundation, Inc.
 # This file is distributed under the same license as the grep package.
 #
 # "Keep your religious feelings to yourself."
 #
-# Benno Schulenberg <benno@vertaalt.nl>, 2005, 2007, 2008, 2010, 2011, 2012, 2013.
-# Benno Schulenberg <benno@vertaalt.nl>, 2014, 2015, 2016, 2018, 2019, 2020, 2021, 2022.
+# Benno Schulenberg <benno@vertaalt.nl>, 2005, 2007, 2008, 2010, 2011, 2012, 2013, 2014
+# Benno Schulenberg <benno@vertaalt.nl>, 2015, 2016, 2018, 2019, 2020, 2021, 2022, 2023.
 # Erwin Poeze <erwin.poeze@gmail.com>, 2009.
 # Taco Witte <tcwitte@cs.uu.nl>, 2004.
 # Ivo Timmermans <itimmermans@bigfoot.com>, 2000.
 # Erick Branderhorst <branderh@debian.org>, 1996.
 msgid ""
 msgstr ""
-"Project-Id-Version: grep-3.7.98\n"
+"Project-Id-Version: grep-3.10.7\n"
 "Report-Msgid-Bugs-To: bug-grep@gnu.org\n"
-"POT-Creation-Date: 2022-09-02 23:52-0700\n"
-"PO-Revision-Date: 2022-07-04 12:12+0200\n"
+"POT-Creation-Date: 2023-05-13 01:14-0700\n"
+"PO-Revision-Date: 2023-04-10 17:00+0200\n"
 "Last-Translator: Benno Schulenberg <vertaling@coevern.nl>\n"
 "Language-Team: Dutch <vertaling@vrijschrift.org>\n"
 "Language: nl\n"
@@ -25,102 +25,102 @@ msgstr ""
 "X-Bugs: Report translation errors to the Language-Team address.\n"
 "Plural-Forms: nplurals=2; plural=n != 1;\n"
 
-#: lib/argmatch.c:147
+#: lib/argmatch.c:145
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "ongeldig argument %s van %s"
 
-#: lib/argmatch.c:148
+#: lib/argmatch.c:146
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "argument %s van %s is niet eenduidig"
 
-#: lib/argmatch.c:167 lib/argmatch.h:238
+#: lib/argmatch.c:165 lib/argmatch.h:242
 msgid "Valid arguments are:"
 msgstr "Geldige argumenten zijn:"
 
-#: lib/c-stack.c:187
+#: lib/c-stack.c:186
 msgid "program error"
 msgstr "programmafout"
 
-#: lib/c-stack.c:188
+#: lib/c-stack.c:187
 msgid "stack overflow"
 msgstr "stack-overloop"
 
-#: lib/closeout.c:122 src/grep.c:1346
+#: lib/closeout.c:121 src/grep.c:1346
 msgid "write error"
 msgstr "schrijffout"
 
-#: lib/dfa.c:894
+#: lib/dfa.c:897
 msgid "unbalanced ["
 msgstr "ongepaarde ["
 
-#: lib/dfa.c:1015
+#: lib/dfa.c:1018
 msgid "invalid character class"
 msgstr "ongeldige tekenklasse"
 
-#: lib/dfa.c:1143
+#: lib/dfa.c:1146
 msgid "character class syntax is [[:space:]], not [:space:]"
 msgstr "syntax van tekenklasse is [[:space:]], niet [:space:]"
 
-#: lib/dfa.c:1209
+#: lib/dfa.c:1222
 msgid "unfinished \\ escape"
 msgstr "onafgemaakte \\-stuurcode"
 
-#: lib/dfa.c:1319
+#: lib/dfa.c:1332
 msgid "? at start of expression"
 msgstr "? aan begin van expressie"
 
-#: lib/dfa.c:1331
+#: lib/dfa.c:1344
 msgid "* at start of expression"
 msgstr "* aan begin van expressie"
 
-#: lib/dfa.c:1345
+#: lib/dfa.c:1358
 msgid "+ at start of expression"
 msgstr "+ aan begin van expressie"
 
-#: lib/dfa.c:1400
+#: lib/dfa.c:1413
 msgid "{...} at start of expression"
 msgstr "{...} aan begin van expressie"
 
-#: lib/dfa.c:1403
+#: lib/dfa.c:1416
 msgid "invalid content of \\{\\}"
 msgstr "ongeldige inhoud van \\{\\}"
 
-#: lib/dfa.c:1405
+#: lib/dfa.c:1418
 msgid "regular expression too big"
 msgstr "reguliere expressie is te groot"
 
-#: lib/dfa.c:1555
+#: lib/dfa.c:1568
 msgid "stray \\ before unprintable character"
 msgstr "verdwaalde \\ voor ontoonbaar teken"
 
-#: lib/dfa.c:1557
+#: lib/dfa.c:1570
 msgid "stray \\ before white space"
 msgstr "verdwaalde \\ voor witruimte"
 
-#: lib/dfa.c:1561
+#: lib/dfa.c:1574
 #, c-format
 msgid "stray \\ before %lc"
 msgstr "verdwaalde \\ voor %lc"
 
-#: lib/dfa.c:1562
+#: lib/dfa.c:1575
 msgid "stray \\"
 msgstr "verdwaalde \\"
 
-#: lib/dfa.c:1917
+#: lib/dfa.c:1925
 msgid "unbalanced ("
 msgstr "ongepaarde ("
 
-#: lib/dfa.c:2034
+#: lib/dfa.c:2042
 msgid "no syntax specified"
 msgstr "geen syntax opgegeven"
 
-#: lib/dfa.c:2045
+#: lib/dfa.c:2053
 msgid "unbalanced )"
 msgstr "ongepaarde )"
 
-#: lib/error.c:195
+#: lib/error.c:193
 msgid "Unknown system error"
 msgstr "Onbekende systeemfout"
 
@@ -173,7 +173,7 @@ msgstr "kan de huidige werkmap niet vastleggen"
 msgid "failed to return to initial working directory"
 msgstr "kan niet terugkeren naar de oorspronkelijke werkmap"
 
-#: lib/xbinary-io.c:37
+#: lib/xbinary-io.c:36
 #, c-format
 msgid "failed to set file descriptor text/binary mode"
 msgstr "kan modus van bestandsdescriptor niet instellen op tekst of binair"
@@ -199,11 +199,11 @@ msgstr "kan modus van bestandsdescriptor niet instellen op tekst of binair"
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:355
+#: lib/quotearg.c:354
 msgid "`"
 msgstr "‘"
 
-#: lib/quotearg.c:356
+#: lib/quotearg.c:355
 msgid "'"
 msgstr "’"
 
@@ -766,69 +766,86 @@ msgstr "onbekend binair bestandstype"
 #: src/grep.c:2831
 msgid ""
 "Written by Mike Haertel and others; see\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 msgstr ""
 "Geschreven door Mike Haertel en anderen; zie\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 
-#: src/grep.c:2934
+#: src/grep.c:2937
 #, c-format
 msgid "warning: GREP_COLOR='%s' is deprecated; use GREP_COLORS='mt=%s'"
 msgstr ""
 "waarschuwing: GREP_COLOR='%s' is verouderd; gebruik GREP_COLORS='mt=%s'"
 
-#: src/pcresearch.c:148
+#: src/pcresearch.c:92
+#, c-format
+msgid ""
+"\n"
+"grep -P uses PCRE2 %s\n"
+msgstr ""
+
+#: src/pcresearch.c:169
+msgid "-P supports only unibyte locales on this platform"
+msgstr "optie '-P' ondersteunt alleen enkelbyte-taalregio's op dit platform"
+
+#: src/pcresearch.c:171
 msgid "-P supports only unibyte and UTF-8 locales"
-msgstr "optie '-P' ondersteunt alleen enkelbytes- en UTF-8-taalregio's"
+msgstr "optie '-P' ondersteunt alleen enkelbyte- en UTF-8-taalregio's"
 
-#: src/pcresearch.c:162
+#: src/pcresearch.c:194
 msgid "the -P option only supports a single pattern"
 msgstr "optie '-P' accepteert slechts één patroon"
 
-#: src/pcresearch.c:215
-#, c-format
-msgid "JIT internal error: %d"
-msgstr "**interne programmafout** in JIT: %d"
-
-#: src/pcresearch.c:252
+#: src/pcresearch.c:290
 msgid "exceeded PCRE's line length limit"
 msgstr "de regellengtegrens van PCRE is overschreden"
 
-#: src/pcresearch.c:330
+#: src/pcresearch.c:368
 #, c-format
 msgid "%s: memory exhausted"
 msgstr "%s: onvoldoende geheugen beschikbaar"
 
-#: src/pcresearch.c:333
+#: src/pcresearch.c:371
 #, c-format
 msgid "%s: exhausted PCRE JIT stack"
 msgstr "%s: de PCRE-JIT-stack is volledig gebruikt"
 
-#: src/pcresearch.c:337
+#: src/pcresearch.c:375
 #, c-format
 msgid "%s: exceeded PCRE's backtracking limit"
 msgstr "%s: de terugverwijzingengrens van PCRE is overschreden"
 
-#: src/pcresearch.c:342
+#: src/pcresearch.c:380
 #, c-format
 msgid "%s: exceeded PCRE's nested backtracking limit"
 msgstr "%s: de genesteterugverwijzingengrens van PCRE is overschreden"
 
-#: src/pcresearch.c:346
+#: src/pcresearch.c:384
 #, c-format
 msgid "%s: PCRE detected recurse loop"
 msgstr "%s: PCRE heeft een recursielus gedetecteerd"
 
-#: src/pcresearch.c:351
+#: src/pcresearch.c:389
 #, c-format
 msgid "%s: exceeded PCRE's heap limit"
 msgstr "%s: de heap-geheugengrens van PCRE is overschreden"
 
-#: src/pcresearch.c:360
+#: src/pcresearch.c:398
 #, c-format
 msgid "%s: internal PCRE error: %d"
 msgstr "%s: **interne programmafout** in PCRE: %d"
 
+#, c-format
+#~ msgid "JIT internal error: %d"
+#~ msgstr "**interne programmafout** in JIT: %d"
+
+#~ msgid ""
+#~ "\n"
+#~ "Built with PCRE "
+#~ msgstr ""
+#~ "\n"
+#~ "Gecompileerd met PCRE "
+
 #~ msgid "failed to allocate memory for the PCRE JIT stack"
 #~ msgstr "onvoldoende geheugen beschikbaar voor de PCRE-JIT-stack"
 
@@ -845,15 +862,6 @@ msgstr "%s: **interne programmafout** in PCRE: %d"
 #~ msgid "%s: unrecognized option '--%s'\n"
 #~ msgstr "%s: onbekende optie '--%s'\n"
 
-#~ msgid "%s: option '-W %s' is ambiguous\n"
-#~ msgstr "%s: optie '-W %s' is niet eenduidig\n"
-
-#~ msgid "%s: option '-W %s' doesn't allow an argument\n"
-#~ msgstr "%s: optie '-W %s' staat geen argument toe\n"
-
-#~ msgid "%s: option '-W %s' requires an argument\n"
-#~ msgstr "%s: optie '-W %s' vereist een argument\n"
-
 #~ msgid "GNU Grep home page: <%s>\n"
 #~ msgstr "Webpagina van GNU grep: <%s>\n"
 
diff --git a/po/pa.po b/po/pa.po
index 6242e1be..86da6d68 100644
--- a/po/pa.po
+++ b/po/pa.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: grep 2.11.11-pre1\n"
 "Report-Msgid-Bugs-To: bug-grep@gnu.org\n"
-"POT-Creation-Date: 2022-09-02 23:52-0700\n"
+"POT-Creation-Date: 2023-05-13 01:14-0700\n"
 "PO-Revision-Date: 2012-05-19 17:52+0530\n"
 "Last-Translator: A S Alam <aalam@users.sf.net>\n"
 "Language-Team: Punjabi <punjabi-l10n@lists.sourceforge.net>\n"
@@ -19,107 +19,107 @@ msgstr ""
 "Plural-Forms: nplurals=2; plural=n != 1;\n"
 "X-Generator: Lokalize 1.4\n"
 
-#: lib/argmatch.c:147
+#: lib/argmatch.c:145
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "%2$s ਲਈ ਗਲਤ ਆਰਗੂਮੈਂਟ %1$s"
 
-#: lib/argmatch.c:148
+#: lib/argmatch.c:146
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr ""
 
-#: lib/argmatch.c:167 lib/argmatch.h:238
+#: lib/argmatch.c:165 lib/argmatch.h:242
 msgid "Valid arguments are:"
 msgstr "ਠੀਕ ਆਰਗੂਮੈਂਟ ਹਨ:"
 
-#: lib/c-stack.c:187
+#: lib/c-stack.c:186
 msgid "program error"
 msgstr ""
 
-#: lib/c-stack.c:188
+#: lib/c-stack.c:187
 msgid "stack overflow"
 msgstr ""
 
-#: lib/closeout.c:122 src/grep.c:1346
+#: lib/closeout.c:121 src/grep.c:1346
 msgid "write error"
 msgstr "ਲਿਖਣ ਗਲਤੀ"
 
-#: lib/dfa.c:894
+#: lib/dfa.c:897
 msgid "unbalanced ["
 msgstr "ਅਧੂਰੀ ["
 
-#: lib/dfa.c:1015
+#: lib/dfa.c:1018
 msgid "invalid character class"
 msgstr "ਗਲਤ ਕਰੈਕਟਰ ਕਲਾਸ"
 
-#: lib/dfa.c:1143
+#: lib/dfa.c:1146
 msgid "character class syntax is [[:space:]], not [:space:]"
 msgstr ""
 
-#: lib/dfa.c:1209
+#: lib/dfa.c:1222
 msgid "unfinished \\ escape"
 msgstr ""
 
-#: lib/dfa.c:1319
+#: lib/dfa.c:1332
 #, fuzzy
 msgid "? at start of expression"
 msgstr "ਗਲਤ ਰੈਗੂਲਰ ਸਮੀਕਰਨ"
 
-#: lib/dfa.c:1331
+#: lib/dfa.c:1344
 #, fuzzy
 msgid "* at start of expression"
 msgstr "ਗਲਤ ਰੈਗੂਲਰ ਸਮੀਕਰਨ"
 
-#: lib/dfa.c:1345
+#: lib/dfa.c:1358
 #, fuzzy
 msgid "+ at start of expression"
 msgstr "ਗਲਤ ਰੈਗੂਲਰ ਸਮੀਕਰਨ"
 
-#: lib/dfa.c:1400
+#: lib/dfa.c:1413
 msgid "{...} at start of expression"
 msgstr ""
 
-#: lib/dfa.c:1403
+#: lib/dfa.c:1416
 #, fuzzy
 msgid "invalid content of \\{\\}"
 msgstr "ਗਲਤ ਵੱਧ ਤੋਂ ਵੱਧ ਗਿਣਤੀ"
 
-#: lib/dfa.c:1405
+#: lib/dfa.c:1418
 #, fuzzy
 msgid "regular expression too big"
 msgstr "ਨਿਯਮਤ ਸਮੀਕਰਨ ਬਹੁਤ ਵੱਡੀ ਹੈ"
 
-#: lib/dfa.c:1555
+#: lib/dfa.c:1568
 msgid "stray \\ before unprintable character"
 msgstr ""
 
-#: lib/dfa.c:1557
+#: lib/dfa.c:1570
 msgid "stray \\ before white space"
 msgstr ""
 
-#: lib/dfa.c:1561
+#: lib/dfa.c:1574
 #, c-format
 msgid "stray \\ before %lc"
 msgstr ""
 
-#: lib/dfa.c:1562
+#: lib/dfa.c:1575
 msgid "stray \\"
 msgstr ""
 
-#: lib/dfa.c:1917
+#: lib/dfa.c:1925
 msgid "unbalanced ("
 msgstr "ਅਧੂਰੀ ("
 
-#: lib/dfa.c:2034
+#: lib/dfa.c:2042
 msgid "no syntax specified"
 msgstr "ਕੋਈ ਸੰਟੈਕਸ ਨਹੀਂ ਦਿੱਤਾ"
 
-#: lib/dfa.c:2045
+#: lib/dfa.c:2053
 msgid "unbalanced )"
 msgstr "ਅਧੂਰੀ )"
 
-#: lib/error.c:195
+#: lib/error.c:193
 msgid "Unknown system error"
 msgstr "ਅਣਜਾਣ ਸਿਸਟਮ ਗਲਤੀ"
 
@@ -172,7 +172,7 @@ msgstr "ਮੌਜੂਦਾ ਕਾਰਜਕਾਰੀ ਡਾਇਰੈਕਟਰੀ
 msgid "failed to return to initial working directory"
 msgstr "ਸ਼ੁਰੂਆਤੀ ਕਾਰਜਕਾਰੀ ਡਾਇਰੈਕਟਰੀ ਦੇਣ ਲਈ ਫੇਲ੍ਹ"
 
-#: lib/xbinary-io.c:37
+#: lib/xbinary-io.c:36
 #, c-format
 msgid "failed to set file descriptor text/binary mode"
 msgstr ""
@@ -198,11 +198,11 @@ msgstr ""
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:355
+#: lib/quotearg.c:354
 msgid "`"
 msgstr "`"
 
-#: lib/quotearg.c:356
+#: lib/quotearg.c:355
 msgid "'"
 msgstr "'"
 
@@ -656,66 +656,76 @@ msgstr "ਅਣਜਾਣ ਬਾਈਨਰੀ-ਫਾਇਲ ਕਿਸਮ"
 #, fuzzy
 msgid ""
 "Written by Mike Haertel and others; see\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 msgstr "ਹੋਰਾਂ ਲਈ <http://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS> ਵੇਖੋ"
 
-#: src/grep.c:2934
+#: src/grep.c:2937
 #, c-format
 msgid "warning: GREP_COLOR='%s' is deprecated; use GREP_COLORS='mt=%s'"
 msgstr ""
 
-#: src/pcresearch.c:148
+#: src/pcresearch.c:92
+#, c-format
+msgid ""
+"\n"
+"grep -P uses PCRE2 %s\n"
+msgstr ""
+
+#: src/pcresearch.c:169
+msgid "-P supports only unibyte locales on this platform"
+msgstr ""
+
+#: src/pcresearch.c:171
 msgid "-P supports only unibyte and UTF-8 locales"
 msgstr ""
 
-#: src/pcresearch.c:162
+#: src/pcresearch.c:194
 msgid "the -P option only supports a single pattern"
 msgstr ""
 
-#: src/pcresearch.c:215
-#, fuzzy, c-format
-msgid "JIT internal error: %d"
-msgstr "ਅੰਦਰੂਨੀ ਗਲਤੀ"
-
-#: src/pcresearch.c:252
+#: src/pcresearch.c:290
 msgid "exceeded PCRE's line length limit"
 msgstr ""
 
-#: src/pcresearch.c:330
+#: src/pcresearch.c:368
 #, fuzzy, c-format
 msgid "%s: memory exhausted"
 msgstr "ਮੈਮੋਰੀ ਖਤਮ ਹੋਈ"
 
-#: src/pcresearch.c:333
+#: src/pcresearch.c:371
 #, c-format
 msgid "%s: exhausted PCRE JIT stack"
 msgstr ""
 
-#: src/pcresearch.c:337
+#: src/pcresearch.c:375
 #, c-format
 msgid "%s: exceeded PCRE's backtracking limit"
 msgstr ""
 
-#: src/pcresearch.c:342
+#: src/pcresearch.c:380
 #, c-format
 msgid "%s: exceeded PCRE's nested backtracking limit"
 msgstr ""
 
-#: src/pcresearch.c:346
+#: src/pcresearch.c:384
 #, c-format
 msgid "%s: PCRE detected recurse loop"
 msgstr ""
 
-#: src/pcresearch.c:351
+#: src/pcresearch.c:389
 #, c-format
 msgid "%s: exceeded PCRE's heap limit"
 msgstr ""
 
-#: src/pcresearch.c:360
+#: src/pcresearch.c:398
 #, fuzzy, c-format
 msgid "%s: internal PCRE error: %d"
 msgstr "ਅੰਦਰੂਨੀ ਗਲਤੀ"
 
+#, fuzzy, c-format
+#~ msgid "JIT internal error: %d"
+#~ msgstr "ਅੰਦਰੂਨੀ ਗਲਤੀ"
+
 #~ msgid "invalid %s%s argument '%s'"
 #~ msgstr "ਗਲਤ %s%s ਆਰਗੂਮੈਂਟ '%s'"
 
diff --git a/po/pl.gmo b/po/pl.gmo
index 05627c62..15947b9e 100644
Binary files a/po/pl.gmo and b/po/pl.gmo differ
diff --git a/po/pl.po b/po/pl.po
index a1afd36b..c9536208 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -1,13 +1,13 @@
 # Polish translation of the GNU grep messages
-# Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2005, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022 Free Software Foundation, Inc.
+# Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2005, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 Free Software Foundation, Inc.
 # This file is distributed under the same license as the grep package.
-# Rafał Maszkowski <rzm@icm.edu.pl>, 1996-2002, 2005, 2007-2017, 2019-2022.
+# Rafał Maszkowski <rzm@icm.edu.pl>, 1996-2002, 2005, 2007-2017, 2019-2023.
 msgid ""
 msgstr ""
-"Project-Id-Version: GNU grep 3.7.98\n"
+"Project-Id-Version: GNU grep 3.10.12\n"
 "Report-Msgid-Bugs-To: bug-grep@gnu.org\n"
-"POT-Creation-Date: 2022-09-02 23:52-0700\n"
-"PO-Revision-Date: 2022-07-03 18:50+0200\n"
+"POT-Creation-Date: 2023-05-13 01:14-0700\n"
+"PO-Revision-Date: 2023-05-03 22:12+0200\n"
 "Last-Translator: Rafał Maszkowski <rzm@icm.edu.pl>\n"
 "Language-Team: Polish <translation-team-pl@lists.sourceforge.net>\n"
 "Language: pl\n"
@@ -16,102 +16,102 @@ msgstr ""
 "Content-Transfer-Encoding: 8-bit\n"
 "X-Bugs: Report translation errors to the Language-Team address.\n"
 
-#: lib/argmatch.c:147
+#: lib/argmatch.c:145
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "błędny argument %s dla %s"
 
-#: lib/argmatch.c:148
+#: lib/argmatch.c:146
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "dwuznaczny argument %s dla %s"
 
-#: lib/argmatch.c:167 lib/argmatch.h:238
+#: lib/argmatch.c:165 lib/argmatch.h:242
 msgid "Valid arguments are:"
 msgstr "Prawidłowe agrumenty to:"
 
-#: lib/c-stack.c:187
+#: lib/c-stack.c:186
 msgid "program error"
 msgstr "błąd programu"
 
-#: lib/c-stack.c:188
+#: lib/c-stack.c:187
 msgid "stack overflow"
 msgstr "przepełnienie stosu"
 
-#: lib/closeout.c:122 src/grep.c:1346
+#: lib/closeout.c:121 src/grep.c:1346
 msgid "write error"
 msgstr "błąd zapisu"
 
-#: lib/dfa.c:894
+#: lib/dfa.c:897
 msgid "unbalanced ["
 msgstr "[ nie do pary"
 
-#: lib/dfa.c:1015
+#: lib/dfa.c:1018
 msgid "invalid character class"
 msgstr "błędna nazwa klasy znaków"
 
-#: lib/dfa.c:1143
+#: lib/dfa.c:1146
 msgid "character class syntax is [[:space:]], not [:space:]"
 msgstr "składnia klasy znaków to [[:space:]], nie [:space:]"
 
-#: lib/dfa.c:1209
+#: lib/dfa.c:1222
 msgid "unfinished \\ escape"
 msgstr "niedokończona sekwencja \\"
 
-#: lib/dfa.c:1319
+#: lib/dfa.c:1332
 msgid "? at start of expression"
 msgstr "? na początke wyrażenia regularnego"
 
-#: lib/dfa.c:1331
+#: lib/dfa.c:1344
 msgid "* at start of expression"
 msgstr "* na początku wyrażenia regularnego"
 
-#: lib/dfa.c:1345
+#: lib/dfa.c:1358
 msgid "+ at start of expression"
 msgstr "+ na początku wyrażenia regularnego"
 
-#: lib/dfa.c:1400
+#: lib/dfa.c:1413
 msgid "{...} at start of expression"
 msgstr "{...} na początku wyrażenia"
 
-#: lib/dfa.c:1403
+#: lib/dfa.c:1416
 msgid "invalid content of \\{\\}"
 msgstr "błędna zawartość \\{\\}"
 
-#: lib/dfa.c:1405
+#: lib/dfa.c:1418
 msgid "regular expression too big"
 msgstr "za duże wyrażenie regularne"
 
-#: lib/dfa.c:1555
+#: lib/dfa.c:1568
 msgid "stray \\ before unprintable character"
 msgstr "niepotrzebny \\ przed znakiem niedrukowalnym"
 
-#: lib/dfa.c:1557
+#: lib/dfa.c:1570
 msgid "stray \\ before white space"
 msgstr "niepotrzebny \\ przed odstępem"
 
-#: lib/dfa.c:1561
+#: lib/dfa.c:1574
 #, c-format
 msgid "stray \\ before %lc"
 msgstr "niepotrzebny \\ przed %lc"
 
-#: lib/dfa.c:1562
+#: lib/dfa.c:1575
 msgid "stray \\"
 msgstr "niepotrzebny \\"
 
-#: lib/dfa.c:1917
+#: lib/dfa.c:1925
 msgid "unbalanced ("
 msgstr "( nie do pary"
 
-#: lib/dfa.c:2034
+#: lib/dfa.c:2042
 msgid "no syntax specified"
 msgstr "brak specyfikacji składni"
 
-#: lib/dfa.c:2045
+#: lib/dfa.c:2053
 msgid "unbalanced )"
 msgstr ") nie do pary"
 
-#: lib/error.c:195
+#: lib/error.c:193
 msgid "Unknown system error"
 msgstr "Nieznany błąd systemowy"
 
@@ -164,7 +164,7 @@ msgstr "nie udało się zapisać bieżącego katalogu"
 msgid "failed to return to initial working directory"
 msgstr "nie udało się powrócić do początkowego katalogu"
 
-#: lib/xbinary-io.c:37
+#: lib/xbinary-io.c:36
 #, c-format
 msgid "failed to set file descriptor text/binary mode"
 msgstr "nie udało się ustawić trybu tekstowego/binarnego deskryptora pliku"
@@ -190,11 +190,11 @@ msgstr "nie udało się ustawić trybu tekstowego/binarnego deskryptora pliku"
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:355
+#: lib/quotearg.c:354
 msgid "`"
 msgstr "„"
 
-#: lib/quotearg.c:356
+#: lib/quotearg.c:355
 msgid "'"
 msgstr "”"
 
@@ -743,65 +743,73 @@ msgstr "nieznany typ pliku binarnego"
 #: src/grep.c:2831
 msgid ""
 "Written by Mike Haertel and others; see\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 msgstr ""
 "Program napisany przez Mike'a Haertela i innych, zobacz\n"
-"https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS"
+"https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS"
 
-#: src/grep.c:2934
+#: src/grep.c:2937
 #, c-format
 msgid "warning: GREP_COLOR='%s' is deprecated; use GREP_COLORS='mt=%s'"
 msgstr ""
 "uwaga: GREP_COLOR='%s' jest formą przestarzałą, użyj GREP_COLORS='mt=%s'"
 
-#: src/pcresearch.c:148
+#: src/pcresearch.c:92
+#, c-format
+msgid ""
+"\n"
+"grep -P uses PCRE2 %s\n"
+msgstr ""
+"\n"
+"grep -P używa PCRE2 %s\n"
+
+#: src/pcresearch.c:169
+msgid "-P supports only unibyte locales on this platform"
+msgstr "-P działa tylko kodowaniem jednobajtowym w tym systemie"
+
+#: src/pcresearch.c:171
 msgid "-P supports only unibyte and UTF-8 locales"
 msgstr "-P działa tylko kodowaniem jednobajtowym albo UTF-8"
 
-#: src/pcresearch.c:162
+#: src/pcresearch.c:194
 msgid "the -P option only supports a single pattern"
 msgstr "opcja -P może być użyta tylko do pojedynczego wzorca"
 
-#: src/pcresearch.c:215
-#, c-format
-msgid "JIT internal error: %d"
-msgstr "błąd wewnętrzny JIT: %d"
-
-#: src/pcresearch.c:252
+#: src/pcresearch.c:290
 msgid "exceeded PCRE's line length limit"
 msgstr "przekroczony limit długości linii PCRE"
 
-#: src/pcresearch.c:330
+#: src/pcresearch.c:368
 #, c-format
 msgid "%s: memory exhausted"
 msgstr "%s: pamięć wyczerpana"
 
-#: src/pcresearch.c:333
+#: src/pcresearch.c:371
 #, c-format
 msgid "%s: exhausted PCRE JIT stack"
 msgstr "%s: wyczerpany stos JIT PCRE"
 
-#: src/pcresearch.c:337
+#: src/pcresearch.c:375
 #, c-format
 msgid "%s: exceeded PCRE's backtracking limit"
 msgstr "%s: przekroczony limit analizy wstecznej PCRE"
 
-#: src/pcresearch.c:342
+#: src/pcresearch.c:380
 #, c-format
 msgid "%s: exceeded PCRE's nested backtracking limit"
 msgstr "%s: przekroczony limit zagłębionej analizy wstecznej PCRE"
 
-#: src/pcresearch.c:346
+#: src/pcresearch.c:384
 #, c-format
 msgid "%s: PCRE detected recurse loop"
 msgstr "%s: pętla rekurencji wykryta przez PCRE"
 
-#: src/pcresearch.c:351
+#: src/pcresearch.c:389
 #, c-format
 msgid "%s: exceeded PCRE's heap limit"
 msgstr "%s: przekroczony limit sterty PCRE"
 
-#: src/pcresearch.c:360
+#: src/pcresearch.c:398
 #, c-format
 msgid "%s: internal PCRE error: %d"
 msgstr "%s: błąd wewnętrzny PCRE: %d"
diff --git a/po/pt.gmo b/po/pt.gmo
index da540def..e7835d84 100644
Binary files a/po/pt.gmo and b/po/pt.gmo differ
diff --git a/po/pt.po b/po/pt.po
index 630782ad..85daba20 100644
--- a/po/pt.po
+++ b/po/pt.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: grep 3.6.27\n"
 "Report-Msgid-Bugs-To: bug-grep@gnu.org\n"
-"POT-Creation-Date: 2022-09-02 23:52-0700\n"
+"POT-Creation-Date: 2023-05-13 01:14-0700\n"
 "PO-Revision-Date: 2021-08-09 10:42+0100\n"
 "Last-Translator: Pedro Albuquerque <pmra@protonmail.com>\n"
 "Language-Team: Portuguese <translation-team-pt@lists.sourceforge.net>\n"
@@ -19,105 +19,105 @@ msgstr ""
 "X-Generator: Poedit 2.3\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
-#: lib/argmatch.c:147
+#: lib/argmatch.c:145
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "argumento inválido %s para %s"
 
-#: lib/argmatch.c:148
+#: lib/argmatch.c:146
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "argumento ambíguo %s para %s"
 
-#: lib/argmatch.c:167 lib/argmatch.h:238
+#: lib/argmatch.c:165 lib/argmatch.h:242
 msgid "Valid arguments are:"
 msgstr "Os argumentos válidos são:"
 
-#: lib/c-stack.c:187
+#: lib/c-stack.c:186
 msgid "program error"
 msgstr "erro de programa"
 
-#: lib/c-stack.c:188
+#: lib/c-stack.c:187
 msgid "stack overflow"
 msgstr "transporte da pilha"
 
-#: lib/closeout.c:122 src/grep.c:1346
+#: lib/closeout.c:121 src/grep.c:1346
 msgid "write error"
 msgstr "erro de escrita"
 
-#: lib/dfa.c:894
+#: lib/dfa.c:897
 msgid "unbalanced ["
 msgstr "[ sem par"
 
-#: lib/dfa.c:1015
+#: lib/dfa.c:1018
 msgid "invalid character class"
 msgstr "classe de carácter inválida"
 
-#: lib/dfa.c:1143
+#: lib/dfa.c:1146
 msgid "character class syntax is [[:space:]], not [:space:]"
 msgstr "a sintaxe da classe de carácter é [[:espaço:]], não [:espaço:]"
 
-#: lib/dfa.c:1209
+#: lib/dfa.c:1222
 msgid "unfinished \\ escape"
 msgstr "não terminado\\escape"
 
-#: lib/dfa.c:1319
+#: lib/dfa.c:1332
 #, fuzzy
 msgid "? at start of expression"
 msgstr "Expressão regular inválida"
 
-#: lib/dfa.c:1331
+#: lib/dfa.c:1344
 #, fuzzy
 msgid "* at start of expression"
 msgstr "Expressão regular inválida"
 
-#: lib/dfa.c:1345
+#: lib/dfa.c:1358
 #, fuzzy
 msgid "+ at start of expression"
 msgstr "Expressão regular inválida"
 
-#: lib/dfa.c:1400
+#: lib/dfa.c:1413
 msgid "{...} at start of expression"
 msgstr ""
 
-#: lib/dfa.c:1403
+#: lib/dfa.c:1416
 msgid "invalid content of \\{\\}"
 msgstr "conteúdo inválido de \\{\\}"
 
-#: lib/dfa.c:1405
+#: lib/dfa.c:1418
 msgid "regular expression too big"
 msgstr "expressão regular muito grande"
 
-#: lib/dfa.c:1555
+#: lib/dfa.c:1568
 msgid "stray \\ before unprintable character"
 msgstr ""
 
-#: lib/dfa.c:1557
+#: lib/dfa.c:1570
 msgid "stray \\ before white space"
 msgstr ""
 
-#: lib/dfa.c:1561
+#: lib/dfa.c:1574
 #, c-format
 msgid "stray \\ before %lc"
 msgstr ""
 
-#: lib/dfa.c:1562
+#: lib/dfa.c:1575
 msgid "stray \\"
 msgstr ""
 
-#: lib/dfa.c:1917
+#: lib/dfa.c:1925
 msgid "unbalanced ("
 msgstr "( sem par"
 
-#: lib/dfa.c:2034
+#: lib/dfa.c:2042
 msgid "no syntax specified"
 msgstr "sintaxe não especificada"
 
-#: lib/dfa.c:2045
+#: lib/dfa.c:2053
 msgid "unbalanced )"
 msgstr ") sem par"
 
-#: lib/error.c:195
+#: lib/error.c:193
 msgid "Unknown system error"
 msgstr "Erro de sistema desconhecido"
 
@@ -170,7 +170,7 @@ msgstr "impossível gravar a pasta de trabalho actual"
 msgid "failed to return to initial working directory"
 msgstr "falha ao voltar à pasta de trabalho inicial"
 
-#: lib/xbinary-io.c:37
+#: lib/xbinary-io.c:36
 #, c-format
 msgid "failed to set file descriptor text/binary mode"
 msgstr "falha ao definir modo texto/binário do descritor de ficheiro"
@@ -196,11 +196,11 @@ msgstr "falha ao definir modo texto/binário do descritor de ficheiro"
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:355
+#: lib/quotearg.c:354
 msgid "`"
 msgstr "\""
 
-#: lib/quotearg.c:356
+#: lib/quotearg.c:355
 msgid "'"
 msgstr "\""
 
@@ -734,70 +734,82 @@ msgid "unknown binary-files type"
 msgstr "tipo de ficheiro binário desconhecido"
 
 #: src/grep.c:2831
+#, fuzzy
 msgid ""
 "Written by Mike Haertel and others; see\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 msgstr ""
 "Escrito por Mike Haertel e outros; veja\n"
 "<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
 
-#: src/grep.c:2934
+#: src/grep.c:2937
 #, c-format
 msgid "warning: GREP_COLOR='%s' is deprecated; use GREP_COLORS='mt=%s'"
 msgstr ""
 
-#: src/pcresearch.c:148
+#: src/pcresearch.c:92
+#, c-format
+msgid ""
+"\n"
+"grep -P uses PCRE2 %s\n"
+msgstr ""
+
+#: src/pcresearch.c:169
+#, fuzzy
+msgid "-P supports only unibyte locales on this platform"
+msgstr "-P só suporta idiomas unibyte e UTF-8"
+
+#: src/pcresearch.c:171
 msgid "-P supports only unibyte and UTF-8 locales"
 msgstr "-P só suporta idiomas unibyte e UTF-8"
 
-#: src/pcresearch.c:162
+#: src/pcresearch.c:194
 msgid "the -P option only supports a single pattern"
 msgstr "a opção -P só suporta um padrão"
 
-#: src/pcresearch.c:215
-#, fuzzy, c-format
-msgid "JIT internal error: %d"
-msgstr "erro interno"
-
-#: src/pcresearch.c:252
+#: src/pcresearch.c:290
 msgid "exceeded PCRE's line length limit"
 msgstr "excedido o limite de tamanho da linha de PCRE"
 
-#: src/pcresearch.c:330
+#: src/pcresearch.c:368
 #, c-format
 msgid "%s: memory exhausted"
 msgstr "%s: memória esgotada"
 
-#: src/pcresearch.c:333
+#: src/pcresearch.c:371
 #, c-format
 msgid "%s: exhausted PCRE JIT stack"
 msgstr "%s: pilha PCRE JIT esgotada"
 
-#: src/pcresearch.c:337
+#: src/pcresearch.c:375
 #, c-format
 msgid "%s: exceeded PCRE's backtracking limit"
 msgstr "%s: excedido o limite de retrocesso de PCRE"
 
-#: src/pcresearch.c:342
+#: src/pcresearch.c:380
 #, fuzzy, c-format
 msgid "%s: exceeded PCRE's nested backtracking limit"
 msgstr "%s: excedido o limite de retrocesso de PCRE"
 
-#: src/pcresearch.c:346
+#: src/pcresearch.c:384
 #, c-format
 msgid "%s: PCRE detected recurse loop"
 msgstr ""
 
-#: src/pcresearch.c:351
+#: src/pcresearch.c:389
 #, fuzzy, c-format
 msgid "%s: exceeded PCRE's heap limit"
 msgstr "%s: limite de recursividade de PCRE excedido"
 
-#: src/pcresearch.c:360
+#: src/pcresearch.c:398
 #, c-format
 msgid "%s: internal PCRE error: %d"
 msgstr "%s: erro interno de PCRE: %d"
 
+#, fuzzy, c-format
+#~ msgid "JIT internal error: %d"
+#~ msgstr "erro interno"
+
 #~ msgid "failed to allocate memory for the PCRE JIT stack"
 #~ msgstr "falha ao alocar memória para a pilha PCRE JIT"
 
diff --git a/po/pt_BR.gmo b/po/pt_BR.gmo
index ee2f9b3b..4cd9313b 100644
Binary files a/po/pt_BR.gmo and b/po/pt_BR.gmo differ
diff --git a/po/pt_BR.po b/po/pt_BR.po
index 57a56c4b..64710c20 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -1,4 +1,4 @@
-# translation of grep-3.5.16.po to Brazilian Portuguese
+# translation of grep-3.10.12.po to Brazilian Portuguese
 # This file is distributed under the same license as the grep package.
 # grep: translation to Brazilian Portuguese (pt_BR)
 # Copyright (C) 2002, 2007, 2008, 2009, 2011, 2012, 2014 Free Software Foundation, Inc.
@@ -7,14 +7,14 @@
 # Rodrigo Stulzer Lopes <rodrigo@conectiva.com.br>, 1997.
 # Santiago Vila Doncel <sanvila@unex.es>, 1997, 1998, 1999, 2000, 2001, 2002.
 # Alexandre Folle de Menezes <afmenez@terra.com.br>, 2002.
-# Rodolfo Ribeiro Gomes <rodolforg@gmail.com>, 2007-2020.
+# Rodolfo Ribeiro Gomes <rodolforg@gmail.com>, 2007-2023.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: GNU grep-3.5.16\n"
+"Project-Id-Version: GNU grep-3.10.12\n"
 "Report-Msgid-Bugs-To: bug-grep@gnu.org\n"
-"POT-Creation-Date: 2022-09-02 23:52-0700\n"
-"PO-Revision-Date: 2020-11-04 09:30-0300\n"
+"POT-Creation-Date: 2023-05-13 01:14-0700\n"
+"PO-Revision-Date: 2023-04-21 13:06-0300\n"
 "Last-Translator: Rodolfo Ribeiro Gomes <rodolforg@gmail.com>\n"
 "Language-Team: Brazilian Portuguese <ldpbr-translation@lists.sourceforge."
 "net>\n"
@@ -23,108 +23,105 @@ msgstr ""
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "X-Bugs: Report translation errors to the Language-Team address.\n"
-"Plural-Forms: nplurals=2; plural=(n > 1);\n"
-"X-Generator: Gtranslator 3.38.0\n"
+"Plural-Forms: nplurals=2; plural=(n > 1)\n"
+"X-Generator: Gtranslator 42.0\n"
 
-#: lib/argmatch.c:147
+#: lib/argmatch.c:145
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "%s é um argumento inválido para %s"
 
-#: lib/argmatch.c:148
+#: lib/argmatch.c:146
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "%s é um argumento ambíguo para %s"
 
-#: lib/argmatch.c:167 lib/argmatch.h:238
+#: lib/argmatch.c:165 lib/argmatch.h:242
 msgid "Valid arguments are:"
 msgstr "Os argumentos válidos são:"
 
-#: lib/c-stack.c:187
+#: lib/c-stack.c:186
 msgid "program error"
 msgstr "erro do programa"
 
-#: lib/c-stack.c:188
+#: lib/c-stack.c:187
 msgid "stack overflow"
 msgstr "estouro de pilha"
 
-#: lib/closeout.c:122 src/grep.c:1346
+#: lib/closeout.c:121 src/grep.c:1346
 msgid "write error"
 msgstr "erro de escrita"
 
-#: lib/dfa.c:894
+#: lib/dfa.c:897
 msgid "unbalanced ["
 msgstr "[ sem correspondente"
 
-#: lib/dfa.c:1015
+#: lib/dfa.c:1018
 msgid "invalid character class"
 msgstr "categoria de caracteres inválida"
 
-#: lib/dfa.c:1143
+#: lib/dfa.c:1146
 msgid "character class syntax is [[:space:]], not [:space:]"
 msgstr "a sintaxe de categoria de caracteres é [[:space:]], e não [:space:]"
 
-#: lib/dfa.c:1209
+#: lib/dfa.c:1222
 msgid "unfinished \\ escape"
 msgstr "escape \\ não terminado"
 
-#: lib/dfa.c:1319
-#, fuzzy
+#: lib/dfa.c:1332
 msgid "? at start of expression"
-msgstr "Expressão regular inválida"
+msgstr "? no início da expressão"
 
-#: lib/dfa.c:1331
-#, fuzzy
+#: lib/dfa.c:1344
 msgid "* at start of expression"
-msgstr "Expressão regular inválida"
+msgstr "* no início da expressão"
 
-#: lib/dfa.c:1345
-#, fuzzy
+#: lib/dfa.c:1358
 msgid "+ at start of expression"
-msgstr "Expressão regular inválida"
+msgstr "+ no início da expressão"
 
-#: lib/dfa.c:1400
+#: lib/dfa.c:1413
 msgid "{...} at start of expression"
-msgstr ""
+msgstr "{...} no início da expressão"
 
-#: lib/dfa.c:1403
+#: lib/dfa.c:1416
 msgid "invalid content of \\{\\}"
 msgstr "conteúdo inválido de \\{\\}"
 
-#: lib/dfa.c:1405
+#: lib/dfa.c:1418
 msgid "regular expression too big"
 msgstr "expressão regular grande demais"
 
-#: lib/dfa.c:1555
+#: lib/dfa.c:1568
 msgid "stray \\ before unprintable character"
-msgstr ""
+msgstr "\\ perdida antes de caractere não imprimível"
 
-#: lib/dfa.c:1557
+#: lib/dfa.c:1570
 msgid "stray \\ before white space"
-msgstr ""
+msgstr "\\ perdida antes de espaço"
 
-#: lib/dfa.c:1561
+#: lib/dfa.c:1574
 #, c-format
 msgid "stray \\ before %lc"
-msgstr ""
+msgstr "\\ perdida antes de %lc"
 
-#: lib/dfa.c:1562
+#: lib/dfa.c:1575
 msgid "stray \\"
-msgstr ""
+msgstr "\\ perdida"
 
-#: lib/dfa.c:1917
+#: lib/dfa.c:1925
 msgid "unbalanced ("
 msgstr "( sem correspondente"
 
-#: lib/dfa.c:2034
+#: lib/dfa.c:2042
 msgid "no syntax specified"
 msgstr "nenhuma sintaxe especificada"
 
-#: lib/dfa.c:2045
+#: lib/dfa.c:2053
 msgid "unbalanced )"
 msgstr ") sem correspondente"
 
-#: lib/error.c:195
+#: lib/error.c:193
 msgid "Unknown system error"
 msgstr "Erro desconhecido de sistema"
 
@@ -177,7 +174,7 @@ msgstr "incapaz de memorizar o diretório de trabalho atual"
 msgid "failed to return to initial working directory"
 msgstr "falhou em retornar ao diretório de trabalho inicial"
 
-#: lib/xbinary-io.c:37
+#: lib/xbinary-io.c:36
 #, c-format
 msgid "failed to set file descriptor text/binary mode"
 msgstr "falhou em definir o modo texto/binário do descritor de arquivo"
@@ -203,11 +200,11 @@ msgstr "falhou em definir o modo texto/binário do descritor de arquivo"
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:355
+#: lib/quotearg.c:354
 msgid "`"
 msgstr "\""
 
-#: lib/quotearg.c:356
+#: lib/quotearg.c:355
 msgid "'"
 msgstr "\""
 
@@ -445,9 +442,9 @@ msgid "General help using GNU software: <%s>\n"
 msgstr "Ajuda geral sobre uso de software GNU: <%s>\n"
 
 #: src/dfasearch.c:59
-#, fuzzy, c-format
+#, c-format
 msgid "warning: %s"
-msgstr "aviso: %s: %s"
+msgstr "aviso: %s:"
 
 #: src/grep.c:656
 msgid "(standard input)"
@@ -676,7 +673,7 @@ msgstr ""
 "  -C, --context=NÚM         emite NÚM linhas de contexto de saída\n"
 
 #: src/grep.c:2053
-#, fuzzy, c-format
+#, c-format
 msgid ""
 "  -NUM                      same as --context=NUM\n"
 "      --group-separator=SEP  print SEP on line between matches with context\n"
@@ -689,6 +686,10 @@ msgid ""
 "\n"
 msgstr ""
 "  -NÚM                      o mesmo que --context=NÚM\n"
+"      --group-separator=SEP  emite SEP na linha entre ocorrências com "
+"contexto\n"
+"      --no-group-separator  não emite separados para ocorrências com "
+"contexto\n"
 "      --color[=QUANDO],\n"
 "      --colour[=QUANDO]     usa marcadores para destacar os textos "
 "coincidentes;\n"
@@ -735,7 +736,7 @@ msgstr "método desconhecido de dispositivos"
 #: src/grep.c:2576
 #, c-format
 msgid "warning: --unix-byte-offsets (-u) is obsolete"
-msgstr ""
+msgstr "aviso: --unix-byte-offsets (-u) está obsoleto"
 
 #: src/grep.c:2688
 msgid "invalid max count"
@@ -748,65 +749,75 @@ msgstr "tipo de arquivo binário desconhecido"
 #: src/grep.c:2831
 msgid ""
 "Written by Mike Haertel and others; see\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 msgstr ""
 "Escrito por Mike Haertel e outros; veja\n"
-"<http://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>"
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 
-#: src/grep.c:2934
+#: src/grep.c:2937
 #, c-format
 msgid "warning: GREP_COLOR='%s' is deprecated; use GREP_COLORS='mt=%s'"
+msgstr "aviso: GREP_COLOR='%s' está obsoleto; use GREP_COLORS='mt=%s'"
+
+#: src/pcresearch.c:92
+#, c-format
+msgid ""
+"\n"
+"grep -P uses PCRE2 %s\n"
+msgstr ""
+"\n"
+"grep -P usa PCRE2 %s\n"
+
+#: src/pcresearch.c:169
+msgid "-P supports only unibyte locales on this platform"
 msgstr ""
+"-P só oferece suporte a localidades unibyte (um caractere por byte) nesta "
+"plataforma"
 
-#: src/pcresearch.c:148
+#: src/pcresearch.c:171
 msgid "-P supports only unibyte and UTF-8 locales"
 msgstr ""
 "-P só oferece suporte a localidades unibyte (um caractere por byte) e UTF-8"
 
-#: src/pcresearch.c:162
+#: src/pcresearch.c:194
 msgid "the -P option only supports a single pattern"
 msgstr "a opção -P só oferece suporte a apenas um único padrão"
 
-#: src/pcresearch.c:215
-#, fuzzy, c-format
-msgid "JIT internal error: %d"
-msgstr "erro interno"
-
-#: src/pcresearch.c:252
+#: src/pcresearch.c:290
 msgid "exceeded PCRE's line length limit"
 msgstr "atingiu o limite de comprimento de linha das PCRE"
 
-#: src/pcresearch.c:330
+#: src/pcresearch.c:368
 #, c-format
 msgid "%s: memory exhausted"
 msgstr "%s: memória esgotada"
 
-#: src/pcresearch.c:333
+#: src/pcresearch.c:371
 #, c-format
 msgid "%s: exhausted PCRE JIT stack"
 msgstr "%s: pilha PCRE JIT estourada"
 
-#: src/pcresearch.c:337
+#: src/pcresearch.c:375
 #, c-format
 msgid "%s: exceeded PCRE's backtracking limit"
 msgstr "%s: atingiu o limite de backtracking das PCRE"
 
-#: src/pcresearch.c:342
-#, fuzzy, c-format
+#: src/pcresearch.c:380
+#, c-format
 msgid "%s: exceeded PCRE's nested backtracking limit"
-msgstr "%s: atingiu o limite de backtracking das PCRE"
+msgstr "%s: atingiu o limite de backtracking aninhados das PCRE"
 
-#: src/pcresearch.c:346
+#: src/pcresearch.c:384
 #, c-format
 msgid "%s: PCRE detected recurse loop"
-msgstr ""
+msgstr "%s: PCRE detectou laço recursivo"
 
-#: src/pcresearch.c:351
-#, fuzzy, c-format
+#: src/pcresearch.c:389
+#, c-format
 msgid "%s: exceeded PCRE's heap limit"
-msgstr "%s: atingiu o limite de recursão das PCRE"
+msgstr "%s: atingiu o limite de pilha das PCRE"
 
-#: src/pcresearch.c:360
+#: src/pcresearch.c:398
 #, c-format
 msgid "%s: internal PCRE error: %d"
 msgstr "%s: erro interno de PCRE: %d"
@@ -837,6 +848,9 @@ msgstr "%s: erro interno de PCRE: %d"
 #~ msgid "Mike Haertel"
 #~ msgstr "Mike Haertel"
 
+#~ msgid "internal error"
+#~ msgstr "erro interno"
+
 #~ msgid "%s: option '--%s' doesn't allow an argument\n"
 #~ msgstr "%s: a opção \"--%s\" não aceita argumentos\n"
 
diff --git a/po/ro.gmo b/po/ro.gmo
index e21714a3..98b9f838 100644
Binary files a/po/ro.gmo and b/po/ro.gmo differ
diff --git a/po/ro.po b/po/ro.po
index 2faf72db..d45bcfbb 100644
--- a/po/ro.po
+++ b/po/ro.po
@@ -1,10 +1,10 @@
 # Mesajele în limba română pentru grep.
-# Copyright (C) 2003 - 2022 Free Software Foundation, Inc.
+# Copyright © 2003 - 2023 Free Software Foundation, Inc.
 # This file is distributed under the same license as the grep package.
 #
 # Eugen Hoanca <eugenh@urban-grafx.ro>, 2003.
 # Florentina Mușat <florentina.musat.28@gmail.com>, 2020.
-# Remus-Gabriel Chelu <remusgabriel.chelu@disroot.org>, 2022.
+# Remus-Gabriel Chelu <remusgabriel.chelu@disroot.org>, 2022 - 2023.
 #
 # Cronologia traducerii fișierului „grep”:
 # Traducerea inițială, făcută de EH, pentru versiunea grep 2.8 (17% - tradus).
@@ -14,16 +14,20 @@
 # NU și a mesajelor traduse (acestea au rămas neschimbate).
 # Eliminare a mesajelor ce-au dispărut în ultima versiune.
 # Actualizări realizate de Remus-Gabriel Chelu <remusgabriel.chelu@disroot.org>, 15.01.2022.
-# Actualizare a traducerii pentru versiunea 3.6.27, făcută de R-GC.
-# Actualizare a traducerii pentru versiunea 3.7.62, făcută de R-GC.
-# Actualizare a traducerii pentru versiunea 3.7.98, făcută de R-GC.
+# Actualizare a traducerii pentru versiunea 3.6.27, făcută de R-GC, feb-2022.
+# Actualizare a traducerii pentru versiunea 3.7.62, făcută de R-GC, apr-2022.
+# Actualizare a traducerii pentru versiunea 3.7.98, făcută de R-GC, iul-2022.
+# Actualizare a traducerii pentru versiunea 3.8.35, făcută de R-GC, feb-2023.
+# Actualizare a traducerii pentru versiunea 3.10.7, făcută de R-GC, apr-2023.
+# Actualizare a traducerii pentru versiunea 3.10.12, făcută de R-GC, apr-2023.
+# Actualizare a traducerii pentru versiunea Y, făcută de X, Z(luna-anul).
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: grep 3.7.98\n"
+"Project-Id-Version: grep 3.10.12\n"
 "Report-Msgid-Bugs-To: bug-grep@gnu.org\n"
-"POT-Creation-Date: 2022-09-02 23:52-0700\n"
-"PO-Revision-Date: 2022-07-04 10:43+0200\n"
+"POT-Creation-Date: 2023-05-13 01:14-0700\n"
+"PO-Revision-Date: 2023-04-21 16:56+0200\n"
 "Last-Translator: Remus-Gabriel Chelu <remusgabriel.chelu@disroot.org>\n"
 "Language-Team: Romanian <translation-team-ro@lists.sourceforge.net>\n"
 "Language: ro\n"
@@ -33,43 +37,43 @@ msgstr ""
 "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < "
 "20)) ? 1 : 2);\n"
 "X-Bugs: Report translation errors to the Language-Team address.\n"
-"X-Generator: Poedit 2.3.1\n"
+"X-Generator: Poedit 3.2.2\n"
 
-#: lib/argmatch.c:147
+#: lib/argmatch.c:145
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "argument nevalid %s pentru %s"
 
-#: lib/argmatch.c:148
+#: lib/argmatch.c:146
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "argument ambiguu %s pentru %s"
 
-#: lib/argmatch.c:167 lib/argmatch.h:238
+#: lib/argmatch.c:165 lib/argmatch.h:242
 msgid "Valid arguments are:"
 msgstr "Argumentele valide sunt:"
 
-#: lib/c-stack.c:187
+#: lib/c-stack.c:186
 msgid "program error"
 msgstr "eroare de program"
 
-#: lib/c-stack.c:188
+#: lib/c-stack.c:187
 msgid "stack overflow"
 msgstr "debordare de stivă"
 
-#: lib/closeout.c:122 src/grep.c:1346
+#: lib/closeout.c:121 src/grep.c:1346
 msgid "write error"
 msgstr "eroare de scriere"
 
-#: lib/dfa.c:894
+#: lib/dfa.c:897
 msgid "unbalanced ["
 msgstr "„[” fără pereche"
 
-#: lib/dfa.c:1015
+#: lib/dfa.c:1018
 msgid "invalid character class"
 msgstr "clasă de caractere nevalidă"
 
-#: lib/dfa.c:1143
+#: lib/dfa.c:1146
 msgid "character class syntax is [[:space:]], not [:space:]"
 msgstr "sintaxa de clasă de caractere este [[:spațiu:]], nu [:spațiu]"
 
@@ -81,64 +85,64 @@ msgstr "sintaxa de clasă de caractere este [[:spațiu:]], nu [:spațiu]"
 # a devenit:
 # „eludare « \ » neterminată”, adică,
 # mesajul actual.
-#: lib/dfa.c:1209
+#: lib/dfa.c:1222
 msgid "unfinished \\ escape"
 msgstr "eludare « \\ » neterminată"
 
-#: lib/dfa.c:1319
+#: lib/dfa.c:1332
 msgid "? at start of expression"
 msgstr "„?” la începutul expresiei"
 
-#: lib/dfa.c:1331
+#: lib/dfa.c:1344
 msgid "* at start of expression"
 msgstr "„*” la începutul expresiei"
 
-#: lib/dfa.c:1345
+#: lib/dfa.c:1358
 msgid "+ at start of expression"
 msgstr "„+” la începutul expresiei"
 
-#: lib/dfa.c:1400
+#: lib/dfa.c:1413
 msgid "{...} at start of expression"
 msgstr "„{...}” la începutul expresiei"
 
-#: lib/dfa.c:1403
+#: lib/dfa.c:1416
 msgid "invalid content of \\{\\}"
 msgstr "conținut nevalid al \\{\\}"
 
-#: lib/dfa.c:1405
+#: lib/dfa.c:1418
 msgid "regular expression too big"
 msgstr "expresia regulată este prea lungă"
 
-#: lib/dfa.c:1555
+#: lib/dfa.c:1568
 msgid "stray \\ before unprintable character"
 msgstr "caracter în plus „\\”, înainte de caracter neimprimabil"
 
-#: lib/dfa.c:1557
+#: lib/dfa.c:1570
 msgid "stray \\ before white space"
 msgstr "caracter în plus „\\”, înainte de spațiu în alb"
 
-#: lib/dfa.c:1561
+#: lib/dfa.c:1574
 #, c-format
 msgid "stray \\ before %lc"
 msgstr "caracter în plus „\\”, înainte de „%lc”"
 
-#: lib/dfa.c:1562
+#: lib/dfa.c:1575
 msgid "stray \\"
 msgstr "caracter în plus „\\”"
 
-#: lib/dfa.c:1917
+#: lib/dfa.c:1925
 msgid "unbalanced ("
 msgstr "„(” fără pereche"
 
-#: lib/dfa.c:2034
+#: lib/dfa.c:2042
 msgid "no syntax specified"
 msgstr "nu s-a specificat nicio sintaxă"
 
-#: lib/dfa.c:2045
+#: lib/dfa.c:2053
 msgid "unbalanced )"
 msgstr "„)” fără pereche"
 
-#: lib/error.c:195
+#: lib/error.c:193
 msgid "Unknown system error"
 msgstr "Eroare de sistem necunoscută"
 
@@ -191,7 +195,7 @@ msgstr "nu s-a putut înregistra directorul de lucru curent"
 msgid "failed to return to initial working directory"
 msgstr "întoarcerea la directorul de lucru inițial a eșuat"
 
-#: lib/xbinary-io.c:37
+#: lib/xbinary-io.c:36
 #, c-format
 msgid "failed to set file descriptor text/binary mode"
 msgstr "nu s-a putut stabili modul de text/binar al descriptorului de fișier"
@@ -217,11 +221,11 @@ msgstr "nu s-a putut stabili modul de text/binar al descriptorului de fișier"
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:355
+#: lib/quotearg.c:354
 msgid "`"
 msgstr "„"
 
-#: lib/quotearg.c:356
+#: lib/quotearg.c:355
 msgid "'"
 msgstr "”"
 
@@ -442,12 +446,12 @@ msgstr ""
 #: lib/version-etc.c:249
 #, c-format
 msgid "Report bugs to: %s\n"
-msgstr "Raportați defecțiunile la: %s\n"
+msgstr "Raportați erorile la: %s\n"
 
 #: lib/version-etc.c:251
 #, c-format
 msgid "Report %s bugs to: %s\n"
-msgstr "Raportați defecțiunile %s la: %s\n"
+msgstr "Raportați erorile %s la: %s\n"
 
 #: lib/version-etc.c:255 lib/version-etc.c:257
 #, c-format
@@ -474,7 +478,7 @@ msgstr "argument de lungime a contextului nevalid"
 
 #: src/grep.c:902
 msgid "input is too large to count"
-msgstr "intrarea(input) este prea mare pentru a fi numărată"
+msgstr "cantitatea de date de la intrare este prea mare pentru a fi numărată"
 
 # R-GC, scrie:
 # o traducere alternativă, ar fi:
@@ -493,7 +497,8 @@ msgstr "%s: avertisment: buclă recursivă de directoare"
 #: src/grep.c:1909
 #, c-format
 msgid "%s: input file is also the output"
-msgstr "%s: fișierul de intrare este de asemenea și ieșirea"
+msgstr ""
+"%s: fișierul de intrare este de asemenea și ieșirea(fișierul de ieșire)"
 
 #: src/grep.c:1971 src/grep.c:1978
 #, c-format
@@ -549,9 +554,10 @@ msgid ""
 msgstr ""
 "  -e, --regexp=MODELE       utilizează MODELELE pentru potrivire\n"
 "  -f, --file=FIȘIER         ia MODELELE din FIȘIER\n"
-"  -i, --ignore-case         ignoră distincțiile de majuscule în modele și "
-"date\n"
-"      --no-ignore-case      nu ignoră distincțiile de majuscule (implicit)\n"
+"  -i, --ignore-case         ignoră distincțiile dintre minuscule și "
+"majuscule în modele și date\n"
+"      --no-ignore-case      nu ignoră distincțiile dintre minuscule și "
+"majuscule (implicit)\n"
 "  -w, --word-regexp         potrivește doar cuvinte întregi\n"
 "  -x, --line-regexp         potrivește doar linii întregi\n"
 "  -z, --null-data           o linie de date se termină în octetul 0, nu în "
@@ -591,8 +597,10 @@ msgstr ""
 "\n"
 "Control de ieșire:\n"
 "  -m, --max-count=NUM       se oprește după NUM linii selectate\n"
-"  -b, --byte-offset         imprimă decalajul de octet cu liniile de ieșire\n"
-"  -n, --line-number         imprimă numărul liniei cu liniile de ieșire\n"
+"  -b, --byte-offset         afișează decalajul în octeți împreună cu liniile "
+"de ieșire\n"
+"  -n, --line-number         afișează numărul de linie împreună cu liniile de "
+"ieșire\n"
 "      --line-buffered       golește ieșirea la fiecare linie\n"
 "  -H, --with-filename       imprimă numele fișierului cu liniile de ieșire\n"
 "  -h, --no-filename         suprimă prefixul numelui de fișier la ieșire\n"
@@ -630,13 +638,13 @@ msgid ""
 "                            TYPE is 'binary', 'text', or 'without-match'\n"
 "  -a, --text                equivalent to --binary-files=text\n"
 msgstr ""
-"  -o, --only-matching       arată doar părțile pline ale liniilor care se "
-"potrivesc\n"
+"  -o, --only-matching       afișează doar părțile liniilor care se potrivesc "
+"complet\n"
 "  -q, --quiet, --silent     suprimă toată ieșirea normală\n"
 "      --binary-files=TIP    presupune că fișierele binare sunt TIP;\n"
 "                            TIP este „binary”, „text” sau „without-"
 "match”(fără-potrivire)\n"
-"  -a, --text                echivalent cu --binary-files=text\n"
+"  -a, --text                echivalent cu „--binary-files=text”\n"
 
 # R-GC, scrie:
 # la recomandarea lui DȘ:
@@ -731,7 +739,7 @@ msgid ""
 "Windows)\n"
 "\n"
 msgstr ""
-"  -NUMĂR                    echivalent cu --context=NUMĂR\n"
+"  -NUMĂR                    echivalent cu „--context=NUMĂR”\n"
 "      --group-separator=SEP  imprimă SEP pe liniile dintre potrivirile cu "
 "contextul\n"
 "      --no-group-separator  nu imprimă un separator pentru potrivirile cu "
@@ -758,8 +766,8 @@ msgstr ""
 "presupune -h.\n"
 "Starea de ieșire este 0 dacă orice linie este selectată, 1 în caz contrar; "
 "dacă\n"
-"apare orice eroare și opțiunea -q nu este specificată, starea de ieșire este "
-"2.\n"
+"apare orice eroare și opțiunea „-q” nu este specificată, starea de ieșire "
+"este 2.\n"
 
 #: src/grep.c:2104
 msgid "conflicting matchers specified"
@@ -768,7 +776,7 @@ msgstr "s-au specificat potriviri contradictorii"
 #: src/grep.c:2111
 msgid "Perl matching not supported in a --disable-perl-regexp build"
 msgstr ""
-"Potrivirea Perl nu este suportată într-o construcție --disable-perl-regexp"
+"Potrivirea Perl nu este suportată într-o construcție „--disable-perl-regexp”"
 
 #: src/grep.c:2113
 #, c-format
@@ -782,7 +790,7 @@ msgstr "metodă necunoscută pentru dispozitive"
 #: src/grep.c:2576
 #, c-format
 msgid "warning: --unix-byte-offsets (-u) is obsolete"
-msgstr "avertisment: --unix-byte-offsets (-u) este învechit"
+msgstr "avertisment: opțiunea „-unix-byte-offsets” (-u) este învechită"
 
 #: src/grep.c:2688
 msgid "invalid max count"
@@ -795,70 +803,90 @@ msgstr "tip de fișiere binare necunoscut"
 #: src/grep.c:2831
 msgid ""
 "Written by Mike Haertel and others; see\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 msgstr ""
 "Scris de Mike Haertel și alții; consultați\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 
-#: src/grep.c:2934
+#: src/grep.c:2937
 #, c-format
 msgid "warning: GREP_COLOR='%s' is deprecated; use GREP_COLORS='mt=%s'"
 msgstr ""
 "avertisment: variabila GREP_COLOR='%s' este depreciată; utilizați "
 "GREP_COLORS='mt=%s'"
 
-#: src/pcresearch.c:148
+#: src/pcresearch.c:92
+#, c-format
+msgid ""
+"\n"
+"grep -P uses PCRE2 %s\n"
+msgstr ""
+"\n"
+"«grep -P» utilizează PCRE2 %s\n"
+
+#: src/pcresearch.c:169
+msgid "-P supports only unibyte locales on this platform"
+msgstr ""
+"opțiunea „-P” acceptă doar configurări regionale unioctet pe această "
+"platformă"
+
+#: src/pcresearch.c:171
 msgid "-P supports only unibyte and UTF-8 locales"
-msgstr "-P suportă doar localizări unioctet și UTF-8"
+msgstr "opțiunea „-P” suportă doar configurări regionale unioctet și UTF-8"
 
-#: src/pcresearch.c:162
+#: src/pcresearch.c:194
 msgid "the -P option only supports a single pattern"
-msgstr "opțiunea -P suportă doar un singur model"
+msgstr "opțiunea „-P” suportă doar un singur model"
 
-#: src/pcresearch.c:215
-#, c-format
-msgid "JIT internal error: %d"
-msgstr "eroare internă JIT: %d"
-
-#: src/pcresearch.c:252
+#: src/pcresearch.c:290
 msgid "exceeded PCRE's line length limit"
 msgstr "s-a depășit limita de lungime a liniei PCRE"
 
-#: src/pcresearch.c:330
+#: src/pcresearch.c:368
 #, c-format
 msgid "%s: memory exhausted"
 msgstr "%s: memorie epuizată"
 
-#: src/pcresearch.c:333
+#: src/pcresearch.c:371
 #, c-format
 msgid "%s: exhausted PCRE JIT stack"
 msgstr "%s: s-a epuizat stiva PCRE JIT"
 
-#: src/pcresearch.c:337
+#: src/pcresearch.c:375
 #, c-format
 msgid "%s: exceeded PCRE's backtracking limit"
 msgstr "%s: limita de referință inversă a PCRE a fost depășită"
 
-#: src/pcresearch.c:342
+#: src/pcresearch.c:380
 #, c-format
 msgid "%s: exceeded PCRE's nested backtracking limit"
 msgstr "%s: limita de referință inversă suprapusă a PCRE a fost depășită"
 
-#: src/pcresearch.c:346
+#: src/pcresearch.c:384
 #, c-format
 msgid "%s: PCRE detected recurse loop"
 msgstr "%s: PCRE a detectat o buclă recursivă"
 
-#: src/pcresearch.c:351
+#: src/pcresearch.c:389
 #, c-format
 msgid "%s: exceeded PCRE's heap limit"
 msgstr "%s: limita de stivă a PCRE a fost depășită"
 
-#: src/pcresearch.c:360
+#: src/pcresearch.c:398
 #, c-format
 msgid "%s: internal PCRE error: %d"
 msgstr "%s: eroare PCRE internă: %d"
 
+#~ msgid ""
+#~ "\n"
+#~ "Built with PCRE "
+#~ msgstr ""
+#~ "\n"
+#~ "Construit cu PCRE "
+
+#~ msgid "JIT internal error: %d"
+#~ msgstr "eroare internă JIT: %d"
+
 #~ msgid "failed to allocate memory for the PCRE JIT stack"
 #~ msgstr "nu s-a putut aloca memorie pentru stiva PCRE JIT"
 
diff --git a/po/ru.gmo b/po/ru.gmo
index 7d2d1341..ab8352c3 100644
Binary files a/po/ru.gmo and b/po/ru.gmo differ
diff --git a/po/ru.po b/po/ru.po
index f9ebd9c1..98ad7843 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -4,13 +4,13 @@
 # This file is distributed under the same license as the grep package.
 #
 # Denis Perchine <dyp@perchine.com>, 1998-2000.
-# Yuri Kozlov <yuray@komyakino.ru>, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022.
+# Yuri Kozlov <yuray@komyakino.ru>, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023.
 msgid ""
 msgstr ""
-"Project-Id-Version: grep 3.7.98\n"
+"Project-Id-Version: grep 3.10.12\n"
 "Report-Msgid-Bugs-To: bug-grep@gnu.org\n"
-"POT-Creation-Date: 2022-09-02 23:52-0700\n"
-"PO-Revision-Date: 2022-07-20 12:32+0300\n"
+"POT-Creation-Date: 2023-05-13 01:14-0700\n"
+"PO-Revision-Date: 2023-05-05 05:06+0300\n"
 "Last-Translator: Yuri Kozlov <yuray@komyakino.ru>\n"
 "Language-Team: Russian <gnu@d07.ru>\n"
 "Language: ru\n"
@@ -18,106 +18,106 @@ msgstr ""
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "X-Bugs: Report translation errors to the Language-Team address.\n"
-"X-Generator: Lokalize 20.12.0\n"
+"X-Generator: Lokalize 22.12.3\n"
 "Plural-Forms:  nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
 "n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
 
-#: lib/argmatch.c:147
+#: lib/argmatch.c:145
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "неверный аргумент %s для %s"
 
-#: lib/argmatch.c:148
+#: lib/argmatch.c:146
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "двусмысленный аргумент %s для %s"
 
-#: lib/argmatch.c:167 lib/argmatch.h:238
+#: lib/argmatch.c:165 lib/argmatch.h:242
 msgid "Valid arguments are:"
 msgstr "Допустимые аргументы:"
 
-#: lib/c-stack.c:187
+#: lib/c-stack.c:186
 msgid "program error"
 msgstr "ошибка программы"
 
-#: lib/c-stack.c:188
+#: lib/c-stack.c:187
 msgid "stack overflow"
 msgstr "переполнение стека"
 
-#: lib/closeout.c:122 src/grep.c:1346
+#: lib/closeout.c:121 src/grep.c:1346
 msgid "write error"
 msgstr "ошибка записи"
 
-#: lib/dfa.c:894
+#: lib/dfa.c:897
 msgid "unbalanced ["
 msgstr "несбалансированная ["
 
-#: lib/dfa.c:1015
+#: lib/dfa.c:1018
 msgid "invalid character class"
 msgstr "неправильный класс символов"
 
-#: lib/dfa.c:1143
+#: lib/dfa.c:1146
 msgid "character class syntax is [[:space:]], not [:space:]"
 msgstr "синтаксис класса символов: [[:space:]], а не [:space:]"
 
-#: lib/dfa.c:1209
+#: lib/dfa.c:1222
 msgid "unfinished \\ escape"
 msgstr "незавершённая \\ экранирующая последовательность"
 
-#: lib/dfa.c:1319
+#: lib/dfa.c:1332
 msgid "? at start of expression"
 msgstr "? в начале выражения"
 
-#: lib/dfa.c:1331
+#: lib/dfa.c:1344
 msgid "* at start of expression"
 msgstr "* в начале выражения"
 
-#: lib/dfa.c:1345
+#: lib/dfa.c:1358
 msgid "+ at start of expression"
 msgstr "+ в начале выражения"
 
-#: lib/dfa.c:1400
+#: lib/dfa.c:1413
 msgid "{...} at start of expression"
 msgstr "{...} в начале выражения"
 
-#: lib/dfa.c:1403
+#: lib/dfa.c:1416
 msgid "invalid content of \\{\\}"
 msgstr "неправильное содержимое в \\{\\}"
 
-#: lib/dfa.c:1405
+#: lib/dfa.c:1418
 msgid "regular expression too big"
 msgstr "регулярное выражение слишком большое"
 
-#: lib/dfa.c:1555
+#: lib/dfa.c:1568
 msgid "stray \\ before unprintable character"
 msgstr "лишняя \\ перед непечатным символом"
 
-#: lib/dfa.c:1557
+#: lib/dfa.c:1570
 msgid "stray \\ before white space"
 msgstr "лишняя \\ перед пустым местом"
 
-#: lib/dfa.c:1561
+#: lib/dfa.c:1574
 #, c-format
 msgid "stray \\ before %lc"
 msgstr "лишняя \\ перед %lc"
 
-#: lib/dfa.c:1562
+#: lib/dfa.c:1575
 msgid "stray \\"
 msgstr "лишняя \\"
 
-#: lib/dfa.c:1917
+#: lib/dfa.c:1925
 msgid "unbalanced ("
 msgstr "несбалансированная ("
 
-#: lib/dfa.c:2034
+#: lib/dfa.c:2042
 msgid "no syntax specified"
 msgstr "не указан синтаксис"
 
-#: lib/dfa.c:2045
+#: lib/dfa.c:2053
 msgid "unbalanced )"
 msgstr "несбалансированная )"
 
-#: lib/error.c:195
+#: lib/error.c:193
 msgid "Unknown system error"
 msgstr "Неизвестная системная ошибка"
 
@@ -170,7 +170,7 @@ msgstr "не удалось запомнить текущий рабочий к
 msgid "failed to return to initial working directory"
 msgstr "не удалось вернуться в начальный рабочий каталог"
 
-#: lib/xbinary-io.c:37
+#: lib/xbinary-io.c:36
 #, c-format
 msgid "failed to set file descriptor text/binary mode"
 msgstr "не удалось изменить текстовый/двоичный режим у файлового дескриптора"
@@ -196,11 +196,11 @@ msgstr "не удалось изменить текстовый/двоичный
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:355
+#: lib/quotearg.c:354
 msgid "`"
 msgstr "«"
 
-#: lib/quotearg.c:356
+#: lib/quotearg.c:355
 msgid "'"
 msgstr "»"
 
@@ -739,70 +739,81 @@ msgstr "неизвестный тип двоичных файлов"
 #: src/grep.c:2831
 msgid ""
 "Written by Mike Haertel and others; see\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 msgstr ""
 "Авторы программы: Mike Haertel и другие; смотрите\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>"
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 
-#: src/grep.c:2934
+#: src/grep.c:2937
 #, c-format
 msgid "warning: GREP_COLOR='%s' is deprecated; use GREP_COLORS='mt=%s'"
 msgstr ""
 "предупреждение: GREP_COLOR='%s' считается устаревшей; используйте "
 "GREP_COLORS='mt=%s'"
 
-#: src/pcresearch.c:148
+#: src/pcresearch.c:92
+#, c-format
+msgid ""
+"\n"
+"grep -P uses PCRE2 %s\n"
+msgstr ""
+"\n"
+"grep -P использует PCRE2 %s\n"
+
+#: src/pcresearch.c:169
+msgid "-P supports only unibyte locales on this platform"
+msgstr "параметр -P поддерживает только однобайтовые локали на этой платформе"
+
+#: src/pcresearch.c:171
 msgid "-P supports only unibyte and UTF-8 locales"
 msgstr "параметр -P поддерживает только однобайтовые локали и UTF-8"
 
-#: src/pcresearch.c:162
+#: src/pcresearch.c:194
 msgid "the -P option only supports a single pattern"
 msgstr "параметр -P поддерживает только одиночный шаблон"
 
-#: src/pcresearch.c:215
-#, c-format
-msgid "JIT internal error: %d"
-msgstr "внутренняя ошибка JIT: %d"
-
-#: src/pcresearch.c:252
+#: src/pcresearch.c:290
 msgid "exceeded PCRE's line length limit"
 msgstr "превышено ограничение длины строки PCRE"
 
-#: src/pcresearch.c:330
+#: src/pcresearch.c:368
 #, c-format
 msgid "%s: memory exhausted"
 msgstr "%s: память исчерпана"
 
-#: src/pcresearch.c:333
+#: src/pcresearch.c:371
 #, c-format
 msgid "%s: exhausted PCRE JIT stack"
 msgstr "%s: исчерпан стек PCRE JIT"
 
-#: src/pcresearch.c:337
+#: src/pcresearch.c:375
 #, c-format
 msgid "%s: exceeded PCRE's backtracking limit"
 msgstr "%s: исчерпан лимит возвратов в PCRE"
 
-#: src/pcresearch.c:342
+#: src/pcresearch.c:380
 #, c-format
 msgid "%s: exceeded PCRE's nested backtracking limit"
 msgstr "%s: исчерпан лимит вложенных возвратов в PCRE"
 
-#: src/pcresearch.c:346
+#: src/pcresearch.c:384
 #, c-format
 msgid "%s: PCRE detected recurse loop"
 msgstr "%s: в PCRE обнаружена рекурсивный цикл"
 
-#: src/pcresearch.c:351
+#: src/pcresearch.c:389
 #, c-format
 msgid "%s: exceeded PCRE's heap limit"
 msgstr "%s: исчерпан лимит кучи в PCRE"
 
-#: src/pcresearch.c:360
+#: src/pcresearch.c:398
 #, c-format
 msgid "%s: internal PCRE error: %d"
 msgstr "%s: внутренняя ошибка PCRE: %d"
 
+#~ msgid "JIT internal error: %d"
+#~ msgstr "внутренняя ошибка JIT: %d"
+
 #~ msgid "failed to allocate memory for the PCRE JIT stack"
 #~ msgstr "ошибка выделения памяти для стека PCRE JIT"
 
diff --git a/po/sk.gmo b/po/sk.gmo
index 909a9b0e..cc1559e0 100644
Binary files a/po/sk.gmo and b/po/sk.gmo differ
diff --git a/po/sk.po b/po/sk.po
index 2bbb4926..575337ab 100644
--- a/po/sk.po
+++ b/po/sk.po
@@ -2,14 +2,14 @@
 # Copyright (C) 1997-99, 2000, 2001, 2002 Free Software Foundation, Inc.
 # This file is distributed under the same license as the grep package.
 # Ivan Masár <helix84@centrum.sk>, 2007, 2008, 2009, 2010, 2011, 2012.
-# Ladislav Michnovič <ladislav.michnovic@gmail.com>, 2020, 2021, 2022.
+# Ladislav Michnovič <ladislav.michnovic@gmail.com>, 2020, 2021, 2022, 2023.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: grep 3.7.98\n"
+"Project-Id-Version: grep 3.10.12\n"
 "Report-Msgid-Bugs-To: bug-grep@gnu.org\n"
-"POT-Creation-Date: 2022-09-02 23:52-0700\n"
-"PO-Revision-Date: 2022-08-18 14:34+0200\n"
+"POT-Creation-Date: 2023-05-13 01:14-0700\n"
+"PO-Revision-Date: 2023-04-21 16:22+0200\n"
 "Last-Translator: Ladislav Michnovič <ladislav.michnovic@gmail.com>\n"
 "Language-Team: Slovak <sk-i18n@lists.linux.sk>\n"
 "Language: sk\n"
@@ -17,104 +17,104 @@ msgstr ""
 "Content-Type: text/plain; charset=utf-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "X-Bugs: Report translation errors to the Language-Team address.\n"
-"X-Generator: Poedit 3.1.1\n"
+"X-Generator: Poedit 3.2.2\n"
 
-#: lib/argmatch.c:147
+#: lib/argmatch.c:145
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "neplatný argument %s pre %s"
 
-#: lib/argmatch.c:148
+#: lib/argmatch.c:146
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "nejednoznačný argument %s pre %s"
 
-#: lib/argmatch.c:167 lib/argmatch.h:238
+#: lib/argmatch.c:165 lib/argmatch.h:242
 msgid "Valid arguments are:"
-msgstr "Platné argumentu sú:"
+msgstr "Platné argumenty sú:"
 
-#: lib/c-stack.c:187
+#: lib/c-stack.c:186
 msgid "program error"
 msgstr "chyba programu"
 
-#: lib/c-stack.c:188
+#: lib/c-stack.c:187
 msgid "stack overflow"
 msgstr "pretečenie zásobníka"
 
-#: lib/closeout.c:122 src/grep.c:1346
+#: lib/closeout.c:121 src/grep.c:1346
 msgid "write error"
 msgstr "chyba zápisu"
 
-#: lib/dfa.c:894
+#: lib/dfa.c:897
 msgid "unbalanced ["
 msgstr "[ bez náprotivku"
 
-#: lib/dfa.c:1015
+#: lib/dfa.c:1018
 msgid "invalid character class"
 msgstr "neplatná trieda znakov"
 
-#: lib/dfa.c:1143
+#: lib/dfa.c:1146
 msgid "character class syntax is [[:space:]], not [:space:]"
 msgstr "syntax triedy znakov je [[:space:]], nie [:space:]"
 
-#: lib/dfa.c:1209
+#: lib/dfa.c:1222
 msgid "unfinished \\ escape"
 msgstr "nedokončená úniková klauzula \\"
 
-#: lib/dfa.c:1319
+#: lib/dfa.c:1332
 msgid "? at start of expression"
 msgstr "? na začiatku výrazu"
 
-#: lib/dfa.c:1331
+#: lib/dfa.c:1344
 msgid "* at start of expression"
 msgstr "* na začiatku výrazu"
 
-#: lib/dfa.c:1345
+#: lib/dfa.c:1358
 msgid "+ at start of expression"
 msgstr "+ na začiatku výrazu"
 
-#: lib/dfa.c:1400
+#: lib/dfa.c:1413
 msgid "{...} at start of expression"
 msgstr "{...} na začiatku výrazu"
 
-#: lib/dfa.c:1403
+#: lib/dfa.c:1416
 msgid "invalid content of \\{\\}"
 msgstr "neplatný obsah \\{\\}"
 
-#: lib/dfa.c:1405
+#: lib/dfa.c:1418
 msgid "regular expression too big"
 msgstr "regulárny výraz je príliš veľký"
 
-#: lib/dfa.c:1555
+#: lib/dfa.c:1568
 msgid "stray \\ before unprintable character"
 msgstr "zatúlaná \\ pred nevytlačitelným znakom"
 
-#: lib/dfa.c:1557
+#: lib/dfa.c:1570
 msgid "stray \\ before white space"
 msgstr "zatúlaná \\ pred bielym znakom"
 
-#: lib/dfa.c:1561
+#: lib/dfa.c:1574
 #, c-format
 msgid "stray \\ before %lc"
 msgstr "zatúlaná \\ pred %lc"
 
-#: lib/dfa.c:1562
+#: lib/dfa.c:1575
 msgid "stray \\"
 msgstr "zatúlaná \\"
 
-#: lib/dfa.c:1917
+#: lib/dfa.c:1925
 msgid "unbalanced ("
 msgstr "( bez náprotivku"
 
-#: lib/dfa.c:2034
+#: lib/dfa.c:2042
 msgid "no syntax specified"
 msgstr "neuvedená syntax"
 
-#: lib/dfa.c:2045
+#: lib/dfa.c:2053
 msgid "unbalanced )"
 msgstr ") bez náprotivku"
 
-#: lib/error.c:195
+#: lib/error.c:193
 msgid "Unknown system error"
 msgstr "Neznáma systémová chyba"
 
@@ -165,9 +165,9 @@ msgstr "nepodarilo sa zaznamenať aktuálny adresár"
 #: lib/openat-die.c:57
 #, c-format
 msgid "failed to return to initial working directory"
-msgstr "zlyhalo navrátenie do pôvodného aktuálneho adresára"
+msgstr "zlyhal navrát do pôvodného aktuálneho adresára"
 
-#: lib/xbinary-io.c:37
+#: lib/xbinary-io.c:36
 #, c-format
 msgid "failed to set file descriptor text/binary mode"
 msgstr "zlyhalo nastaviť deskriptor súboru do textového/binárneho módu"
@@ -193,11 +193,11 @@ msgstr "zlyhalo nastaviť deskriptor súboru do textového/binárneho módu"
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:355
+#: lib/quotearg.c:354
 msgid "`"
 msgstr "„"
 
-#: lib/quotearg.c:356
+#: lib/quotearg.c:355
 msgid "'"
 msgstr "“"
 
@@ -518,14 +518,14 @@ msgid ""
 "  -x, --line-regexp         match only whole lines\n"
 "  -z, --null-data           a data line ends in 0 byte, not newline\n"
 msgstr ""
-"  -e, --regexp=VZOR       použiť na hľadanie zhody VZOR\n"
+"  -e, --regexp=VZOR       použiť VZOR na hľadanie zhody\n"
 "  -f, --file=SÚBOR          získať VZOR zo SÚBORu\n"
 "  -i, --ignore-case         ignorovať rozdiely vo veľkosti písmen\n"
 "      --no-ignore-case      neignorovať rozdiely vo veľkosti písmen "
 "(predvolené)\n"
 "  -w, --word-regexp         vynútiť, aby VZOR zodpovedal len celým slovám\n"
 "  -x, --line-regexp         vynútiť, aby VZOR zodpovedal len celým riadkom\n"
-"  -z, --null-data           údaje končia bajtom 0, nie novým riadkom\n"
+"  -z, --null-data           údaje končia bajtom 0, nie odriadkovaním\n"
 
 #: src/grep.c:1999
 #, c-format
@@ -601,7 +601,7 @@ msgstr ""
 "  -d, --directories=OPERÁCIA ako pracovať s adresármi; kde OPERÁCIA je\n"
 "                            „read“ (čítať), „recurse“ (prechádzať) alebo\n"
 "                            „skip“ (preskočiť)\n"
-"  -D, --devices=OPERÁCIA    ako pracovať so zariadeniami, FIFO a socketmi;\n"
+"  -D, --devices=OPERÁCIA    ako pracovať so zariadeniami, FIFO a soketmi;\n"
 "                            OPERÁCIA je „read“ (čítať) alebo "
 "„skip“ (preskočiť)\n"
 "  -r, --recursive           ekvivalentné s --directories=recurse\n"
@@ -671,7 +671,7 @@ msgid ""
 "\n"
 msgstr ""
 "  -NUM                  rovnaké ako --context=NUM\n"
-"      --group-separator=SEP  vypíš oddeľovač SEP na riadok medzi zhodami s "
+"      --group-separator=ODD  vypíš oddeľovač ODD na riadok medzi zhodami s "
 "kontextom\n"
 "      --no-group-separator  nevypisuj oddeľovač pre zhody s kontextom\n"
 "      --color[=KEDY],\n"
@@ -688,10 +688,10 @@ msgid ""
 "Exit status is 0 if any line is selected, 1 otherwise;\n"
 "if any error occurs and -q is not given, the exit status is 2.\n"
 msgstr ""
-"Ak SÚBOR je -, číta sa zo štandardného vstupu. Bez SÚBORU číta sa . ak \n"
-"je rekurzia, v opačnom prípade -. Ak sú zadané menej ako dva SÚBORY "
+"Ak SÚBOR je “-“, číta sa zo štandardného vstupu. Bez SÚBORU, číta sa “.”,\n"
+"ak je rekurzia, v opačnom prípade “-“. Ak sú zadané menej ako dva SÚBORY, "
 "predpokladá sa -h.\n"
-"Výstupný chybový kód je 0 ak bol vybraný nejaký riadok,inak je 1;\n"
+"Výstupný chybový kód je 0, ak bol vybraný nejaký riadok,inak je 1;\n"
 "ak sa vyskytne nejaká chyba a nebolo zadané -q, výstupný chybový kód je 2.\n"
 
 #: src/grep.c:2104
@@ -728,69 +728,87 @@ msgstr "neznámy typ binárneho súboru"
 #: src/grep.c:2831
 msgid ""
 "Written by Mike Haertel and others; see\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 msgstr ""
-"Napísal Mike Haertel iní; pozri\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"Napísal Mike Haertel a ďalší; pozri\n"
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 
-#: src/grep.c:2934
+#: src/grep.c:2937
 #, c-format
 msgid "warning: GREP_COLOR='%s' is deprecated; use GREP_COLORS='mt=%s'"
 msgstr ""
 "upozornenie: GREP_COLOR='%s' sa už nepoužíva, použite GREP_COLORS='mt=%s'"
 
-#: src/pcresearch.c:148
+#: src/pcresearch.c:92
+#, c-format
+msgid ""
+"\n"
+"grep -P uses PCRE2 %s\n"
+msgstr ""
+"\n"
+"grep -P používa PCRE2 %s\n"
+
+#: src/pcresearch.c:169
+msgid "-P supports only unibyte locales on this platform"
+msgstr "-P podporuje na tejto platforme iba unibyte locales"
+
+#: src/pcresearch.c:171
 msgid "-P supports only unibyte and UTF-8 locales"
 msgstr "-P podporuje iba unibyte a UTF-8 locales"
 
-#: src/pcresearch.c:162
+#: src/pcresearch.c:194
 msgid "the -P option only supports a single pattern"
 msgstr "voľba -P podporuje iba jediný vzor"
 
-#: src/pcresearch.c:215
-#, c-format
-msgid "JIT internal error: %d"
-msgstr "vnútorná chyba JIT: %d"
-
-#: src/pcresearch.c:252
+#: src/pcresearch.c:290
 msgid "exceeded PCRE's line length limit"
 msgstr "prekročenie limitu dĺžky riadka PCRE"
 
-#: src/pcresearch.c:330
+#: src/pcresearch.c:368
 #, c-format
 msgid "%s: memory exhausted"
 msgstr "%s: pamäť bola vyčerpaná"
 
-#: src/pcresearch.c:333
+#: src/pcresearch.c:371
 #, c-format
 msgid "%s: exhausted PCRE JIT stack"
 msgstr "%s: vyčerpaný zásobník PCRE JIT"
 
-#: src/pcresearch.c:337
+#: src/pcresearch.c:375
 #, c-format
 msgid "%s: exceeded PCRE's backtracking limit"
 msgstr "%s: prekročenie limitu backtrackingu PCRE"
 
-#: src/pcresearch.c:342
+#: src/pcresearch.c:380
 #, c-format
 msgid "%s: exceeded PCRE's nested backtracking limit"
 msgstr "%s: prekročenie limitu vnoreného spätného sledovania PCRE"
 
-#: src/pcresearch.c:346
+#: src/pcresearch.c:384
 #, c-format
 msgid "%s: PCRE detected recurse loop"
 msgstr "%s: PCRE zistilo rekurzívnu slučku"
 
-#: src/pcresearch.c:351
+#: src/pcresearch.c:389
 #, c-format
 msgid "%s: exceeded PCRE's heap limit"
 msgstr "%s: prekročenie limitu haldy PCRE"
 
-#: src/pcresearch.c:360
+#: src/pcresearch.c:398
 #, c-format
 msgid "%s: internal PCRE error: %d"
 msgstr "%s: vnútorná chyba PCRE: %d"
 
+#~ msgid ""
+#~ "\n"
+#~ "Built with PCRE "
+#~ msgstr ""
+#~ "\n"
+#~ "Zostavené s PCRE "
+
+#~ msgid "JIT internal error: %d"
+#~ msgstr "vnútorná chyba JIT: %d"
+
 #~ msgid "failed to allocate memory for the PCRE JIT stack"
 #~ msgstr "chyba pri alokácii pamäte pre zásobník PCRE JIT"
 
diff --git a/po/sl.po b/po/sl.po
index a6ab099c..6d168c7b 100644
--- a/po/sl.po
+++ b/po/sl.po
@@ -9,7 +9,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: GNU grep 3.0.23-b00\n"
 "Report-Msgid-Bugs-To: bug-grep@gnu.org\n"
-"POT-Creation-Date: 2022-09-02 23:52-0700\n"
+"POT-Creation-Date: 2023-05-13 01:14-0700\n"
 "PO-Revision-Date: 2018-07-28 23:40+0200\n"
 "Last-Translator: Primož Peterlin <primozz.peterlin@gmail.com>\n"
 "Language-Team: Slovenian <translation-team-sl@lists.sourceforge.net>\n"
@@ -21,105 +21,105 @@ msgstr ""
 "Plural-Forms: nplurals=4; plural=(n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || "
 "n%100==4 ? 3 : 0);\n"
 
-#: lib/argmatch.c:147
+#: lib/argmatch.c:145
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "neveljavni argument %s za %s"
 
-#: lib/argmatch.c:148
+#: lib/argmatch.c:146
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "dvoumni argument %s za %s"
 
-#: lib/argmatch.c:167 lib/argmatch.h:238
+#: lib/argmatch.c:165 lib/argmatch.h:242
 msgid "Valid arguments are:"
 msgstr "Veljavni argumenti so:"
 
-#: lib/c-stack.c:187
+#: lib/c-stack.c:186
 msgid "program error"
 msgstr ""
 
-#: lib/c-stack.c:188
+#: lib/c-stack.c:187
 msgid "stack overflow"
 msgstr ""
 
-#: lib/closeout.c:122 src/grep.c:1346
+#: lib/closeout.c:121 src/grep.c:1346
 msgid "write error"
 msgstr "napaka pri pisanju"
 
-#: lib/dfa.c:894
+#: lib/dfa.c:897
 msgid "unbalanced ["
 msgstr "uklepaj [ brez zaklepaja"
 
-#: lib/dfa.c:1015
+#: lib/dfa.c:1018
 msgid "invalid character class"
 msgstr "neveljavno ime razreda znakov"
 
-#: lib/dfa.c:1143
+#: lib/dfa.c:1146
 msgid "character class syntax is [[:space:]], not [:space:]"
 msgstr "skladnja imena razreda znakov je [[:space:]], ne [:space:]"
 
-#: lib/dfa.c:1209
+#: lib/dfa.c:1222
 msgid "unfinished \\ escape"
 msgstr "nedokončano ubežno zaporedje \\"
 
-#: lib/dfa.c:1319
+#: lib/dfa.c:1332
 #, fuzzy
 msgid "? at start of expression"
 msgstr "Neveljaven regularen izraz"
 
-#: lib/dfa.c:1331
+#: lib/dfa.c:1344
 #, fuzzy
 msgid "* at start of expression"
 msgstr "Neveljaven regularen izraz"
 
-#: lib/dfa.c:1345
+#: lib/dfa.c:1358
 #, fuzzy
 msgid "+ at start of expression"
 msgstr "Neveljaven regularen izraz"
 
-#: lib/dfa.c:1400
+#: lib/dfa.c:1413
 msgid "{...} at start of expression"
 msgstr ""
 
-#: lib/dfa.c:1403
+#: lib/dfa.c:1416
 msgid "invalid content of \\{\\}"
 msgstr "neveljavna vsebina \\{\\}"
 
-#: lib/dfa.c:1405
+#: lib/dfa.c:1418
 msgid "regular expression too big"
 msgstr "regularni izraz je preobsežen"
 
-#: lib/dfa.c:1555
+#: lib/dfa.c:1568
 msgid "stray \\ before unprintable character"
 msgstr ""
 
-#: lib/dfa.c:1557
+#: lib/dfa.c:1570
 msgid "stray \\ before white space"
 msgstr ""
 
-#: lib/dfa.c:1561
+#: lib/dfa.c:1574
 #, c-format
 msgid "stray \\ before %lc"
 msgstr ""
 
-#: lib/dfa.c:1562
+#: lib/dfa.c:1575
 msgid "stray \\"
 msgstr ""
 
-#: lib/dfa.c:1917
+#: lib/dfa.c:1925
 msgid "unbalanced ("
 msgstr "uklepaj ( brez zaklepaja"
 
-#: lib/dfa.c:2034
+#: lib/dfa.c:2042
 msgid "no syntax specified"
 msgstr "skladnja ni podana"
 
-#: lib/dfa.c:2045
+#: lib/dfa.c:2053
 msgid "unbalanced )"
 msgstr "zaklepaj ) brez uklepaja"
 
-#: lib/error.c:195
+#: lib/error.c:193
 msgid "Unknown system error"
 msgstr "Neznana sistemska napaka"
 
@@ -172,7 +172,7 @@ msgstr "trenutnega delovnega imenika ni mogoče zabeležiti"
 msgid "failed to return to initial working directory"
 msgstr "vrnitev v začetni delovni imenik ni mogoča"
 
-#: lib/xbinary-io.c:37
+#: lib/xbinary-io.c:36
 #, c-format
 msgid "failed to set file descriptor text/binary mode"
 msgstr "nastavitev deskriptorja datoteke za tekstovni/binarni način ni uspela"
@@ -198,11 +198,11 @@ msgstr "nastavitev deskriptorja datoteke za tekstovni/binarni način ni uspela"
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:355
+#: lib/quotearg.c:354
 msgid "`"
 msgstr "»"
 
-#: lib/quotearg.c:356
+#: lib/quotearg.c:355
 msgid "'"
 msgstr "«"
 
@@ -740,66 +740,77 @@ msgstr "neznan tip binarne datoteke"
 #, fuzzy
 msgid ""
 "Written by Mike Haertel and others; see\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 msgstr "drugi, glejte <http://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>"
 
-#: src/grep.c:2934
+#: src/grep.c:2937
 #, c-format
 msgid "warning: GREP_COLOR='%s' is deprecated; use GREP_COLORS='mt=%s'"
 msgstr ""
 
-#: src/pcresearch.c:148
+#: src/pcresearch.c:92
+#, c-format
+msgid ""
+"\n"
+"grep -P uses PCRE2 %s\n"
+msgstr ""
+
+#: src/pcresearch.c:169
+#, fuzzy
+msgid "-P supports only unibyte locales on this platform"
+msgstr "-P podpira samo enobajtna kodiranja in UTF-8"
+
+#: src/pcresearch.c:171
 msgid "-P supports only unibyte and UTF-8 locales"
 msgstr "-P podpira samo enobajtna kodiranja in UTF-8"
 
-#: src/pcresearch.c:162
+#: src/pcresearch.c:194
 msgid "the -P option only supports a single pattern"
 msgstr "izbira -P podpira le en vzorec"
 
-#: src/pcresearch.c:215
-#, fuzzy, c-format
-msgid "JIT internal error: %d"
-msgstr "interna napaka"
-
-#: src/pcresearch.c:252
+#: src/pcresearch.c:290
 msgid "exceeded PCRE's line length limit"
 msgstr "prekoračena meja PCRE za dolžino vrstice"
 
-#: src/pcresearch.c:330
+#: src/pcresearch.c:368
 #, fuzzy, c-format
 msgid "%s: memory exhausted"
 msgstr "pomnilnik porabljen"
 
-#: src/pcresearch.c:333
+#: src/pcresearch.c:371
 #, fuzzy, c-format
 msgid "%s: exhausted PCRE JIT stack"
 msgstr "prekoračitev sklada PCRE JIT"
 
-#: src/pcresearch.c:337
+#: src/pcresearch.c:375
 #, fuzzy, c-format
 msgid "%s: exceeded PCRE's backtracking limit"
 msgstr "prekoračena meja PCRE za iskanje s povratnim sledenjem"
 
-#: src/pcresearch.c:342
+#: src/pcresearch.c:380
 #, fuzzy, c-format
 msgid "%s: exceeded PCRE's nested backtracking limit"
 msgstr "prekoračena meja PCRE za iskanje s povratnim sledenjem"
 
-#: src/pcresearch.c:346
+#: src/pcresearch.c:384
 #, c-format
 msgid "%s: PCRE detected recurse loop"
 msgstr ""
 
-#: src/pcresearch.c:351
+#: src/pcresearch.c:389
 #, fuzzy, c-format
 msgid "%s: exceeded PCRE's heap limit"
 msgstr "prekoračena meja PCRE za iskanje s povratnim sledenjem"
 
-#: src/pcresearch.c:360
+#: src/pcresearch.c:398
 #, fuzzy, c-format
 msgid "%s: internal PCRE error: %d"
 msgstr "interna napaka PCRE: %d"
 
+#, fuzzy, c-format
+#~ msgid "JIT internal error: %d"
+#~ msgstr "interna napaka"
+
 #~ msgid "failed to allocate memory for the PCRE JIT stack"
 #~ msgstr "pomnilnika za sklad PCRE JIT se ni uspelo dodeliti"
 
diff --git a/po/sr.gmo b/po/sr.gmo
index 52d2c188..87f0c81a 100644
Binary files a/po/sr.gmo and b/po/sr.gmo differ
diff --git a/po/sr.po b/po/sr.po
index 2c9a9e63..f59d597d 100644
--- a/po/sr.po
+++ b/po/sr.po
@@ -2,13 +2,14 @@
 # Copyright © 2020 Free Software Foundation, Inc.
 # This file is distributed under the same license as the grep package.
 # Danilo Segan <dsegan@gmx.net>, 2003.
-# Мирослав Николић <miroslavnikolic@rocketmail.com>, 2011–2021.
+# Мирослав Николић <miroslavnikolic@rocketmail.com>, 2011–2022.
+#
 msgid ""
 msgstr ""
-"Project-Id-Version: grep-3.6.27\n"
+"Project-Id-Version: grep-3.7.98\n"
 "Report-Msgid-Bugs-To: bug-grep@gnu.org\n"
-"POT-Creation-Date: 2022-09-02 23:52-0700\n"
-"PO-Revision-Date: 2021-10-01 21:45+0200\n"
+"POT-Creation-Date: 2023-05-13 01:14-0700\n"
+"PO-Revision-Date: 2022-09-08 05:08+0200\n"
 "Last-Translator: Мирослав Николић <miroslavnikolic@rocketmail.com>\n"
 "Language-Team: Serbian <(nothing)>\n"
 "Language: sr\n"
@@ -19,105 +20,102 @@ msgstr ""
 "n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
 "X-Bugs: Report translation errors to the Language-Team address.\n"
 
-#: lib/argmatch.c:147
+#: lib/argmatch.c:145
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "неисправан аргумент „%s“ за „%s“"
 
-#: lib/argmatch.c:148
+#: lib/argmatch.c:146
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "нејасан аргумент „%s“ за „%s“"
 
-#: lib/argmatch.c:167 lib/argmatch.h:238
+#: lib/argmatch.c:165 lib/argmatch.h:242
 msgid "Valid arguments are:"
 msgstr "Исправни аргументи су:"
 
-#: lib/c-stack.c:187
+#: lib/c-stack.c:186
 msgid "program error"
 msgstr "грешка програма"
 
-#: lib/c-stack.c:188
+#: lib/c-stack.c:187
 msgid "stack overflow"
 msgstr "прекорачење спремника"
 
-#: lib/closeout.c:122 src/grep.c:1346
+#: lib/closeout.c:121 src/grep.c:1346
 msgid "write error"
 msgstr "грешка писања"
 
-#: lib/dfa.c:894
+#: lib/dfa.c:897
 msgid "unbalanced ["
 msgstr "неуравнотежена ["
 
-#: lib/dfa.c:1015
+#: lib/dfa.c:1018
 msgid "invalid character class"
 msgstr "неисправна класа знака"
 
-#: lib/dfa.c:1143
+#: lib/dfa.c:1146
 msgid "character class syntax is [[:space:]], not [:space:]"
 msgstr "синтакса класе знака је [[:размак:]], а не [:размак:]"
 
-#: lib/dfa.c:1209
+#: lib/dfa.c:1222
 msgid "unfinished \\ escape"
 msgstr "недовршена \\ излазим"
 
-#: lib/dfa.c:1319
-#, fuzzy
+#: lib/dfa.c:1332
 msgid "? at start of expression"
-msgstr "Неисправан регуларан израз"
+msgstr "? на почетку израза"
 
-#: lib/dfa.c:1331
-#, fuzzy
+#: lib/dfa.c:1344
 msgid "* at start of expression"
-msgstr "Неисправан регуларан израз"
+msgstr "* на почетку израза"
 
-#: lib/dfa.c:1345
-#, fuzzy
+#: lib/dfa.c:1358
 msgid "+ at start of expression"
-msgstr "Неисправан регуларан израз"
+msgstr "+ на почетку израза"
 
-#: lib/dfa.c:1400
+#: lib/dfa.c:1413
 msgid "{...} at start of expression"
-msgstr ""
+msgstr "{...} на почетку израза"
 
-#: lib/dfa.c:1403
+#: lib/dfa.c:1416
 msgid "invalid content of \\{\\}"
 msgstr "неисправан садржај \\{\\}"
 
-#: lib/dfa.c:1405
+#: lib/dfa.c:1418
 msgid "regular expression too big"
 msgstr "регуларни израз је превелик"
 
-#: lib/dfa.c:1555
+#: lib/dfa.c:1568
 msgid "stray \\ before unprintable character"
-msgstr ""
+msgstr "залутала \\ пре неисписивог знака"
 
-#: lib/dfa.c:1557
+#: lib/dfa.c:1570
 msgid "stray \\ before white space"
-msgstr ""
+msgstr "залутала \\ пре празнине"
 
-#: lib/dfa.c:1561
+#: lib/dfa.c:1574
 #, c-format
 msgid "stray \\ before %lc"
-msgstr ""
+msgstr "залутала \\ пре „%lc“"
 
-#: lib/dfa.c:1562
+#: lib/dfa.c:1575
 msgid "stray \\"
-msgstr ""
+msgstr "залутала \\"
 
-#: lib/dfa.c:1917
+#: lib/dfa.c:1925
 msgid "unbalanced ("
 msgstr "неуравнотежена ("
 
-#: lib/dfa.c:2034
+#: lib/dfa.c:2042
 msgid "no syntax specified"
 msgstr "синтакса није наведена"
 
-#: lib/dfa.c:2045
+#: lib/dfa.c:2053
 msgid "unbalanced )"
 msgstr "неуравнотежена )"
 
-#: lib/error.c:195
+#: lib/error.c:193
 msgid "Unknown system error"
 msgstr "Непозната системска грешка"
 
@@ -170,7 +168,7 @@ msgstr "не могу да снимим тренутни радни директ
 msgid "failed to return to initial working directory"
 msgstr "не могу да се вратим у почетни радни директоријум"
 
-#: lib/xbinary-io.c:37
+#: lib/xbinary-io.c:36
 #, c-format
 msgid "failed to set file descriptor text/binary mode"
 msgstr "нисам успео да подесим текстуални/бинарни режим описника датотеке"
@@ -196,11 +194,11 @@ msgstr "нисам успео да подесим текстуални/бина
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:355
+#: lib/quotearg.c:354
 msgid "`"
 msgstr "„"
 
-#: lib/quotearg.c:356
+#: lib/quotearg.c:355
 msgid "'"
 msgstr "“"
 
@@ -439,9 +437,9 @@ msgid "General help using GNU software: <%s>\n"
 msgstr "Општа помоћ за Гнуов софтвер: <%s>\n"
 
 #: src/dfasearch.c:59
-#, fuzzy, c-format
+#, c-format
 msgid "warning: %s"
-msgstr "упозорење: %s: %s"
+msgstr "упозорење: %s"
 
 #: src/grep.c:656
 msgid "(standard input)"
@@ -740,70 +738,82 @@ msgid "unknown binary-files type"
 msgstr "непозната врста бинарних датотека"
 
 #: src/grep.c:2831
+#, fuzzy
 msgid ""
 "Written by Mike Haertel and others; see\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 msgstr ""
 "Написали су Мајк Хиртел и други; погледајте\n"
 "<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
 
-#: src/grep.c:2934
+#: src/grep.c:2937
 #, c-format
 msgid "warning: GREP_COLOR='%s' is deprecated; use GREP_COLORS='mt=%s'"
+msgstr "упозорење: GREP_COLOR='%s' је застарело; користите GREP_COLORS='mt=%s'"
+
+#: src/pcresearch.c:92
+#, c-format
+msgid ""
+"\n"
+"grep -P uses PCRE2 %s\n"
 msgstr ""
 
-#: src/pcresearch.c:148
+#: src/pcresearch.c:169
+#, fuzzy
+msgid "-P supports only unibyte locales on this platform"
+msgstr "„-P“ подржава само једнобајтне и УТФ-8 језике"
+
+#: src/pcresearch.c:171
 msgid "-P supports only unibyte and UTF-8 locales"
 msgstr "„-P“ подржава само једнобајтне и УТФ-8 језике"
 
-#: src/pcresearch.c:162
+#: src/pcresearch.c:194
 msgid "the -P option only supports a single pattern"
 msgstr "опција „-P“ подржава само самосталне шаблоне"
 
-#: src/pcresearch.c:215
-#, fuzzy, c-format
-msgid "JIT internal error: %d"
-msgstr "унутрашња грешка"
-
-#: src/pcresearch.c:252
+#: src/pcresearch.c:290
 msgid "exceeded PCRE's line length limit"
 msgstr "прекорачено је ограничење дужине реда ПЦРЕ-а"
 
-#: src/pcresearch.c:330
+#: src/pcresearch.c:368
 #, c-format
 msgid "%s: memory exhausted"
 msgstr "%s: меморија је потрошена"
 
-#: src/pcresearch.c:333
+#: src/pcresearch.c:371
 #, c-format
 msgid "%s: exhausted PCRE JIT stack"
 msgstr "%s: потрошени ПЦРЕ ЈИТ спремник"
 
-#: src/pcresearch.c:337
+#: src/pcresearch.c:375
 #, c-format
 msgid "%s: exceeded PCRE's backtracking limit"
 msgstr "%s: прекорачено је ПЦРЕ-ово ограничење тражења уназад"
 
-#: src/pcresearch.c:342
-#, fuzzy, c-format
+#: src/pcresearch.c:380
+#, c-format
 msgid "%s: exceeded PCRE's nested backtracking limit"
 msgstr "%s: прекорачено је ПЦРЕ-ово ограничење тражења уназад"
 
-#: src/pcresearch.c:346
+#: src/pcresearch.c:384
 #, c-format
 msgid "%s: PCRE detected recurse loop"
-msgstr ""
+msgstr "%s: ПЦРЕ је открио дубинску петљу"
 
-#: src/pcresearch.c:351
-#, fuzzy, c-format
+#: src/pcresearch.c:389
+#, c-format
 msgid "%s: exceeded PCRE's heap limit"
-msgstr "%s: прекорачено је ограничење ПЦРЕ дубачења"
+msgstr "%s: прекорачено је ограничење ПЦРЕ гомиле"
 
-#: src/pcresearch.c:360
+#: src/pcresearch.c:398
 #, c-format
 msgid "%s: internal PCRE error: %d"
 msgstr "%s: унутрашња грешка ПЦРЕ-а: %d"
 
+#, c-format
+#~ msgid "JIT internal error: %d"
+#~ msgstr "ЈИТ унутрашња грешка: %d"
+
 #~ msgid "failed to allocate memory for the PCRE JIT stack"
 #~ msgstr "нисам успео да доделим меморију за ПЦРЕ ЏИТ спремник"
 
diff --git a/po/sv.gmo b/po/sv.gmo
index a8c68cf7..df14608f 100644
Binary files a/po/sv.gmo and b/po/sv.gmo differ
diff --git a/po/sv.po b/po/sv.po
index 4aa171e2..19340224 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -1,17 +1,17 @@
 # Swedish messages for GNU Grep
-# Copyright © 1996, 1998, 1999, 2000, 2001, 2006, 2007, 2008, 2009, 2010, 2011, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022 Free Software Foundation, Inc.
+# Copyright © 1996, 1998, 1999, 2000, 2001, 2006, 2007, 2008, 2009, 2010, 2011, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 Free Software Foundation, Inc.
 # This file is distributed under the same license as the grep package.
 # Thomas Olsson <cid95tho@student1.lu.se>, 1996.
 # Daniel Resare <daniel@resare.com>, 1998, 1999, 2000, 2001.
 # Daniel Nylander <po@danielnylander.se>, 2006, 2007, 2008, 2009, 2010, 2011.
-# Anders Jonsson <anders.jonsson@norsjovallen.se>, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022.
+# Anders Jonsson <anders.jonsson@norsjovallen.se>, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: grep 3.7.98\n"
+"Project-Id-Version: grep 3.10.12\n"
 "Report-Msgid-Bugs-To: bug-grep@gnu.org\n"
-"POT-Creation-Date: 2022-09-02 23:52-0700\n"
-"PO-Revision-Date: 2022-07-03 18:32+0200\n"
+"POT-Creation-Date: 2023-05-13 01:14-0700\n"
+"PO-Revision-Date: 2023-04-23 12:03+0200\n"
 "Last-Translator: Anders Jonsson <anders.jonsson@norsjovallen.se>\n"
 "Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
 "Language: sv\n"
@@ -19,104 +19,104 @@ msgstr ""
 "Content-Type: text/plain; charset=utf-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "X-Bugs: Report translation errors to the Language-Team address.\n"
-"X-Generator: Poedit 3.1\n"
+"X-Generator: Poedit 3.2.2\n"
 
-#: lib/argmatch.c:147
+#: lib/argmatch.c:145
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "ogiltigt argument %s för %s"
 
-#: lib/argmatch.c:148
+#: lib/argmatch.c:146
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "tvetydigt argument %s för %s"
 
-#: lib/argmatch.c:167 lib/argmatch.h:238
+#: lib/argmatch.c:165 lib/argmatch.h:242
 msgid "Valid arguments are:"
 msgstr "Giltiga argument är:"
 
-#: lib/c-stack.c:187
+#: lib/c-stack.c:186
 msgid "program error"
 msgstr "programfel"
 
-#: lib/c-stack.c:188
+#: lib/c-stack.c:187
 msgid "stack overflow"
 msgstr "stacköverspill"
 
-#: lib/closeout.c:122 src/grep.c:1346
+#: lib/closeout.c:121 src/grep.c:1346
 msgid "write error"
 msgstr "skrivfel"
 
-#: lib/dfa.c:894
+#: lib/dfa.c:897
 msgid "unbalanced ["
 msgstr "obalanserad ["
 
-#: lib/dfa.c:1015
+#: lib/dfa.c:1018
 msgid "invalid character class"
 msgstr "ogiltig teckenklass"
 
-#: lib/dfa.c:1143
+#: lib/dfa.c:1146
 msgid "character class syntax is [[:space:]], not [:space:]"
 msgstr "syntax för teckenklass är [[:space:]], inte [:space:]"
 
-#: lib/dfa.c:1209
+#: lib/dfa.c:1222
 msgid "unfinished \\ escape"
 msgstr "oavslutad \\-sekvens"
 
-#: lib/dfa.c:1319
+#: lib/dfa.c:1332
 msgid "? at start of expression"
 msgstr "? i början på uttryck"
 
-#: lib/dfa.c:1331
+#: lib/dfa.c:1344
 msgid "* at start of expression"
 msgstr "* i början på uttryck"
 
-#: lib/dfa.c:1345
+#: lib/dfa.c:1358
 msgid "+ at start of expression"
 msgstr "+ i början på uttryck"
 
-#: lib/dfa.c:1400
+#: lib/dfa.c:1413
 msgid "{...} at start of expression"
 msgstr "{...} i början på uttryck"
 
-#: lib/dfa.c:1403
+#: lib/dfa.c:1416
 msgid "invalid content of \\{\\}"
 msgstr "ogiltigt innehåll i \\{\\}"
 
-#: lib/dfa.c:1405
+#: lib/dfa.c:1418
 msgid "regular expression too big"
 msgstr "reguljärt uttryck är för stort"
 
-#: lib/dfa.c:1555
+#: lib/dfa.c:1568
 msgid "stray \\ before unprintable character"
 msgstr "löst \\ före ej utskrivbart tecken"
 
-#: lib/dfa.c:1557
+#: lib/dfa.c:1570
 msgid "stray \\ before white space"
 msgstr "löst \\ före blanktecken"
 
-#: lib/dfa.c:1561
+#: lib/dfa.c:1574
 #, c-format
 msgid "stray \\ before %lc"
 msgstr "löst \\ före %lc"
 
-#: lib/dfa.c:1562
+#: lib/dfa.c:1575
 msgid "stray \\"
 msgstr "löst \\"
 
-#: lib/dfa.c:1917
+#: lib/dfa.c:1925
 msgid "unbalanced ("
 msgstr "obalanserad ("
 
-#: lib/dfa.c:2034
+#: lib/dfa.c:2042
 msgid "no syntax specified"
 msgstr "ingen syntax angiven"
 
-#: lib/dfa.c:2045
+#: lib/dfa.c:2053
 msgid "unbalanced )"
 msgstr "obalanserad )"
 
-#: lib/error.c:195
+#: lib/error.c:193
 msgid "Unknown system error"
 msgstr "Okänt systemfel"
 
@@ -169,7 +169,7 @@ msgstr "kan inte notera aktuell arbetskatalog"
 msgid "failed to return to initial working directory"
 msgstr "misslyckades med att återvända till ursprunglig arbetskatalog"
 
-#: lib/xbinary-io.c:37
+#: lib/xbinary-io.c:36
 #, c-format
 msgid "failed to set file descriptor text/binary mode"
 msgstr "misslyckades med att ställa in text/binärläge för filbeskrivare"
@@ -199,11 +199,11 @@ msgstr "misslyckades med att ställa in text/binärläge för filbeskrivare"
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:355
+#: lib/quotearg.c:354
 msgid "`"
 msgstr "”"
 
-#: lib/quotearg.c:356
+#: lib/quotearg.c:355
 msgid "'"
 msgstr "”"
 
@@ -734,68 +734,86 @@ msgstr "okänd binärfiltyp"
 #: src/grep.c:2831
 msgid ""
 "Written by Mike Haertel and others; see\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 msgstr ""
-"Skrivet av Mike Haertel och andra, se <https://git.sv.gnu.org/cgit/grep.git/"
-"tree/AUTHORS>."
+"Skrivet av Mike Haertel och andra, se\n"
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 
-#: src/grep.c:2934
+#: src/grep.c:2937
 #, c-format
 msgid "warning: GREP_COLOR='%s' is deprecated; use GREP_COLORS='mt=%s'"
 msgstr "varning: GREP_COLOR='%s' är föråldrad; använd GREP_COLORS='mt=%s'"
 
-#: src/pcresearch.c:148
+#: src/pcresearch.c:92
+#, c-format
+msgid ""
+"\n"
+"grep -P uses PCRE2 %s\n"
+msgstr ""
+"\n"
+"grep -P använder PCRE2 %s\n"
+
+#: src/pcresearch.c:169
+msgid "-P supports only unibyte locales on this platform"
+msgstr "-P stöder endast unibyte-lokaler på denna plattform"
+
+#: src/pcresearch.c:171
 msgid "-P supports only unibyte and UTF-8 locales"
 msgstr "-P stöder endast unibyte- och UTF-8-lokaler"
 
-#: src/pcresearch.c:162
+#: src/pcresearch.c:194
 msgid "the -P option only supports a single pattern"
 msgstr "flaggan -P har endast stöd för ett mönster"
 
-#: src/pcresearch.c:215
-#, c-format
-msgid "JIT internal error: %d"
-msgstr "internt JIT-fel: %d"
-
-#: src/pcresearch.c:252
+#: src/pcresearch.c:290
 msgid "exceeded PCRE's line length limit"
 msgstr "översteg radlängdsgräns för PCRE"
 
-#: src/pcresearch.c:330
+#: src/pcresearch.c:368
 #, c-format
 msgid "%s: memory exhausted"
 msgstr "%s: minnet är slut"
 
-#: src/pcresearch.c:333
+#: src/pcresearch.c:371
 #, c-format
 msgid "%s: exhausted PCRE JIT stack"
 msgstr "%s: fyllde JIT-stacken för PCRE"
 
-#: src/pcresearch.c:337
+#: src/pcresearch.c:375
 #, c-format
 msgid "%s: exceeded PCRE's backtracking limit"
 msgstr "%s: översteg gräns för PCRE-bakåtspårning"
 
-#: src/pcresearch.c:342
+#: src/pcresearch.c:380
 #, c-format
 msgid "%s: exceeded PCRE's nested backtracking limit"
 msgstr "%s: översteg gräns för nästlad PCRE-bakåtspårning"
 
-#: src/pcresearch.c:346
+#: src/pcresearch.c:384
 #, c-format
 msgid "%s: PCRE detected recurse loop"
 msgstr "%s: PCRE upptäckte rekursiv loop"
 
-#: src/pcresearch.c:351
+#: src/pcresearch.c:389
 #, c-format
 msgid "%s: exceeded PCRE's heap limit"
 msgstr "%s: översteg heap-gräns för PCRE"
 
-#: src/pcresearch.c:360
+#: src/pcresearch.c:398
 #, c-format
 msgid "%s: internal PCRE error: %d"
 msgstr "%s: internt PCRE-fel: %d"
 
+#~ msgid ""
+#~ "\n"
+#~ "Built with PCRE "
+#~ msgstr ""
+#~ "\n"
+#~ "Byggt med PCRE "
+
+#~ msgid "JIT internal error: %d"
+#~ msgstr "internt JIT-fel: %d"
+
 #~ msgid "failed to allocate memory for the PCRE JIT stack"
 #~ msgstr "misslyckades med att allokera minne för JIT-stacken för PCRE"
 
diff --git a/po/ta.gmo b/po/ta.gmo
index b19c0043..3a1a316e 100644
Binary files a/po/ta.gmo and b/po/ta.gmo differ
diff --git a/po/ta.po b/po/ta.po
index 5b7efa50..ffa08c87 100644
--- a/po/ta.po
+++ b/po/ta.po
@@ -2,14 +2,15 @@
 # Copyright (C) 2021 Free Software Foundation, Inc.
 # This file is distributed under the same license as the grep package.
 # Nardhini <nardhini@systemreboot.net>, 2021.
-# Arun Isaac <arunisaac@systemreboot.net>, 2021.
+# Arun Isaac <arunisaac@systemreboot.net>, 2021, 2023.
+# Anbarasan Sivakumar <anbarasan80@proton.me>, 2023.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: GNU grep 3.6.27\n"
+"Project-Id-Version: GNU grep 3.10.12\n"
 "Report-Msgid-Bugs-To: bug-grep@gnu.org\n"
-"POT-Creation-Date: 2022-09-02 23:52-0700\n"
-"PO-Revision-Date: 2021-08-28 03:18+0530\n"
+"POT-Creation-Date: 2023-05-13 01:14-0700\n"
+"PO-Revision-Date: 2023-04-26 00:29+0100\n"
 "Last-Translator: Arun Isaac <arunisaac@systemreboot.net>\n"
 "Language-Team: Tamil <tamil@systemreboot.net>\n"
 "Language: ta\n"
@@ -18,105 +19,102 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "X-Bugs: Report translation errors to the Language-Team address.\n"
 
-#: lib/argmatch.c:147
+#: lib/argmatch.c:145
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "%2$s க்கு ஏற்கத்தகாச் செயலுருபு %1$s"
 
-#: lib/argmatch.c:148
+#: lib/argmatch.c:146
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "%2$s க்குத் தெளிவற்ற செயலுருபு %1$s"
 
-#: lib/argmatch.c:167 lib/argmatch.h:238
+#: lib/argmatch.c:165 lib/argmatch.h:242
 msgid "Valid arguments are:"
 msgstr "ஏற்கத்தகு செயலுருபுகள்:"
 
-#: lib/c-stack.c:187
+#: lib/c-stack.c:186
 msgid "program error"
 msgstr "நிரல் பிழை"
 
-#: lib/c-stack.c:188
+#: lib/c-stack.c:187
 msgid "stack overflow"
 msgstr "அடுக்கு வழிவு"
 
-#: lib/closeout.c:122 src/grep.c:1346
+#: lib/closeout.c:121 src/grep.c:1346
 msgid "write error"
 msgstr "எழுது பிழை"
 
-#: lib/dfa.c:894
+#: lib/dfa.c:897
 msgid "unbalanced ["
 msgstr "நிறைவுறா ["
 
-#: lib/dfa.c:1015
+#: lib/dfa.c:1018
 msgid "invalid character class"
 msgstr "ஏற்கத்தகா வரியுரு வகுப்பு"
 
-#: lib/dfa.c:1143
+#: lib/dfa.c:1146
 msgid "character class syntax is [[:space:]], not [:space:]"
 msgstr "வரியுரு வகுப்பை [[:space:]] எனக் குறிப்பிடுக, [:space:] என்றல்ல"
 
-#: lib/dfa.c:1209
+#: lib/dfa.c:1222
 msgid "unfinished \\ escape"
 msgstr "நிறைவுறா \\ விடுவிப்பு"
 
-#: lib/dfa.c:1319
-#, fuzzy
+#: lib/dfa.c:1332
 msgid "? at start of expression"
-msgstr "ஏற்கத்தகா தேடுகுறித்தொடர்"
+msgstr "செங்குறித்தொடர் முன் ?"
 
-#: lib/dfa.c:1331
-#, fuzzy
+#: lib/dfa.c:1344
 msgid "* at start of expression"
-msgstr "ஏற்கத்தகா தேடுகுறித்தொடர்"
+msgstr "செங்குறித்தொடர் முன் *"
 
-#: lib/dfa.c:1345
-#, fuzzy
+#: lib/dfa.c:1358
 msgid "+ at start of expression"
-msgstr "ஏற்கத்தகா தேடுகுறித்தொடர்"
+msgstr "செங்குறித்தொடர் முன் +"
 
-#: lib/dfa.c:1400
+#: lib/dfa.c:1413
 msgid "{...} at start of expression"
-msgstr ""
+msgstr "செங்குறித்தொடர் முன் {...}"
 
-#: lib/dfa.c:1403
+#: lib/dfa.c:1416
 msgid "invalid content of \\{\\}"
 msgstr "ஏற்கத்தகா நெளி அடைப்பு \\{\\} உள்ளடக்கம்"
 
-#: lib/dfa.c:1405
+#: lib/dfa.c:1418
 msgid "regular expression too big"
-msgstr "தேடுகுறித்தொடர் அளவிற்கு மிஞ்சியது"
+msgstr "செங்குறித்தொடர் அளவிற்கு மிஞ்சியது"
 
-#: lib/dfa.c:1555
+#: lib/dfa.c:1568
 msgid "stray \\ before unprintable character"
-msgstr ""
+msgstr "எழுத்துவடிவில்லா வரியுரு முன் இடம் தவறிய \\"
 
-#: lib/dfa.c:1557
+#: lib/dfa.c:1570
 msgid "stray \\ before white space"
-msgstr ""
+msgstr "வெள்ளை இடைவெளி முன் இடம் தவறிய \\"
 
-#: lib/dfa.c:1561
+#: lib/dfa.c:1574
 #, c-format
 msgid "stray \\ before %lc"
-msgstr ""
+msgstr "%lc முன் இடம் தவறிய \\"
 
-#: lib/dfa.c:1562
+#: lib/dfa.c:1575
 msgid "stray \\"
-msgstr ""
+msgstr "இடம் தவறிய \\"
 
-#: lib/dfa.c:1917
+#: lib/dfa.c:1925
 msgid "unbalanced ("
 msgstr "நிறைவுறா ("
 
-#: lib/dfa.c:2034
+#: lib/dfa.c:2042
 msgid "no syntax specified"
 msgstr "தொடரமைப்பு குறிப்பிடப்படவில்லை"
 
-#: lib/dfa.c:2045
+#: lib/dfa.c:2053
 msgid "unbalanced )"
 msgstr "நிறைவுறா )"
 
-#: lib/error.c:195
+#: lib/error.c:193
 msgid "Unknown system error"
 msgstr "அறியப்படாக் கணிப்பொறிப் பிழை"
 
@@ -169,7 +167,7 @@ msgstr "பணியடைவைப் பதிக்க இயலவில்
 msgid "failed to return to initial working directory"
 msgstr "முதல் பணியடைவிற்குத் திரும்ப இயலவில்லை"
 
-#: lib/xbinary-io.c:37
+#: lib/xbinary-io.c:36
 #, c-format
 msgid "failed to set file descriptor text/binary mode"
 msgstr "கோப்பு விவரிப்பிக்கு text/binary பாங்கை அளிக்க இயலவில்லை"
@@ -195,11 +193,11 @@ msgstr "கோப்பு விவரிப்பிக்கு text/binary 
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:355
+#: lib/quotearg.c:354
 msgid "`"
 msgstr "“"
 
-#: lib/quotearg.c:356
+#: lib/quotearg.c:355
 msgid "'"
 msgstr "”"
 
@@ -213,7 +211,7 @@ msgstr "பொருத்தம் இல்லை"
 
 #: lib/regcomp.c:128
 msgid "Invalid regular expression"
-msgstr "ஏற்கத்தகா தேடுகுறித்தொடர்"
+msgstr "ஏற்கத்தகா செங்குறித்தொடர்"
 
 #: lib/regcomp.c:131
 msgid "Invalid collation character"
@@ -257,15 +255,15 @@ msgstr "நினைவகம் தீர்ந்தது"
 
 #: lib/regcomp.c:161
 msgid "Invalid preceding regular expression"
-msgstr "ஏற்கத்தகா முந்தைய தேடுகுறித்தொடர்"
+msgstr "ஏற்கத்தகா முந்தைய செங்குறித்தொடர்"
 
 #: lib/regcomp.c:164
 msgid "Premature end of regular expression"
-msgstr "நிறைவுறாத் தேடுகுறித்தொடர்"
+msgstr "நிறைவுறாத் செங்குறித்தொடர்"
 
 #: lib/regcomp.c:167
 msgid "Regular expression too big"
-msgstr "தேடுகுறித்தொடர் அளவிற்கு மிஞ்சியது"
+msgstr "செங்குறித்தொடர் அளவிற்கு மிஞ்சியது"
 
 #: lib/regcomp.c:170
 msgid "Unmatched ) or \\)"
@@ -273,7 +271,7 @@ msgstr "நிறைவுறா ) அல்லது \\)"
 
 #: lib/regcomp.c:650
 msgid "No previous regular expression"
-msgstr "முந்தைய தேடுகுறித்தொடர் எதுவும் இல்லை"
+msgstr "முந்தைய செங்குறித்தொடர் எதுவும் இல்லை"
 
 #: lib/version-etc.c:73
 #, c-format
@@ -300,9 +298,9 @@ msgid ""
 "This is free software: you are free to change and redistribute it.\n"
 "There is NO WARRANTY, to the extent permitted by law.\n"
 msgstr ""
-"உரிமம் GPLv3+: GNU GPL பதிப்பு 3 அல்லது பிந்தைய பதிப்புகள் <%s>.\n"
-"இதுக் கட்டற்ற மென்பொருள்; இதை மாற்றவோ பரிமாறவோ தடையில்லை.\n"
-"சட்டத்தால் அனுமதிக்கப்பட்ட அளவிற்கு எந்த உத்தரவாதமும் இல்லை.\n"
+"GPLv3+ உரிமம்: GNU GPL பதிப்பு 3 அல்லது அதற்கு மேல் <%s>.\n"
+"இதுக் கட்டற்ற மென்பொருள்: இதை மாற்றவோ பகிரவோ தடையில்லை.\n"
+"சட்டத்தால் அனுமதிக்கப்பட்ட அளவிற்கு எந்த நம்புறுதியும் இல்லை.\n"
 
 #. TRANSLATORS: %s denotes an author name.
 #: lib/version-etc.c:105
@@ -441,7 +439,7 @@ msgstr "GNU மென்பொருள் பயன்பாட்டு உத
 #: src/dfasearch.c:59
 #, c-format
 msgid "warning: %s"
-msgstr ""
+msgstr "எச்சரிக்கை: %s"
 
 #: src/grep.c:656
 msgid "(standard input)"
@@ -449,7 +447,7 @@ msgstr "(இயல் உள்ளீடு)"
 
 #: src/grep.c:837
 msgid "invalid context length argument"
-msgstr "ஏற்கத்தகாச் சூழல் நீளம்"
+msgstr "ஏற்கத்தகாச் சூழல் மதிப்புரு நீளம்"
 
 #: src/grep.c:902
 msgid "input is too large to count"
@@ -506,10 +504,10 @@ msgid ""
 "  -G, --basic-regexp        PATTERNS are basic regular expressions\n"
 "  -P, --perl-regexp         PATTERNS are Perl regular expressions\n"
 msgstr ""
-"  -E, --extended-regexp      <தேடுதொடர்கள்> விரிவுபட்ட தேடுகுறித்தொடர்கள்\n"
+"  -E, --extended-regexp      <தேடுதொடர்கள்> விரிவுபட்ட செங்குறித்தொடர்கள்\n"
 "  -F, --fixed-strings        <தேடுதொடர்கள்> உருச்சரங்கள்\n"
-"  -G, --basic-regexp         <தேடுதொடர்கள்> அடிப்படை தேடுகுறித்தொடர்கள்\n"
-"  -P, --perl-regexp          <தேடுதொடர்கள்> Perl தேடுகுறித்தொடர்கள்\n"
+"  -G, --basic-regexp         <தேடுதொடர்கள்> அடிப்படை செங்குறித்தொடர்கள்\n"
+"  -P, --perl-regexp          <தேடுதொடர்கள்> Perl செங்குறித்தொடர்கள்\n"
 
 #: src/grep.c:1991
 #, c-format
@@ -730,64 +728,73 @@ msgstr "ஏற்கத்தகா இருமக்கோப்பு வக
 #: src/grep.c:2831
 msgid ""
 "Written by Mike Haertel and others; see\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 msgstr ""
 "மைக் ஏர்டெலும் பிறரும் எழுதியது;\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS> காண்க."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS> காண்க."
 
-#: src/grep.c:2934
+#: src/grep.c:2937
 #, c-format
 msgid "warning: GREP_COLOR='%s' is deprecated; use GREP_COLORS='mt=%s'"
+msgstr "எச்சரிக்கை: GREP_COLOR='%s' வழக்கொழிந்தது; GREP_COLORS='mt=%s' பயன்படுத்துக"
+
+#: src/pcresearch.c:92
+#, c-format
+msgid ""
+"\n"
+"grep -P uses PCRE2 %s\n"
 msgstr ""
+"\n"
+"\n"
+"grep -P PCRE2 %s பயன்படுத்துகிறது\n"
+
+#: src/pcresearch.c:169
+msgid "-P supports only unibyte locales on this platform"
+msgstr "இத்தளத்தில் -P ஒற்றை எண்ணிருமி வட்டாரங்களில் மட்டுமே இயங்கும்"
 
-#: src/pcresearch.c:148
+#: src/pcresearch.c:171
 msgid "-P supports only unibyte and UTF-8 locales"
 msgstr "-P ஒற்றை எண்ணிருமி வட்டாரங்களிலும் UTF-8 வட்டாரங்களிலும் மட்டுமே இயங்கும்"
 
-#: src/pcresearch.c:162
+#: src/pcresearch.c:194
 msgid "the -P option only supports a single pattern"
 msgstr "-P செயல்மாற்றிக்கு ஒருத் தேடுதொடர் தான் இருக்க வேண்டும்"
 
-#: src/pcresearch.c:215
-#, fuzzy, c-format
-msgid "JIT internal error: %d"
-msgstr "%s: PCRE அகப்பிழை: %d"
-
-#: src/pcresearch.c:252
+#: src/pcresearch.c:290
 msgid "exceeded PCRE's line length limit"
 msgstr "PCRE நிரலகத்தின் வரி நீள வரம்பு மீறப்பட்டது"
 
-#: src/pcresearch.c:330
+#: src/pcresearch.c:368
 #, c-format
 msgid "%s: memory exhausted"
 msgstr "%s: நினைவகம் தீர்ந்தது"
 
-#: src/pcresearch.c:333
+#: src/pcresearch.c:371
 #, c-format
 msgid "%s: exhausted PCRE JIT stack"
 msgstr "%s: PCRE நிரலகத்தின் JIT அடுக்கு தீர்ந்தது"
 
-#: src/pcresearch.c:337
+#: src/pcresearch.c:375
 #, c-format
 msgid "%s: exceeded PCRE's backtracking limit"
 msgstr "%s: PCRE நிரலகத்தின் பின்வாங்கல் வரம்பு மீறப்பட்டது"
 
-#: src/pcresearch.c:342
-#, fuzzy, c-format
+#: src/pcresearch.c:380
+#, c-format
 msgid "%s: exceeded PCRE's nested backtracking limit"
-msgstr "%s: PCRE நிரலகத்தின் பின்வாங்கல் வரம்பு மீறப்பட்டது"
+msgstr "%s: PCRE நிரலகத்தின் உள்ளமை பின்வாங்கல் வரம்பு மீறப்பட்டது"
 
-#: src/pcresearch.c:346
+#: src/pcresearch.c:384
 #, c-format
 msgid "%s: PCRE detected recurse loop"
-msgstr ""
+msgstr "%s: PCRE மீள்சுருள் சுற்று கண்டறியப்பட்டது"
 
-#: src/pcresearch.c:351
-#, fuzzy, c-format
+#: src/pcresearch.c:389
+#, c-format
 msgid "%s: exceeded PCRE's heap limit"
-msgstr "%s: PCRE நிரலகத்தின் மீள்சுருள் வரம்பு மீறப்பட்டது"
+msgstr "%s: PCRE நிரலகத்தின் குவியல் வரம்பு மீறப்பட்டது"
 
-#: src/pcresearch.c:360
+#: src/pcresearch.c:398
 #, c-format
 msgid "%s: internal PCRE error: %d"
 msgstr "%s: PCRE அகப்பிழை: %d"
diff --git a/po/th.po b/po/th.po
index 028fce10..4f6795e9 100644
--- a/po/th.po
+++ b/po/th.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: grep-3.1.48\n"
 "Report-Msgid-Bugs-To: bug-grep@gnu.org\n"
-"POT-Creation-Date: 2022-09-02 23:52-0700\n"
+"POT-Creation-Date: 2023-05-13 01:14-0700\n"
 "PO-Revision-Date: 2018-12-17 01:11+0700\n"
 "Last-Translator: Seksan Poltree <seksan.poltree@gmail.com>\n"
 "Language-Team: Thai <thai-l10n@googlegroups.com>\n"
@@ -17,105 +17,105 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "X-Bugs: Report translation errors to the Language-Team address.\n"
 
-#: lib/argmatch.c:147
+#: lib/argmatch.c:145
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "อาร์กิวเมนต์ %s ไม่ถูกต้องสำหรับ %s"
 
-#: lib/argmatch.c:148
+#: lib/argmatch.c:146
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "อาร์กิวเมนต์ %s กำกวมไม่ชัดเจน สำหรับ %s"
 
-#: lib/argmatch.c:167 lib/argmatch.h:238
+#: lib/argmatch.c:165 lib/argmatch.h:242
 msgid "Valid arguments are:"
 msgstr "อาร์กิวเมนต์ที่ใช้ได้ ได้แก่:"
 
-#: lib/c-stack.c:187
+#: lib/c-stack.c:186
 msgid "program error"
 msgstr "โปรแกรมผิดพลาด"
 
-#: lib/c-stack.c:188
+#: lib/c-stack.c:187
 msgid "stack overflow"
 msgstr "stack overflow"
 
-#: lib/closeout.c:122 src/grep.c:1346
+#: lib/closeout.c:121 src/grep.c:1346
 msgid "write error"
 msgstr "การเขียนผิดพลาด"
 
-#: lib/dfa.c:894
+#: lib/dfa.c:897
 msgid "unbalanced ["
 msgstr "[ ไม่สมดุลกัน"
 
-#: lib/dfa.c:1015
+#: lib/dfa.c:1018
 msgid "invalid character class"
 msgstr "ชื่อกลุ่มชุดอักขระไม่ถูกต้อง"
 
-#: lib/dfa.c:1143
+#: lib/dfa.c:1146
 msgid "character class syntax is [[:space:]], not [:space:]"
 msgstr "วากยสัมพันธ์ของกลุ่มชุดอักขระ คือ [[:space:]], ไม่ใช่ [:space:]"
 
-#: lib/dfa.c:1209
+#: lib/dfa.c:1222
 msgid "unfinished \\ escape"
 msgstr "เครื่องหมายหลีก \\ ไม่จบ"
 
-#: lib/dfa.c:1319
+#: lib/dfa.c:1332
 #, fuzzy
 msgid "? at start of expression"
 msgstr "นิพจน์ปกติไม่ถูกต้อง"
 
-#: lib/dfa.c:1331
+#: lib/dfa.c:1344
 #, fuzzy
 msgid "* at start of expression"
 msgstr "นิพจน์ปกติไม่ถูกต้อง"
 
-#: lib/dfa.c:1345
+#: lib/dfa.c:1358
 #, fuzzy
 msgid "+ at start of expression"
 msgstr "นิพจน์ปกติไม่ถูกต้อง"
 
-#: lib/dfa.c:1400
+#: lib/dfa.c:1413
 msgid "{...} at start of expression"
 msgstr ""
 
-#: lib/dfa.c:1403
+#: lib/dfa.c:1416
 msgid "invalid content of \\{\\}"
 msgstr "เนื้อหาของ \\{\\} ไม่ถูกต้อง"
 
-#: lib/dfa.c:1405
+#: lib/dfa.c:1418
 msgid "regular expression too big"
 msgstr "นิพจน์ปกติใหญ่เกินไป"
 
-#: lib/dfa.c:1555
+#: lib/dfa.c:1568
 msgid "stray \\ before unprintable character"
 msgstr ""
 
-#: lib/dfa.c:1557
+#: lib/dfa.c:1570
 msgid "stray \\ before white space"
 msgstr ""
 
-#: lib/dfa.c:1561
+#: lib/dfa.c:1574
 #, c-format
 msgid "stray \\ before %lc"
 msgstr ""
 
-#: lib/dfa.c:1562
+#: lib/dfa.c:1575
 msgid "stray \\"
 msgstr ""
 
-#: lib/dfa.c:1917
+#: lib/dfa.c:1925
 msgid "unbalanced ("
 msgstr "( ไม่สมดุลกัน"
 
-#: lib/dfa.c:2034
+#: lib/dfa.c:2042
 msgid "no syntax specified"
 msgstr "ไม่ระบุวากยสัมพันธ์"
 
-#: lib/dfa.c:2045
+#: lib/dfa.c:2053
 msgid "unbalanced )"
 msgstr ") ไม่สมดุลกัน"
 
-#: lib/error.c:195
+#: lib/error.c:193
 msgid "Unknown system error"
 msgstr "ข้อผิดพลาดของระบบที่ไม่รู้จัก"
 
@@ -168,7 +168,7 @@ msgstr "ไม่สามารถบันทีกไดเรกทอรี
 msgid "failed to return to initial working directory"
 msgstr "ล้มเหลวในการกลับไปยังไดเรกทอรีทำงานเริ่มต้น"
 
-#: lib/xbinary-io.c:37
+#: lib/xbinary-io.c:36
 #, c-format
 msgid "failed to set file descriptor text/binary mode"
 msgstr "ล้มเหลวในการตั้งค่าตัวอธิบายไฟล์ในโหมดข้อความ/ไบนารี"
@@ -194,11 +194,11 @@ msgstr "ล้มเหลวในการตั้งค่าตัวอธ
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:355
+#: lib/quotearg.c:354
 msgid "`"
 msgstr "`"
 
-#: lib/quotearg.c:356
+#: lib/quotearg.c:355
 msgid "'"
 msgstr "'"
 
@@ -720,66 +720,77 @@ msgstr "ชนิดแฟ้มไบนารีที่ไม่รู้จ
 #, fuzzy
 msgid ""
 "Written by Mike Haertel and others; see\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 msgstr "อื่น ๆ , ดูที่ <https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>"
 
-#: src/grep.c:2934
+#: src/grep.c:2937
 #, c-format
 msgid "warning: GREP_COLOR='%s' is deprecated; use GREP_COLORS='mt=%s'"
 msgstr ""
 
-#: src/pcresearch.c:148
+#: src/pcresearch.c:92
+#, c-format
+msgid ""
+"\n"
+"grep -P uses PCRE2 %s\n"
+msgstr ""
+
+#: src/pcresearch.c:169
+#, fuzzy
+msgid "-P supports only unibyte locales on this platform"
+msgstr "-P สนับสนุนเฉพาะโลแคล unibyte และ UTF-8"
+
+#: src/pcresearch.c:171
 msgid "-P supports only unibyte and UTF-8 locales"
 msgstr "-P สนับสนุนเฉพาะโลแคล unibyte และ UTF-8"
 
-#: src/pcresearch.c:162
+#: src/pcresearch.c:194
 msgid "the -P option only supports a single pattern"
 msgstr "ตัวเลือก -P สนับสนุนรูปแบบเดียวเท่านั้น"
 
-#: src/pcresearch.c:215
-#, fuzzy, c-format
-msgid "JIT internal error: %d"
-msgstr "ข้อผิดพลาดภายใน"
-
-#: src/pcresearch.c:252
+#: src/pcresearch.c:290
 msgid "exceeded PCRE's line length limit"
 msgstr "ขอบเขตความยาวบรรทัด PCRE เกินจากข้อจำกัด"
 
-#: src/pcresearch.c:330
+#: src/pcresearch.c:368
 #, fuzzy, c-format
 msgid "%s: memory exhausted"
 msgstr "หน่วยความจำถูกใช้จนหมด"
 
-#: src/pcresearch.c:333
+#: src/pcresearch.c:371
 #, fuzzy, c-format
 msgid "%s: exhausted PCRE JIT stack"
 msgstr "แสต็ก PCRE JIT ถูกใช้จนหมดแล้ว"
 
-#: src/pcresearch.c:337
+#: src/pcresearch.c:375
 #, fuzzy, c-format
 msgid "%s: exceeded PCRE's backtracking limit"
 msgstr "ขอบเขตการ backtrack ของ PCRE เกินจากข้อจำกัด"
 
-#: src/pcresearch.c:342
+#: src/pcresearch.c:380
 #, fuzzy, c-format
 msgid "%s: exceeded PCRE's nested backtracking limit"
 msgstr "ขอบเขตการ backtrack ของ PCRE เกินจากข้อจำกัด"
 
-#: src/pcresearch.c:346
+#: src/pcresearch.c:384
 #, c-format
 msgid "%s: PCRE detected recurse loop"
 msgstr ""
 
-#: src/pcresearch.c:351
+#: src/pcresearch.c:389
 #, fuzzy, c-format
 msgid "%s: exceeded PCRE's heap limit"
 msgstr "ขอบเขตการ backtrack ของ PCRE เกินจากข้อจำกัด"
 
-#: src/pcresearch.c:360
+#: src/pcresearch.c:398
 #, fuzzy, c-format
 msgid "%s: internal PCRE error: %d"
 msgstr "ข้อผิดพลาด PCRE ภายใน: %d"
 
+#, fuzzy, c-format
+#~ msgid "JIT internal error: %d"
+#~ msgstr "ข้อผิดพลาดภายใน"
+
 #~ msgid "failed to allocate memory for the PCRE JIT stack"
 #~ msgstr "ล้มเหลวที่จะจัดสรรหน่วยความจำสำหรับสแต็ก PCRE JIT"
 
diff --git a/po/tr.gmo b/po/tr.gmo
index 8705a7aa..14c2dba6 100644
Binary files a/po/tr.gmo and b/po/tr.gmo differ
diff --git a/po/tr.po b/po/tr.po
index 03ab3ee7..0faea57f 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -6,10 +6,10 @@
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: grep-3.7.62\n"
+"Project-Id-Version: grep-3.8.35\n"
 "Report-Msgid-Bugs-To: bug-grep@gnu.org\n"
-"POT-Creation-Date: 2022-09-02 23:52-0700\n"
-"PO-Revision-Date: 2022-04-27 15:00+0300\n"
+"POT-Creation-Date: 2023-05-13 01:14-0700\n"
+"PO-Revision-Date: 2023-02-28 11:00+0300\n"
 "Last-Translator: Emir SARI <emir_sari@icloud.com>\n"
 "Language-Team: Turkish <gnome-turk@gnome.org>\n"
 "Language: tr\n"
@@ -19,105 +19,102 @@ msgstr ""
 "X-Bugs: Report translation errors to the Language-Team address.\n"
 "X-Generator: KBabel 1.0\n"
 
-#: lib/argmatch.c:147
+#: lib/argmatch.c:145
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "%2$s için %1$s argümanı geçersiz"
 
-#: lib/argmatch.c:148
+#: lib/argmatch.c:146
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "`%2$s' için %1$s argümanı belirsiz"
 
-#: lib/argmatch.c:167 lib/argmatch.h:238
+#: lib/argmatch.c:165 lib/argmatch.h:242
 msgid "Valid arguments are:"
 msgstr "Geçerli argümanlar:"
 
-#: lib/c-stack.c:187
+#: lib/c-stack.c:186
 msgid "program error"
 msgstr "program hatası"
 
-#: lib/c-stack.c:188
+#: lib/c-stack.c:187
 msgid "stack overflow"
 msgstr "yığın taşması"
 
-#: lib/closeout.c:122 src/grep.c:1346
+#: lib/closeout.c:121 src/grep.c:1346
 msgid "write error"
 msgstr "yazma hatası"
 
-#: lib/dfa.c:894
+#: lib/dfa.c:897
 msgid "unbalanced ["
 msgstr "karşılıksız ["
 
-#: lib/dfa.c:1015
+#: lib/dfa.c:1018
 msgid "invalid character class"
 msgstr "geçersiz karakter sınıfı"
 
-#: lib/dfa.c:1143
+#: lib/dfa.c:1146
 msgid "character class syntax is [[:space:]], not [:space:]"
 msgstr "karakter sınıfı sözdizimi [[:boşluk:]], [:boşluk] değil"
 
-#: lib/dfa.c:1209
+#: lib/dfa.c:1222
 msgid "unfinished \\ escape"
 msgstr "tamamlanmamış \\ kaçışı"
 
-#: lib/dfa.c:1319
-#, fuzzy
+#: lib/dfa.c:1332
 msgid "? at start of expression"
-msgstr "Geçersiz düzenli ifade"
+msgstr "ifadenin başlangıcında ?"
 
-#: lib/dfa.c:1331
-#, fuzzy
+#: lib/dfa.c:1344
 msgid "* at start of expression"
-msgstr "Geçersiz düzenli ifade"
+msgstr "ifadenin başlangıcında *"
 
-#: lib/dfa.c:1345
-#, fuzzy
+#: lib/dfa.c:1358
 msgid "+ at start of expression"
-msgstr "Geçersiz düzenli ifade"
+msgstr "ifadenin başlangıcında +"
 
-#: lib/dfa.c:1400
+#: lib/dfa.c:1413
 msgid "{...} at start of expression"
-msgstr ""
+msgstr "ifadenin başlangıcında {...}"
 
-#: lib/dfa.c:1403
+#: lib/dfa.c:1416
 msgid "invalid content of \\{\\}"
 msgstr "geçersiz \\{\\} içeriği"
 
-#: lib/dfa.c:1405
+#: lib/dfa.c:1418
 msgid "regular expression too big"
 msgstr "düzenli ifade pek büyük"
 
-#: lib/dfa.c:1555
+#: lib/dfa.c:1568
 msgid "stray \\ before unprintable character"
-msgstr ""
+msgstr "yazdırılamayan karakter öncesi başıboş \\"
 
-#: lib/dfa.c:1557
+#: lib/dfa.c:1570
 msgid "stray \\ before white space"
-msgstr ""
+msgstr "boşluk öncesi başıboş \\"
 
-#: lib/dfa.c:1561
+#: lib/dfa.c:1574
 #, c-format
 msgid "stray \\ before %lc"
-msgstr ""
+msgstr "%lc öncesi başıboş \\"
 
-#: lib/dfa.c:1562
+#: lib/dfa.c:1575
 msgid "stray \\"
-msgstr ""
+msgstr "başıboş \\"
 
-#: lib/dfa.c:1917
+#: lib/dfa.c:1925
 msgid "unbalanced ("
 msgstr "karşılıksız ("
 
-#: lib/dfa.c:2034
+#: lib/dfa.c:2042
 msgid "no syntax specified"
 msgstr "sözdizim belirtilmemiş"
 
-#: lib/dfa.c:2045
+#: lib/dfa.c:2053
 msgid "unbalanced )"
 msgstr "karşılıksız )"
 
-#: lib/error.c:195
+#: lib/error.c:193
 msgid "Unknown system error"
 msgstr "Bilinmeyen sistem hatası"
 
@@ -170,7 +167,7 @@ msgstr "geçerli çalışma dizini kaydedilemiyor"
 msgid "failed to return to initial working directory"
 msgstr "başlangıç çalışma dizinine dönülemedi"
 
-#: lib/xbinary-io.c:37
+#: lib/xbinary-io.c:36
 #, c-format
 msgid "failed to set file descriptor text/binary mode"
 msgstr "dosya tanımlayıcısı metin/ikili kipi ayarlanamadı"
@@ -196,11 +193,11 @@ msgstr "dosya tanımlayıcısı metin/ikili kipi ayarlanamadı"
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:355
+#: lib/quotearg.c:354
 msgid "`"
 msgstr "`"
 
-#: lib/quotearg.c:356
+#: lib/quotearg.c:355
 msgid "'"
 msgstr "'"
 
@@ -234,11 +231,11 @@ msgstr "Geçersiz geri başvuru"
 
 #: lib/regcomp.c:143
 msgid "Unmatched [, [^, [:, [., or [="
-msgstr "Eşleşmemiş [, [^, [:, [. veya [="
+msgstr "[, [^, [:, [. veya [= eşleşmiyor"
 
 #: lib/regcomp.c:146
 msgid "Unmatched ( or \\("
-msgstr "Eşleşmemiş ( veya \\("
+msgstr "( veya \\( eşleşmiyor"
 
 #: lib/regcomp.c:149
 msgid "Unmatched \\{"
@@ -440,7 +437,7 @@ msgstr "GNU yazılımı kullanımı genel yardımı: <%s>\n"
 #: src/dfasearch.c:59
 #, c-format
 msgid "warning: %s"
-msgstr ""
+msgstr "uyarı: %s"
 
 #: src/grep.c:656
 msgid "(standard input)"
@@ -728,64 +725,76 @@ msgstr "bilinmeyen ikili dosya türü"
 #: src/grep.c:2831
 msgid ""
 "Written by Mike Haertel and others; see\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 msgstr ""
 "Mike Haertel ve diğerleri tarafından yazılmıştır; bkz.\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 
-#: src/grep.c:2934
+#: src/grep.c:2937
 #, c-format
 msgid "warning: GREP_COLOR='%s' is deprecated; use GREP_COLORS='mt=%s'"
 msgstr ""
+"uyarı: GREP_COLOR='%s', artık kullanımdan kalkıyor; GREP_COLORS='mt=%s' "
+"kullanın"
+
+#: src/pcresearch.c:92
+#, c-format
+msgid ""
+"\n"
+"grep -P uses PCRE2 %s\n"
+msgstr ""
 
-#: src/pcresearch.c:148
+#: src/pcresearch.c:169
+msgid "-P supports only unibyte locales on this platform"
+msgstr "-P, bu platformda yalnızca unibyte yerelini destekler"
+
+#: src/pcresearch.c:171
 msgid "-P supports only unibyte and UTF-8 locales"
 msgstr "-P yalnızca unibyte ve UTF-8 yerellerini destekler"
 
-#: src/pcresearch.c:162
+#: src/pcresearch.c:194
 msgid "the -P option only supports a single pattern"
 msgstr "-P seçeneği yalnızca tek bir dizgiyi destekler"
 
-#: src/pcresearch.c:215
-#, c-format
-msgid "JIT internal error: %d"
-msgstr "JIT iç hatası: %d"
-
-#: src/pcresearch.c:252
+#: src/pcresearch.c:290
 msgid "exceeded PCRE's line length limit"
 msgstr "PCRE's satır uzunluğu limiti aşıldı"
 
-#: src/pcresearch.c:330
+#: src/pcresearch.c:368
 #, c-format
 msgid "%s: memory exhausted"
 msgstr "%s: Bellek tükendi"
 
-#: src/pcresearch.c:333
+#: src/pcresearch.c:371
 #, c-format
 msgid "%s: exhausted PCRE JIT stack"
 msgstr "%s: PCRE JIT yığını tükendi"
 
-#: src/pcresearch.c:337
+#: src/pcresearch.c:375
 #, c-format
 msgid "%s: exceeded PCRE's backtracking limit"
 msgstr "%s: PCRE'nin geri izleme limiti aşıldı"
 
-#: src/pcresearch.c:342
+#: src/pcresearch.c:380
 #, c-format
 msgid "%s: exceeded PCRE's nested backtracking limit"
 msgstr "%s: PCRE'nin iç içe geçmiş geri izleme limiti aşıldı"
 
-#: src/pcresearch.c:346
+#: src/pcresearch.c:384
 #, c-format
 msgid "%s: PCRE detected recurse loop"
 msgstr "%s: PCRE, özyineleme döngüsü algıladı"
 
-#: src/pcresearch.c:351
+#: src/pcresearch.c:389
 #, c-format
 msgid "%s: exceeded PCRE's heap limit"
 msgstr "%s: PCRE'nin öbek limiti aşıldı"
 
-#: src/pcresearch.c:360
+#: src/pcresearch.c:398
 #, c-format
 msgid "%s: internal PCRE error: %d"
 msgstr "%s: İç PCRE hatası: %d"
+
+#, c-format
+#~ msgid "JIT internal error: %d"
+#~ msgstr "JIT iç hatası: %d"
diff --git a/po/uk.gmo b/po/uk.gmo
index c7d21f80..3dfb7590 100644
Binary files a/po/uk.gmo and b/po/uk.gmo differ
diff --git a/po/uk.po b/po/uk.po
index dfa618c5..92339e1e 100644
--- a/po/uk.po
+++ b/po/uk.po
@@ -4,13 +4,13 @@
 #
 # Volodymyr M. Lisivka <lvm@mystery.lviv.net>, 2001-2002.
 # Dmytro O. Redchuk <dor@kiev-online.net>, 2002.
-# Yuri Chornoivan <yurchor@ukr.net>, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022.
+# Yuri Chornoivan <yurchor@ukr.net>, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023.
 msgid ""
 msgstr ""
-"Project-Id-Version: grep-3.7.98\n"
+"Project-Id-Version: grep-3.10.12\n"
 "Report-Msgid-Bugs-To: bug-grep@gnu.org\n"
-"POT-Creation-Date: 2022-09-02 23:52-0700\n"
-"PO-Revision-Date: 2022-07-03 19:14+0300\n"
+"POT-Creation-Date: 2023-05-13 01:14-0700\n"
+"PO-Revision-Date: 2023-04-21 21:00+0300\n"
 "Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n"
 "Language-Team: Ukrainian <trans-uk@lists.fedoraproject.org>\n"
 "Language: uk\n"
@@ -21,104 +21,104 @@ msgstr ""
 "Plural-Forms: nplurals=1; plural=0;\n"
 "X-Generator: Lokalize 20.12.0\n"
 
-#: lib/argmatch.c:147
+#: lib/argmatch.c:145
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "некоректний аргумент, %s, %s"
 
-#: lib/argmatch.c:148
+#: lib/argmatch.c:146
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "неоднозначний аргумент, %s, %s"
 
-#: lib/argmatch.c:167 lib/argmatch.h:238
+#: lib/argmatch.c:165 lib/argmatch.h:242
 msgid "Valid arguments are:"
 msgstr "Список коректних аргументів:"
 
-#: lib/c-stack.c:187
+#: lib/c-stack.c:186
 msgid "program error"
 msgstr "помилка програми"
 
-#: lib/c-stack.c:188
+#: lib/c-stack.c:187
 msgid "stack overflow"
 msgstr "переповнення стека"
 
-#: lib/closeout.c:122 src/grep.c:1346
+#: lib/closeout.c:121 src/grep.c:1346
 msgid "write error"
 msgstr "помилка запису"
 
-#: lib/dfa.c:894
+#: lib/dfa.c:897
 msgid "unbalanced ["
 msgstr "неврівноважена дужка ["
 
-#: lib/dfa.c:1015
+#: lib/dfa.c:1018
 msgid "invalid character class"
 msgstr "некоректний клас символів"
 
-#: lib/dfa.c:1143
+#: lib/dfa.c:1146
 msgid "character class syntax is [[:space:]], not [:space:]"
 msgstr ""
 "синтаксичну конструкцію класу символів слід визначати так: [[:space:]], а не "
 "так: [:space:]"
 
-#: lib/dfa.c:1209
+#: lib/dfa.c:1222
 msgid "unfinished \\ escape"
 msgstr "незавершена \\-послідовність"
 
-#: lib/dfa.c:1319
+#: lib/dfa.c:1332
 msgid "? at start of expression"
 msgstr "? на початку виразу"
 
-#: lib/dfa.c:1331
+#: lib/dfa.c:1344
 msgid "* at start of expression"
 msgstr "* на початку виразу"
 
-#: lib/dfa.c:1345
+#: lib/dfa.c:1358
 msgid "+ at start of expression"
 msgstr "+ на початку виразу"
 
-#: lib/dfa.c:1400
+#: lib/dfa.c:1413
 msgid "{...} at start of expression"
 msgstr "{...} на початку виразу"
 
-#: lib/dfa.c:1403
+#: lib/dfa.c:1416
 msgid "invalid content of \\{\\}"
 msgstr "некоректний вміст \\{\\}"
 
-#: lib/dfa.c:1405
+#: lib/dfa.c:1418
 msgid "regular expression too big"
 msgstr "занадто об'ємний формальний вираз"
 
-#: lib/dfa.c:1555
+#: lib/dfa.c:1568
 msgid "stray \\ before unprintable character"
 msgstr "зайва \\ перед непридатним до друку символом"
 
-#: lib/dfa.c:1557
+#: lib/dfa.c:1570
 msgid "stray \\ before white space"
 msgstr "зайва \\ перед пробілом"
 
-#: lib/dfa.c:1561
+#: lib/dfa.c:1574
 #, c-format
 msgid "stray \\ before %lc"
 msgstr "зайва \\ перед %lc"
 
-#: lib/dfa.c:1562
+#: lib/dfa.c:1575
 msgid "stray \\"
 msgstr "зайвий символ \\"
 
-#: lib/dfa.c:1917
+#: lib/dfa.c:1925
 msgid "unbalanced ("
 msgstr "неврівноважена дужка ("
 
-#: lib/dfa.c:2034
+#: lib/dfa.c:2042
 msgid "no syntax specified"
 msgstr "не вказано синтаксис"
 
-#: lib/dfa.c:2045
+#: lib/dfa.c:2053
 msgid "unbalanced )"
 msgstr "неврівноважена дужка )"
 
-#: lib/error.c:195
+#: lib/error.c:193
 msgid "Unknown system error"
 msgstr "Невідома системна помилка"
 
@@ -171,7 +171,7 @@ msgstr "не вдалося зберегти поточний робочий к
 msgid "failed to return to initial working directory"
 msgstr "не вдалося повернутись до початкового робочого каталогу"
 
-#: lib/xbinary-io.c:37
+#: lib/xbinary-io.c:36
 #, c-format
 msgid "failed to set file descriptor text/binary mode"
 msgstr ""
@@ -198,11 +198,11 @@ msgstr ""
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:355
+#: lib/quotearg.c:354
 msgid "`"
 msgstr "«"
 
-#: lib/quotearg.c:356
+#: lib/quotearg.c:355
 msgid "'"
 msgstr "»"
 
@@ -759,70 +759,88 @@ msgstr "невідомий тип двійкових файлів"
 #: src/grep.c:2831
 msgid ""
 "Written by Mike Haertel and others; see\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 msgstr ""
 "Авторами програми є Mike Haertel та інші програмісти; див.\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 
-#: src/grep.c:2934
+#: src/grep.c:2937
 #, c-format
 msgid "warning: GREP_COLOR='%s' is deprecated; use GREP_COLORS='mt=%s'"
 msgstr ""
 "попередження: GREP_COLOR='%s' вважається застарілим; скористайтеся "
 "GREP_COLORS='mt=%s'"
 
-#: src/pcresearch.c:148
+#: src/pcresearch.c:92
+#, c-format
+msgid ""
+"\n"
+"grep -P uses PCRE2 %s\n"
+msgstr ""
+"\n"
+"grep -P використовує PCRE2 %s\n"
+
+#: src/pcresearch.c:169
+msgid "-P supports only unibyte locales on this platform"
+msgstr "у -P на цій платформі передбачено підтримку лише однобайтових локалей"
+
+#: src/pcresearch.c:171
 msgid "-P supports only unibyte and UTF-8 locales"
 msgstr "у -P передбачено підтримку лише однобайтових локалей та UTF-8"
 
-#: src/pcresearch.c:162
+#: src/pcresearch.c:194
 msgid "the -P option only supports a single pattern"
 msgstr "аргументом параметра -P може бути лише один шаблон"
 
-#: src/pcresearch.c:215
-#, c-format
-msgid "JIT internal error: %d"
-msgstr "Внутрішня помилка JIT: %d"
-
-#: src/pcresearch.c:252
+#: src/pcresearch.c:290
 msgid "exceeded PCRE's line length limit"
 msgstr "перевищено обмеження на довжину рядка PCRE"
 
-#: src/pcresearch.c:330
+#: src/pcresearch.c:368
 #, c-format
 msgid "%s: memory exhausted"
 msgstr "%s: пам'ять вичерпано"
 
-#: src/pcresearch.c:333
+#: src/pcresearch.c:371
 #, c-format
 msgid "%s: exhausted PCRE JIT stack"
 msgstr "%s: вичерпано стек JIT PCRE"
 
-#: src/pcresearch.c:337
+#: src/pcresearch.c:375
 #, c-format
 msgid "%s: exceeded PCRE's backtracking limit"
 msgstr "%s: перевищено обмеження на зворотне стеження у PCRE"
 
-#: src/pcresearch.c:342
+#: src/pcresearch.c:380
 #, c-format
 msgid "%s: exceeded PCRE's nested backtracking limit"
 msgstr "%s: перевищено обмеження на вкладеність зворотного стеження у PCRE"
 
-#: src/pcresearch.c:346
+#: src/pcresearch.c:384
 #, c-format
 msgid "%s: PCRE detected recurse loop"
 msgstr "%s: виявлено рекурсивний цикл у PCRE"
 
-#: src/pcresearch.c:351
+#: src/pcresearch.c:389
 #, c-format
 msgid "%s: exceeded PCRE's heap limit"
 msgstr "%s: перевищено обмеження на «купу» у PCRE"
 
-#: src/pcresearch.c:360
+#: src/pcresearch.c:398
 #, c-format
 msgid "%s: internal PCRE error: %d"
 msgstr "%s: внутрішня помилка PCRE: %d"
 
+#~ msgid ""
+#~ "\n"
+#~ "Built with PCRE "
+#~ msgstr ""
+#~ "\n"
+#~ "Зібрано з використанням PCRE "
+
+#~ msgid "JIT internal error: %d"
+#~ msgstr "Внутрішня помилка JIT: %d"
+
 #~ msgid "failed to allocate memory for the PCRE JIT stack"
 #~ msgstr "не вдалося отримати область пам’яті під стек JIT PCRE"
 
diff --git a/po/vi.gmo b/po/vi.gmo
index 9fe8371e..d59b39fe 100644
Binary files a/po/vi.gmo and b/po/vi.gmo differ
diff --git a/po/vi.po b/po/vi.po
index 560d0d13..b197417d 100644
--- a/po/vi.po
+++ b/po/vi.po
@@ -3,123 +3,119 @@
 # Copyright © 2016 Free Software Foundation, Inc.
 # This file is distributed under the same license as the grep package.
 # Clytie Siddall <clytie@riverland.net.au>, 2005-2010.
-# Trần Ngọc Quân <vnwildman@gmail.com>, 2012-2018, 2022.
+# Trần Ngọc Quân <vnwildman@gmail.com>, 2012-2018, 2022-2023.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: grep 3.7.62\n"
+"Project-Id-Version: grep 3.10.12\n"
 "Report-Msgid-Bugs-To: bug-grep@gnu.org\n"
-"POT-Creation-Date: 2022-09-02 23:52-0700\n"
-"PO-Revision-Date: 2022-04-30 08:40+0700\n"
+"POT-Creation-Date: 2023-05-13 01:14-0700\n"
+"PO-Revision-Date: 2023-04-23 15:06+0700\n"
 "Last-Translator: Trần Ngọc Quân <vnwildman@gmail.com>\n"
 "Language-Team: Vietnamese <translation-team-vi@lists.sourceforge.net>\n"
 "Language: vi\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=1; plural=0;\n"
 "X-Bugs: Report translation errors to the Language-Team address.\n"
-"X-Generator: Poedit 3.0.1\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
 
-#: lib/argmatch.c:147
+#: lib/argmatch.c:145
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "đối số %s không hợp lệ đối với %s"
 
-#: lib/argmatch.c:148
+#: lib/argmatch.c:146
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "đối số %s không rõ ràng đối với %s"
 
-#: lib/argmatch.c:167 lib/argmatch.h:238
+#: lib/argmatch.c:165 lib/argmatch.h:242
 msgid "Valid arguments are:"
 msgstr "Các đối số hợp lệ là:"
 
-#: lib/c-stack.c:187
+#: lib/c-stack.c:186
 msgid "program error"
 msgstr "lỗi chương trình"
 
-#: lib/c-stack.c:188
+#: lib/c-stack.c:187
 msgid "stack overflow"
 msgstr "tràn ngăn xếp"
 
-#: lib/closeout.c:122 src/grep.c:1346
+#: lib/closeout.c:121 src/grep.c:1346
 msgid "write error"
 msgstr "lỗi ghi"
 
-#: lib/dfa.c:894
+#: lib/dfa.c:897
 msgid "unbalanced ["
 msgstr "thiếu dấu ngoặc vuông mở ["
 
-#: lib/dfa.c:1015
+#: lib/dfa.c:1018
 msgid "invalid character class"
 msgstr "sai lớp ký tự"
 
-#: lib/dfa.c:1143
+#: lib/dfa.c:1146
 msgid "character class syntax is [[:space:]], not [:space:]"
 msgstr "cú pháp lớp ký tự là [[:space:]], không phải [:space:]"
 
-#: lib/dfa.c:1209
+#: lib/dfa.c:1222
 msgid "unfinished \\ escape"
 msgstr "chưa kết thúc thoát chuỗi \\"
 
-#: lib/dfa.c:1319
-#, fuzzy
+#: lib/dfa.c:1332
 msgid "? at start of expression"
-msgstr "Biểu thức chính quy không hợp lệ"
+msgstr "? ở đầu biểu thức"
 
-#: lib/dfa.c:1331
-#, fuzzy
+#: lib/dfa.c:1344
 msgid "* at start of expression"
-msgstr "Biểu thức chính quy không hợp lệ"
+msgstr "* ở đầu biểu thức"
 
-#: lib/dfa.c:1345
-#, fuzzy
+#: lib/dfa.c:1358
 msgid "+ at start of expression"
-msgstr "Biểu thức chính quy không hợp lệ"
+msgstr "+ ở đầu biểu thức"
 
-#: lib/dfa.c:1400
+#: lib/dfa.c:1413
 msgid "{...} at start of expression"
-msgstr ""
+msgstr "{...} ở đầu của biểu thức"
 
-#: lib/dfa.c:1403
+#: lib/dfa.c:1416
 msgid "invalid content of \\{\\}"
 msgstr "nội dung của \\{\\} không hợp lệ"
 
-#: lib/dfa.c:1405
+#: lib/dfa.c:1418
 msgid "regular expression too big"
 msgstr "biểu thức chính quy quá lớn"
 
-#: lib/dfa.c:1555
+#: lib/dfa.c:1568
 msgid "stray \\ before unprintable character"
-msgstr ""
+msgstr "thừa \\ trước ký tự không in được"
 
-#: lib/dfa.c:1557
+#: lib/dfa.c:1570
 msgid "stray \\ before white space"
-msgstr ""
+msgstr "thừa \\ trước ký tự khoảng trắng"
 
-#: lib/dfa.c:1561
+#: lib/dfa.c:1574
 #, c-format
 msgid "stray \\ before %lc"
-msgstr ""
+msgstr "thừa \\ trước %lc"
 
-#: lib/dfa.c:1562
+#: lib/dfa.c:1575
 msgid "stray \\"
-msgstr ""
+msgstr "thừa \\"
 
-#: lib/dfa.c:1917
+#: lib/dfa.c:1925
 msgid "unbalanced ("
 msgstr "thiếu dấu ngoặc đơn mở ("
 
-#: lib/dfa.c:2034
+#: lib/dfa.c:2042
 msgid "no syntax specified"
 msgstr "chưa đưa ra cú pháp"
 
-#: lib/dfa.c:2045
+#: lib/dfa.c:2053
 msgid "unbalanced )"
 msgstr "thiếu dấu ngoặc đơn đóng )"
 
-#: lib/error.c:195
+#: lib/error.c:193
 msgid "Unknown system error"
 msgstr "Lỗi hệ thống không rõ"
 
@@ -172,7 +168,7 @@ msgstr "không thể ghi nhớ được thư mục làm việc hiện thời"
 msgid "failed to return to initial working directory"
 msgstr "gặp lỗi khi quay trở về thư mục làm việc khởi đầu"
 
-#: lib/xbinary-io.c:37
+#: lib/xbinary-io.c:36
 #, c-format
 msgid "failed to set file descriptor text/binary mode"
 msgstr "gặp lỗi khi đặt chế độ văn bản/nhị phân cho bộ mô tả tập tin"
@@ -198,11 +194,11 @@ msgstr "gặp lỗi khi đặt chế độ văn bản/nhị phân cho bộ mô t
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:355
+#: lib/quotearg.c:354
 msgid "`"
 msgstr "“"
 
-#: lib/quotearg.c:356
+#: lib/quotearg.c:355
 msgid "'"
 msgstr "”"
 
@@ -444,9 +440,9 @@ msgid "General help using GNU software: <%s>\n"
 msgstr "Trợ giúp chung về cách sử dụng phần mềm GNU: <%s>\n"
 
 #: src/dfasearch.c:59
-#, fuzzy, c-format
+#, c-format
 msgid "warning: %s"
-msgstr "cảnh báo: %s: %s"
+msgstr "cảnh báo: %s"
 
 #: src/grep.c:656
 msgid "(standard input)"
@@ -741,68 +737,79 @@ msgstr "không rõ kiểu tập tin nhị phân (binary-files)"
 #: src/grep.c:2831
 msgid ""
 "Written by Mike Haertel and others; see\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 msgstr ""
 "Được viết bởi Mike Haertel và nhiều người khác, xem tại\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 
-#: src/grep.c:2934
+#: src/grep.c:2937
 #, c-format
 msgid "warning: GREP_COLOR='%s' is deprecated; use GREP_COLORS='mt=%s'"
+msgstr "cảnh báo: GREP_COLOR='%s' đã lạc hậu; dùng GREP_COLORS='mt=%s'"
+
+#: src/pcresearch.c:92
+#, c-format
+msgid ""
+"\n"
+"grep -P uses PCRE2 %s\n"
 msgstr ""
+"\n"
+"grep -P dùng PCRE2 %s\n"
+
+#: src/pcresearch.c:169
+msgid "-P supports only unibyte locales on this platform"
+msgstr "-P chỉ hỗ trợ miền địa phương unibyte trên hệ thống này"
 
-#: src/pcresearch.c:148
+#: src/pcresearch.c:171
 msgid "-P supports only unibyte and UTF-8 locales"
 msgstr "-P chỉ hỗ trợ miền địa phương unibyte và UTF-8"
 
-#: src/pcresearch.c:162
+#: src/pcresearch.c:194
 msgid "the -P option only supports a single pattern"
 msgstr "tùy chọn “-P” chỉ hỗ trợ một mẫu đơn lẻ"
 
-#: src/pcresearch.c:215
-#, c-format
-msgid "JIT internal error: %d"
-msgstr "Lỗi nội bộ JIT: %d"
-
-#: src/pcresearch.c:252
+#: src/pcresearch.c:290
 msgid "exceeded PCRE's line length limit"
 msgstr "đã vượt quá giới hạn chiều dài dòng của PCRE"
 
-#: src/pcresearch.c:330
+#: src/pcresearch.c:368
 #, c-format
 msgid "%s: memory exhausted"
 msgstr "%s: hết bộ nhớ"
 
-#: src/pcresearch.c:333
+#: src/pcresearch.c:371
 #, c-format
 msgid "%s: exhausted PCRE JIT stack"
 msgstr "%s: ngăn xếp “PCRE JIT” đã hết"
 
-#: src/pcresearch.c:337
+#: src/pcresearch.c:375
 #, c-format
 msgid "%s: exceeded PCRE's backtracking limit"
 msgstr "%s: đã vượt quá giới hạn tìm ngược của PCRE"
 
-#: src/pcresearch.c:342
+#: src/pcresearch.c:380
 #, c-format
 msgid "%s: exceeded PCRE's nested backtracking limit"
 msgstr "%s: đã vượt quá giới hạn tìm ngược lồng nhau của PCRE"
 
-#: src/pcresearch.c:346
+#: src/pcresearch.c:384
 #, c-format
 msgid "%s: PCRE detected recurse loop"
 msgstr "%s : PCRE phát hiện vòng lặp quẩn tròn"
 
-#: src/pcresearch.c:351
+#: src/pcresearch.c:389
 #, c-format
 msgid "%s: exceeded PCRE's heap limit"
 msgstr "%s: đã vượt quá giới hạn bộ nhớ heap của PCRE"
 
-#: src/pcresearch.c:360
+#: src/pcresearch.c:398
 #, c-format
 msgid "%s: internal PCRE error: %d"
 msgstr "%s: lỗi nội bộ PCRE: %d"
 
+#~ msgid "JIT internal error: %d"
+#~ msgstr "Lỗi nội bộ JIT: %d"
+
 #~ msgid "warning: GREP_OPTIONS is deprecated; please use an alias or script"
 #~ msgstr ""
 #~ "cảnh báo: GREP_OPTIONS đã lỗi thời; vui lòng dòng một bí danh hoặc văn "
diff --git a/po/zh_CN.gmo b/po/zh_CN.gmo
index eed6bea9..706c6381 100644
Binary files a/po/zh_CN.gmo and b/po/zh_CN.gmo differ
diff --git a/po/zh_CN.po b/po/zh_CN.po
index 10f3554a..e40ae8b7 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -3,13 +3,13 @@
 # Copyright (C) 2008 Free Software Foundation, Inc.
 # Ji ZhengYu <zhengyuji@gmail.com>, 2016.
 # Boyuan Yang <073plan@gmail.com>, 2018, 2019, 2020.
-# Wenbin Lv <wenbin816@gmail.com>. 2022.
+# Wenbin Lv <wenbin816@gmail.com>, 2022, 2023.
 msgid ""
 msgstr ""
-"Project-Id-Version: grep 3.7.98\n"
+"Project-Id-Version: grep 3.10.12\n"
 "Report-Msgid-Bugs-To: bug-grep@gnu.org\n"
-"POT-Creation-Date: 2022-09-02 23:52-0700\n"
-"PO-Revision-Date: 2022-07-04 10:07+0800\n"
+"POT-Creation-Date: 2023-05-13 01:14-0700\n"
+"PO-Revision-Date: 2023-04-21 22:09+0800\n"
 "Last-Translator: Wenbin Lv <wenbin816@gmail.com>\n"
 "Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n"
 "Language: zh_CN\n"
@@ -17,104 +17,104 @@ msgstr ""
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "X-Bugs: Report translation errors to the Language-Team address.\n"
-"X-Generator: Poedit 3.1\n"
+"X-Generator: Poedit 3.2.2\n"
 
-#: lib/argmatch.c:147
+#: lib/argmatch.c:145
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "%2$s 的参数 %1$s 无效"
 
-#: lib/argmatch.c:148
+#: lib/argmatch.c:146
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "%2$s 的参数 %1$s 有歧义"
 
-#: lib/argmatch.c:167 lib/argmatch.h:238
+#: lib/argmatch.c:165 lib/argmatch.h:242
 msgid "Valid arguments are:"
 msgstr "有效的参数有:"
 
-#: lib/c-stack.c:187
+#: lib/c-stack.c:186
 msgid "program error"
 msgstr "程序错误"
 
-#: lib/c-stack.c:188
+#: lib/c-stack.c:187
 msgid "stack overflow"
 msgstr "栈溢出"
 
-#: lib/closeout.c:122 src/grep.c:1346
+#: lib/closeout.c:121 src/grep.c:1346
 msgid "write error"
 msgstr "写入错误"
 
-#: lib/dfa.c:894
+#: lib/dfa.c:897
 msgid "unbalanced ["
 msgstr "有未匹配的 ["
 
-#: lib/dfa.c:1015
+#: lib/dfa.c:1018
 msgid "invalid character class"
 msgstr "无效的字符类"
 
-#: lib/dfa.c:1143
+#: lib/dfa.c:1146
 msgid "character class syntax is [[:space:]], not [:space:]"
 msgstr "字符类的语法是 [[:space:]],而非 [:space:]"
 
-#: lib/dfa.c:1209
+#: lib/dfa.c:1222
 msgid "unfinished \\ escape"
 msgstr "未结束的 \\ 转义"
 
-#: lib/dfa.c:1319
+#: lib/dfa.c:1332
 msgid "? at start of expression"
 msgstr "表达式以 ? 开头"
 
-#: lib/dfa.c:1331
+#: lib/dfa.c:1344
 msgid "* at start of expression"
 msgstr "表达式以 * 开头"
 
-#: lib/dfa.c:1345
+#: lib/dfa.c:1358
 msgid "+ at start of expression"
 msgstr "表达式以 + 开头"
 
-#: lib/dfa.c:1400
+#: lib/dfa.c:1413
 msgid "{...} at start of expression"
 msgstr "表达式以 {...} 开头"
 
-#: lib/dfa.c:1403
+#: lib/dfa.c:1416
 msgid "invalid content of \\{\\}"
 msgstr "\\{\\}中内容无效"
 
-#: lib/dfa.c:1405
+#: lib/dfa.c:1418
 msgid "regular expression too big"
 msgstr "正则表达式太长"
 
-#: lib/dfa.c:1555
+#: lib/dfa.c:1568
 msgid "stray \\ before unprintable character"
 msgstr "不可打印字符前有多余的 \\"
 
-#: lib/dfa.c:1557
+#: lib/dfa.c:1570
 msgid "stray \\ before white space"
 msgstr "空白字符前有多余的 \\"
 
-#: lib/dfa.c:1561
+#: lib/dfa.c:1574
 #, c-format
 msgid "stray \\ before %lc"
 msgstr "%lc 前有多余的 \\"
 
-#: lib/dfa.c:1562
+#: lib/dfa.c:1575
 msgid "stray \\"
 msgstr "多余的 \\"
 
-#: lib/dfa.c:1917
+#: lib/dfa.c:1925
 msgid "unbalanced ("
 msgstr "有未匹配的 ("
 
-#: lib/dfa.c:2034
+#: lib/dfa.c:2042
 msgid "no syntax specified"
 msgstr "未指定语法"
 
-#: lib/dfa.c:2045
+#: lib/dfa.c:2053
 msgid "unbalanced )"
 msgstr "有未匹配的 )"
 
-#: lib/error.c:195
+#: lib/error.c:193
 msgid "Unknown system error"
 msgstr "未知的系统错误"
 
@@ -167,7 +167,7 @@ msgstr "无法记录当前工作目录"
 msgid "failed to return to initial working directory"
 msgstr "返回到初始工作目录失败"
 
-#: lib/xbinary-io.c:37
+#: lib/xbinary-io.c:36
 #, c-format
 msgid "failed to set file descriptor text/binary mode"
 msgstr "设置文件描述符为文本/二进制模式时失败"
@@ -193,11 +193,11 @@ msgstr "设置文件描述符为文本/二进制模式时失败"
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:355
+#: lib/quotearg.c:354
 msgid "`"
 msgstr "\""
 
-#: lib/quotearg.c:356
+#: lib/quotearg.c:355
 msgid "'"
 msgstr "\""
 
@@ -718,68 +718,86 @@ msgstr "未知的 --binary-files 类型"
 #: src/grep.c:2831
 msgid ""
 "Written by Mike Haertel and others; see\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 msgstr ""
 "由 Mike Haerhtel 等人编写;作者信息请参见\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>。"
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>。"
 
-#: src/grep.c:2934
+#: src/grep.c:2937
 #, c-format
 msgid "warning: GREP_COLOR='%s' is deprecated; use GREP_COLORS='mt=%s'"
 msgstr "警告:GREP_COLOR='%s' 已弃用;请使用 GREP_COLORS='mt=%s'"
 
-#: src/pcresearch.c:148
+#: src/pcresearch.c:92
+#, c-format
+msgid ""
+"\n"
+"grep -P uses PCRE2 %s\n"
+msgstr ""
+"\n"
+"grep -P 使用 PCRE2 %s\n"
+
+#: src/pcresearch.c:169
+msgid "-P supports only unibyte locales on this platform"
+msgstr "-P 在此平台上仅支持单字节区域设置"
+
+#: src/pcresearch.c:171
 msgid "-P supports only unibyte and UTF-8 locales"
 msgstr "-P 仅支持单字节和 UTF-8 区域设置"
 
-#: src/pcresearch.c:162
+#: src/pcresearch.c:194
 msgid "the -P option only supports a single pattern"
 msgstr "-P 选项仅支持单个模式字符串"
 
-#: src/pcresearch.c:215
-#, c-format
-msgid "JIT internal error: %d"
-msgstr "JIT 内部错误:%d"
-
-#: src/pcresearch.c:252
+#: src/pcresearch.c:290
 msgid "exceeded PCRE's line length limit"
 msgstr "超过 PCRE 的行长度限制"
 
-#: src/pcresearch.c:330
+#: src/pcresearch.c:368
 #, c-format
 msgid "%s: memory exhausted"
 msgstr "%s: 内存耗尽"
 
-#: src/pcresearch.c:333
+#: src/pcresearch.c:371
 #, c-format
 msgid "%s: exhausted PCRE JIT stack"
 msgstr "%s: PCRE JIT 栈耗尽"
 
-#: src/pcresearch.c:337
+#: src/pcresearch.c:375
 #, c-format
 msgid "%s: exceeded PCRE's backtracking limit"
 msgstr "%s: 超过 PCRE 的回溯限制"
 
-#: src/pcresearch.c:342
+#: src/pcresearch.c:380
 #, c-format
 msgid "%s: exceeded PCRE's nested backtracking limit"
 msgstr "%s: 超过 PCRE 的嵌套回溯限制"
 
-#: src/pcresearch.c:346
+#: src/pcresearch.c:384
 #, c-format
 msgid "%s: PCRE detected recurse loop"
 msgstr "%s: PCRE 检测到递归循环"
 
-#: src/pcresearch.c:351
+#: src/pcresearch.c:389
 #, c-format
 msgid "%s: exceeded PCRE's heap limit"
 msgstr "%s: 超过 PCRE 的堆限制"
 
-#: src/pcresearch.c:360
+#: src/pcresearch.c:398
 #, c-format
 msgid "%s: internal PCRE error: %d"
 msgstr "%s: PCRE 内部错误:%d"
 
+#~ msgid ""
+#~ "\n"
+#~ "Built with PCRE "
+#~ msgstr ""
+#~ "\n"
+#~ "构建时使用 PCRE "
+
+#~ msgid "JIT internal error: %d"
+#~ msgstr "JIT 内部错误:%d"
+
 #~ msgid "failed to allocate memory for the PCRE JIT stack"
 #~ msgstr "为 PCRE JIT 栈分配内存时出错"
 
diff --git a/po/zh_TW.gmo b/po/zh_TW.gmo
index 02d5ec3b..51a81487 100644
Binary files a/po/zh_TW.gmo and b/po/zh_TW.gmo differ
diff --git a/po/zh_TW.po b/po/zh_TW.po
index 3296029e..e4a6f8df 100644
--- a/po/zh_TW.po
+++ b/po/zh_TW.po
@@ -5,13 +5,13 @@
 # Yuan-Chen Cheng <ycheng@sinica.edu.tw>, 2004.
 # Webber Liao <wpliao@gmail.com>, 2012, 2016.
 # Wei-Lun Chao <bluebat@member.fsf.org>, 2013.
-# Yi-Jyun Pan <pan93412@gmail.com>, 2018, 2019, 2020, 2021, 2022.
+# Yi-Jyun Pan <pan93412@gmail.com>, 2018, 2019, 2020, 2021, 2022, 2023.
 msgid ""
 msgstr ""
-"Project-Id-Version: grep 3.7.98\n"
+"Project-Id-Version: grep 3.8.35\n"
 "Report-Msgid-Bugs-To: bug-grep@gnu.org\n"
-"POT-Creation-Date: 2022-09-02 23:52-0700\n"
-"PO-Revision-Date: 2022-07-03 23:53+0800\n"
+"POT-Creation-Date: 2023-05-13 01:14-0700\n"
+"PO-Revision-Date: 2023-02-27 16:26+0800\n"
 "Last-Translator: Yi-Jyun Pan <pan93412@gmail.com>\n"
 "Language-Team: Chinese (traditional) <zh-l10n@lists.linux.org.tw>\n"
 "Language: zh_TW\n"
@@ -20,104 +20,104 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
 "X-Bugs: Report translation errors to the Language-Team address.\n"
-"X-Generator: Poedit 3.1\n"
+"X-Generator: Poedit 3.2.2\n"
 
-#: lib/argmatch.c:147
+#: lib/argmatch.c:145
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "%2$s 的引數 %1$s 無效"
 
-#: lib/argmatch.c:148
+#: lib/argmatch.c:146
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "%2$s 的引數 %1$s 不明確"
 
-#: lib/argmatch.c:167 lib/argmatch.h:238
+#: lib/argmatch.c:165 lib/argmatch.h:242
 msgid "Valid arguments are:"
 msgstr "有效的引數為:"
 
-#: lib/c-stack.c:187
+#: lib/c-stack.c:186
 msgid "program error"
 msgstr "程式錯誤"
 
-#: lib/c-stack.c:188
+#: lib/c-stack.c:187
 msgid "stack overflow"
 msgstr "堆疊超出容量"
 
-#: lib/closeout.c:122 src/grep.c:1346
+#: lib/closeout.c:121 src/grep.c:1346
 msgid "write error"
 msgstr "寫入發生錯誤"
 
-#: lib/dfa.c:894
+#: lib/dfa.c:897
 msgid "unbalanced ["
 msgstr "不對稱的 ["
 
-#: lib/dfa.c:1015
+#: lib/dfa.c:1018
 msgid "invalid character class"
 msgstr "無效的字元類別"
 
-#: lib/dfa.c:1143
+#: lib/dfa.c:1146
 msgid "character class syntax is [[:space:]], not [:space:]"
 msgstr "字元類別的語法為 [[:space:]], 非 [:space:]"
 
-#: lib/dfa.c:1209
+#: lib/dfa.c:1222
 msgid "unfinished \\ escape"
 msgstr "不完整的 \\ 逸出"
 
-#: lib/dfa.c:1319
+#: lib/dfa.c:1332
 msgid "? at start of expression"
 msgstr "表示式開頭有 ?"
 
-#: lib/dfa.c:1331
+#: lib/dfa.c:1344
 msgid "* at start of expression"
 msgstr "表示式開頭有 *"
 
-#: lib/dfa.c:1345
+#: lib/dfa.c:1358
 msgid "+ at start of expression"
 msgstr "表示式開頭有 +"
 
-#: lib/dfa.c:1400
+#: lib/dfa.c:1413
 msgid "{...} at start of expression"
 msgstr "表示式開頭有 {...}"
 
-#: lib/dfa.c:1403
+#: lib/dfa.c:1416
 msgid "invalid content of \\{\\}"
 msgstr "\\{\\} 的內容無效"
 
-#: lib/dfa.c:1405
+#: lib/dfa.c:1418
 msgid "regular expression too big"
 msgstr "正規表示式過長"
 
-#: lib/dfa.c:1555
+#: lib/dfa.c:1568
 msgid "stray \\ before unprintable character"
 msgstr "在不可見字元前有孤立的 \\"
 
-#: lib/dfa.c:1557
+#: lib/dfa.c:1570
 msgid "stray \\ before white space"
 msgstr "在空白前有孤立的 \\"
 
-#: lib/dfa.c:1561
+#: lib/dfa.c:1574
 #, c-format
 msgid "stray \\ before %lc"
 msgstr "在 %lc 前有孤立的 \\"
 
-#: lib/dfa.c:1562
+#: lib/dfa.c:1575
 msgid "stray \\"
 msgstr "有孤立的 \\"
 
-#: lib/dfa.c:1917
+#: lib/dfa.c:1925
 msgid "unbalanced ("
 msgstr "不對稱的 ("
 
-#: lib/dfa.c:2034
+#: lib/dfa.c:2042
 msgid "no syntax specified"
 msgstr "沒有指定的語法"
 
-#: lib/dfa.c:2045
+#: lib/dfa.c:2053
 msgid "unbalanced )"
 msgstr "不對稱的 )"
 
-#: lib/error.c:195
+#: lib/error.c:193
 msgid "Unknown system error"
 msgstr "未知的系統錯誤"
 
@@ -170,7 +170,7 @@ msgstr "無法記錄現行工作目錄"
 msgid "failed to return to initial working directory"
 msgstr "無法返回原本的工作目錄"
 
-#: lib/xbinary-io.c:37
+#: lib/xbinary-io.c:36
 #, c-format
 msgid "failed to set file descriptor text/binary mode"
 msgstr "無法設定檔案描述符號的文字/二進位模式"
@@ -196,11 +196,11 @@ msgstr "無法設定檔案描述符號的文字/二進位模式"
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:355
+#: lib/quotearg.c:354
 msgid "`"
 msgstr "`"
 
-#: lib/quotearg.c:356
+#: lib/quotearg.c:355
 msgid "'"
 msgstr "'"
 
@@ -720,68 +720,78 @@ msgstr "未知的二進位檔案類別"
 #: src/grep.c:2831
 msgid ""
 "Written by Mike Haertel and others; see\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."
 msgstr ""
 "由 Mike Haertel 及其他人撰寫而成;請見\n"
-"<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>。"
+"<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>。"
 
-#: src/grep.c:2934
+#: src/grep.c:2937
 #, c-format
 msgid "warning: GREP_COLOR='%s' is deprecated; use GREP_COLORS='mt=%s'"
 msgstr "警告:GREP_COLOR='%s' 已經廢棄;請改用 GREP_COLORS='mt=%s'"
 
-#: src/pcresearch.c:148
+#: src/pcresearch.c:92
+#, c-format
+msgid ""
+"\n"
+"grep -P uses PCRE2 %s\n"
+msgstr ""
+
+#: src/pcresearch.c:169
+msgid "-P supports only unibyte locales on this platform"
+msgstr "在本平台上 -P 只支援單位元組語系"
+
+#: src/pcresearch.c:171
 msgid "-P supports only unibyte and UTF-8 locales"
 msgstr "-P 只支援單位元組和 UTF-8 編碼"
 
-#: src/pcresearch.c:162
+#: src/pcresearch.c:194
 msgid "the -P option only supports a single pattern"
 msgstr "-P 選項只支援單一樣式"
 
-#: src/pcresearch.c:215
-#, c-format
-msgid "JIT internal error: %d"
-msgstr "JIT 內部錯誤:%d"
-
-#: src/pcresearch.c:252
+#: src/pcresearch.c:290
 msgid "exceeded PCRE's line length limit"
 msgstr "已超過 PCRE 的字數上限"
 
-#: src/pcresearch.c:330
+#: src/pcresearch.c:368
 #, c-format
 msgid "%s: memory exhausted"
 msgstr "%s:已用盡記憶體"
 
-#: src/pcresearch.c:333
+#: src/pcresearch.c:371
 #, c-format
 msgid "%s: exhausted PCRE JIT stack"
 msgstr "%s:已用盡 PCRE JIT 堆疊"
 
-#: src/pcresearch.c:337
+#: src/pcresearch.c:375
 #, c-format
 msgid "%s: exceeded PCRE's backtracking limit"
 msgstr "%s:超出 PCRE 的回溯上限"
 
-#: src/pcresearch.c:342
+#: src/pcresearch.c:380
 #, c-format
 msgid "%s: exceeded PCRE's nested backtracking limit"
 msgstr "%s:超出 PCRE 的巢狀回溯上限"
 
-#: src/pcresearch.c:346
+#: src/pcresearch.c:384
 #, c-format
 msgid "%s: PCRE detected recurse loop"
 msgstr "%s:PCRE 偵測到重複遞迴"
 
-#: src/pcresearch.c:351
+#: src/pcresearch.c:389
 #, c-format
 msgid "%s: exceeded PCRE's heap limit"
 msgstr "%s:超出 PCRE 的堆積上限"
 
-#: src/pcresearch.c:360
+#: src/pcresearch.c:398
 #, c-format
 msgid "%s: internal PCRE error: %d"
 msgstr "%s:內部 PCRE 錯誤: %d"
 
+#, c-format
+#~ msgid "JIT internal error: %d"
+#~ msgstr "JIT 內部錯誤:%d"
+
 #~ msgid "failed to allocate memory for the PCRE JIT stack"
 #~ msgstr "為 PCRE JIT 堆疊分配記憶體時出現錯誤"
 
diff --git a/src/Makefile.am b/src/Makefile.am
index 52743afe..2c5a9fe6 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,5 +1,5 @@
 ## Process this file with automake to create Makefile.in
-# Copyright 1997-1998, 2005-2022 Free Software Foundation, Inc.
+# Copyright 1997-1998, 2005-2023 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/src/Makefile.in b/src/Makefile.in
index ddd96ee6..4e5cf1f0 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -1,7 +1,7 @@
 # Makefile.in generated by automake 1.16i from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2022 Free Software Foundation, Inc.
+# Copyright (C) 1994-2023 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,7 +14,7 @@
 
 @SET_MAKE@
 
-# Copyright 1997-1998, 2005-2022 Free Software Foundation, Inc.
+# Copyright 1997-1998, 2005-2023 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
@@ -89,9 +89,6 @@ am__make_dryrun = (target_option=n; $(am__make_running_with_option))
 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 am__rm_f = rm -f $(am__rm_f_notfound)
 am__rm_rf = rm -rf $(am__rm_f_notfound)
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
@@ -115,7 +112,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
 	$(top_srcdir)/m4/absolute-header.m4 $(top_srcdir)/m4/alloca.m4 \
 	$(top_srcdir)/m4/arpa_inet_h.m4 \
 	$(top_srcdir)/m4/asm-underscore.m4 $(top_srcdir)/m4/assert.m4 \
-	$(top_srcdir)/m4/btowc.m4 $(top_srcdir)/m4/builtin-expect.m4 \
+	$(top_srcdir)/m4/assert_h.m4 $(top_srcdir)/m4/btowc.m4 \
+	$(top_srcdir)/m4/build-to-host.m4 \
+	$(top_srcdir)/m4/builtin-expect.m4 $(top_srcdir)/m4/c-bool.m4 \
 	$(top_srcdir)/m4/c-stack.m4 $(top_srcdir)/m4/calloc.m4 \
 	$(top_srcdir)/m4/chdir-long.m4 $(top_srcdir)/m4/close.m4 \
 	$(top_srcdir)/m4/closedir.m4 $(top_srcdir)/m4/codeset.m4 \
@@ -126,12 +125,13 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
 	$(top_srcdir)/m4/double-slash-root.m4 $(top_srcdir)/m4/dup.m4 \
 	$(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \
 	$(top_srcdir)/m4/environ.m4 $(top_srcdir)/m4/errno_h.m4 \
-	$(top_srcdir)/m4/error.m4 $(top_srcdir)/m4/exponentd.m4 \
-	$(top_srcdir)/m4/extensions.m4 \
+	$(top_srcdir)/m4/error.m4 $(top_srcdir)/m4/error_h.m4 \
+	$(top_srcdir)/m4/exponentd.m4 $(top_srcdir)/m4/extensions.m4 \
 	$(top_srcdir)/m4/extern-inline.m4 $(top_srcdir)/m4/fchdir.m4 \
-	$(top_srcdir)/m4/fcntl-o.m4 $(top_srcdir)/m4/fcntl-safer.m4 \
-	$(top_srcdir)/m4/fcntl.m4 $(top_srcdir)/m4/fcntl_h.m4 \
-	$(top_srcdir)/m4/fdopen.m4 $(top_srcdir)/m4/fdopendir.m4 \
+	$(top_srcdir)/m4/fclose.m4 $(top_srcdir)/m4/fcntl-o.m4 \
+	$(top_srcdir)/m4/fcntl-safer.m4 $(top_srcdir)/m4/fcntl.m4 \
+	$(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fdopen.m4 \
+	$(top_srcdir)/m4/fdopendir.m4 $(top_srcdir)/m4/fflush.m4 \
 	$(top_srcdir)/m4/filenamecat.m4 $(top_srcdir)/m4/flexmember.m4 \
 	$(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fnmatch.m4 \
 	$(top_srcdir)/m4/fnmatch_h.m4 $(top_srcdir)/m4/fopen.m4 \
@@ -212,35 +212,34 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
 	$(top_srcdir)/m4/stack-direction.m4 \
 	$(top_srcdir)/m4/stat-time.m4 $(top_srcdir)/m4/stat.m4 \
 	$(top_srcdir)/m4/stdalign.m4 $(top_srcdir)/m4/stdarg.m4 \
-	$(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stddef_h.m4 \
-	$(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/stdint_h.m4 \
-	$(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \
-	$(top_srcdir)/m4/stpcpy.m4 $(top_srcdir)/m4/strdup.m4 \
-	$(top_srcdir)/m4/strerror.m4 $(top_srcdir)/m4/strerror_r.m4 \
-	$(top_srcdir)/m4/string_h.m4 $(top_srcdir)/m4/strnlen.m4 \
-	$(top_srcdir)/m4/strstr.m4 $(top_srcdir)/m4/strtoimax.m4 \
-	$(top_srcdir)/m4/strtoll.m4 $(top_srcdir)/m4/strtoull.m4 \
-	$(top_srcdir)/m4/strtoumax.m4 $(top_srcdir)/m4/symlink.m4 \
-	$(top_srcdir)/m4/sys_ioctl_h.m4 \
+	$(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \
+	$(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/stdio_h.m4 \
+	$(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/stpcpy.m4 \
+	$(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \
+	$(top_srcdir)/m4/strerror_r.m4 $(top_srcdir)/m4/string_h.m4 \
+	$(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/strstr.m4 \
+	$(top_srcdir)/m4/strtoimax.m4 $(top_srcdir)/m4/strtoll.m4 \
+	$(top_srcdir)/m4/strtoull.m4 $(top_srcdir)/m4/strtoumax.m4 \
+	$(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_ioctl_h.m4 \
 	$(top_srcdir)/m4/sys_select_h.m4 \
 	$(top_srcdir)/m4/sys_socket_h.m4 \
 	$(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_time_h.m4 \
 	$(top_srcdir)/m4/sys_types_h.m4 $(top_srcdir)/m4/sys_uio_h.m4 \
 	$(top_srcdir)/m4/thread.m4 $(top_srcdir)/m4/threadlib.m4 \
-	$(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/unistd-safer.m4 \
-	$(top_srcdir)/m4/unistd_h.m4 $(top_srcdir)/m4/unlocked-io.m4 \
-	$(top_srcdir)/m4/vasnprintf.m4 $(top_srcdir)/m4/version-etc.m4 \
-	$(top_srcdir)/m4/visibility.m4 $(top_srcdir)/m4/warn-on-use.m4 \
-	$(top_srcdir)/m4/warnings.m4 $(top_srcdir)/m4/wchar_h.m4 \
-	$(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wcrtomb.m4 \
-	$(top_srcdir)/m4/wctob.m4 $(top_srcdir)/m4/wctomb.m4 \
-	$(top_srcdir)/m4/wctype_h.m4 $(top_srcdir)/m4/wcwidth.m4 \
+	$(top_srcdir)/m4/time.m4 $(top_srcdir)/m4/time_h.m4 \
+	$(top_srcdir)/m4/unistd-safer.m4 $(top_srcdir)/m4/unistd_h.m4 \
+	$(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/vasnprintf.m4 \
+	$(top_srcdir)/m4/version-etc.m4 $(top_srcdir)/m4/visibility.m4 \
+	$(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/warnings.m4 \
+	$(top_srcdir)/m4/wchar_h.m4 $(top_srcdir)/m4/wchar_t.m4 \
+	$(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wctob.m4 \
+	$(top_srcdir)/m4/wctomb.m4 $(top_srcdir)/m4/wctype_h.m4 \
+	$(top_srcdir)/m4/wcwidth.m4 \
 	$(top_srcdir)/m4/windows-stat-inodes.m4 \
 	$(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/wmemchr.m4 \
 	$(top_srcdir)/m4/wmempcpy.m4 $(top_srcdir)/m4/xalloc.m4 \
 	$(top_srcdir)/m4/xsize.m4 $(top_srcdir)/m4/xstrtol.m4 \
-	$(top_srcdir)/m4/year2038.m4 $(top_srcdir)/m4/zzgnulib.m4 \
-	$(top_srcdir)/configure.ac
+	$(top_srcdir)/m4/zzgnulib.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
@@ -350,6 +349,9 @@ am__define_uniq_tagged_files = \
 am__DIST_COMMON = $(srcdir)/Makefile.in \
 	$(top_srcdir)/build-aux/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+pkgdatadir = @pkgdatadir@
+pkgincludedir = @pkgincludedir@
+pkglibdir = @pkglibdir@
 pkglibexecdir = @pkglibexecdir@
 ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
@@ -359,6 +361,7 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
 AR = @AR@
 ARFLAGS = @ARFLAGS@
+ASSERT_H = @ASSERT_H@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -381,6 +384,7 @@ CTAGS = @CTAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DIR_HAS_FD_MEMBER = @DIR_HAS_FD_MEMBER@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
@@ -391,6 +395,7 @@ ENOLINK_VALUE = @ENOLINK_VALUE@
 EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
 EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
 ERRNO_H = @ERRNO_H@
+ERROR_H = @ERROR_H@
 ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FLOAT_H = @FLOAT_H@
@@ -491,6 +496,7 @@ GL_GNULIB_GETPAGESIZE = @GL_GNULIB_GETPAGESIZE@
 GL_GNULIB_GETPASS = @GL_GNULIB_GETPASS@
 GL_GNULIB_GETPASS_GNU = @GL_GNULIB_GETPASS_GNU@
 GL_GNULIB_GETPEERNAME = @GL_GNULIB_GETPEERNAME@
+GL_GNULIB_GETPROGNAME = @GL_GNULIB_GETPROGNAME@
 GL_GNULIB_GETSOCKNAME = @GL_GNULIB_GETSOCKNAME@
 GL_GNULIB_GETSOCKOPT = @GL_GNULIB_GETSOCKOPT@
 GL_GNULIB_GETSUBOPT = @GL_GNULIB_GETSUBOPT@
@@ -542,6 +548,7 @@ GL_GNULIB_MBSSEP = @GL_GNULIB_MBSSEP@
 GL_GNULIB_MBSSPN = @GL_GNULIB_MBSSPN@
 GL_GNULIB_MBSSTR = @GL_GNULIB_MBSSTR@
 GL_GNULIB_MBSTOK_R = @GL_GNULIB_MBSTOK_R@
+GL_GNULIB_MBSTOWCS = @GL_GNULIB_MBSTOWCS@
 GL_GNULIB_MBTOWC = @GL_GNULIB_MBTOWC@
 GL_GNULIB_MDA_ACCESS = @GL_GNULIB_MDA_ACCESS@
 GL_GNULIB_MDA_CHDIR = @GL_GNULIB_MDA_CHDIR@
@@ -588,6 +595,7 @@ GL_GNULIB_MEMCHR = @GL_GNULIB_MEMCHR@
 GL_GNULIB_MEMMEM = @GL_GNULIB_MEMMEM@
 GL_GNULIB_MEMPCPY = @GL_GNULIB_MEMPCPY@
 GL_GNULIB_MEMRCHR = @GL_GNULIB_MEMRCHR@
+GL_GNULIB_MEMSET_EXPLICIT = @GL_GNULIB_MEMSET_EXPLICIT@
 GL_GNULIB_MKDIR = @GL_GNULIB_MKDIR@
 GL_GNULIB_MKDIRAT = @GL_GNULIB_MKDIRAT@
 GL_GNULIB_MKDTEMP = @GL_GNULIB_MKDTEMP@
@@ -712,6 +720,7 @@ GL_GNULIB_STRVERSCMP = @GL_GNULIB_STRVERSCMP@
 GL_GNULIB_SYMLINK = @GL_GNULIB_SYMLINK@
 GL_GNULIB_SYMLINKAT = @GL_GNULIB_SYMLINKAT@
 GL_GNULIB_SYSTEM_POSIX = @GL_GNULIB_SYSTEM_POSIX@
+GL_GNULIB_TIME = @GL_GNULIB_TIME@
 GL_GNULIB_TIMEGM = @GL_GNULIB_TIMEGM@
 GL_GNULIB_TIMESPEC_GET = @GL_GNULIB_TIMESPEC_GET@
 GL_GNULIB_TIMESPEC_GETRES = @GL_GNULIB_TIMESPEC_GETRES@
@@ -788,6 +797,7 @@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
 GNULIB_TEST_WARN_CFLAGS = @GNULIB_TEST_WARN_CFLAGS@
 GNULIB_WARN_CFLAGS = @GNULIB_WARN_CFLAGS@
 GREP = @GREP@
+HARD_LOCALE_LIB = @HARD_LOCALE_LIB@
 HAVE_ACCEPT4 = @HAVE_ACCEPT4@
 HAVE_ALIGNED_ALLOC = @HAVE_ALIGNED_ALLOC@
 HAVE_ALLOCA_H = @HAVE_ALLOCA_H@
@@ -822,6 +832,7 @@ HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@
 HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
 HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
 HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
+HAVE_DECL_GETW = @HAVE_DECL_GETW@
 HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@
 HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@
 HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@
@@ -831,6 +842,8 @@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@
 HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
 HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
 HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@
+HAVE_DECL_PROGRAM_INVOCATION_NAME = @HAVE_DECL_PROGRAM_INVOCATION_NAME@
+HAVE_DECL_PUTW = @HAVE_DECL_PUTW@
 HAVE_DECL_SETENV = @HAVE_DECL_SETENV@
 HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@
 HAVE_DECL_SETSTATE = @HAVE_DECL_SETSTATE@
@@ -854,6 +867,9 @@ HAVE_DIRENT_H = @HAVE_DIRENT_H@
 HAVE_DPRINTF = @HAVE_DPRINTF@
 HAVE_DUP3 = @HAVE_DUP3@
 HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
+HAVE_ERROR = @HAVE_ERROR@
+HAVE_ERROR_AT_LINE = @HAVE_ERROR_AT_LINE@
+HAVE_ERROR_H = @HAVE_ERROR_H@
 HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
 HAVE_EXECVPE = @HAVE_EXECVPE@
 HAVE_EXPLICIT_BZERO = @HAVE_EXPLICIT_BZERO@
@@ -884,11 +900,14 @@ HAVE_GETLOGIN = @HAVE_GETLOGIN@
 HAVE_GETOPT_H = @HAVE_GETOPT_H@
 HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
 HAVE_GETPASS = @HAVE_GETPASS@
+HAVE_GETPROGNAME = @HAVE_GETPROGNAME@
 HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
 HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@
 HAVE_GETUMASK = @HAVE_GETUMASK@
 HAVE_GRANTPT = @HAVE_GRANTPT@
 HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
+HAVE_IMAXABS = @HAVE_IMAXABS@
+HAVE_IMAXDIV = @HAVE_IMAXDIV@
 HAVE_IMAXDIV_T = @HAVE_IMAXDIV_T@
 HAVE_INITSTATE = @HAVE_INITSTATE@
 HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
@@ -916,6 +935,7 @@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@
 HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@
 HAVE_MBTOWC = @HAVE_MBTOWC@
 HAVE_MEMPCPY = @HAVE_MEMPCPY@
+HAVE_MEMSET_EXPLICIT = @HAVE_MEMSET_EXPLICIT@
 HAVE_MKDIRAT = @HAVE_MKDIRAT@
 HAVE_MKDTEMP = @HAVE_MKDTEMP@
 HAVE_MKFIFO = @HAVE_MKFIFO@
@@ -1078,6 +1098,7 @@ HAVE_TIMESPEC_GETRES = @HAVE_TIMESPEC_GETRES@
 HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@
 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@
 HAVE_UNISTD_H = @HAVE_UNISTD_H@
+HAVE_UNISTRING_WOE32DLL_H = @HAVE_UNISTRING_WOE32DLL_H@
 HAVE_UNLINKAT = @HAVE_UNLINKAT@
 HAVE_UNLOCKPT = @HAVE_UNLOCKPT@
 HAVE_USLEEP = @HAVE_USLEEP@
@@ -1127,7 +1148,6 @@ HAVE_WMEMPCPY = @HAVE_WMEMPCPY@
 HAVE_WMEMSET = @HAVE_WMEMSET@
 HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@
 HAVE_XLOCALE_H = @HAVE_XLOCALE_H@
-HAVE__BOOL = @HAVE__BOOL@
 HAVE__EXIT = @HAVE__EXIT@
 HOST_CPU = @HOST_CPU@
 HOST_CPU_C_ABI = @HOST_CPU_C_ABI@
@@ -1191,16 +1211,21 @@ LTLIBOBJS = @LTLIBOBJS@
 LTLIBSIGSEGV = @LTLIBSIGSEGV@
 LTLIBTHREAD = @LTLIBTHREAD@
 MAKEINFO = @MAKEINFO@
+MBRTOWC_LIB = @MBRTOWC_LIB@
 MKDIR_P = @MKDIR_P@
 MSGFMT = @MSGFMT@
 MSGFMT_015 = @MSGFMT_015@
 MSGMERGE = @MSGMERGE@
+NANOSLEEP_LIB = @NANOSLEEP_LIB@
 NETINET_IN_H = @NETINET_IN_H@
 NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@
+NEXT_ASSERT_H = @NEXT_ASSERT_H@
 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@
+NEXT_AS_FIRST_DIRECTIVE_ASSERT_H = @NEXT_AS_FIRST_DIRECTIVE_ASSERT_H@
 NEXT_AS_FIRST_DIRECTIVE_CTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_CTYPE_H@
 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@
 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
+NEXT_AS_FIRST_DIRECTIVE_ERROR_H = @NEXT_AS_FIRST_DIRECTIVE_ERROR_H@
 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@
 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@
 NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H = @NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H@
@@ -1234,6 +1259,7 @@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@
 NEXT_CTYPE_H = @NEXT_CTYPE_H@
 NEXT_DIRENT_H = @NEXT_DIRENT_H@
 NEXT_ERRNO_H = @NEXT_ERRNO_H@
+NEXT_ERROR_H = @NEXT_ERROR_H@
 NEXT_FCNTL_H = @NEXT_FCNTL_H@
 NEXT_FLOAT_H = @NEXT_FLOAT_H@
 NEXT_FNMATCH_H = @NEXT_FNMATCH_H@
@@ -1284,6 +1310,7 @@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
 PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
 PRIPTR_PREFIX = @PRIPTR_PREFIX@
 PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
+PTHREAD_SIGMASK_LIB = @PTHREAD_SIGMASK_LIB@
 PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
 RANLIB = @RANLIB@
 REPLACE_ACCESS = @REPLACE_ACCESS@
@@ -1303,7 +1330,10 @@ REPLACE_DIRFD = @REPLACE_DIRFD@
 REPLACE_DPRINTF = @REPLACE_DPRINTF@
 REPLACE_DUP = @REPLACE_DUP@
 REPLACE_DUP2 = @REPLACE_DUP2@
+REPLACE_DUP3 = @REPLACE_DUP3@
 REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
+REPLACE_ERROR = @REPLACE_ERROR@
+REPLACE_ERROR_AT_LINE = @REPLACE_ERROR_AT_LINE@
 REPLACE_EXECL = @REPLACE_EXECL@
 REPLACE_EXECLE = @REPLACE_EXECLE@
 REPLACE_EXECLP = @REPLACE_EXECLP@
@@ -1316,6 +1346,7 @@ REPLACE_FCHMODAT = @REPLACE_FCHMODAT@
 REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
 REPLACE_FCLOSE = @REPLACE_FCLOSE@
 REPLACE_FCNTL = @REPLACE_FCNTL@
+REPLACE_FDATASYNC = @REPLACE_FDATASYNC@
 REPLACE_FDOPEN = @REPLACE_FDOPEN@
 REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@
 REPLACE_FFLUSH = @REPLACE_FFLUSH@
@@ -1340,17 +1371,23 @@ REPLACE_GETCWD = @REPLACE_GETCWD@
 REPLACE_GETDELIM = @REPLACE_GETDELIM@
 REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
 REPLACE_GETDTABLESIZE = @REPLACE_GETDTABLESIZE@
+REPLACE_GETENTROPY = @REPLACE_GETENTROPY@
 REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
 REPLACE_GETLINE = @REPLACE_GETLINE@
+REPLACE_GETLOADAVG = @REPLACE_GETLOADAVG@
 REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
 REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
 REPLACE_GETPASS = @REPLACE_GETPASS@
 REPLACE_GETPASS_FOR_GETPASS_GNU = @REPLACE_GETPASS_FOR_GETPASS_GNU@
+REPLACE_GETPROGNAME = @REPLACE_GETPROGNAME@
+REPLACE_GETSUBOPT = @REPLACE_GETSUBOPT@
 REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
 REPLACE_GMTIME = @REPLACE_GMTIME@
 REPLACE_ICONV = @REPLACE_ICONV@
 REPLACE_ICONV_OPEN = @REPLACE_ICONV_OPEN@
 REPLACE_ICONV_UTF = @REPLACE_ICONV_UTF@
+REPLACE_IMAXABS = @REPLACE_IMAXABS@
+REPLACE_IMAXDIV = @REPLACE_IMAXDIV@
 REPLACE_INET_NTOP = @REPLACE_INET_NTOP@
 REPLACE_INET_PTON = @REPLACE_INET_PTON@
 REPLACE_INITSTATE = @REPLACE_INITSTATE@
@@ -1377,14 +1414,19 @@ REPLACE_MBSINIT = @REPLACE_MBSINIT@
 REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
 REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
 REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
+REPLACE_MBSTOWCS = @REPLACE_MBSTOWCS@
 REPLACE_MBTOWC = @REPLACE_MBTOWC@
+REPLACE_MB_CUR_MAX = @REPLACE_MB_CUR_MAX@
 REPLACE_MEMCHR = @REPLACE_MEMCHR@
 REPLACE_MEMMEM = @REPLACE_MEMMEM@
+REPLACE_MEMPCPY = @REPLACE_MEMPCPY@
 REPLACE_MKDIR = @REPLACE_MKDIR@
 REPLACE_MKFIFO = @REPLACE_MKFIFO@
 REPLACE_MKFIFOAT = @REPLACE_MKFIFOAT@
 REPLACE_MKNOD = @REPLACE_MKNOD@
 REPLACE_MKNODAT = @REPLACE_MKNODAT@
+REPLACE_MKOSTEMP = @REPLACE_MKOSTEMP@
+REPLACE_MKOSTEMPS = @REPLACE_MKOSTEMPS@
 REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
 REPLACE_MKTIME = @REPLACE_MKTIME@
 REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
@@ -1396,8 +1438,10 @@ REPLACE_OPEN = @REPLACE_OPEN@
 REPLACE_OPENAT = @REPLACE_OPENAT@
 REPLACE_OPENDIR = @REPLACE_OPENDIR@
 REPLACE_PERROR = @REPLACE_PERROR@
+REPLACE_PIPE2 = @REPLACE_PIPE2@
 REPLACE_POPEN = @REPLACE_POPEN@
 REPLACE_POSIX_MEMALIGN = @REPLACE_POSIX_MEMALIGN@
+REPLACE_POSIX_OPENPT = @REPLACE_POSIX_OPENPT@
 REPLACE_PREAD = @REPLACE_PREAD@
 REPLACE_PRINTF = @REPLACE_PRINTF@
 REPLACE_PSELECT = @REPLACE_PSELECT@
@@ -1462,6 +1506,7 @@ REPLACE_RAISE = @REPLACE_RAISE@
 REPLACE_RANDOM = @REPLACE_RANDOM@
 REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
 REPLACE_READ = @REPLACE_READ@
+REPLACE_READDIR = @REPLACE_READDIR@
 REPLACE_READLINK = @REPLACE_READLINK@
 REPLACE_READLINKAT = @REPLACE_READLINKAT@
 REPLACE_REALLOCARRAY = @REPLACE_REALLOCARRAY@
@@ -1471,10 +1516,12 @@ REPLACE_REALPATH = @REPLACE_REALPATH@
 REPLACE_REMOVE = @REPLACE_REMOVE@
 REPLACE_RENAME = @REPLACE_RENAME@
 REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
+REPLACE_REWINDDIR = @REPLACE_REWINDDIR@
 REPLACE_RMDIR = @REPLACE_RMDIR@
 REPLACE_SCHED_YIELD = @REPLACE_SCHED_YIELD@
 REPLACE_SELECT = @REPLACE_SELECT@
 REPLACE_SETENV = @REPLACE_SETENV@
+REPLACE_SETHOSTNAME = @REPLACE_SETHOSTNAME@
 REPLACE_SETLOCALE = @REPLACE_SETLOCALE@
 REPLACE_SETSTATE = @REPLACE_SETSTATE@
 REPLACE_SLEEP = @REPLACE_SLEEP@
@@ -1483,6 +1530,7 @@ REPLACE_SPRINTF = @REPLACE_SPRINTF@
 REPLACE_STAT = @REPLACE_STAT@
 REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@
 REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
+REPLACE_STPCPY = @REPLACE_STPCPY@
 REPLACE_STPNCPY = @REPLACE_STPNCPY@
 REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
 REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@
@@ -1509,7 +1557,9 @@ REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@
 REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@
 REPLACE_SYMLINK = @REPLACE_SYMLINK@
 REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@
+REPLACE_TIME = @REPLACE_TIME@
 REPLACE_TIMEGM = @REPLACE_TIMEGM@
+REPLACE_TIMESPEC_GET = @REPLACE_TIMESPEC_GET@
 REPLACE_TMPFILE = @REPLACE_TMPFILE@
 REPLACE_TOWLOWER = @REPLACE_TOWLOWER@
 REPLACE_TRUNCATE = @REPLACE_TRUNCATE@
@@ -1527,24 +1577,33 @@ REPLACE_VPRINTF = @REPLACE_VPRINTF@
 REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
 REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
 REPLACE_WCRTOMB = @REPLACE_WCRTOMB@
+REPLACE_WCSCMP = @REPLACE_WCSCMP@
 REPLACE_WCSFTIME = @REPLACE_WCSFTIME@
+REPLACE_WCSNCMP = @REPLACE_WCSNCMP@
 REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@
 REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@
+REPLACE_WCSSTR = @REPLACE_WCSSTR@
 REPLACE_WCSTOK = @REPLACE_WCSTOK@
 REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@
 REPLACE_WCTOB = @REPLACE_WCTOB@
 REPLACE_WCTOMB = @REPLACE_WCTOMB@
 REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
+REPLACE_WMEMCMP = @REPLACE_WMEMCMP@
+REPLACE_WMEMPCPY = @REPLACE_WMEMPCPY@
 REPLACE_WRITE = @REPLACE_WRITE@
+REPLACE__EXIT = @REPLACE__EXIT@
+SCHED_YIELD_LIB = @SCHED_YIELD_LIB@
 SED = @SED@
+SELECT_LIB = @SELECT_LIB@
+SETLOCALE_LIB = @SETLOCALE_LIB@
+SETLOCALE_NULL_LIB = @SETLOCALE_NULL_LIB@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 SIGSEGV_H = @SIGSEGV_H@
 SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
 SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
-STDALIGN_H = @STDALIGN_H@
 STDARG_H = @STDARG_H@
-STDBOOL_H = @STDBOOL_H@
+STDCKDINT_H = @STDCKDINT_H@
 STDDEF_H = @STDDEF_H@
 STDINT_H = @STDINT_H@
 STRIP = @STRIP@
@@ -1587,6 +1646,8 @@ am__tar = @am__tar@
 am__untar = @am__untar@
 am__xargs_n = @am__xargs_n@
 bindir = @bindir@
+bindir_c = @bindir_c@
+bindir_c_make = @bindir_c_make@
 build = @build@
 build_alias = @build_alias@
 build_cpu = @build_cpu@
@@ -1594,10 +1655,20 @@ build_os = @build_os@
 build_vendor = @build_vendor@
 builddir = @builddir@
 datadir = @datadir@
+datadir_c = @datadir_c@
+datadir_c_make = @datadir_c_make@
 datarootdir = @datarootdir@
+datarootdir_c = @datarootdir_c@
+datarootdir_c_make = @datarootdir_c_make@
 docdir = @docdir@
+docdir_c = @docdir_c@
+docdir_c_make = @docdir_c_make@
 dvidir = @dvidir@
+dvidir_c = @dvidir_c@
+dvidir_c_make = @dvidir_c_make@
 exec_prefix = @exec_prefix@
+exec_prefix_c = @exec_prefix_c@
+exec_prefix_c_make = @exec_prefix_c_make@
 gl_LIBOBJDEPS = @gl_LIBOBJDEPS@
 gl_LIBOBJS = @gl_LIBOBJS@
 gl_LTLIBOBJS = @gl_LTLIBOBJS@
@@ -1611,26 +1682,68 @@ host_cpu = @host_cpu@
 host_os = @host_os@
 host_vendor = @host_vendor@
 htmldir = @htmldir@
+htmldir_c = @htmldir_c@
+htmldir_c_make = @htmldir_c_make@
 includedir = @includedir@
+includedir_c = @includedir_c@
+includedir_c_make = @includedir_c_make@
 infodir = @infodir@
+infodir_c = @infodir_c@
+infodir_c_make = @infodir_c_make@
 install_sh = @install_sh@
 libdir = @libdir@
+libdir_c = @libdir_c@
+libdir_c_make = @libdir_c_make@
 libexecdir = @libexecdir@
+libexecdir_c = @libexecdir_c@
+libexecdir_c_make = @libexecdir_c_make@
 lispdir = @lispdir@
+lispdir_c = @lispdir_c@
+lispdir_c_make = @lispdir_c_make@
 localedir = $(datadir)/locale
+localedir_c = @localedir_c@
+localedir_c_make = @localedir_c_make@
 localstatedir = @localstatedir@
+localstatedir_c = @localstatedir_c@
+localstatedir_c_make = @localstatedir_c_make@
 mandir = @mandir@
+mandir_c = @mandir_c@
+mandir_c_make = @mandir_c_make@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+oldincludedir_c = @oldincludedir_c@
+oldincludedir_c_make = @oldincludedir_c_make@
 pdfdir = @pdfdir@
+pdfdir_c = @pdfdir_c@
+pdfdir_c_make = @pdfdir_c_make@
+pkgdatadir_c = @pkgdatadir_c@
+pkgdatadir_c_make = @pkgdatadir_c_make@
+pkgincludedir_c = @pkgincludedir_c@
+pkgincludedir_c_make = @pkgincludedir_c_make@
+pkglibdir_c = @pkglibdir_c@
+pkglibdir_c_make = @pkglibdir_c_make@
+pkglibexecdir_c = @pkglibexecdir_c@
+pkglibexecdir_c_make = @pkglibexecdir_c_make@
 prefix = @prefix@
+prefix_c = @prefix_c@
+prefix_c_make = @prefix_c_make@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+psdir_c = @psdir_c@
+psdir_c_make = @psdir_c_make@
 runstatedir = @runstatedir@
+runstatedir_c = @runstatedir_c@
+runstatedir_c_make = @runstatedir_c_make@
 sbindir = @sbindir@
+sbindir_c = @sbindir_c@
+sbindir_c_make = @sbindir_c_make@
 sharedstatedir = @sharedstatedir@
+sharedstatedir_c = @sharedstatedir_c@
+sharedstatedir_c_make = @sharedstatedir_c_make@
 srcdir = @srcdir@
 sysconfdir = @sysconfdir@
+sysconfdir_c = @sysconfdir_c@
+sysconfdir_c_make = @sysconfdir_c_make@
 target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
@@ -1921,7 +2034,7 @@ install-strip:
 mostlyclean-generic:
 
 clean-generic:
-	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+	-$(am__rm_f) $(CLEANFILES)
 
 distclean-generic:
 	-$(am__rm_f) $(CONFIG_CLEAN_FILES)
@@ -1935,7 +2048,7 @@ clean: clean-am
 clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
 
 distclean: distclean-am
-		-rm -f ./$(DEPDIR)/dfasearch.Po
+	-rm -f ./$(DEPDIR)/dfasearch.Po
 	-rm -f ./$(DEPDIR)/grep.Po
 	-rm -f ./$(DEPDIR)/kwsearch.Po
 	-rm -f ./$(DEPDIR)/kwset.Po
@@ -1986,7 +2099,7 @@ install-ps-am:
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
-		-rm -f ./$(DEPDIR)/dfasearch.Po
+	-rm -f ./$(DEPDIR)/dfasearch.Po
 	-rm -f ./$(DEPDIR)/grep.Po
 	-rm -f ./$(DEPDIR)/kwsearch.Po
 	-rm -f ./$(DEPDIR)/kwset.Po
diff --git a/src/dfasearch.c b/src/dfasearch.c
index 91f776a6..3d586c21 100644
--- a/src/dfasearch.c
+++ b/src/dfasearch.c
@@ -1,5 +1,5 @@
 /* dfasearch.c - searching subroutines using dfa and regex for grep.
-   Copyright 1992, 1998, 2000, 2007, 2009-2022 Free Software Foundation, Inc.
+   Copyright 1992, 1998, 2000, 2007, 2009-2023 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
@@ -149,7 +149,7 @@ regex_compile (struct dfa_comp *dc, char const *p, idx_t len,
   pat.allocated = 0;
 
   /* Do not use a fastmap with -i, to work around glibc Bug#20381.  */
-  verify (UCHAR_MAX < IDX_MAX);
+  static_assert (UCHAR_MAX < IDX_MAX);
   idx_t uchar_max = UCHAR_MAX;
   pat.fastmap = (syntax_only | match_icase) ? NULL : ximalloc (uchar_max + 1);
 
@@ -261,8 +261,6 @@ GEAcompile (char *pattern, idx_t size, reg_syntax_t syntax_bits,
           dc->patterns++;
         }
 
-      re_set_syntax (syntax_bits);
-
       if (!regex_compile (dc, p, len, dc->pcount, lineno, syntax_bits,
                           !backref))
         compilation_failed = true;
@@ -281,20 +279,19 @@ GEAcompile (char *pattern, idx_t size, reg_syntax_t syntax_bits,
   if (compilation_failed)
     exit (EXIT_TROUBLE);
 
-  if (prev <= patlim)
+  if (patlim < prev)
+    buflen--;
+  else if (pattern < prev)
     {
-      if (pattern < prev)
-        {
-          idx_t prevlen = patlim - prev;
-          buf = xirealloc (buf, buflen + prevlen);
-          memcpy (buf + buflen, prev, prevlen);
-          buflen += prevlen;
-        }
-      else
-        {
-          buf = pattern;
-          buflen = size;
-        }
+      idx_t prevlen = patlim - prev;
+      buf = xirealloc (buf, buflen + prevlen);
+      memcpy (buf + buflen, prev, prevlen);
+      buflen += prevlen;
+    }
+  else
+    {
+      buf = pattern;
+      buflen = size;
     }
 
   /* In the match_words and match_lines cases, we use a different pattern
diff --git a/src/die.h b/src/die.h
index 4197f0f0..af67b542 100644
--- a/src/die.h
+++ b/src/die.h
@@ -1,5 +1,5 @@
 /* Report an error and exit.
-   Copyright 2016-2022 Free Software Foundation, Inc.
+   Copyright 2016-2023 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
@@ -20,7 +20,6 @@
 #define DIE_H
 
 #include <error.h>
-#include <stdbool.h>
 #include <verify.h>
 
 /* Like 'error (STATUS, ...)', except STATUS must be a nonzero constant.
diff --git a/src/grep.c b/src/grep.c
index 9b9407d6..491dd028 100644
--- a/src/grep.c
+++ b/src/grep.c
@@ -1,5 +1,5 @@
 /* grep.c - main driver file for grep.
-   Copyright (C) 1992, 1997-2002, 2004-2022 Free Software Foundation, Inc.
+   Copyright (C) 1992, 1997-2002, 2004-2023 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
@@ -24,6 +24,7 @@
 #include <wchar.h>
 #include <inttypes.h>
 #include <stdarg.h>
+#include <stdckdint.h>
 #include <stdint.h>
 #include <stdio.h>
 #include "system.h"
@@ -40,7 +41,6 @@
 #include "fcntl-safer.h"
 #include "fts_.h"
 #include "getopt.h"
-#include "getprogname.h"
 #include "grep.h"
 #include "hash.h"
 #include "intprops.h"
@@ -898,7 +898,7 @@ static intmax_t
 add_count (intmax_t a, idx_t b)
 {
   intmax_t sum;
-  if (!INT_ADD_OK (a, b, &sum))
+  if (ckd_add (&sum, a, b))
     die (EXIT_TROUBLE, 0, _("input is too large to count"));
   return sum;
 }
@@ -982,7 +982,7 @@ fillbuf (idx_t save, struct stat const *st)
               off_t to_be_read = st->st_size - bufoffset;
               ptrdiff_t a;
               if (0 <= to_be_read
-                  && INT_ADD_OK (to_be_read, save + min_after_buflim, &a))
+                  && !ckd_add (&a, to_be_read, save + min_after_buflim))
                 alloc_max = MAX (a, bufalloc + incr_min);
             }
 
@@ -1435,7 +1435,7 @@ prtext (char *beg, char *lim)
 /* Replace all NUL bytes in buffer P (which ends at LIM) with EOL.
    This avoids running out of memory when binary input contains a long
    sequence of zeros, which would otherwise be considered to be part
-   of a long line.  P[LIM] should be EOL.  */
+   of a long line.  *LIM should be EOL.  */
 static void
 zap_nuls (char *p, char *lim, char eol)
 {
@@ -1583,7 +1583,7 @@ grep (int fd, struct stat const *st, bool *ineof)
          the buffer, 0 means there is no incomplete last line).  */
       oldc = beg[-1];
       beg[-1] = eol;
-      /* FIXME: use rawmemrchr if/when it exists, since we have ensured
+      /* If rawmemrchr existed it could be used here, since we have ensured
          that this use of memrchr is guaranteed never to return NULL.  */
       lim = memrchr (beg - 1, eol, buflim - beg + 1);
       ++lim;
@@ -2829,7 +2829,10 @@ main (int argc, char **argv)
       version_etc (stdout, getprogname (), PACKAGE_NAME, VERSION,
                    (char *) NULL);
       puts (_("Written by Mike Haertel and others; see\n"
-              "<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>."));
+              "<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>."));
+#if HAVE_LIBPCRE
+      Pprint_version ();
+#endif
       return EXIT_SUCCESS;
     }
 
diff --git a/src/grep.h b/src/grep.h
index fdafdc60..8d3dbe30 100644
--- a/src/grep.h
+++ b/src/grep.h
@@ -1,5 +1,5 @@
 /* grep.h - interface to grep driver for searching subroutines.
-   Copyright (C) 1992, 1998, 2001, 2007, 2009-2022 Free Software Foundation,
+   Copyright (C) 1992, 1998, 2001, 2007, 2009-2023 Free Software Foundation,
    Inc.
 
    This program is free software; you can redistribute it and/or modify
@@ -20,7 +20,6 @@
 #ifndef GREP_GREP_H
 #define GREP_GREP_H 1
 
-#include <stdbool.h>
 #include <idx.h>
 
 /* The following flags are exported from grep for the matchers
diff --git a/src/kwsearch.c b/src/kwsearch.c
index f6517170..212f6e6c 100644
--- a/src/kwsearch.c
+++ b/src/kwsearch.c
@@ -1,5 +1,5 @@
 /* kwsearch.c - searching subroutines using kwset for grep.
-   Copyright 1992, 1998, 2000, 2007, 2009-2022 Free Software Foundation, Inc.
+   Copyright 1992, 1998, 2000, 2007, 2009-2023 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/src/kwset.c b/src/kwset.c
index fc25a94e..b885ef92 100644
--- a/src/kwset.c
+++ b/src/kwset.c
@@ -1,5 +1,5 @@
 /* kwset.c - search for any of a set of keywords.
-   Copyright (C) 1989, 1998, 2000, 2005, 2007, 2009-2022 Free Software
+   Copyright (C) 1989, 1998, 2000, 2005, 2007, 2009-2023 Free Software
    Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
@@ -27,10 +27,11 @@
 
 #include "kwset.h"
 
+#include <stdckdint.h>
 #include <stdint.h>
 #include <sys/types.h>
+
 #include "system.h"
-#include "intprops.h"
 #include "memchr2.h"
 #include "obstack.h"
 #include "xalloc.h"
@@ -674,7 +675,7 @@ bmexec_trans (kwset_t kwset, char const *text, idx_t size)
 
   /* Significance of 12: 1 (initial offset) + 10 (skip loop) + 1 (md2).  */
   idx_t len12;
-  if (INT_MULTIPLY_OK (len, 12, &len12) && len12 < size)
+  if (!ckd_mul (&len12, len, 12) && len12 < size)
     /* 11 is not a bug, the initial offset happens only once.  */
     for (ep = text + size - 11 * len; tp <= ep; )
       {
diff --git a/src/kwset.h b/src/kwset.h
index 3c2f0142..679a47d9 100644
--- a/src/kwset.h
+++ b/src/kwset.h
@@ -1,5 +1,5 @@
 /* kwset.h - header declaring the keyword set library.
-   Copyright (C) 1989, 1998, 2005, 2007, 2009-2022 Free Software Foundation,
+   Copyright (C) 1989, 1998, 2005, 2007, 2009-2023 Free Software Foundation,
    Inc.
 
    This program is free software; you can redistribute it and/or modify
@@ -20,7 +20,6 @@
 /* Written August 1989 by Mike Haertel.  */
 
 #include <stddef.h>
-#include <stdbool.h>
 
 #include <idx.h>
 
diff --git a/src/pcresearch.c b/src/pcresearch.c
index f332a44f..44262ac6 100644
--- a/src/pcresearch.c
+++ b/src/pcresearch.c
@@ -1,5 +1,5 @@
 /* pcresearch.c - searching subroutines using PCRE for grep.
-   Copyright 2000, 2007, 2009-2022 Free Software Foundation, Inc.
+   Copyright 2000, 2007, 2009-2023 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -17,9 +17,12 @@
    02110-1301, USA.  */
 
 #include <config.h>
+
 #include "search.h"
 #include "die.h"
 
+#include <stdckdint.h>
+
 #define PCRE2_CODE_UNIT_WIDTH 8
 #include <pcre2.h>
 
@@ -32,6 +35,18 @@
 # define PCRE2_ERROR_DEPTHLIMIT PCRE2_ERROR_RECURSIONLIMIT
 # define pcre2_set_depth_limit pcre2_set_recursion_limit
 #endif
+#ifndef PCRE2_EXTRA_ASCII_BSD
+# define PCRE2_EXTRA_ASCII_BSD 0
+#endif
+
+/* Use PCRE2_MATCH_INVALID_UTF if supported and not buggy;
+   see <https://github.com/PCRE2Project/pcre2/issues/224>.
+   Assume the bug will be fixed after PCRE2 10.42.  */
+#if defined PCRE2_MATCH_INVALID_UTF && 10 < PCRE2_MAJOR + (42 < PCRE2_MINOR)
+enum { MATCH_INVALID_UTF = PCRE2_MATCH_INVALID_UTF };
+#else
+enum { MATCH_INVALID_UTF = 0 };
+#endif
 
 struct pcre_comp
 {
@@ -68,6 +83,15 @@ private_free (void *ptr, _GL_UNUSED void *unused)
   free (ptr);
 }
 
+void
+Pprint_version (void)
+{
+  char buf[128];
+  if (sizeof buf <= pcre2_config (PCRE2_CONFIG_VERSION, buf))
+    abort ();
+  printf (_("\ngrep -P uses PCRE2 %s\n"), buf);
+}
+
 /* Match the already-compiled PCRE pattern against the data in SUBJECT,
    of size SEARCH_BYTES and starting with offset SEARCH_OFFSET, with
    options OPTIONS.
@@ -104,7 +128,7 @@ jit_exec (struct pcre_comp *pc, char const *subject, idx_t search_bytes,
         {
           uint32_t lim;
           pcre2_config (PCRE2_CONFIG_DEPTHLIMIT, &lim);
-          if (INT_MULTIPLY_WRAPV (lim, 2, &lim))
+          if (ckd_mul (&lim, lim, 2))
             return e;
           if (!pc->mcontext)
             pc->mcontext = pcre2_match_context_create (pc->gcontext);
@@ -115,16 +139,11 @@ jit_exec (struct pcre_comp *pc, char const *subject, idx_t search_bytes,
     }
 }
 
-/* Return true if E is an error code for bad UTF-8, and if pcre2_match
-   could return E because PCRE lacks PCRE2_MATCH_INVALID_UTF.  */
+/* Return true if E is an error code for bad UTF-8.  */
 static bool
 bad_utf8_from_pcre2 (int e)
 {
-#ifdef PCRE2_MATCH_INVALID_UTF
-  return false;
-#else
   return PCRE2_ERROR_UTF8_ERR21 <= e && e <= PCRE2_ERROR_UTF8_ERR1;
-#endif
 }
 
 /* Compile the -P style PATTERN, containing SIZE bytes that are
@@ -144,16 +163,29 @@ Pcompile (char *pattern, idx_t size, reg_syntax_t ignored, bool exact)
 
   if (localeinfo.multibyte)
     {
+      uint32_t unicode;
+      if (pcre2_config (PCRE2_CONFIG_UNICODE, &unicode) < 0 || !unicode)
+        die (EXIT_TROUBLE, 0,
+             _("-P supports only unibyte locales on this platform"));
       if (! localeinfo.using_utf8)
         die (EXIT_TROUBLE, 0, _("-P supports only unibyte and UTF-8 locales"));
+
       flags |= PCRE2_UTF;
+
+      /* If supported, consider invalid UTF-8 as a barrier not an error.  */
+      flags |= MATCH_INVALID_UTF;
+
+      /* If PCRE2_EXTRA_ASCII_BSD is available, use PCRE2_UCP
+         so that \d does not have the undesirable effect of matching
+         non-ASCII digits.  Otherwise (i.e., with PCRE2 10.42 and earlier),
+         escapes like \w have only their ASCII interpretations,
+         but that's better than the confusion that would ensue if \d
+         matched non-ASCII digits.  */
+      flags |= PCRE2_EXTRA_ASCII_BSD ? PCRE2_UCP : 0;
+
 #if 0
       /* Do not match individual code units but only UTF-8.  */
       flags |= PCRE2_NEVER_BACKSLASH_C;
-#endif
-#ifdef PCRE2_MATCH_INVALID_UTF
-      /* Consider invalid UTF-8 as a barrier, instead of error.  */
-      flags |= PCRE2_MATCH_INVALID_UTF;
 #endif
     }
 
@@ -161,12 +193,16 @@ Pcompile (char *pattern, idx_t size, reg_syntax_t ignored, bool exact)
   if (rawmemchr (pattern, '\n') != patlim)
     die (EXIT_TROUBLE, 0, _("the -P option only supports a single pattern"));
 
+#ifdef PCRE2_EXTRA_MATCH_LINE
+  uint32_t extra_options = (PCRE2_EXTRA_ASCII_BSD
+                            | (match_lines ? PCRE2_EXTRA_MATCH_LINE : 0));
+  pcre2_set_compile_extra_options (ccontext, extra_options);
+#endif
+
   void *re_storage = NULL;
   if (match_lines)
     {
-#ifdef PCRE2_EXTRA_MATCH_LINE
-      pcre2_set_compile_extra_options (ccontext, PCRE2_EXTRA_MATCH_LINE);
-#else
+#ifndef PCRE2_EXTRA_MATCH_LINE
       static char const /* These sizes omit trailing NUL.  */
         xprefix[4] = "^(?:", xsuffix[2] = ")$";
       idx_t re_size = size + sizeof xprefix + sizeof xsuffix;
@@ -193,7 +229,9 @@ Pcompile (char *pattern, idx_t size, reg_syntax_t ignored, bool exact)
       size = re_size;
     }
 
-  pcre2_set_character_tables (ccontext, pcre2_maketables (gcontext));
+  if (!localeinfo.multibyte)
+    pcre2_set_character_tables (ccontext, pcre2_maketables (gcontext));
+
   pc->cre = pcre2_compile ((PCRE2_SPTR) pattern, size, flags,
                            &ec, &e, ccontext);
   if (!pc->cre)
@@ -210,9 +248,9 @@ Pcompile (char *pattern, idx_t size, reg_syntax_t ignored, bool exact)
   pc->mcontext = NULL;
   pc->data = pcre2_match_data_create_from_pattern (pc->cre, gcontext);
 
-  ec = pcre2_jit_compile (pc->cre, PCRE2_JIT_COMPLETE);
-  if (ec && ec != PCRE2_ERROR_JIT_BADOPTION && ec != PCRE2_ERROR_NOMEMORY)
-    die (EXIT_TROUBLE, 0, _("JIT internal error: %d"), ec);
+  /* Ignore any failure return from pcre2_jit_compile, as that merely
+     means JIT won't be used during matching.  */
+  pcre2_jit_compile (pc->cre, PCRE2_JIT_COMPLETE);
 
   /* The PCRE documentation says that a 32 KiB stack is the default.  */
   pc->jit_stack = NULL;
@@ -280,7 +318,7 @@ Pexecute (void *vcp, char const *buf, idx_t size, idx_t *match_size,
 
           e = jit_exec (pc, subject, line_end - subject,
                         search_offset, options);
-          if (!bad_utf8_from_pcre2 (e))
+          if (MATCH_INVALID_UTF || !bad_utf8_from_pcre2 (e))
             break;
 
           idx_t valid_bytes = pcre2_get_startchar (pc->data);
diff --git a/src/search.h b/src/search.h
index 1f548d94..ebb9d070 100644
--- a/src/search.h
+++ b/src/search.h
@@ -1,5 +1,5 @@
 /* search.c - searching subroutines using dfa, kwset and regex for grep.
-   Copyright 1992, 1998, 2000, 2007, 2009-2022 Free Software Foundation, Inc.
+   Copyright 1992, 1998, 2000, 2007, 2009-2023 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
@@ -65,6 +65,7 @@ extern ptrdiff_t Fexecute (void *, char const *, idx_t, idx_t *, char const *);
 /* pcresearch.c */
 extern void *Pcompile (char *, idx_t, reg_syntax_t, bool);
 extern ptrdiff_t Pexecute (void *, char const *, idx_t, idx_t *, char const *);
+extern void Pprint_version (void);
 
 /* grep.c */
 extern struct localeinfo localeinfo;
diff --git a/src/searchutils.c b/src/searchutils.c
index ed621807..84f79c8f 100644
--- a/src/searchutils.c
+++ b/src/searchutils.c
@@ -1,5 +1,5 @@
 /* searchutils.c - helper subroutines for grep's matchers.
-   Copyright 1992, 1998, 2000, 2007, 2009-2022 Free Software Foundation, Inc.
+   Copyright 1992, 1998, 2000, 2007, 2009-2023 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/src/system.h b/src/system.h
index 80257737..47c458f3 100644
--- a/src/system.h
+++ b/src/system.h
@@ -1,5 +1,5 @@
 /* Portability cruft.  Include after config.h and sys/types.h.
-   Copyright 1996, 1998-2000, 2007, 2009-2022 Free Software Foundation, Inc.
+   Copyright 1996, 1998-2000, 2007, 2009-2023 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/tests/Coreutils.pm b/tests/Coreutils.pm
index 031b6d9b..7fa1fb47 100644
--- a/tests/Coreutils.pm
+++ b/tests/Coreutils.pm
@@ -1,7 +1,7 @@
 package Coreutils;
 # This is a testing framework.
 
-# Copyright (C) 1998-2015, 2017-2022 Free Software Foundation, Inc.
+# Copyright (C) 1998-2015, 2017-2023 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/tests/CuSkip.pm b/tests/CuSkip.pm
index ff28ecd4..3641adf1 100644
--- a/tests/CuSkip.pm
+++ b/tests/CuSkip.pm
@@ -1,7 +1,7 @@
 package CuSkip;
 # Skip a test: emit diag to log and to stderr, and exit 77
 
-# Copyright (C) 2011-2015, 2017-2022 Free Software Foundation, Inc.
+# Copyright (C) 2011-2015, 2017-2023 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/tests/CuTmpdir.pm b/tests/CuTmpdir.pm
index 7b38b2dc..4e8d99f8 100644
--- a/tests/CuTmpdir.pm
+++ b/tests/CuTmpdir.pm
@@ -1,7 +1,7 @@
 package CuTmpdir;
 # create, then chdir into a temporary sub-directory
 
-# Copyright (C) 2007-2015, 2017-2022 Free Software Foundation, Inc.
+# Copyright (C) 2007-2015, 2017-2023 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/tests/Makefile.am b/tests/Makefile.am
index c0dd4040..9b4422eb 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,5 +1,5 @@
 ## Process this file with automake to create Makefile.in
-# Copyright 1997-1998, 2005-2022 Free Software Foundation, Inc.
+# Copyright 1997-1998, 2005-2023 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
@@ -46,13 +46,19 @@ LDADD = ../lib/libgreputils.a $(LIBINTL) ../lib/libgreputils.a
 # The triple-backref test is expected to fail with both the system
 # matcher (i.e., with glibc) and with the included matcher.
 # Both matchers need to be fixed.
-# FIXME-2015: Remove this once the glibc and gnulib bugs are fixed.
+# FIXME-2025: Remove this once the glibc and gnulib bugs are fixed.
 XFAIL_TESTS = triple-backref
 
+# The glibc-infloop test is expected to fail with both the system
+# matcher (i.e., with glibc) and with the included matcher.
+# Both matchers need to be fixed.
+# FIXME-2025: Remove this once the glibc and gnulib bugs are fixed.
+XFAIL_TESTS += glibc-infloop
+
 # Equivalence classes are only supported when using the system
 # matcher (which means only with glibc).
 # The included matcher needs to be fixed.
-# FIXME-2015: Remove this once the gnulib bug is fixed.
+# FIXME-2025: Remove this once the gnulib bug is fixed.
 if USE_INCLUDED_REGEX
 XFAIL_TESTS += equiv-classes
 else
@@ -108,6 +114,7 @@ TESTS =						\
   fillbuf-long-line				\
   fmbtest					\
   foad1						\
+  glibc-infloop					\
   grep-dev-null					\
   grep-dev-null-out				\
   grep-dir					\
@@ -139,6 +146,7 @@ TESTS =						\
   options					\
   pcre						\
   pcre-abort					\
+  pcre-ascii-digits				\
   pcre-context					\
   pcre-count					\
   pcre-infloop					\
@@ -147,6 +155,8 @@ TESTS =						\
   pcre-jitstack					\
   pcre-o					\
   pcre-utf8					\
+  pcre-utf8-bug224				\
+  pcre-utf8-w					\
   pcre-w					\
   pcre-wx-backref				\
   pcre-z					\
@@ -176,11 +186,13 @@ TESTS =						\
   unibyte-bracket-expr				\
   unibyte-negated-circumflex			\
   utf8-bracket					\
+  version-pcre					\
   warn-char-classes				\
   word-delim-multibyte				\
   word-multi-file				\
   word-multibyte				\
   write-error-msg				\
+  y2038-vs-32-bit				\
   yesno						\
   z-anchor-newline
 
@@ -251,6 +263,7 @@ TESTS_ENVIRONMENT =				\
   srcdir='$(srcdir)'				\
   top_srcdir='$(top_srcdir)'			\
   CC='$(CC)'					\
+  CONFIG_HEADER='$(abs_top_builddir)/$(CONFIG_INCLUDE)' \
   GREP_TEST_NAME=`echo $$tst|sed 's,^\./,,;s,/,-,g'` \
   MAKE=$(MAKE)					\
   MALLOC_PERTURB_=$(MALLOC_PERTURB_)		\
diff --git a/tests/Makefile.in b/tests/Makefile.in
index db48e5a0..8ae7bb47 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -1,7 +1,7 @@
 # Makefile.in generated by automake 1.16i from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2022 Free Software Foundation, Inc.
+# Copyright (C) 1994-2023 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,7 +14,7 @@
 
 @SET_MAKE@
 
-# Copyright 1997-1998, 2005-2022 Free Software Foundation, Inc.
+# Copyright 1997-1998, 2005-2023 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
@@ -86,9 +86,6 @@ am__make_dryrun = (target_option=n; $(am__make_running_with_option))
 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 am__rm_f = rm -f $(am__rm_f_notfound)
 am__rm_rf = rm -rf $(am__rm_f_notfound)
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
@@ -108,7 +105,7 @@ check_PROGRAMS = get-mb-cur-max$(EXEEXT)
 # Equivalence classes are only supported when using the system
 # matcher (which means only with glibc).
 # The included matcher needs to be fixed.
-# FIXME-2015: Remove this once the gnulib bug is fixed.
+# FIXME-2025: Remove this once the gnulib bug is fixed.
 @USE_INCLUDED_REGEX_TRUE@am__append_1 = equiv-classes
 subdir = tests
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -117,7 +114,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
 	$(top_srcdir)/m4/absolute-header.m4 $(top_srcdir)/m4/alloca.m4 \
 	$(top_srcdir)/m4/arpa_inet_h.m4 \
 	$(top_srcdir)/m4/asm-underscore.m4 $(top_srcdir)/m4/assert.m4 \
-	$(top_srcdir)/m4/btowc.m4 $(top_srcdir)/m4/builtin-expect.m4 \
+	$(top_srcdir)/m4/assert_h.m4 $(top_srcdir)/m4/btowc.m4 \
+	$(top_srcdir)/m4/build-to-host.m4 \
+	$(top_srcdir)/m4/builtin-expect.m4 $(top_srcdir)/m4/c-bool.m4 \
 	$(top_srcdir)/m4/c-stack.m4 $(top_srcdir)/m4/calloc.m4 \
 	$(top_srcdir)/m4/chdir-long.m4 $(top_srcdir)/m4/close.m4 \
 	$(top_srcdir)/m4/closedir.m4 $(top_srcdir)/m4/codeset.m4 \
@@ -128,12 +127,13 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
 	$(top_srcdir)/m4/double-slash-root.m4 $(top_srcdir)/m4/dup.m4 \
 	$(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \
 	$(top_srcdir)/m4/environ.m4 $(top_srcdir)/m4/errno_h.m4 \
-	$(top_srcdir)/m4/error.m4 $(top_srcdir)/m4/exponentd.m4 \
-	$(top_srcdir)/m4/extensions.m4 \
+	$(top_srcdir)/m4/error.m4 $(top_srcdir)/m4/error_h.m4 \
+	$(top_srcdir)/m4/exponentd.m4 $(top_srcdir)/m4/extensions.m4 \
 	$(top_srcdir)/m4/extern-inline.m4 $(top_srcdir)/m4/fchdir.m4 \
-	$(top_srcdir)/m4/fcntl-o.m4 $(top_srcdir)/m4/fcntl-safer.m4 \
-	$(top_srcdir)/m4/fcntl.m4 $(top_srcdir)/m4/fcntl_h.m4 \
-	$(top_srcdir)/m4/fdopen.m4 $(top_srcdir)/m4/fdopendir.m4 \
+	$(top_srcdir)/m4/fclose.m4 $(top_srcdir)/m4/fcntl-o.m4 \
+	$(top_srcdir)/m4/fcntl-safer.m4 $(top_srcdir)/m4/fcntl.m4 \
+	$(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fdopen.m4 \
+	$(top_srcdir)/m4/fdopendir.m4 $(top_srcdir)/m4/fflush.m4 \
 	$(top_srcdir)/m4/filenamecat.m4 $(top_srcdir)/m4/flexmember.m4 \
 	$(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fnmatch.m4 \
 	$(top_srcdir)/m4/fnmatch_h.m4 $(top_srcdir)/m4/fopen.m4 \
@@ -214,35 +214,34 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
 	$(top_srcdir)/m4/stack-direction.m4 \
 	$(top_srcdir)/m4/stat-time.m4 $(top_srcdir)/m4/stat.m4 \
 	$(top_srcdir)/m4/stdalign.m4 $(top_srcdir)/m4/stdarg.m4 \
-	$(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stddef_h.m4 \
-	$(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/stdint_h.m4 \
-	$(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \
-	$(top_srcdir)/m4/stpcpy.m4 $(top_srcdir)/m4/strdup.m4 \
-	$(top_srcdir)/m4/strerror.m4 $(top_srcdir)/m4/strerror_r.m4 \
-	$(top_srcdir)/m4/string_h.m4 $(top_srcdir)/m4/strnlen.m4 \
-	$(top_srcdir)/m4/strstr.m4 $(top_srcdir)/m4/strtoimax.m4 \
-	$(top_srcdir)/m4/strtoll.m4 $(top_srcdir)/m4/strtoull.m4 \
-	$(top_srcdir)/m4/strtoumax.m4 $(top_srcdir)/m4/symlink.m4 \
-	$(top_srcdir)/m4/sys_ioctl_h.m4 \
+	$(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \
+	$(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/stdio_h.m4 \
+	$(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/stpcpy.m4 \
+	$(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \
+	$(top_srcdir)/m4/strerror_r.m4 $(top_srcdir)/m4/string_h.m4 \
+	$(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/strstr.m4 \
+	$(top_srcdir)/m4/strtoimax.m4 $(top_srcdir)/m4/strtoll.m4 \
+	$(top_srcdir)/m4/strtoull.m4 $(top_srcdir)/m4/strtoumax.m4 \
+	$(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_ioctl_h.m4 \
 	$(top_srcdir)/m4/sys_select_h.m4 \
 	$(top_srcdir)/m4/sys_socket_h.m4 \
 	$(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_time_h.m4 \
 	$(top_srcdir)/m4/sys_types_h.m4 $(top_srcdir)/m4/sys_uio_h.m4 \
 	$(top_srcdir)/m4/thread.m4 $(top_srcdir)/m4/threadlib.m4 \
-	$(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/unistd-safer.m4 \
-	$(top_srcdir)/m4/unistd_h.m4 $(top_srcdir)/m4/unlocked-io.m4 \
-	$(top_srcdir)/m4/vasnprintf.m4 $(top_srcdir)/m4/version-etc.m4 \
-	$(top_srcdir)/m4/visibility.m4 $(top_srcdir)/m4/warn-on-use.m4 \
-	$(top_srcdir)/m4/warnings.m4 $(top_srcdir)/m4/wchar_h.m4 \
-	$(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wcrtomb.m4 \
-	$(top_srcdir)/m4/wctob.m4 $(top_srcdir)/m4/wctomb.m4 \
-	$(top_srcdir)/m4/wctype_h.m4 $(top_srcdir)/m4/wcwidth.m4 \
+	$(top_srcdir)/m4/time.m4 $(top_srcdir)/m4/time_h.m4 \
+	$(top_srcdir)/m4/unistd-safer.m4 $(top_srcdir)/m4/unistd_h.m4 \
+	$(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/vasnprintf.m4 \
+	$(top_srcdir)/m4/version-etc.m4 $(top_srcdir)/m4/visibility.m4 \
+	$(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/warnings.m4 \
+	$(top_srcdir)/m4/wchar_h.m4 $(top_srcdir)/m4/wchar_t.m4 \
+	$(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wctob.m4 \
+	$(top_srcdir)/m4/wctomb.m4 $(top_srcdir)/m4/wctype_h.m4 \
+	$(top_srcdir)/m4/wcwidth.m4 \
 	$(top_srcdir)/m4/windows-stat-inodes.m4 \
 	$(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/wmemchr.m4 \
 	$(top_srcdir)/m4/wmempcpy.m4 $(top_srcdir)/m4/xalloc.m4 \
 	$(top_srcdir)/m4/xsize.m4 $(top_srcdir)/m4/xstrtol.m4 \
-	$(top_srcdir)/m4/year2038.m4 $(top_srcdir)/m4/zzgnulib.m4 \
-	$(top_srcdir)/configure.ac
+	$(top_srcdir)/m4/zzgnulib.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
@@ -518,6 +517,9 @@ am__DIST_COMMON = $(srcdir)/Makefile.in \
 	$(top_srcdir)/build-aux/depcomp \
 	$(top_srcdir)/build-aux/test-driver
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+pkgdatadir = @pkgdatadir@
+pkgincludedir = @pkgincludedir@
+pkglibdir = @pkglibdir@
 pkglibexecdir = @pkglibexecdir@
 ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
@@ -527,6 +529,7 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
 AR = @AR@
 ARFLAGS = @ARFLAGS@
+ASSERT_H = @ASSERT_H@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -549,6 +552,7 @@ CTAGS = @CTAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DIR_HAS_FD_MEMBER = @DIR_HAS_FD_MEMBER@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
@@ -559,6 +563,7 @@ ENOLINK_VALUE = @ENOLINK_VALUE@
 EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
 EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
 ERRNO_H = @ERRNO_H@
+ERROR_H = @ERROR_H@
 ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FLOAT_H = @FLOAT_H@
@@ -659,6 +664,7 @@ GL_GNULIB_GETPAGESIZE = @GL_GNULIB_GETPAGESIZE@
 GL_GNULIB_GETPASS = @GL_GNULIB_GETPASS@
 GL_GNULIB_GETPASS_GNU = @GL_GNULIB_GETPASS_GNU@
 GL_GNULIB_GETPEERNAME = @GL_GNULIB_GETPEERNAME@
+GL_GNULIB_GETPROGNAME = @GL_GNULIB_GETPROGNAME@
 GL_GNULIB_GETSOCKNAME = @GL_GNULIB_GETSOCKNAME@
 GL_GNULIB_GETSOCKOPT = @GL_GNULIB_GETSOCKOPT@
 GL_GNULIB_GETSUBOPT = @GL_GNULIB_GETSUBOPT@
@@ -710,6 +716,7 @@ GL_GNULIB_MBSSEP = @GL_GNULIB_MBSSEP@
 GL_GNULIB_MBSSPN = @GL_GNULIB_MBSSPN@
 GL_GNULIB_MBSSTR = @GL_GNULIB_MBSSTR@
 GL_GNULIB_MBSTOK_R = @GL_GNULIB_MBSTOK_R@
+GL_GNULIB_MBSTOWCS = @GL_GNULIB_MBSTOWCS@
 GL_GNULIB_MBTOWC = @GL_GNULIB_MBTOWC@
 GL_GNULIB_MDA_ACCESS = @GL_GNULIB_MDA_ACCESS@
 GL_GNULIB_MDA_CHDIR = @GL_GNULIB_MDA_CHDIR@
@@ -756,6 +763,7 @@ GL_GNULIB_MEMCHR = @GL_GNULIB_MEMCHR@
 GL_GNULIB_MEMMEM = @GL_GNULIB_MEMMEM@
 GL_GNULIB_MEMPCPY = @GL_GNULIB_MEMPCPY@
 GL_GNULIB_MEMRCHR = @GL_GNULIB_MEMRCHR@
+GL_GNULIB_MEMSET_EXPLICIT = @GL_GNULIB_MEMSET_EXPLICIT@
 GL_GNULIB_MKDIR = @GL_GNULIB_MKDIR@
 GL_GNULIB_MKDIRAT = @GL_GNULIB_MKDIRAT@
 GL_GNULIB_MKDTEMP = @GL_GNULIB_MKDTEMP@
@@ -880,6 +888,7 @@ GL_GNULIB_STRVERSCMP = @GL_GNULIB_STRVERSCMP@
 GL_GNULIB_SYMLINK = @GL_GNULIB_SYMLINK@
 GL_GNULIB_SYMLINKAT = @GL_GNULIB_SYMLINKAT@
 GL_GNULIB_SYSTEM_POSIX = @GL_GNULIB_SYSTEM_POSIX@
+GL_GNULIB_TIME = @GL_GNULIB_TIME@
 GL_GNULIB_TIMEGM = @GL_GNULIB_TIMEGM@
 GL_GNULIB_TIMESPEC_GET = @GL_GNULIB_TIMESPEC_GET@
 GL_GNULIB_TIMESPEC_GETRES = @GL_GNULIB_TIMESPEC_GETRES@
@@ -956,6 +965,7 @@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
 GNULIB_TEST_WARN_CFLAGS = @GNULIB_TEST_WARN_CFLAGS@
 GNULIB_WARN_CFLAGS = @GNULIB_WARN_CFLAGS@
 GREP = @GREP@
+HARD_LOCALE_LIB = @HARD_LOCALE_LIB@
 HAVE_ACCEPT4 = @HAVE_ACCEPT4@
 HAVE_ALIGNED_ALLOC = @HAVE_ALIGNED_ALLOC@
 HAVE_ALLOCA_H = @HAVE_ALLOCA_H@
@@ -990,6 +1000,7 @@ HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@
 HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
 HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
 HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
+HAVE_DECL_GETW = @HAVE_DECL_GETW@
 HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@
 HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@
 HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@
@@ -999,6 +1010,8 @@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@
 HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
 HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
 HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@
+HAVE_DECL_PROGRAM_INVOCATION_NAME = @HAVE_DECL_PROGRAM_INVOCATION_NAME@
+HAVE_DECL_PUTW = @HAVE_DECL_PUTW@
 HAVE_DECL_SETENV = @HAVE_DECL_SETENV@
 HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@
 HAVE_DECL_SETSTATE = @HAVE_DECL_SETSTATE@
@@ -1022,6 +1035,9 @@ HAVE_DIRENT_H = @HAVE_DIRENT_H@
 HAVE_DPRINTF = @HAVE_DPRINTF@
 HAVE_DUP3 = @HAVE_DUP3@
 HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
+HAVE_ERROR = @HAVE_ERROR@
+HAVE_ERROR_AT_LINE = @HAVE_ERROR_AT_LINE@
+HAVE_ERROR_H = @HAVE_ERROR_H@
 HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
 HAVE_EXECVPE = @HAVE_EXECVPE@
 HAVE_EXPLICIT_BZERO = @HAVE_EXPLICIT_BZERO@
@@ -1052,11 +1068,14 @@ HAVE_GETLOGIN = @HAVE_GETLOGIN@
 HAVE_GETOPT_H = @HAVE_GETOPT_H@
 HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
 HAVE_GETPASS = @HAVE_GETPASS@
+HAVE_GETPROGNAME = @HAVE_GETPROGNAME@
 HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
 HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@
 HAVE_GETUMASK = @HAVE_GETUMASK@
 HAVE_GRANTPT = @HAVE_GRANTPT@
 HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
+HAVE_IMAXABS = @HAVE_IMAXABS@
+HAVE_IMAXDIV = @HAVE_IMAXDIV@
 HAVE_IMAXDIV_T = @HAVE_IMAXDIV_T@
 HAVE_INITSTATE = @HAVE_INITSTATE@
 HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
@@ -1084,6 +1103,7 @@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@
 HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@
 HAVE_MBTOWC = @HAVE_MBTOWC@
 HAVE_MEMPCPY = @HAVE_MEMPCPY@
+HAVE_MEMSET_EXPLICIT = @HAVE_MEMSET_EXPLICIT@
 HAVE_MKDIRAT = @HAVE_MKDIRAT@
 HAVE_MKDTEMP = @HAVE_MKDTEMP@
 HAVE_MKFIFO = @HAVE_MKFIFO@
@@ -1246,6 +1266,7 @@ HAVE_TIMESPEC_GETRES = @HAVE_TIMESPEC_GETRES@
 HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@
 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@
 HAVE_UNISTD_H = @HAVE_UNISTD_H@
+HAVE_UNISTRING_WOE32DLL_H = @HAVE_UNISTRING_WOE32DLL_H@
 HAVE_UNLINKAT = @HAVE_UNLINKAT@
 HAVE_UNLOCKPT = @HAVE_UNLOCKPT@
 HAVE_USLEEP = @HAVE_USLEEP@
@@ -1295,7 +1316,6 @@ HAVE_WMEMPCPY = @HAVE_WMEMPCPY@
 HAVE_WMEMSET = @HAVE_WMEMSET@
 HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@
 HAVE_XLOCALE_H = @HAVE_XLOCALE_H@
-HAVE__BOOL = @HAVE__BOOL@
 HAVE__EXIT = @HAVE__EXIT@
 HOST_CPU = @HOST_CPU@
 HOST_CPU_C_ABI = @HOST_CPU_C_ABI@
@@ -1359,16 +1379,21 @@ LTLIBOBJS = @LTLIBOBJS@
 LTLIBSIGSEGV = @LTLIBSIGSEGV@
 LTLIBTHREAD = @LTLIBTHREAD@
 MAKEINFO = @MAKEINFO@
+MBRTOWC_LIB = @MBRTOWC_LIB@
 MKDIR_P = @MKDIR_P@
 MSGFMT = @MSGFMT@
 MSGFMT_015 = @MSGFMT_015@
 MSGMERGE = @MSGMERGE@
+NANOSLEEP_LIB = @NANOSLEEP_LIB@
 NETINET_IN_H = @NETINET_IN_H@
 NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@
+NEXT_ASSERT_H = @NEXT_ASSERT_H@
 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@
+NEXT_AS_FIRST_DIRECTIVE_ASSERT_H = @NEXT_AS_FIRST_DIRECTIVE_ASSERT_H@
 NEXT_AS_FIRST_DIRECTIVE_CTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_CTYPE_H@
 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@
 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
+NEXT_AS_FIRST_DIRECTIVE_ERROR_H = @NEXT_AS_FIRST_DIRECTIVE_ERROR_H@
 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@
 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@
 NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H = @NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H@
@@ -1402,6 +1427,7 @@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@
 NEXT_CTYPE_H = @NEXT_CTYPE_H@
 NEXT_DIRENT_H = @NEXT_DIRENT_H@
 NEXT_ERRNO_H = @NEXT_ERRNO_H@
+NEXT_ERROR_H = @NEXT_ERROR_H@
 NEXT_FCNTL_H = @NEXT_FCNTL_H@
 NEXT_FLOAT_H = @NEXT_FLOAT_H@
 NEXT_FNMATCH_H = @NEXT_FNMATCH_H@
@@ -1452,6 +1478,7 @@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
 PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
 PRIPTR_PREFIX = @PRIPTR_PREFIX@
 PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
+PTHREAD_SIGMASK_LIB = @PTHREAD_SIGMASK_LIB@
 PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
 RANLIB = @RANLIB@
 REPLACE_ACCESS = @REPLACE_ACCESS@
@@ -1471,7 +1498,10 @@ REPLACE_DIRFD = @REPLACE_DIRFD@
 REPLACE_DPRINTF = @REPLACE_DPRINTF@
 REPLACE_DUP = @REPLACE_DUP@
 REPLACE_DUP2 = @REPLACE_DUP2@
+REPLACE_DUP3 = @REPLACE_DUP3@
 REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
+REPLACE_ERROR = @REPLACE_ERROR@
+REPLACE_ERROR_AT_LINE = @REPLACE_ERROR_AT_LINE@
 REPLACE_EXECL = @REPLACE_EXECL@
 REPLACE_EXECLE = @REPLACE_EXECLE@
 REPLACE_EXECLP = @REPLACE_EXECLP@
@@ -1484,6 +1514,7 @@ REPLACE_FCHMODAT = @REPLACE_FCHMODAT@
 REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
 REPLACE_FCLOSE = @REPLACE_FCLOSE@
 REPLACE_FCNTL = @REPLACE_FCNTL@
+REPLACE_FDATASYNC = @REPLACE_FDATASYNC@
 REPLACE_FDOPEN = @REPLACE_FDOPEN@
 REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@
 REPLACE_FFLUSH = @REPLACE_FFLUSH@
@@ -1508,17 +1539,23 @@ REPLACE_GETCWD = @REPLACE_GETCWD@
 REPLACE_GETDELIM = @REPLACE_GETDELIM@
 REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
 REPLACE_GETDTABLESIZE = @REPLACE_GETDTABLESIZE@
+REPLACE_GETENTROPY = @REPLACE_GETENTROPY@
 REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
 REPLACE_GETLINE = @REPLACE_GETLINE@
+REPLACE_GETLOADAVG = @REPLACE_GETLOADAVG@
 REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
 REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
 REPLACE_GETPASS = @REPLACE_GETPASS@
 REPLACE_GETPASS_FOR_GETPASS_GNU = @REPLACE_GETPASS_FOR_GETPASS_GNU@
+REPLACE_GETPROGNAME = @REPLACE_GETPROGNAME@
+REPLACE_GETSUBOPT = @REPLACE_GETSUBOPT@
 REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
 REPLACE_GMTIME = @REPLACE_GMTIME@
 REPLACE_ICONV = @REPLACE_ICONV@
 REPLACE_ICONV_OPEN = @REPLACE_ICONV_OPEN@
 REPLACE_ICONV_UTF = @REPLACE_ICONV_UTF@
+REPLACE_IMAXABS = @REPLACE_IMAXABS@
+REPLACE_IMAXDIV = @REPLACE_IMAXDIV@
 REPLACE_INET_NTOP = @REPLACE_INET_NTOP@
 REPLACE_INET_PTON = @REPLACE_INET_PTON@
 REPLACE_INITSTATE = @REPLACE_INITSTATE@
@@ -1545,14 +1582,19 @@ REPLACE_MBSINIT = @REPLACE_MBSINIT@
 REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
 REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
 REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
+REPLACE_MBSTOWCS = @REPLACE_MBSTOWCS@
 REPLACE_MBTOWC = @REPLACE_MBTOWC@
+REPLACE_MB_CUR_MAX = @REPLACE_MB_CUR_MAX@
 REPLACE_MEMCHR = @REPLACE_MEMCHR@
 REPLACE_MEMMEM = @REPLACE_MEMMEM@
+REPLACE_MEMPCPY = @REPLACE_MEMPCPY@
 REPLACE_MKDIR = @REPLACE_MKDIR@
 REPLACE_MKFIFO = @REPLACE_MKFIFO@
 REPLACE_MKFIFOAT = @REPLACE_MKFIFOAT@
 REPLACE_MKNOD = @REPLACE_MKNOD@
 REPLACE_MKNODAT = @REPLACE_MKNODAT@
+REPLACE_MKOSTEMP = @REPLACE_MKOSTEMP@
+REPLACE_MKOSTEMPS = @REPLACE_MKOSTEMPS@
 REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
 REPLACE_MKTIME = @REPLACE_MKTIME@
 REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
@@ -1564,8 +1606,10 @@ REPLACE_OPEN = @REPLACE_OPEN@
 REPLACE_OPENAT = @REPLACE_OPENAT@
 REPLACE_OPENDIR = @REPLACE_OPENDIR@
 REPLACE_PERROR = @REPLACE_PERROR@
+REPLACE_PIPE2 = @REPLACE_PIPE2@
 REPLACE_POPEN = @REPLACE_POPEN@
 REPLACE_POSIX_MEMALIGN = @REPLACE_POSIX_MEMALIGN@
+REPLACE_POSIX_OPENPT = @REPLACE_POSIX_OPENPT@
 REPLACE_PREAD = @REPLACE_PREAD@
 REPLACE_PRINTF = @REPLACE_PRINTF@
 REPLACE_PSELECT = @REPLACE_PSELECT@
@@ -1630,6 +1674,7 @@ REPLACE_RAISE = @REPLACE_RAISE@
 REPLACE_RANDOM = @REPLACE_RANDOM@
 REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
 REPLACE_READ = @REPLACE_READ@
+REPLACE_READDIR = @REPLACE_READDIR@
 REPLACE_READLINK = @REPLACE_READLINK@
 REPLACE_READLINKAT = @REPLACE_READLINKAT@
 REPLACE_REALLOCARRAY = @REPLACE_REALLOCARRAY@
@@ -1639,10 +1684,12 @@ REPLACE_REALPATH = @REPLACE_REALPATH@
 REPLACE_REMOVE = @REPLACE_REMOVE@
 REPLACE_RENAME = @REPLACE_RENAME@
 REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
+REPLACE_REWINDDIR = @REPLACE_REWINDDIR@
 REPLACE_RMDIR = @REPLACE_RMDIR@
 REPLACE_SCHED_YIELD = @REPLACE_SCHED_YIELD@
 REPLACE_SELECT = @REPLACE_SELECT@
 REPLACE_SETENV = @REPLACE_SETENV@
+REPLACE_SETHOSTNAME = @REPLACE_SETHOSTNAME@
 REPLACE_SETLOCALE = @REPLACE_SETLOCALE@
 REPLACE_SETSTATE = @REPLACE_SETSTATE@
 REPLACE_SLEEP = @REPLACE_SLEEP@
@@ -1651,6 +1698,7 @@ REPLACE_SPRINTF = @REPLACE_SPRINTF@
 REPLACE_STAT = @REPLACE_STAT@
 REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@
 REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
+REPLACE_STPCPY = @REPLACE_STPCPY@
 REPLACE_STPNCPY = @REPLACE_STPNCPY@
 REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
 REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@
@@ -1677,7 +1725,9 @@ REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@
 REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@
 REPLACE_SYMLINK = @REPLACE_SYMLINK@
 REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@
+REPLACE_TIME = @REPLACE_TIME@
 REPLACE_TIMEGM = @REPLACE_TIMEGM@
+REPLACE_TIMESPEC_GET = @REPLACE_TIMESPEC_GET@
 REPLACE_TMPFILE = @REPLACE_TMPFILE@
 REPLACE_TOWLOWER = @REPLACE_TOWLOWER@
 REPLACE_TRUNCATE = @REPLACE_TRUNCATE@
@@ -1695,24 +1745,33 @@ REPLACE_VPRINTF = @REPLACE_VPRINTF@
 REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
 REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
 REPLACE_WCRTOMB = @REPLACE_WCRTOMB@
+REPLACE_WCSCMP = @REPLACE_WCSCMP@
 REPLACE_WCSFTIME = @REPLACE_WCSFTIME@
+REPLACE_WCSNCMP = @REPLACE_WCSNCMP@
 REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@
 REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@
+REPLACE_WCSSTR = @REPLACE_WCSSTR@
 REPLACE_WCSTOK = @REPLACE_WCSTOK@
 REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@
 REPLACE_WCTOB = @REPLACE_WCTOB@
 REPLACE_WCTOMB = @REPLACE_WCTOMB@
 REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
+REPLACE_WMEMCMP = @REPLACE_WMEMCMP@
+REPLACE_WMEMPCPY = @REPLACE_WMEMPCPY@
 REPLACE_WRITE = @REPLACE_WRITE@
+REPLACE__EXIT = @REPLACE__EXIT@
+SCHED_YIELD_LIB = @SCHED_YIELD_LIB@
 SED = @SED@
+SELECT_LIB = @SELECT_LIB@
+SETLOCALE_LIB = @SETLOCALE_LIB@
+SETLOCALE_NULL_LIB = @SETLOCALE_NULL_LIB@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 SIGSEGV_H = @SIGSEGV_H@
 SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
 SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
-STDALIGN_H = @STDALIGN_H@
 STDARG_H = @STDARG_H@
-STDBOOL_H = @STDBOOL_H@
+STDCKDINT_H = @STDCKDINT_H@
 STDDEF_H = @STDDEF_H@
 STDINT_H = @STDINT_H@
 STRIP = @STRIP@
@@ -1755,6 +1814,8 @@ am__tar = @am__tar@
 am__untar = @am__untar@
 am__xargs_n = @am__xargs_n@
 bindir = @bindir@
+bindir_c = @bindir_c@
+bindir_c_make = @bindir_c_make@
 build = @build@
 build_alias = @build_alias@
 build_cpu = @build_cpu@
@@ -1762,10 +1823,20 @@ build_os = @build_os@
 build_vendor = @build_vendor@
 builddir = @builddir@
 datadir = @datadir@
+datadir_c = @datadir_c@
+datadir_c_make = @datadir_c_make@
 datarootdir = @datarootdir@
+datarootdir_c = @datarootdir_c@
+datarootdir_c_make = @datarootdir_c_make@
 docdir = @docdir@
+docdir_c = @docdir_c@
+docdir_c_make = @docdir_c_make@
 dvidir = @dvidir@
+dvidir_c = @dvidir_c@
+dvidir_c_make = @dvidir_c_make@
 exec_prefix = @exec_prefix@
+exec_prefix_c = @exec_prefix_c@
+exec_prefix_c_make = @exec_prefix_c_make@
 gl_LIBOBJDEPS = @gl_LIBOBJDEPS@
 gl_LIBOBJS = @gl_LIBOBJS@
 gl_LTLIBOBJS = @gl_LTLIBOBJS@
@@ -1779,26 +1850,68 @@ host_cpu = @host_cpu@
 host_os = @host_os@
 host_vendor = @host_vendor@
 htmldir = @htmldir@
+htmldir_c = @htmldir_c@
+htmldir_c_make = @htmldir_c_make@
 includedir = @includedir@
+includedir_c = @includedir_c@
+includedir_c_make = @includedir_c_make@
 infodir = @infodir@
+infodir_c = @infodir_c@
+infodir_c_make = @infodir_c_make@
 install_sh = @install_sh@
 libdir = @libdir@
+libdir_c = @libdir_c@
+libdir_c_make = @libdir_c_make@
 libexecdir = @libexecdir@
+libexecdir_c = @libexecdir_c@
+libexecdir_c_make = @libexecdir_c_make@
 lispdir = @lispdir@
+lispdir_c = @lispdir_c@
+lispdir_c_make = @lispdir_c_make@
 localedir = @localedir@
+localedir_c = @localedir_c@
+localedir_c_make = @localedir_c_make@
 localstatedir = @localstatedir@
+localstatedir_c = @localstatedir_c@
+localstatedir_c_make = @localstatedir_c_make@
 mandir = @mandir@
+mandir_c = @mandir_c@
+mandir_c_make = @mandir_c_make@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+oldincludedir_c = @oldincludedir_c@
+oldincludedir_c_make = @oldincludedir_c_make@
 pdfdir = @pdfdir@
+pdfdir_c = @pdfdir_c@
+pdfdir_c_make = @pdfdir_c_make@
+pkgdatadir_c = @pkgdatadir_c@
+pkgdatadir_c_make = @pkgdatadir_c_make@
+pkgincludedir_c = @pkgincludedir_c@
+pkgincludedir_c_make = @pkgincludedir_c_make@
+pkglibdir_c = @pkglibdir_c@
+pkglibdir_c_make = @pkglibdir_c_make@
+pkglibexecdir_c = @pkglibexecdir_c@
+pkglibexecdir_c_make = @pkglibexecdir_c_make@
 prefix = @prefix@
+prefix_c = @prefix_c@
+prefix_c_make = @prefix_c_make@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+psdir_c = @psdir_c@
+psdir_c_make = @psdir_c_make@
 runstatedir = @runstatedir@
+runstatedir_c = @runstatedir_c@
+runstatedir_c_make = @runstatedir_c_make@
 sbindir = @sbindir@
+sbindir_c = @sbindir_c@
+sbindir_c_make = @sbindir_c_make@
 sharedstatedir = @sharedstatedir@
+sharedstatedir_c = @sharedstatedir_c@
+sharedstatedir_c_make = @sharedstatedir_c_make@
 srcdir = @srcdir@
 sysconfdir = @sysconfdir@
+sysconfdir_c = @sysconfdir_c@
+sysconfdir_c_make = @sysconfdir_c_make@
 target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
@@ -1829,8 +1942,13 @@ LDADD = ../lib/libgreputils.a $(LIBINTL) ../lib/libgreputils.a
 # The triple-backref test is expected to fail with both the system
 # matcher (i.e., with glibc) and with the included matcher.
 # Both matchers need to be fixed.
-# FIXME-2015: Remove this once the glibc and gnulib bugs are fixed.
-XFAIL_TESTS = triple-backref $(am__append_1)
+# FIXME-2025: Remove this once the glibc and gnulib bugs are fixed.
+
+# The glibc-infloop test is expected to fail with both the system
+# matcher (i.e., with glibc) and with the included matcher.
+# Both matchers need to be fixed.
+# FIXME-2025: Remove this once the glibc and gnulib bugs are fixed.
+XFAIL_TESTS = triple-backref glibc-infloop $(am__append_1)
 # The backref-alt test fails for glibc 2.27 and earlier.
 # If you're using older glibc you can upgrade to glibc 2.28 or later,
 # configure --with-included-regex, or ignore the test failure.
@@ -1881,6 +1999,7 @@ TESTS = \
   fillbuf-long-line				\
   fmbtest					\
   foad1						\
+  glibc-infloop					\
   grep-dev-null					\
   grep-dev-null-out				\
   grep-dir					\
@@ -1912,6 +2031,7 @@ TESTS = \
   options					\
   pcre						\
   pcre-abort					\
+  pcre-ascii-digits				\
   pcre-context					\
   pcre-count					\
   pcre-infloop					\
@@ -1920,6 +2040,8 @@ TESTS = \
   pcre-jitstack					\
   pcre-o					\
   pcre-utf8					\
+  pcre-utf8-bug224				\
+  pcre-utf8-w					\
   pcre-w					\
   pcre-wx-backref				\
   pcre-z					\
@@ -1949,11 +2071,13 @@ TESTS = \
   unibyte-bracket-expr				\
   unibyte-negated-circumflex			\
   utf8-bracket					\
+  version-pcre					\
   warn-char-classes				\
   word-delim-multibyte				\
   word-multi-file				\
   word-multibyte				\
   write-error-msg				\
+  y2038-vs-32-bit				\
   yesno						\
   z-anchor-newline
 
@@ -2024,6 +2148,7 @@ TESTS_ENVIRONMENT = \
   srcdir='$(srcdir)'				\
   top_srcdir='$(top_srcdir)'			\
   CC='$(CC)'					\
+  CONFIG_HEADER='$(abs_top_builddir)/$(CONFIG_INCLUDE)' \
   GREP_TEST_NAME=`echo $$tst|sed 's,^\./,,;s,/,-,g'` \
   MAKE=$(MAKE)					\
   MALLOC_PERTURB_=$(MALLOC_PERTURB_)		\
@@ -2286,13 +2411,12 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
 	$$success || exit 1
 
 check-TESTS: $(check_PROGRAMS)
-	@list='$(RECHECK_LOGS)';           $(am__rm_f) $$list
-	@list='$(RECHECK_LOGS:.log=.trs)'; $(am__rm_f) $$list
+	@$(am__rm_f) $(RECHECK_LOGS)
+	@$(am__rm_f) $(RECHECK_LOGS:.log=.trs)
 	@$(am__rm_f) $(TEST_SUITE_LOG)
 	@set +e; $(am__set_TESTS_bases); \
 	log_list=`for i in $$bases; do echo $$i.log; done`; \
-	trs_list=`for i in $$bases; do echo $$i.trs; done`; \
-	log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
+	log_list=`echo $$log_list`; \
 	$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
 	exit $$?;
 recheck: all $(check_PROGRAMS)
@@ -2621,6 +2745,13 @@ foad1.log: foad1
 	--log-file $$b.log --trs-file $$b.trs \
 	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
 	"$$tst" $(AM_TESTS_FD_REDIRECT)
+glibc-infloop.log: glibc-infloop
+	@p='glibc-infloop'; \
+	b='glibc-infloop'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
 grep-dev-null.log: grep-dev-null
 	@p='grep-dev-null'; \
 	b='grep-dev-null'; \
@@ -2838,6 +2969,13 @@ pcre-abort.log: pcre-abort
 	--log-file $$b.log --trs-file $$b.trs \
 	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
 	"$$tst" $(AM_TESTS_FD_REDIRECT)
+pcre-ascii-digits.log: pcre-ascii-digits
+	@p='pcre-ascii-digits'; \
+	b='pcre-ascii-digits'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
 pcre-context.log: pcre-context
 	@p='pcre-context'; \
 	b='pcre-context'; \
@@ -2894,6 +3032,20 @@ pcre-utf8.log: pcre-utf8
 	--log-file $$b.log --trs-file $$b.trs \
 	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
 	"$$tst" $(AM_TESTS_FD_REDIRECT)
+pcre-utf8-bug224.log: pcre-utf8-bug224
+	@p='pcre-utf8-bug224'; \
+	b='pcre-utf8-bug224'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
+pcre-utf8-w.log: pcre-utf8-w
+	@p='pcre-utf8-w'; \
+	b='pcre-utf8-w'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
 pcre-w.log: pcre-w
 	@p='pcre-w'; \
 	b='pcre-w'; \
@@ -3097,6 +3249,13 @@ utf8-bracket.log: utf8-bracket
 	--log-file $$b.log --trs-file $$b.trs \
 	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
 	"$$tst" $(AM_TESTS_FD_REDIRECT)
+version-pcre.log: version-pcre
+	@p='version-pcre'; \
+	b='version-pcre'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
 warn-char-classes.log: warn-char-classes
 	@p='warn-char-classes'; \
 	b='warn-char-classes'; \
@@ -3132,6 +3291,13 @@ write-error-msg.log: write-error-msg
 	--log-file $$b.log --trs-file $$b.trs \
 	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
 	"$$tst" $(AM_TESTS_FD_REDIRECT)
+y2038-vs-32-bit.log: y2038-vs-32-bit
+	@p='y2038-vs-32-bit'; \
+	b='y2038-vs-32-bit'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
 yesno.log: yesno
 	@p='yesno'; \
 	b='yesno'; \
@@ -3233,9 +3399,9 @@ install-strip:
 	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
 	fi
 mostlyclean-generic:
-	-test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
-	-test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
-	-test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+	-$(am__rm_f) $(TEST_LOGS)
+	-$(am__rm_f) $(TEST_LOGS:.log=.trs)
+	-$(am__rm_f) $(TEST_SUITE_LOG)
 
 clean-generic:
 
@@ -3251,7 +3417,7 @@ clean: clean-am
 clean-am: clean-checkPROGRAMS clean-generic mostlyclean-am
 
 distclean: distclean-am
-		-rm -f ./$(DEPDIR)/get-mb-cur-max.Po
+	-rm -f ./$(DEPDIR)/get-mb-cur-max.Po
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
 	distclean-tags
@@ -3297,7 +3463,7 @@ install-ps-am:
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
-		-rm -f ./$(DEPDIR)/get-mb-cur-max.Po
+	-rm -f ./$(DEPDIR)/get-mb-cur-max.Po
 	-rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic
 
diff --git a/tests/backref b/tests/backref
index 510e130a..ab365889 100755
--- a/tests/backref
+++ b/tests/backref
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Test for back-references and other things.
 #
-# Copyright (C) 2001, 2006, 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2006, 2009-2023 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
@@ -43,4 +43,12 @@ if test $? -ne 2 ; then
         failures=1
 fi
 
+# https://bugs.gnu.org/36148#13
+echo 'Total failed: 2 (1 ignored)' |
+    grep -e '^Total failed: 0$' -e '^Total failed: \([0-9]*\) (\1 ignored)$'
+if test $? -ne 1 ; then
+        echo "Backref: Multiple -e test, test #5 failed"
+        failures=1
+fi
+
 Exit $failures
diff --git a/tests/backref-alt b/tests/backref-alt
index 7c84f6fc..0dbe1e62 100755
--- a/tests/backref-alt
+++ b/tests/backref-alt
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Test for a bug in glibc's regex code as of 2015-09-19.
 #
-# Copyright 2015-2022 Free Software Foundation, Inc.
+# Copyright 2015-2023 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/backslash-dot b/tests/backslash-dot
index 96cd7386..4575d5db 100755
--- a/tests/backslash-dot
+++ b/tests/backslash-dot
@@ -1,7 +1,7 @@
 #! /bin/sh
 # This once failed to match: echo . | grep '\.'
 #
-# Copyright (C) 2020-2022 Free Software Foundation, Inc.
+# Copyright (C) 2020-2023 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/backslash-s-and-repetition-operators b/tests/backslash-s-and-repetition-operators
index 95d933da..7e746f6a 100755
--- a/tests/backslash-s-and-repetition-operators
+++ b/tests/backslash-s-and-repetition-operators
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Ensure that \s and \S work with repetition operators.
 #
-# Copyright (C) 2013-2022 Free Software Foundation, Inc.
+# Copyright (C) 2013-2023 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/backslash-s-vs-invalid-multibyte b/tests/backslash-s-vs-invalid-multibyte
index 3acaea76..b4acfe3d 100755
--- a/tests/backslash-s-vs-invalid-multibyte
+++ b/tests/backslash-s-vs-invalid-multibyte
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Ensure that neither \s nor \S matches an invalid multibyte character.
 #
-# Copyright (C) 2013-2022 Free Software Foundation, Inc.
+# Copyright (C) 2013-2023 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/binary-file-matches b/tests/binary-file-matches
index 16ead1df..d83eacd7 100755
--- a/tests/binary-file-matches
+++ b/tests/binary-file-matches
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Test for the "binary file ... matches" diagnostic.
 #
-# Copyright (C) 2020-2022 Free Software Foundation, Inc.
+# Copyright (C) 2020-2023 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/bre b/tests/bre
index 62435d2c..6c8c40da 100755
--- a/tests/bre
+++ b/tests/bre
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Regression test for GNU grep.
 #
-# Copyright (C) 2001, 2006, 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2006, 2009-2023 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/bre.awk b/tests/bre.awk
index 50c32d27..3ce6998a 100644
--- a/tests/bre.awk
+++ b/tests/bre.awk
@@ -1,4 +1,4 @@
-# Copyright (C) 2001, 2006, 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2006, 2009-2023 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/c-locale b/tests/c-locale
index 525bf16c..d833f759 100755
--- a/tests/c-locale
+++ b/tests/c-locale
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Regression test for GNU grep.
 #
-# Copyright 2016-2022 Free Software Foundation, Inc.
+# Copyright 2016-2023 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/case-fold-titlecase b/tests/case-fold-titlecase
index a920fa82..61c7ea04 100755
--- a/tests/case-fold-titlecase
+++ b/tests/case-fold-titlecase
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Check that case folding works even with titlecase and similarly odd chars.
 
-# Copyright 2014-2022 Free Software Foundation, Inc.
+# Copyright 2014-2023 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
@@ -168,7 +168,7 @@ do
 done
 
 # Try a unibyte test with ISO 8859-7, if available.
-if test "$(get-mb-cur-max el_GR.iso88597)" -eq 1; then
+if test "$(get-mb-cur-max el_GR.iso88597)" = 1; then
   LC_ALL=el_GR.iso88597
   export LC_ALL
 
diff --git a/tests/color-colors b/tests/color-colors
index 39982778..24187c96 100755
--- a/tests/color-colors
+++ b/tests/color-colors
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Check that GREP_COLOR elicits a warning.
 
-# Copyright 2022 Free Software Foundation, Inc.
+# Copyright 2022-2023 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/tests/count-newline b/tests/count-newline
index 964be69e..df8ef078 100755
--- a/tests/count-newline
+++ b/tests/count-newline
@@ -2,7 +2,7 @@
 # Test that newline is counted correctly even when the transition
 # table is rebuilt.
 
-# Copyright 2014-2022 Free Software Foundation, Inc.
+# Copyright 2014-2023 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/tests/dfa-coverage b/tests/dfa-coverage
index b029fe8f..e8f2aaf6 100755
--- a/tests/dfa-coverage
+++ b/tests/dfa-coverage
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Exercise the final reachable code in dfa.c's match_mb_charset.
 
-# Copyright (C) 2012-2022 Free Software Foundation, Inc.
+# Copyright (C) 2012-2023 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/tests/dfa-heap-overrun b/tests/dfa-heap-overrun
index 2435bcf2..2dfc1b96 100755
--- a/tests/dfa-heap-overrun
+++ b/tests/dfa-heap-overrun
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Trigger a heap overrun in grep-2.6..grep-2.8.
 
-# Copyright (C) 2011-2022 Free Software Foundation, Inc.
+# Copyright (C) 2011-2023 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/tests/dfa-invalid-utf8 b/tests/dfa-invalid-utf8
index 5a034feb..9aec9004 100755
--- a/tests/dfa-invalid-utf8
+++ b/tests/dfa-invalid-utf8
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Test whether "grep '.'" matches invalid UTF-8 byte sequences.
 #
-# Copyright 2019-2022 Free Software Foundation, Inc.
+# Copyright 2019-2023 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/empty b/tests/empty
index 44b691d2..48cd1ce5 100755
--- a/tests/empty
+++ b/tests/empty
@@ -2,7 +2,7 @@
 # test that the empty file means no pattern
 # and an empty pattern means match all.
 #
-# Copyright (C) 2001, 2006, 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2006, 2009-2023 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/empty-line-mb b/tests/empty-line-mb
index fd68cfde..c76bcb05 100755
--- a/tests/empty-line-mb
+++ b/tests/empty-line-mb
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Exercise bugs in grep-2.13 with -i, -n and an RE of ^$ in a multi-byte locale.
 #
-# Copyright (C) 2012-2022 Free Software Foundation, Inc.
+# Copyright (C) 2012-2023 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/encoding-error b/tests/encoding-error
index a3c26e75..38ed3cb8 100755
--- a/tests/encoding-error
+++ b/tests/encoding-error
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Test grep's behavior on encoding errors.
 #
-# Copyright 2015-2022 Free Software Foundation, Inc.
+# Copyright 2015-2023 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/envvar-check b/tests/envvar-check
index 56354a0f..0c9a7306 100644
--- a/tests/envvar-check
+++ b/tests/envvar-check
@@ -1,7 +1,7 @@
 # -*- sh -*-
 # Check environment variables for sane values while testing.
 
-# Copyright (C) 2000-2022 Free Software Foundation, Inc.
+# Copyright (C) 2000-2023 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/tests/ere b/tests/ere
index a74e03ce..dcb4778d 100755
--- a/tests/ere
+++ b/tests/ere
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Regression test for GNU grep.
 #
-# Copyright (C) 2001, 2006, 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2006, 2009-2023 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/ere.awk b/tests/ere.awk
index c19237c8..d1c9c0f8 100644
--- a/tests/ere.awk
+++ b/tests/ere.awk
@@ -1,4 +1,4 @@
-# Copyright (C) 2001, 2006, 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2006, 2009-2023 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/false-match-mb-non-utf8 b/tests/false-match-mb-non-utf8
index 65b18c88..abb7f9de 100755
--- a/tests/false-match-mb-non-utf8
+++ b/tests/false-match-mb-non-utf8
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Test for false matches in grep 2.19..2.26 in multibyte, non-UTF8 locales
 #
-# Copyright (C) 2016-2022 Free Software Foundation, Inc.
+# Copyright (C) 2016-2023 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/fgrep-longest b/tests/fgrep-longest
index 4e404527..fe0d1b56 100755
--- a/tests/fgrep-longest
+++ b/tests/fgrep-longest
@@ -2,7 +2,7 @@
 # With multiple matches, grep -Fo could print a shorter one.
 # This bug affected grep versions 2.26 through 2.27.
 #
-# Copyright (C) 2017-2022 Free Software Foundation, Inc.
+# Copyright (C) 2017-2023 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/file b/tests/file
index ce96b316..d1285d80 100755
--- a/tests/file
+++ b/tests/file
@@ -4,7 +4,7 @@
 # grep -F -f pattern_file file
 # grep -G -f pattern_file file
 #
-# Copyright (C) 2001, 2006, 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2006, 2009-2023 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/filename-lineno.pl b/tests/filename-lineno.pl
index a62e5ac4..33a235a6 100755
--- a/tests/filename-lineno.pl
+++ b/tests/filename-lineno.pl
@@ -4,7 +4,7 @@
 # file or line number from which the offending regular expression came.
 # With 2.26, now, each such diagnostic has a "FILENAME:LINENO: " prefix.
 
-# Copyright (C) 2016-2022 Free Software Foundation, Inc.
+# Copyright (C) 2016-2023 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/tests/fmbtest b/tests/fmbtest
index e348062f..e64b6baa 100755
--- a/tests/fmbtest
+++ b/tests/fmbtest
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2006, 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2006, 2009-2023 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
@@ -53,21 +53,21 @@ EOF
 for mode in F G E; do
 
 test1=$(echo $(LC_ALL=$cz grep -${mode} -f cspatfile csinput |
-               tr -cs '0-9' '[ *]'))
+               tr '\n' ' ' | tr -cd '0-9 '))
 if test "$test1" != "11 12 13 14 15 16 17 18"; then
   echo "Test #1 ${mode} failed: $test1"
   failures=1
 fi
 
 test2=$(echo $(LC_ALL=$cz grep -${mode}i -f cspatfile csinput |
-               tr -cs '0-9' '[ *]'))
+               tr '\n' ' ' | tr -cd '0-9 '))
 if test "$test2" != "01 02 07 08 10 11 12 13 14 15 16 17 18 19 20"; then
   echo "Test #2 ${mode} failed: $test2"
   failures=1
 fi
 
 test3=$(echo $(LC_ALL=$cz grep -${mode}i -e 'ČÍšE' -e 'Čas' csinput |
-               tr -cs '0-9' '[ *]'))
+               tr '\n' ' ' | tr -cd '0-9 '))
 if test "$test3" != "01 02 07 08 10 11 12 13 14 15 16 17 18 19 20"; then
   echo "Test #3 ${mode} failed: $test3"
   failures=1
@@ -115,7 +115,7 @@ done
 for mode in G E; do
 
 test8=$(echo $(LC_ALL=$cz grep -${mode}i -e 'Č.šE' -e 'Č[a-f]s' csinput |
-               tr -cs '0-9' '[ *]'))
+               tr '\n' ' ' | tr -cd '0-9 '))
 if test "$test8" != "01 02 07 08 10 11 12 13 14 15 16 17 18 19 20"; then
   echo "Test #8 ${mode} failed: $test8"
   failures=1
diff --git a/tests/foad1 b/tests/foad1
index e13a992f..f10c1d77 100755
--- a/tests/foad1
+++ b/tests/foad1
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Test various combinations of command-line options.
 #
-# Copyright (C) 2001, 2006, 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2006, 2009-2023 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/get-mb-cur-max.c b/tests/get-mb-cur-max.c
index c40126b6..1dde7a72 100644
--- a/tests/get-mb-cur-max.c
+++ b/tests/get-mb-cur-max.c
@@ -1,5 +1,5 @@
 /* Auxiliary program to detect support for a locale.
-   Copyright 2010-2022 Free Software Foundation, Inc.
+   Copyright 2010-2023 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
@@ -21,8 +21,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#include "getprogname.h"
-
 int
 main (int argc, char **argv)
 {
diff --git a/tests/glibc-infloop b/tests/glibc-infloop
new file mode 100755
index 00000000..cc8dc238
--- /dev/null
+++ b/tests/glibc-infloop
@@ -0,0 +1,30 @@
+#!/bin/sh
+# This would infloop when using glibc's regex at least until glibc-2.36.
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+
+require_timeout_
+require_en_utf8_locale_
+
+fail=0
+
+cat <<\EOF > glibc-check.c
+#include <features.h>
+#ifdef __GLIBC__
+int ok;
+#else
+# error "not glibc"
+#endif
+EOF
+$CC -c glibc-check.c && glibc=1 || glibc=0
+
+grep '^#define USE_INCLUDED_REGEX 1' "$CONFIG_HEADER" \
+  && included_regex=1 || included_regex=0
+
+case $glibc:$included_regex in
+  0:0) skip_ 'runs only with glibc or when built with the included regex'
+esac
+
+echo a > in || framework_failure_
+timeout 2 env LC_ALL=en_US.UTF-8 grep -E -w '((()|a)|())*' in || fail=1
+
+Exit $fail
diff --git a/tests/hangul-syllable b/tests/hangul-syllable
index 961875de..481279a2 100755
--- a/tests/hangul-syllable
+++ b/tests/hangul-syllable
@@ -99,6 +99,15 @@ for i in 355; do
     done
   done
 done
+
+# On platforms like 32-bit AIX where WCHAR_MAX == 0xFFFF, skip checks
+# where the corresponding Unicode characters are not supported.
+if test $fail -eq 0; then
+  printf '\360\220\200\200\n' >in || framework_failure_
+  grep '^.$' in >out 2>&1 || fail=1
+  cmp in out || skip_ 'platform does not support U+10000'
+fi
+
 for i in 360; do
   for j in 220 277; do
     for k in 200 277; do
diff --git a/tests/hash-collision-perf b/tests/hash-collision-perf
index 594c5419..2190193a 100755
--- a/tests/hash-collision-perf
+++ b/tests/hash-collision-perf
@@ -2,7 +2,7 @@
 # Test for this performance regression:
 # grep-3.5 and 3.6 would take O(N^2) time for some sets of input regexps.
 
-# Copyright 2020-2022 Free Software Foundation, Inc.
+# Copyright 2020-2023 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/tests/help-version b/tests/help-version
index 29a069f7..031a424b 100755
--- a/tests/help-version
+++ b/tests/help-version
@@ -2,7 +2,7 @@
 # Make sure all of these programs work properly
 # when invoked with --help or --version.
 
-# Copyright (C) 2000-2022 Free Software Foundation, Inc.
+# Copyright (C) 2000-2023 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/tests/high-bit-range b/tests/high-bit-range
index 6e129ce9..8bb55354 100755
--- a/tests/high-bit-range
+++ b/tests/high-bit-range
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Exercise high-bit-set unibyte-in-[...]-range bug.
 
-# Copyright (C) 2011-2022 Free Software Foundation, Inc.
+# Copyright (C) 2011-2023 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/tests/init.cfg b/tests/init.cfg
index 515482c6..4aa56ead 100644
--- a/tests/init.cfg
+++ b/tests/init.cfg
@@ -48,10 +48,18 @@ require_timeout_()
 
 require_pcre_()
 {
-  echo . | grep -P . 2>err || {
-    test $? -eq 1 && fail_ PCRE available, but does not work.
-    skip_ no PCRE support
-  }
+  case $LC_ALL in
+    *.UTF-8)
+      printf '\303\241\n' | grep -P '^.$' 2>err || {
+        test $? -eq 1 && fail_ PCRE available, but does not work
+        skip_ no PCRE Unicode support
+      };;
+    *)
+      echo . | grep -P '^.$' 2>err || {
+        test $? -eq 1 && fail_ PCRE available, but does not work.
+        skip_ no PCRE support
+      };;
+  esac
   compare /dev/null err || fail_ PCRE available, but stderr not empty.
 }
 
diff --git a/tests/init.sh b/tests/init.sh
index d5d37c98..0494097e 100644
--- a/tests/init.sh
+++ b/tests/init.sh
@@ -1,6 +1,6 @@
 # source this file; set up for tests
 
-# Copyright (C) 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2009-2023 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
@@ -646,18 +646,19 @@ compare_dev_null_ ()
 
 for diff_opt_ in -u -U3 -c '' no; do
   test "$diff_opt_" != no &&
-    diff_out_=`exec 2>/dev/null; diff $diff_opt_ "$0" "$0" < /dev/null` &&
+    diff_out_=`exec 2>/dev/null
+      LC_ALL=C diff $diff_opt_ "$0" "$0" < /dev/null` &&
     break
 done
 if test "$diff_opt_" != no; then
   if test -z "$diff_out_"; then
-    compare_ () { diff $diff_opt_ "$@"; }
+    compare_ () { LC_ALL=C diff $diff_opt_ "$@"; }
   else
     compare_ ()
     {
       # If no differences were found, AIX and HP-UX 'diff' produce output
       # like "No differences encountered".  Hide this output.
-      diff $diff_opt_ "$@" > diff.out
+      LC_ALL=C diff $diff_opt_ "$@" > diff.out
       diff_status_=$?
       test $diff_status_ -eq 0 || cat diff.out || diff_status_=2
       rm -f diff.out || diff_status_=2
@@ -702,4 +703,4 @@ test -f "$srcdir/init.cfg" \
 setup_ "$@"
 # This trap is here, rather than in the setup_ function, because some
 # shells run the exit trap at shell function exit, rather than script exit.
-trap remove_tmp_ 0
+trap remove_tmp_ EXIT
diff --git a/tests/initial-tab b/tests/initial-tab
index 16d90755..10ed38df 100755
--- a/tests/initial-tab
+++ b/tests/initial-tab
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Exercise -T.
 
-# Copyright 2016-2022 Free Software Foundation, Inc.
+# Copyright 2016-2023 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/tests/khadafy b/tests/khadafy
index 1b78dd5a..7ea9a4a6 100755
--- a/tests/khadafy
+++ b/tests/khadafy
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Regression test for GNU grep.
 #
-# Copyright (C) 2001, 2006, 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2006, 2009-2023 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/kwset-abuse b/tests/kwset-abuse
index 632b4a9f..6cc5394f 100755
--- a/tests/kwset-abuse
+++ b/tests/kwset-abuse
@@ -2,7 +2,7 @@
 # Evoke a segfault in a hard-to-reach code path of kwset.c.
 # This bug affected grep versions 2.19 through 2.21.
 #
-# Copyright (C) 2015-2022 Free Software Foundation, Inc.
+# Copyright (C) 2015-2023 Free Software Foundation, Inc.
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/tests/long-pattern-perf b/tests/long-pattern-perf
index 39ba63b7..5e9e6e9b 100755
--- a/tests/long-pattern-perf
+++ b/tests/long-pattern-perf
@@ -1,7 +1,7 @@
 #!/bin/sh
 # grep-2.21 would incur a 100x penalty for 10x increase in regexp length
 
-# Copyright 2015-2022 Free Software Foundation, Inc.
+# Copyright 2015-2023 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
@@ -42,7 +42,7 @@ base_ms=$(cat base-ms)
 # mem requirements of the 2nd test, and the latter ended up taking >35x
 # more time than the base case. Skipping this test for any system using
 # more than this many milliseconds for the first case should avoid those
-# false-postitive failures while skipping the test on few other systems.
+# false-positive failures while skipping the test on few other systems.
 test 800 -lt "$base_ms" && skip_ "this base-case test took too long"
 
 returns_ 0 user_time_ 1 grep -f re-10x in > b10x-ms \
diff --git a/tests/many-regex-performance b/tests/many-regex-performance
index 4a5adacd..09c84f33 100755
--- a/tests/many-regex-performance
+++ b/tests/many-regex-performance
@@ -3,7 +3,7 @@
 # grep-3.4 would require O(N^2) RSS for N regexps
 # grep-3.5 requires O(N) in the most common cases.
 
-# Copyright 2020-2022 Free Software Foundation, Inc.
+# Copyright 2020-2023 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/tests/match-lines b/tests/match-lines
index d0fc9177..4be1c575 100755
--- a/tests/match-lines
+++ b/tests/match-lines
@@ -3,7 +3,7 @@
 # grep -F -x -o PAT print an extra newline for each match.
 # This would fail for grep-2.19 and grep-2.20.
 
-# Copyright 2014-2022 Free Software Foundation, Inc.
+# Copyright 2014-2023 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/tests/mb-dot-newline b/tests/mb-dot-newline
index 061c493a..28a8c40e 100755
--- a/tests/mb-dot-newline
+++ b/tests/mb-dot-newline
@@ -2,7 +2,7 @@
 # Trigger a bug in the DFA matcher.
 # This would fail for grep-2.20.
 
-# Copyright 2014-2022 Free Software Foundation, Inc.
+# Copyright 2014-2023 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/tests/mb-non-UTF8-overrun b/tests/mb-non-UTF8-overrun
index 49212877..1ce8997e 100755
--- a/tests/mb-non-UTF8-overrun
+++ b/tests/mb-non-UTF8-overrun
@@ -2,7 +2,7 @@
 # grep would sometimes read beyond end of input, when using a non-UTF8
 # multibyte locale.
 
-# Copyright 2014-2022 Free Software Foundation, Inc.
+# Copyright 2014-2023 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/tests/mb-non-UTF8-perf-Fw b/tests/mb-non-UTF8-perf-Fw
index d46bce38..504dc5f7 100755
--- a/tests/mb-non-UTF8-perf-Fw
+++ b/tests/mb-non-UTF8-perf-Fw
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Test for a performance regression with -Fw and a non-UTF8 multibyte locale.
 
-# Copyright 2019-2022 Free Software Foundation, Inc.
+# Copyright 2019-2023 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/tests/mb-non-UTF8-performance b/tests/mb-non-UTF8-performance
index f3b33afe..de448aca 100755
--- a/tests/mb-non-UTF8-performance
+++ b/tests/mb-non-UTF8-performance
@@ -3,7 +3,7 @@
 # The 200x is on an Intel i7-based system.
 # On an AMD FX-4100, it would take up to 2500x longer.
 
-# Copyright 2014-2022 Free Software Foundation, Inc.
+# Copyright 2014-2023 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/tests/mb-non-UTF8-word-boundary b/tests/mb-non-UTF8-word-boundary
index 384a5920..39ea5487 100755
--- a/tests/mb-non-UTF8-word-boundary
+++ b/tests/mb-non-UTF8-word-boundary
@@ -1,7 +1,7 @@
 #!/bin/sh
 # grep -Fw could false-match when using a non-UTF8 multibyte locale.
 
-# Copyright 2019-2022 Free Software Foundation, Inc.
+# Copyright 2019-2023 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/tests/multibyte-white-space b/tests/multibyte-white-space
index d7c57cd6..2254a127 100755
--- a/tests/multibyte-white-space
+++ b/tests/multibyte-white-space
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Test whether \s matches SP and UTF-8 multi-byte white space characters.
 #
-# Copyright (C) 2013-2022 Free Software Foundation, Inc.
+# Copyright (C) 2013-2023 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/multiple-begin-or-end-line b/tests/multiple-begin-or-end-line
index bbb55666..859a9e53 100755
--- a/tests/multiple-begin-or-end-line
+++ b/tests/multiple-begin-or-end-line
@@ -2,7 +2,7 @@
 # Test a pattern of multiple begin or end line constraints.
 # This would mistakenly print a line when using grep-2.19.
 
-# Copyright 2014-2022 Free Software Foundation, Inc.
+# Copyright 2014-2023 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/tests/null-byte b/tests/null-byte
index a17eef8c..b2fccbea 100755
--- a/tests/null-byte
+++ b/tests/null-byte
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Test NUL bytes in patterns and data.
 
-# Copyright 2014-2022 Free Software Foundation, Inc.
+# Copyright 2014-2023 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/tests/options b/tests/options
index c81d1230..5d9426bb 100755
--- a/tests/options
+++ b/tests/options
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Test for POSIX options for grep
 #
-# Copyright (C) 2001, 2006, 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2006, 2009-2023 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/pcre b/tests/pcre
index f2c63c8b..dc8b90d5 100755
--- a/tests/pcre
+++ b/tests/pcre
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Simple PCRE tests.
 #
-# Copyright (C) 2001, 2006, 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2006, 2009-2023 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/pcre-abort b/tests/pcre-abort
index 5ad8e1f0..3bce7920 100755
--- a/tests/pcre-abort
+++ b/tests/pcre-abort
@@ -2,7 +2,7 @@
 # Show that grep handles PCRE2_ERROR_MATCHLIMIT.
 # In grep-2.8, it would abort.
 #
-# Copyright (C) 2011-2022 Free Software Foundation, Inc.
+# Copyright (C) 2011-2023 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/pcre-ascii-digits b/tests/pcre-ascii-digits
new file mode 100755
index 00000000..9dfc0fae
--- /dev/null
+++ b/tests/pcre-ascii-digits
@@ -0,0 +1,55 @@
+#!/bin/sh
+# Ensure that grep -P's \d matches only the 10 ASCII digits.
+# With, grep-3.9, \d would match e.g., the multibyte Arabic digits.
+# The same applied to \D.
+#
+# Copyright (C) 2023 Free Software Foundation, Inc.
+#
+# Copying and distribution of this file, with or without modification,
+# are permitted in any medium without royalty provided the copyright
+# notice and this notice are preserved.
+
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+require_en_utf8_locale_
+LC_ALL=en_US.UTF-8
+export LC_ALL
+require_pcre_
+
+echo . | grep -qP '(*UTF).' 2>/dev/null \
+  || skip_ 'PCRE unicode support is compiled out'
+echo 0 | grep -qP '(?aD)\d' \
+  || skip_ 'PCRE 10.42 and older lack PCRE2_EXTRA_ASCII_BSD'
+
+fail=0
+
+# $ printf %s ٠١٢٣٤٥٦٧٨٩|od -An -to1 -w10 |sed 's/ /\\/g'; : arabic digits
+# \331\240\331\241\331\242\331\243\331\244
+# \331\245\331\246\331\247\331\250\331\251
+printf '\331\240\331\241\331\242\331\243\331\244' > in || framework_failure_
+printf '\331\245\331\246\331\247\331\250\331\251' >> in || framework_failure_
+printf '\n' >> in || framework_failure_
+
+# Ensure that \d matches no character.
+returns_ 1 grep -P '\d' in > out || fail=1
+compare /dev/null out || fail=1
+
+# Ensure that ^\D+$ matches the entire line.
+grep -P '^\D+$' in > out || fail=1
+compare in out || fail=1
+
+# When built with PCRE2 10.43 and newer, one may use (?aD) and (?-aD)
+# to toggle between modes.  (?aD) is the default (making \d == [0-9]).
+# (?-aD) relaxes \d, making it match "all" digits.
+# Use mixed digits as input: Arabic 0 and ASCII 4: ٠4
+printf '\331\2404\n' > in2 || framework_failure_
+
+returns_ 1 grep -P '\d\d' in2 > out || fail=1
+compare /dev/null out || fail=1
+
+grep -P '(?-aD)\d(?aD)\d' in2 > out || fail=1
+compare in2 out || fail=1
+
+returns_ 1 grep -P '\d(?-aD)\d' in2 > out || fail=1
+compare /dev/null out || fail=1
+
+Exit $fail
diff --git a/tests/pcre-count b/tests/pcre-count
index 4e289c2a..66d0b59e 100755
--- a/tests/pcre-count
+++ b/tests/pcre-count
@@ -2,7 +2,7 @@
 # grep -P / grep -Pc are inconsistent results
 # This bug affected grep versions 2.21 through 2.22.
 #
-# Copyright (C) 2015-2022 Free Software Foundation, Inc.
+# Copyright (C) 2015-2023 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/pcre-infloop b/tests/pcre-infloop
index abcda5dc..6958c619 100755
--- a/tests/pcre-infloop
+++ b/tests/pcre-infloop
@@ -2,7 +2,7 @@
 # With some versions of libpcre, apparently including 8.35,
 # the following would trigger an infinite loop in its match function.
 
-# Copyright 2014-2022 Free Software Foundation, Inc.
+# Copyright 2014-2023 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/tests/pcre-invalid-utf8-infloop b/tests/pcre-invalid-utf8-infloop
index 6bb8bedd..fc296939 100755
--- a/tests/pcre-invalid-utf8-infloop
+++ b/tests/pcre-invalid-utf8-infloop
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Ensure that grep -oaP doesn't infloop for invalid multi-byte input
 #
-# Copyright (C) 2015-2022 Free Software Foundation, Inc.
+# Copyright (C) 2015-2023 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/pcre-invalid-utf8-input b/tests/pcre-invalid-utf8-input
index 635909a5..99ff32cb 100755
--- a/tests/pcre-invalid-utf8-input
+++ b/tests/pcre-invalid-utf8-input
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Ensure that grep -P doesn't abort or infloop for invalid multi-byte input
 #
-# Copyright (C) 2013-2022 Free Software Foundation, Inc.
+# Copyright (C) 2013-2023 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/pcre-jitstack b/tests/pcre-jitstack
index a5582908..e4b2cedb 100755
--- a/tests/pcre-jitstack
+++ b/tests/pcre-jitstack
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Grep 2.21 would report "grep: internal PCRE error: -27"
 #
-# Copyright 2015-2022 Free Software Foundation, Inc.
+# Copyright 2015-2023 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/pcre-o b/tests/pcre-o
index 31cdd4a2..9e41e910 100755
--- a/tests/pcre-o
+++ b/tests/pcre-o
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Ensure that grep -oP doesn't cause internal error at match.
 #
-# Copyright (C) 2014-2022 Free Software Foundation, Inc.
+# Copyright (C) 2014-2023 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/pcre-utf8 b/tests/pcre-utf8
index a1f5c0c4..4d97e69c 100755
--- a/tests/pcre-utf8
+++ b/tests/pcre-utf8
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Ensure that, with -P, Unicode \p{} symbols are correctly matched.
 #
-# Copyright (C) 2012-2022 Free Software Foundation, Inc.
+# Copyright (C) 2012-2023 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
@@ -14,7 +14,7 @@ LC_ALL=en_US.UTF-8 require_pcre_
 fail=0
 
 echo '$' | LC_ALL=en_US.UTF-8 grep -qP '\p{S}' \
-  || skip_ 'PCRE support is compiled out, or it does not support properties'
+  || skip_ 'PCRE unicode support is compiled out'
 
 euro='\342\202\254 euro'
 printf "$euro\\n" > in || framework_failure_
diff --git a/tests/pcre-utf8-bug224 b/tests/pcre-utf8-bug224
new file mode 100755
index 00000000..78845017
--- /dev/null
+++ b/tests/pcre-utf8-bug224
@@ -0,0 +1,31 @@
+#!/bin/sh
+# Ensure negated Perl classes match multibyte characters in UTF mode.
+#
+# Copyright (C) 2023 Free Software Foundation, Inc.
+#
+# Copying and distribution of this file, with or without modification,
+# are permitted in any medium without royalty provided the copyright
+# notice and this notice are preserved.
+
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+require_en_utf8_locale_
+LC_ALL=en_US.UTF-8
+export LC_ALL
+require_pcre_
+
+echo . | grep -qP '(*UTF).' 2>/dev/null \
+  || skip_ 'PCRE unicode support is compiled out'
+
+fail=0
+
+# 'ñ' - U+00F1 LATIN SMALL LETTER N WITH TILDE
+printf '\302\221\n' > in || framework_failure_
+grep -P '\D' in > out || fail=1
+compare in out || fail=1
+
+# '𝄞' - U+1D11E MUSICAL SYMBOL G CLEF
+printf '\360\235\204\236\n' > in || framework_failure_
+grep -P '\W' in > out || fail=1
+compare in out || fail=1
+
+Exit $fail
diff --git a/tests/pcre-utf8-w b/tests/pcre-utf8-w
new file mode 100755
index 00000000..aa347840
--- /dev/null
+++ b/tests/pcre-utf8-w
@@ -0,0 +1,34 @@
+#!/bin/sh
+# Ensure non-ASCII UTF-8 characters are correctly identified as
+# word-constituents
+#
+# Copyright (C) 2023 Free Software Foundation, Inc.
+#
+# Copying and distribution of this file, with or without modification,
+# are permitted in any medium without royalty provided the copyright
+# notice and this notice are preserved.
+
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+require_en_utf8_locale_
+LC_ALL=en_US.UTF-8
+export LC_ALL
+require_pcre_
+
+echo . | grep -qP '(*UTF).' 2>/dev/null \
+  || skip_ 'PCRE unicode support is compiled out'
+echo 0 | grep -qP '(?aD)\d' \
+  || skip_ 'PCRE 10.42 and older lack PCRE2_EXTRA_ASCII_BSD'
+
+fail=0
+
+echo 'Perú' > in || framework_failure_
+
+echo 'ú' > exp || framework_failure_
+grep -Po '.\b' in > out || fail=1
+compare exp out || fail=1
+
+echo 'rú' > exp || framework_failure_
+grep -Po 'r\w' in > out || fail=1
+compare exp out || fail=1
+
+Exit $fail
diff --git a/tests/pcre-w b/tests/pcre-w
index ef155c36..c37c0573 100755
--- a/tests/pcre-w
+++ b/tests/pcre-w
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Before grep-2.19, grep -Pw %% would match %% enclosed in word boundaries
 #
-# Copyright (C) 2014-2022 Free Software Foundation, Inc.
+# Copyright (C) 2014-2023 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/pcre-wx-backref b/tests/pcre-wx-backref
index 1307f254..d7808e02 100755
--- a/tests/pcre-wx-backref
+++ b/tests/pcre-wx-backref
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Before grep-2.19, grep -P and -w/-x would not work with a back-reference.
 #
-# Copyright (C) 2014-2022 Free Software Foundation, Inc.
+# Copyright (C) 2014-2023 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/posix-bracket b/tests/posix-bracket
index d8b4c5ff..12ced377 100755
--- a/tests/posix-bracket
+++ b/tests/posix-bracket
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Check various bracket expressions in the POSIX locale.
 
-# Copyright 2014-2022 Free Software Foundation, Inc.
+# Copyright 2014-2023 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/tests/proc b/tests/proc
index 78ce7d72..ebad1861 100755
--- a/tests/proc
+++ b/tests/proc
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Test the /proc file system if available.
 
-# Copyright 2016-2022 Free Software Foundation, Inc.
+# Copyright 2016-2023 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/skip-read b/tests/skip-read
index 1e9e7184..0006443e 100755
--- a/tests/skip-read
+++ b/tests/skip-read
@@ -9,12 +9,10 @@ echo /dev/null >exp || framework_failure_
 
 for opts in '-m0 y' '-f /dev/null' '-v ""'; do
   for matcher in '' -E -F; do
-    for file in /dev/null no-such-file; do
-      eval returns_ 1 grep $opts $matcher no-such-file > out || fail=1
-      compare /dev/null out || fail=1
-      eval returns_ 1 grep -l $opts $matcher /dev/null > out || fail=1
-      compare /dev/null out || fail=1
-    done
+    eval returns_ 1 grep $opts $matcher no-such-file > out || fail=1
+    compare /dev/null out || fail=1
+    eval returns_ 1 grep -l $opts $matcher /dev/null > out || fail=1
+    compare /dev/null out || fail=1
     eval returns_ 1 grep -L $opts $matcher /dev/null > out || fail=1
     compare exp out || fail=1
     eval returns_ 1 grep -L $opts $matcher /dev/null > /dev/null || fail=1
diff --git a/tests/spencer1 b/tests/spencer1
index 91769963..bad700a4 100755
--- a/tests/spencer1
+++ b/tests/spencer1
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Regression test for GNU grep.
 # Copyright (C) 1988 Henry Spencer.
-# Copyright (C) 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2009-2023 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/spencer1-locale b/tests/spencer1-locale
index cc8cd3da..54a84220 100755
--- a/tests/spencer1-locale
+++ b/tests/spencer1-locale
@@ -2,7 +2,7 @@
 # Regression test for GNU grep.
 #
 # Copyright (C) 1988 Henry Spencer.
-# Copyright (C) 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2009-2023 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/spencer1-locale.awk b/tests/spencer1-locale.awk
index f6595733..a3003c42 100644
--- a/tests/spencer1-locale.awk
+++ b/tests/spencer1-locale.awk
@@ -1,5 +1,5 @@
 # Copyright (C) 1988 Henry Spencer.
-# Copyright (C) 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2009-2023 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/spencer1.awk b/tests/spencer1.awk
index 162e8a96..98bb25ad 100644
--- a/tests/spencer1.awk
+++ b/tests/spencer1.awk
@@ -1,5 +1,5 @@
 # Copyright (C) 1988 Henry Spencer.
-# Copyright (C) 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2009-2023 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/status b/tests/status
index 5c02d98a..83781ce8 100755
--- a/tests/status
+++ b/tests/status
@@ -5,7 +5,7 @@
 #  1 no match
 #  2 file not found
 #
-# Copyright (C) 2001, 2006, 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2006, 2009-2023 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/surrogate-pair b/tests/surrogate-pair
index 2c859fcd..bc344512 100755
--- a/tests/surrogate-pair
+++ b/tests/surrogate-pair
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Check the handling of characters outside the Unicode BMP.
 
-# Copyright (C) 2013-2022 Free Software Foundation, Inc.
+# Copyright (C) 2013-2023 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/tests/surrogate-search b/tests/surrogate-search
index da085d35..7dfea54a 100755
--- a/tests/surrogate-search
+++ b/tests/surrogate-search
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Check characters outside the Unicode BMP in the search string.
 
-# Copyright 2021-2022 Free Software Foundation, Inc.
+# Copyright 2021-2023 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -28,15 +28,20 @@ esac
 
 fail=0
 
-s_pair=$(printf '\360\220\220\205')
-printf '%s\n' "$s_pair" > in || framework_failure_
-
 LC_ALL=en_US.UTF-8
 export LC_ALL
 
+# On platforms like 32-bit AIX where WCHAR_MAX == 0xFFFF, skip this check,
+# since the corresponding Unicode characters are not supported.
+printf '\360\220\200\200\n' >in || framework_failure_
+grep '^.$' in >out || fail=1
+compare in out || skip_ 'platform does not support U+10000'
+
+printf '\360\220\220\205\n' > in || framework_failure_
+
 for opt in '' -i -E -F -iE -iF; do
   grep --file=in $opt in > out 2>&1 || fail=1
-  compare out in || fail=1
+  compare in out || fail=1
 done
 
 Exit $fail
diff --git a/tests/symlink b/tests/symlink
index dce0cc1c..1132ffd0 100755
--- a/tests/symlink
+++ b/tests/symlink
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Check that "grep -r" does the right thing with symbolic links.
 
-# Copyright (C) 2012-2022 Free Software Foundation, Inc.
+# Copyright (C) 2012-2023 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/tests/triple-backref b/tests/triple-backref
index d9de8010..15dbdbf9 100755
--- a/tests/triple-backref
+++ b/tests/triple-backref
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Test for a bug in glibc's regex code as of September 7, 2014.
 #
-# Copyright (C) 2014-2022 Free Software Foundation, Inc.
+# Copyright (C) 2014-2023 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/turkish-I b/tests/turkish-I
index 05d6f2a8..2a47bfaf 100755
--- a/tests/turkish-I
+++ b/tests/turkish-I
@@ -1,7 +1,7 @@
 #!/bin/sh
 # grep -i in UTF-8: missing NL in output on line containing I WITH DOT (U+0130)
 
-# Copyright (C) 2011-2022 Free Software Foundation, Inc.
+# Copyright (C) 2011-2023 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/tests/turkish-I-without-dot b/tests/turkish-I-without-dot
index 44a3117f..09dae02f 100755
--- a/tests/turkish-I-without-dot
+++ b/tests/turkish-I-without-dot
@@ -3,7 +3,7 @@
 # (like "I" in the tr_TR.utf8 locale) whose lower-case representation
 # occupies more bytes (two in this case, for 0xc4b1, aka U+0131).
 
-# Copyright (C) 2011-2022 Free Software Foundation, Inc.
+# Copyright (C) 2011-2023 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/tests/turkish-eyes b/tests/turkish-eyes
index 64fc3b0d..a2adca0c 100755
--- a/tests/turkish-eyes
+++ b/tests/turkish-eyes
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Ensure that case-insensitive matching works with all Turkish i's
 
-# Copyright (C) 2014-2022 Free Software Foundation, Inc.
+# Copyright (C) 2014-2023 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/tests/two-chars b/tests/two-chars
index ad549a50..aeb5dc86 100755
--- a/tests/two-chars
+++ b/tests/two-chars
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Check for grep -F with two patterns consisting of the same char.
 #
-# Copyright 2016-2022 Free Software Foundation, Inc.
+# Copyright 2016-2023 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/two-files b/tests/two-files
index 41ed6daf..f6034d99 100755
--- a/tests/two-files
+++ b/tests/two-files
@@ -2,7 +2,7 @@
 # Read two files, of increasing size.
 # With ASAN, this would have triggered a false-positive read of poisoned memory.
 #
-# Copyright 2015-2022 Free Software Foundation, Inc.
+# Copyright 2015-2023 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/unibyte-binary b/tests/unibyte-binary
index 64c2bd3d..f89a7ce3 100755
--- a/tests/unibyte-binary
+++ b/tests/unibyte-binary
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Test binary files in unibyte locales with encoding errors
 
-# Copyright 2016-2022 Free Software Foundation, Inc.
+# Copyright 2016-2023 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/tests/unibyte-bracket-expr b/tests/unibyte-bracket-expr
index 0ed62842..2a100cb8 100755
--- a/tests/unibyte-bracket-expr
+++ b/tests/unibyte-bracket-expr
@@ -5,7 +5,7 @@
 # ru_RU.KOI8-R for any C whose wide-char representation differed from
 # its single-byte equivalent.
 
-# Copyright (C) 2011-2022 Free Software Foundation, Inc.
+# Copyright (C) 2011-2023 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/tests/unibyte-negated-circumflex b/tests/unibyte-negated-circumflex
index 3f47a1b5..13785824 100755
--- a/tests/unibyte-negated-circumflex
+++ b/tests/unibyte-negated-circumflex
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Exercise a bug where [^^-^] was treated as if it were [^-^].
 
-# Copyright 2014-2022 Free Software Foundation, Inc.
+# Copyright 2014-2023 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/tests/utf8-bracket b/tests/utf8-bracket
index 2e10db5b..c1cb3a51 100755
--- a/tests/utf8-bracket
+++ b/tests/utf8-bracket
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Check bracket expressions in a UTF-8 locale.
 
-# Copyright 2015-2022 Free Software Foundation, Inc.
+# Copyright 2015-2023 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/tests/version-pcre b/tests/version-pcre
new file mode 100755
index 00000000..c7bb182f
--- /dev/null
+++ b/tests/version-pcre
@@ -0,0 +1,15 @@
+#! /bin/sh
+# Test for presence of pcre version number in --version output.
+#
+# Copyright (C) 2023 Free Software Foundation, Inc.
+#
+# Copying and distribution of this file, with or without modification,
+# are permitted in any medium without royalty provided the copyright
+# notice and this notice are preserved.
+
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+
+grep -q '^#define HAVE_LIBPCRE 1' "$CONFIG_HEADER" \
+  || skip_ 'built without PCRE support'
+
+grep --version | grep -qP '^grep -P uses PCRE2 [\d.]+'
diff --git a/tests/write-error-msg b/tests/write-error-msg
index 8cb1d26b..018f24b2 100755
--- a/tests/write-error-msg
+++ b/tests/write-error-msg
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Ensure that output errors are reported with errno information.
 
-# Copyright 2016-2022 Free Software Foundation, Inc.
+# Copyright 2016-2023 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/tests/y2038-vs-32-bit b/tests/y2038-vs-32-bit
new file mode 100755
index 00000000..3d3e9ae5
--- /dev/null
+++ b/tests/y2038-vs-32-bit
@@ -0,0 +1,13 @@
+#!/bin/sh
+# This would fail with grep-3.9 and 3.10 on 32-bit ARM and x86 hosts.
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+
+fail=0
+
+echo text > in || framework_failure_
+touch -t 203901010000 in || skip_ 'touch -t 2039... failed'
+grep t in > out 2> err || fail=1
+compare in out || fail=1
+compare /dev/null err || fail=1
+
+Exit $fail
diff --git a/tests/yesno b/tests/yesno
index 204196c2..d6bf8897 100755
--- a/tests/yesno
+++ b/tests/yesno
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Test feature interaction of -C, -v, -o, and -m.
 #
-# Copyright (C) 2001, 2006, 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2006, 2009-2023 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/z-anchor-newline b/tests/z-anchor-newline
index 5f9667c3..76f778a6 100755
--- a/tests/z-anchor-newline
+++ b/tests/z-anchor-newline
@@ -2,7 +2,7 @@
 # grep -z with an anchor in the regex could mistakenly match text
 # including a newline.
 
-# Copyright 2016-2022 Free Software Foundation, Inc.
+# Copyright 2016-2023 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

More details

Full run details

Historical runs