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\ }}
+\def\amprm#1 {\ampseentrue{\rm\ }}
\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